@ -3,42 +3,55 @@
<!-- 地图区域 -- >
<!-- 地图区域 -- >
< div id = "g-container" : style = "{ width: '100%', height: '100%' }" / >
< div id = "g-container" : style = "{ width: '100%', height: '100%' }" / >
<!-- 绘制面板 -- >
<!-- 绘制面板 -- >
< div
< div class = "g-action-panel" : style = "{ right: drawVisible ? '316px' : '16px' }" >
class = "g-action-panel"
< div : class = "state.currentType === 'pin' ? 'g-action-item selection' : 'g-action-item'"
: style = "{ right: drawVisible ? '316px' : '16px' }"
@ click = "draw('pin', true)" >
>
< div : class = "state.currentType === 'pin' ? 'g-action-item selection' : 'g-action-item'" @ click = "draw('pin', true)" >
< a > < a -image :src ="pin" :preview ="false" / > < / a >
< a > < a -image :src ="pin" :preview ="false" / > < / a >
< / div >
< / div >
< div : class = "state.currentType === 'polyline' ? 'g-action-item selection' : 'g-action-item'" @ click = "draw('polyline', true)" >
< div : class = "state.currentType === 'polyline' ? 'g-action-item selection' : 'g-action-item'"
< a > < LineOutlined :rotate ="135" class = "fz20" / > < / a >
@ click = "draw('polyline', true)" >
< a >
< LineOutlined :rotate ="135" class = "fz20" / >
< / a >
< / div >
< / div >
< div : class = "state.currentType === 'polygon' && !state.isFlightArea ? 'g-action-item selection' : 'g-action-item'" @ click = "draw('polygon', true)" >
< div : class = "state.currentType === 'polygon' && !state.isFlightArea ? 'g-action-item selection' : 'g-action-item'"
< a > < BorderOutlined class = "fz18" / > < / a >
@ click = "draw('polygon', true)" >
< a >
< BorderOutlined class = "fz18" / >
< / a >
< / div >
< / div >
< FlightAreaActionIcon class = "g-action-item mt10" : class = "{'selection': mouseMode && state.isFlightArea}" @select-action ="selectFlightAreaAction" @click ="selectFlightAreaAction" / >
< FlightAreaActionIcon class = "g-action-item mt10" : class = "{ 'selection': mouseMode && state.isFlightArea }"
@ select - action = "selectFlightAreaAction" @ click = "selectFlightAreaAction" / >
< div v-if ="mouseMode" class="g-action-item" @click="draw('off', false)" >
< div v-if ="mouseMode" class="g-action-item" @click="draw('off', false)" >
< a style = "color: red;" > < CloseOutlined / > < / a >
< a style = "color: red;" >
< CloseOutlined / >
< / a >
< / div >
< / div >
< / div >
< / div >
<!-- 飞机OSD -- >
<!-- 飞机OSD -- >
< div v-if ="osdVisible.visible && !osdVisible.is_dock" v-drag-window class="osd-panel fz12" >
< div v-if ="osdVisible.visible && !osdVisible.is_dock" v-drag-window class="osd-panel fz12" >
< div class = "drag-title pl5 pr5 flex-align-center flex-row flex-justify-between" style = "border-bottom: 1px solid #515151; height: 18%;" >
< div class = "drag-title pl5 pr5 flex-align-center flex-row flex-justify-between"
style = "border-bottom: 1px solid #515151; height: 18%;" >
< span > { { osdVisible . callsign } } < / span >
< span > { { osdVisible . callsign } } < / span >
< span > < a class = "fz16" style = "color: white;" @ click = "() => osdVisible.visible = false" > < CloseOutlined / > < / a > < / span >
< span > < a class = "fz16" style = "color: white;" @ click = "() => osdVisible.visible = false" >
< CloseOutlined / >
< / a > < / span >
< / div >
< / div >
< div style = "height: 82%;" >
< div style = "height: 82%;" >
< div class = "flex-column flex-align-center flex-justify-center" style = "margin-top: -5px; padding-top: 25px; float: left; width: 60px; background: #2d2d2d;" >
< div class = "flex-column flex-align-center flex-justify-center"
style = "margin-top: -5px; padding-top: 25px; float: left; width: 60px; background: #2d2d2d;" >
< a -tooltip :title ="osdVisible.model" >
< a -tooltip :title ="osdVisible.model" >
< div style = "width: 90%;" class = "flex-column flex-align-center flex-justify-center" >
< div style = "width: 90%;" class = "flex-column flex-align-center flex-justify-center" >
< span > < a -image :src ="M30" :preview ="false" / > < / span >
< span > < a -image :src ="M30" :preview ="false" / > < / span >
< span > { { osdVisible . model } } < / span >
< span > { { osdVisible . model } } < / span >
< / div >
< / div >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / div >
< / div >
< div class = "osd" >
< div class = "osd" >
< a -row >
< a -row >
< a -col span = "16" : style = "deviceInfo.device.mode_code === EModeCode.Disconnected ? 'color: red; font-weight: 700;': 'color: rgb(25,190,107)'" > { { EModeCode [ deviceInfo . device . mode _code ] } } < / a - c o l >
< a -col span = "16" : style = " deviceInfo.device.mode_code = = = EModeCode.Disconnected ?
'color: red; font-weight: 700;' : 'color: rgb(25,190,107)' " >
{ { EModeCode [ deviceInfo . device . mode _code ] } } < / a - c o l >
< / a - r o w >
< / a - r o w >
< a -row >
< a -row >
< a -col span = "6" >
< a -col span = "6" >
@ -49,15 +62,22 @@
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "RC Battery Level" >
< a -tooltip title = "RC Battery Level" >
< span > < ThunderboltOutlined class = "fz14" / > < / span >
< span >
< span class = "ml10" > { { deviceInfo . gateway && deviceInfo . gateway . capacity _percent !== str ? deviceInfo . gateway ? . capacity _percent + ' %' : deviceInfo . gateway ? . capacity _percent } } < / span >
< ThunderboltOutlined class = "fz14" / >
< / span >
< span class = "ml10" > { { deviceInfo . gateway && deviceInfo . gateway . capacity _percent !== str ?
deviceInfo . gateway ? . capacity _percent + ' %' : deviceInfo . gateway ? . capacity _percent } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Drone Battery Level" >
< a -tooltip title = "Drone Battery Level" >
< span > < ThunderboltOutlined class = "fz14" / > < / span >
< span >
< span class = "ml10" > { { deviceInfo . device . battery . capacity _percent !== str ? deviceInfo . device . battery . capacity _percent + ' %' : deviceInfo . device . battery . capacity _percent } } < / span >
< ThunderboltOutlined class = "fz14" / >
< / span >
< span class = "ml10" > { { deviceInfo . device . battery . capacity _percent !== str ?
deviceInfo . device . battery . capacity _percent + ' %' : deviceInfo . device . battery . capacity _percent
} } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< / a - r o w >
< / a - r o w >
@ -65,7 +85,8 @@
< a -tooltip title = "RTK Fixed" >
< a -tooltip title = "RTK Fixed" >
< a -col span = "6" class = "flex-row flex-align-center flex-justify-start" >
< a -col span = "6" class = "flex-row flex-align-center flex-justify-start" >
< span > Fixed < / span >
< span > Fixed < / span >
< span class = "ml10 circle" : style = "deviceInfo.device.position_state.is_fixed === 1 ? 'backgroud: rgb(25,190,107);' : ' background: red;'" > < / span >
< span class = "ml10 circle"
: style = "deviceInfo.device.position_state.is_fixed === 1 ? 'backgroud: rgb(25,190,107);' : ' background: red;'" > < / span >
< / a - c o l >
< / a - c o l >
< / a - t o o l t i p >
< / a - t o o l t i p >
< a -col span = "6" >
< a -col span = "6" >
@ -76,7 +97,9 @@
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "RTK" >
< a -tooltip title = "RTK" >
< span > < TrademarkOutlined class = "fz14" / > < / span >
< span >
< TrademarkOutlined class = "fz14" / >
< / span >
< span class = "ml10" > { { deviceInfo . device . position _state . rtk _number } } < / span >
< span class = "ml10" > { { deviceInfo . device . position _state . rtk _number } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
@ -84,26 +107,33 @@
< a -row >
< a -row >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Flight Mode" >
< a -tooltip title = "Flight Mode" >
< span > < ControlOutlined class = "fz16" / > < / span >
< span >
< ControlOutlined class = "fz16" / >
< / span >
< span class = "ml10" > { { EGear [ deviceInfo . device . gear ] } } < / span >
< span class = "ml10" > { { EGear [ deviceInfo . device . gear ] } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Altitude above sea level" >
< a -tooltip title = "Altitude above sea level" >
< span > ASL < / span >
< span > ASL < / span >
< span class = "ml10" > { { deviceInfo . device . height === str ? str : deviceInfo . device . height . toFixed ( 2 ) + ' m' } } < / span >
< span class = "ml10" >
{ { deviceInfo . device . height === str ? str : Number ( deviceInfo . device . height ) . toFixed ( 2 ) + 'm' } }
< / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Altitude above takeoff level" >
< a -tooltip title = "Altitude above takeoff level" >
< span > ALT < / span >
< span > ALT < / span >
< span class = "ml10" > { { deviceInfo . device . elevation === str ? str : deviceInfo . device . elevation . toFixed ( 2 ) + ' m' } } < / span >
< span class = "ml10" >
{ { deviceInfo . device . elevation === str ? str : Number ( deviceInfo . device . elevation ) . toFixed ( 2 ) + ' m'
} } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Distance to Home Point" >
< a -tooltip title = "Distance to Home Point" >
< span > H < / span >
< span > H < / span >
< span class = "ml10" > { { deviceInfo . device . home _distance === str ? str : deviceInfo . device . home _distance . toFixed ( 2 ) + ' m' } } < / span >
< span class = "ml10" > { { deviceInfo . device . home _distance === str ?
str : Number ( deviceInfo . device . home _distance ) . toFixed ( 2 ) + ' m' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< / a - r o w >
< / a - r o w >
@ -111,19 +141,22 @@
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Horizontal Speed" >
< a -tooltip title = "Horizontal Speed" >
< span > H . S < / span >
< span > H . S < / span >
< span class = "ml10" > { { deviceInfo . device . horizontal _speed === str ? str : deviceInfo . device . horizontal _speed . toFixed ( 2 ) + ' m/s' } } < / span >
< span class = "ml10" > { { deviceInfo . device . horizontal _speed === str ?
str : Number ( deviceInfo . device . horizontal _speed ) . toFixed ( 2 ) + ' m/s' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Vertical Speed" >
< a -tooltip title = "Vertical Speed" >
< span > V . S < / span >
< span > V . S < / span >
< span class = "ml10" > { { deviceInfo . device . vertical _speed === str ? str : deviceInfo . device . vertical _speed . toFixed ( 2 ) + ' m/s' } } < / span >
< span class = "ml10" > { { deviceInfo . device . vertical _speed === str ? str :
Number ( deviceInfo . device . vertical _speed ) . toFixed ( 2 ) + ' m/s' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Wind Speed" >
< a -tooltip title = "Wind Speed" >
< span > W . S < / span >
< span > W . S < / span >
< span class = "ml10" > { { deviceInfo . device . wind _speed === str ? str : ( deviceInfo . device . wind _speed / 10 ) . toFixed ( 2 ) + ' m/s' } } < / span >
< span class = "ml10" > { { deviceInfo . device . wind _speed === str ? str :
( Number ( deviceInfo . device . wind _speed ) / 10 ) . toFixed ( 2 ) + ' m/s' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< / a - r o w >
< / a - r o w >
@ -131,54 +164,71 @@
< / div >
< / div >
< div class = "battery-slide" v-if ="deviceInfo.device.battery.remain_flight_time !== 0" >
< div class = "battery-slide" v-if ="deviceInfo.device.battery.remain_flight_time !== 0" >
< div style = "background: #535759;" class = "width-100" > < / div >
< div style = "background: #535759;" class = "width-100" > < / div >
< div class = "capacity-percent" : style = "{ width: deviceInfo.device.battery.capacity_percent + '%'}" > < / div >
< div class = "capacity-percent" : style = "{ width: deviceInfo.device.battery.capacity_percent + '%' }" > < / div >
< div class = "return-home" : style = "{ width: deviceInfo.device.battery.return_home_power + '%'}" > < / div >
< div class = "return-home" : style = "{ width: deviceInfo.device.battery.return_home_power + '%' }" > < / div >
< div class = "landing" : style = "{ width: deviceInfo.device.battery.landing_power + '%'}" > < / div >
< div class = "landing" : style = "{ width: deviceInfo.device.battery.landing_power + '%' }" > < / div >
< div class = "white-point" : style = "{ left: deviceInfo.device.battery.landing_power + '%'}" > < / div >
< div class = "white-point" : style = "{ left: deviceInfo.device.battery.landing_power + '%' }" > < / div >
< div class = "battery" : style = "{ left: deviceInfo.device.battery.capacity_percent + '%' }" >
< div class = "battery" : style = "{ left: deviceInfo.device.battery.capacity_percent + '%' }" >
{ { Math . floor ( deviceInfo . device . battery . remain _flight _time / 60 ) } } :
{ { Math . floor ( deviceInfo . device . battery . remain _flight _time / 60 ) } } :
{ { 10 > ( deviceInfo . device . battery . remain _flight _time % 60 ) ? '0' : '' } } { { deviceInfo . device . battery . remain _flight _time % 60 } }
{ { 10 > ( deviceInfo . device . battery . remain _flight _time % 60 ) ? '0' :
'' } } { { deviceInfo . device . battery . remain _flight _time % 60 } }
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
<!-- 机场OSD -- >
<!-- 机场OSD -- >
< div v-if ="osdVisible.visible && osdVisible.is_dock" v-drag-window class="osd-panel fz12" >
< div v-if ="osdVisible.visible && osdVisible.is_dock" v-drag-window class="osd-panel fz12" >
< div class = "drag-title fz16 pl5 pr5 flex-align-center flex-row flex-justify-between" style = "border-bottom: 1px solid #515151; height: 10%;" >
< div class = "drag-title fz16 pl5 pr5 flex-align-center flex-row flex-justify-between"
style = "border-bottom: 1px solid #515151; height: 10%;" >
< span > { { osdVisible . gateway _callsign } } < / span >
< span > { { osdVisible . gateway _callsign } } < / span >
< / div >
< / div >
< span > < a style = "color: white; position: absolute; top: 5px; right: 5px;" @ click = "() => osdVisible.visible = false" > < CloseOutlined / > < / a > < / span >
< span > < a style = "color: white; position: absolute; top: 5px; right: 5px;"
@ click = "() => osdVisible.visible = false" >
< CloseOutlined / >
< / a > < / span >
<!-- 机场 -- >
<!-- 机场 -- >
< div class = "flex-display" style = "border-bottom: 1px solid #515151;" >
< div class = "flex-display" style = "border-bottom: 1px solid #515151;" >
< div class = "flex-column flex-align-stretch flex-justify-center" style = "width: 60px; background: #2d2d2d;" >
< div class = "flex-column flex-align-stretch flex-justify-center" style = "width: 60px; background: #2d2d2d;" >
< a -tooltip :title ="osdVisible.model" >
< a -tooltip :title ="osdVisible.model" >
< div class = "flex-column flex-align-center flex-justify-center" style = "width: 90%;" >
< div class = "flex-column flex-align-center flex-justify-center" style = "width: 90%;" >
< span > < RobotFilled style = "font-size: 48px;" / > < / span >
< span >
< RobotFilled style = "font-size: 48px;" / >
< / span >
< span class = "mt10" > Dock < / span >
< span class = "mt10" > Dock < / span >
< / div >
< / div >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / div >
< / div >
< div class = "osd flex-1" style = "flex: 1" >
< div class = "osd flex-1" style = "flex: 1" >
< a -row >
< a -row >
< a -col span = "16" : style = "deviceInfo.dock.basic_osd?.mode_code === EDockModeCode.Disconnected ? 'color: red; font-weight: 700;': 'color: rgb(25,190,107)'" >
< a -col span = "16"
: style = "deviceInfo.dock.basic_osd?.mode_code === EDockModeCode.Disconnected ? 'color: red; font-weight: 700;' : 'color: rgb(25,190,107)'" >
{ { EDockModeCode [ deviceInfo . dock . basic _osd ? . mode _code ] } } < / a - c o l >
{ { EDockModeCode [ deviceInfo . dock . basic _osd ? . mode _code ] } } < / a - c o l >
< / a - r o w >
< / a - r o w >
< a -row >
< a -row >
< a -col span = "12" >
< a -col span = "12" >
< a -tooltip title = "Accumulated Running Time" >
< a -tooltip title = "Accumulated Running Time" >
< span > < HistoryOutlined / > < / span >
< span >
< HistoryOutlined / >
< / span >
< span class = "ml10" >
< span class = "ml10" >
< span v-if ="deviceInfo.dock.work_osd?.acc_time >= 2592000" > {{ Math.floor ( deviceInfo.dock.work_osd ? .acc_time / 2592000 ) }} m < / span >
< span v-if ="deviceInfo.dock.work_osd?.acc_time >= 2592000" > {{
< span v-if ="(deviceInfo.dock.work_osd?.acc_time % 2592000) >= 86400" > {{ Math.floor ( ( deviceInfo.dock.work_osd ? .acc_time % 2592000 ) / 86400 ) }} d < / span >
Math . floor ( deviceInfo . dock . work _osd ? . acc _time / 2592000 ) } } m < / span >
< span v-if ="(deviceInfo.dock.work_osd?.acc_time % 2592000 % 86400) >= 3600" > {{ Math.floor ( ( deviceInfo.dock.work_osd ? .acc_time % 2592000 % 86400 ) / 3600 ) }} h < / span >
< span v-if ="(deviceInfo.dock.work_osd?.acc_time % 2592000) >= 86400" > {{
< span v-if ="(deviceInfo.dock.work_osd?.acc_time % 2592000 % 86400 % 3600) >= 60" > {{ Math.floor ( ( deviceInfo.dock.work_osd ? .acc_time % 2592000 % 86400 % 3600 ) / 60 ) }} min < / span >
Math . floor ( ( deviceInfo . dock . work _osd ? . acc _time % 2592000 ) / 86400 ) } } d < / span >
< span v-if ="(deviceInfo.dock.work_osd?.acc_time % 2592000 % 86400) >= 3600" > {{
Math . floor ( ( deviceInfo . dock . work _osd ? . acc _time % 2592000 % 86400 ) / 3600 ) } } h < / span >
< span v-if ="(deviceInfo.dock.work_osd?.acc_time % 2592000 % 86400 % 3600) >= 60" > {{
Math . floor ( ( deviceInfo . dock . work _osd ? . acc _time % 2592000 % 86400 % 3600 ) / 60 ) } } min < / span >
< span > { { Math . floor ( deviceInfo . dock . work _osd ? . acc _time % 2592000 % 86400 % 3600 % 60 ) } } s < / span >
< span > { { Math . floor ( deviceInfo . dock . work _osd ? . acc _time % 2592000 % 86400 % 3600 % 60 ) } } s < / span >
< / span >
< / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "12" >
< a -col span = "12" >
< a -tooltip title = "Activation time" >
< a -tooltip title = "Activation time" >
< span > < FieldTimeOutlined / > < / span >
< span >
< span class = "ml10" > { { new Date ( ( deviceInfo . dock . work _osd ? . activation _time ? ? 0 ) * 1000 ) . toLocaleString ( ) } }
< FieldTimeOutlined / >
< / span >
< span class = "ml10" > { { new Date ( ( deviceInfo . dock . work _osd ? . activation _time ? ? 0 ) * 1000 ) . toLocaleString ( )
} }
< / span >
< / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
@ -187,21 +237,29 @@
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Network State" >
< a -tooltip title = "Network State" >
< span :style ="qualityStyle" >
< span :style ="qualityStyle" >
< span v-if ="deviceInfo.dock.basic_osd?.network_state?.type === NetworkStateTypeEnum.FOUR_G" > < SignalFilled / > < / span >
< span v-if ="deviceInfo.dock.basic_osd?.network_state?.type === NetworkStateTypeEnum.FOUR_G" >
< span v-else > < GlobalOutlined / > < / span >
< SignalFilled / >
< / span >
< span v-else >
< GlobalOutlined / >
< / span >
< / span >
< span class = "ml10" > { { deviceInfo . dock . basic _osd ? . network _state ? . rate } } kb / s < / span >
< / span >
< span class = "ml10" > { { deviceInfo . dock . basic _osd ? . network _state ? . rate } } kb / s < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "The total number of times the dock has performed missions." >
< a -tooltip title = "The total number of times the dock has performed missions." >
< span > < CarryOutOutlined / > < / span >
< span >
< span class = "ml10" > { { deviceInfo . dock . work _osd ? . job _number } } < / span >
< CarryOutOutlined / >
< / span >
< span class = "ml10" > { { deviceInfo . dock . work _osd ? . job _number } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Media File Remain Upload" >
< a -tooltip title = "Media File Remain Upload" >
< span > < CloudUploadOutlined class = "fz14" / > < / span >
< span >
< CloudUploadOutlined class = "fz14" / >
< / span >
< span class = "ml10" > { { deviceInfo . dock . link _osd ? . media _file _detail ? . remain _upload } } < / span >
< span class = "ml10" > { { deviceInfo . dock . link _osd ? . media _file _detail ? . remain _upload } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
@ -211,10 +269,14 @@
< p > total : { { deviceInfo . dock . basic _osd ? . storage ? . total } } < / p >
< p > total : { { deviceInfo . dock . basic _osd ? . storage ? . total } } < / p >
< p > used : { { deviceInfo . dock . basic _osd ? . storage ? . used } } < / p >
< p > used : { { deviceInfo . dock . basic _osd ? . storage ? . used } } < / p >
< / template >
< / template >
< span > < FolderOpenOutlined / > < / span >
< span >
< FolderOpenOutlined / >
< / span >
< span class = "ml10" v-if ="deviceInfo.dock.basic_osd?.storage?.total > 0" >
< span class = "ml10" v-if ="deviceInfo.dock.basic_osd?.storage?.total > 0" >
< a -progress type = "circle" :width ="20" : percent = "deviceInfo.dock.basic_osd?.storage?.used * 100/ deviceInfo.dock.basic_osd?.storage?.total"
< a -progress type = "circle" :width ="20"
: strokeWidth = "20" : showInfo = "false" : strokeColor = "deviceInfo.dock.basic_osd?.storage?.used * 100 / deviceInfo.dock.basic_osd?.storage?.total > 80 ? 'red' : '#00ee8b' " / >
: percent = "deviceInfo.dock.basic_osd?.storage?.used * 100 / deviceInfo.dock.basic_osd?.storage?.total"
: strokeWidth = "20" : showInfo = "false"
: strokeColor = "deviceInfo.dock.basic_osd?.storage?.used * 100 / deviceInfo.dock.basic_osd?.storage?.total > 80 ? 'red' : '#00ee8b'" / >
< / span >
< / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
@ -223,7 +285,7 @@
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Wind Speed" >
< a -tooltip title = "Wind Speed" >
< span > W . S < / span >
< span > W . S < / span >
< span class = "ml10" > { { ( deviceInfo . dock . basic _osd ? . wind _speed ? ? str ) + ' m/s' } } < / span >
< span class = "ml10" > { { ( deviceInfo . dock . basic _osd ? . wind _speed ? ? str ) + ' m/s' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
@ -254,67 +316,84 @@
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Working Voltage" >
< a -tooltip title = "Working Voltage" >
< span style = "border: 1px solid; border-radius: 50%; width: 18px; height: 18px; line-height: 16px; text-align: center; float: left;" > V < / span >
< span
style = "border: 1px solid; border-radius: 50%; width: 18px; height: 18px; line-height: 16px; text-align: center; float: left;" > V < / span >
< span class = "ml10" > { { ( deviceInfo . dock . work _osd ? . working _voltage ? ? str ) + ' mV' } } < / span >
< span class = "ml10" > { { ( deviceInfo . dock . work _osd ? . working _voltage ? ? str ) + ' mV' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Working Current" >
< a -tooltip title = "Working Current" >
< span style = "border: 1px solid; border-radius: 50%; width: 18px; height: 18px; line-height: 15px; text-align: center; float: left;" > A < / span >
< span
style = "border: 1px solid; border-radius: 50%; width: 18px; height: 18px; line-height: 15px; text-align: center; float: left;" > A < / span >
< span class = "ml10" > { { ( deviceInfo . dock . work _osd ? . working _current ? ? str ) + ' mA' } } < / span >
< span class = "ml10" > { { ( deviceInfo . dock . work _osd ? . working _current ? ? str ) + ' mA' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Drone in dock" >
< a -tooltip title = "Drone in dock" >
< span > < RocketOutlined / > < / span >
< span >
< RocketOutlined / >
< / span >
< span class = "ml10" > { { deviceInfo . dock . basic _osd ? . drone _in _dock } } < / span >
< span class = "ml10" > { { deviceInfo . dock . basic _osd ? . drone _in _dock } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< / a - r o w >
< / a - r o w >
< a -row class = "p5" >
< a -row class = "p5" >
< a -col span = "24" >
< a -col span = "24" >
< a -button type = "primary" :disabled ="dockControlPanelVisible" size = "small" @click ="setDockControlPanelVisible(true)" >
< a -button type = "primary" :disabled ="dockControlPanelVisible" size = "small"
@ click = "setDockControlPanelVisible(true)" >
Actions
Actions
< / a - b u t t o n >
< / a - b u t t o n >
< / a - c o l >
< / a - c o l >
< / a - r o w >
< / a - r o w >
<!-- 机场控制面板 -- >
<!-- 机场控制面板 -- >
< DockControlPanel v-if ="dockControlPanelVisible" :sn="osdVisible.gateway_sn" :deviceInfo="deviceInfo" @close-control-panel="onCloseControlPanel" >
< DockControlPanel v -if = " dockControlPanelVisible " :sn ="osdVisible.gateway_sn" :deviceInfo ="deviceInfo"
@ close - control - panel = "onCloseControlPanel" >
< / DockControlPanel >
< / DockControlPanel >
< / div >
< / div >
< / div >
< / div >
<!-- 飞机 -- >
<!-- 飞机 -- >
< div class = "flex-display" >
< div class = "flex-display" >
< div class = "flex-column flex-align-stretch flex-justify-center" style = "width: 60px; background: #2d2d2d;" >
< div class = "flex-column flex-align-stretch flex-justify-center" style = "width: 60px; background: #2d2d2d;" >
< a -tooltip :title ="osdVisible.model" >
< a -tooltip :title ="osdVisible.model" >
< div style = "width: 90%;" class = "flex-column flex-align-center flex-justify-center" >
< div style = "width: 90%;" class = "flex-column flex-align-center flex-justify-center" >
< span > < a -image :src ="M30" :preview ="false" / > < / span >
< span > < a -image :src ="M30" :preview ="false" / > < / span >
< span > M30 < / span >
< span > M30 < / span >
< / div >
< / div >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / div >
< / div >
< div class = "osd flex-1" >
< div class = "osd flex-1" >
< a -row >
< a -row >
< a -col span = "16" : style = "!deviceInfo.device || deviceInfo.device?.mode_code === EModeCode.Disconnected ? 'color: red; font-weight: 700;': 'color: rgb(25,190,107)'" >
< a -col span = "16"
{ { ! deviceInfo . device ? EModeCode [ EModeCode . Disconnected ] : EModeCode [ deviceInfo . device ? . mode _code ] } } < / a - c o l >
: style = "!deviceInfo.device || deviceInfo.device?.mode_code === EModeCode.Disconnected ? 'color: red; font-weight: 700;' : 'color: rgb(25,190,107)'" >
{ { ! deviceInfo . device ? EModeCode [ EModeCode . Disconnected ] : EModeCode [ deviceInfo . device ? . mode _code ]
} } < / a - c o l >
< / a - r o w >
< / a - r o w >
< a -row >
< a -row >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Upward Quality" >
< a -tooltip title = "Upward Quality" >
< span > < SignalFilled / > < ArrowUpOutlined style = "font-size: 9px; vertical-align: top;" / > < / span >
< span >
< SignalFilled / >
< ArrowUpOutlined style = "font-size: 9px; vertical-align: top;" / >
< / span >
< span class = "ml10" > { { deviceInfo . dock . link _osd ? . sdr ? . up _quality } } < / span >
< span class = "ml10" > { { deviceInfo . dock . link _osd ? . sdr ? . up _quality } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Downward Quality" >
< a -tooltip title = "Downward Quality" >
< span > < SignalFilled / > < ArrowDownOutlined style = "font-size: 9px; vertical-align: top;" / > < / span >
< span >
< SignalFilled / >
< ArrowDownOutlined style = "font-size: 9px; vertical-align: top;" / >
< / span >
< span class = "ml10" > { { deviceInfo . dock . link _osd ? . sdr ? . down _quality } } < / span >
< span class = "ml10" > { { deviceInfo . dock . link _osd ? . sdr ? . down _quality } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Drone Battery Level" >
< a -tooltip title = "Drone Battery Level" >
< span > < ThunderboltOutlined class = "fz14" / > < / span >
< span >
< span class = "ml10" > { { deviceInfo . device && deviceInfo . device . battery . capacity _percent !== str ? deviceInfo . device ? . battery . capacity _percent + ' %' : str } } < / span >
< ThunderboltOutlined class = "fz14" / >
< / span >
< span class = "ml10" > { { deviceInfo . device && deviceInfo . device . battery . capacity _percent !== str ?
deviceInfo . device ? . battery . capacity _percent + ' %' : str } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
@ -323,10 +402,14 @@
< p > total : { { deviceInfo . device ? . storage ? . total } } < / p >
< p > total : { { deviceInfo . device ? . storage ? . total } } < / p >
< p > used : { { deviceInfo . device ? . storage ? . used } } < / p >
< p > used : { { deviceInfo . device ? . storage ? . used } } < / p >
< / template >
< / template >
< span > < FolderOpenOutlined / > < / span >
< span >
< FolderOpenOutlined / >
< / span >
< span class = "ml10" v-if ="deviceInfo.device?.storage?.total > 0" >
< span class = "ml10" v-if ="deviceInfo.device?.storage?.total > 0" >
< a -progress type = "circle" :width ="20" : percent = "deviceInfo.device?.storage?.used * 100/ deviceInfo.device?.storage?.total"
< a -progress type = "circle" :width ="20"
: strokeWidth = "20" : showInfo = "false" : strokeColor = "deviceInfo.device?.storage?.used * 100 / deviceInfo.device?.storage?.total > 80 ? 'red' : '#00ee8b' " / >
: percent = "deviceInfo.device?.storage?.used * 100 / deviceInfo.device?.storage?.total"
: strokeWidth = "20" : showInfo = "false"
: strokeColor = "deviceInfo.device?.storage?.used * 100 / deviceInfo.device?.storage?.total > 80 ? 'red' : '#00ee8b'" / >
< / span >
< / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
@ -335,7 +418,8 @@
< a -tooltip title = "RTK Fixed" >
< a -tooltip title = "RTK Fixed" >
< a -col span = "6" class = "flex-row flex-align-center flex-justify-start" >
< a -col span = "6" class = "flex-row flex-align-center flex-justify-start" >
< span > Fixed < / span >
< span > Fixed < / span >
< span class = "ml10 circle" : style = "deviceInfo.device?.position_state.is_fixed === 1 ? 'backgroud: rgb(25,190,107);' : ' background: red;'" > < / span >
< span class = "ml10 circle"
: style = "deviceInfo.device?.position_state.is_fixed === 1 ? 'backgroud: rgb(25,190,107);' : ' background: red;'" > < / span >
< / a - c o l >
< / a - c o l >
< / a - t o o l t i p >
< / a - t o o l t i p >
< a -col span = "6" >
< a -col span = "6" >
@ -346,7 +430,9 @@
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "RTK" >
< a -tooltip title = "RTK" >
< span > < TrademarkOutlined class = "fz14" / > < / span >
< span >
< TrademarkOutlined class = "fz14" / >
< / span >
< span class = "ml10" > { { deviceInfo . device ? deviceInfo . device . position _state . rtk _number : str } } < / span >
< span class = "ml10" > { { deviceInfo . device ? deviceInfo . device . position _state . rtk _number : str } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
@ -354,26 +440,32 @@
< a -row >
< a -row >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Flight Mode" >
< a -tooltip title = "Flight Mode" >
< span > < ControlOutlined class = "fz16" / > < / span >
< span >
< ControlOutlined class = "fz16" / >
< / span >
< span class = "ml10" > { { deviceInfo . device ? EGear [ deviceInfo . device ? . gear ] : str } } < / span >
< span class = "ml10" > { { deviceInfo . device ? EGear [ deviceInfo . device ? . gear ] : str } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Altitude above sea level" >
< a -tooltip title = "Altitude above sea level" >
< span > ASL < / span >
< span > ASL < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . height === str ? str : deviceInfo . device ? . height . toFixed ( 2 ) + ' m' } } < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . height === str ? str :
Number ( deviceInfo . device ? . height ) . toFixed ( 2 ) + ' m' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Altitude above takeoff level" >
< a -tooltip title = "Altitude above takeoff level" >
< span > ALT < / span >
< span > ALT < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . elevation === str ? str : deviceInfo . device ? . elevation . toFixed ( 2 ) + ' m' } } < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . elevation === str ? str :
Number ( deviceInfo . device ? . elevation ) . toFixed ( 2 ) + ' m' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Distance to Home Point" >
< a -tooltip title = "Distance to Home Point" >
< span style = "border: 1px solid; border-radius: 50%; width: 18px; height: 18px; line-height: 15px; text-align: center; display: block; float: left;" > H < / span >
< span
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . home _distance === str ? str : deviceInfo . device ? . home _distance . toFixed ( 2 ) + ' m' } } < / span >
style = "border: 1px solid; border-radius: 50%; width: 18px; height: 18px; line-height: 15px; text-align: center; display: block; float: left;" > H < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . home _distance === str ? str :
Number ( deviceInfo . device ? . home _distance ) . toFixed ( 2 ) + ' m' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< / a - r o w >
< / a - r o w >
@ -381,47 +473,59 @@
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Horizontal Speed" >
< a -tooltip title = "Horizontal Speed" >
< span > H . S < / span >
< span > H . S < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device ? . horizontal _speed === str ? str : deviceInfo . device ? . horizontal _speed . toFixed ( 2 ) + ' m/s' } } < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device ? . horizontal _speed === str ? str :
Number ( deviceInfo . device ? . horizontal _speed ) . toFixed ( 2 ) + ' m/s' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Vertical Speed" >
< a -tooltip title = "Vertical Speed" >
< span > V . S < / span >
< span > V . S < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . vertical _speed === str ? str : deviceInfo . device ? . vertical _speed . toFixed ( 2 ) + ' m/s' } } < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . vertical _speed === str ? str :
Number ( deviceInfo . device ? . vertical _speed ) . toFixed ( 2 ) + ' m/s' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< a -col span = "6" >
< a -col span = "6" >
< a -tooltip title = "Wind Speed" >
< a -tooltip title = "Wind Speed" >
< span > W . S < / span >
< span > W . S < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . wind _speed === str ? str : ( deviceInfo . device ? . wind _speed / 10 ) . toFixed ( 2 ) + ' m/s' } } < / span >
< span class = "ml10" > { { ! deviceInfo . device || deviceInfo . device . wind _speed === str ? str :
( Number ( deviceInfo . device ? . wind _speed ) / 10 ) . toFixed ( 2 ) + ' m/s' } } < / span >
< / a - t o o l t i p >
< / a - t o o l t i p >
< / a - c o l >
< / a - c o l >
< / a - r o w >
< / a - r o w >
< / div >
< / div >
< / div >
< / div >
< div class = "battery-slide" v-if ="deviceInfo.device && deviceInfo.device.battery.remain_flight_time !== 0" style="border: 1px solid red" >
< div class = "battery-slide" v -if = " deviceInfo.device & & deviceInfo.device.battery.remain_flight_time ! = = 0 "
style = "border: 1px solid red" >
< div style = "background: #535759;" class = "width-100" > < / div >
< div style = "background: #535759;" class = "width-100" > < / div >
< div class = "capacity-percent" : style = "{ width: deviceInfo.device.battery.capacity_percent + '%'}" > < / div >
< div class = "capacity-percent" : style = "{ width: deviceInfo.device.battery.capacity_percent + '%' }" > < / div >
< div class = "return-home" : style = "{ width: deviceInfo.device.battery.return_home_power + '%'}" > < / div >
< div class = "return-home" : style = "{ width: deviceInfo.device.battery.return_home_power + '%' }" > < / div >
< div class = "landing" : style = "{ width: deviceInfo.device.battery.landing_power + '%'}" > < / div >
< div class = "landing" : style = "{ width: deviceInfo.device.battery.landing_power + '%' }" > < / div >
< div class = "white-point" : style = "{ left: deviceInfo.device.battery.landing_power + '%'}" > < / div >
< div class = "white-point" : style = "{ left: deviceInfo.device.battery.landing_power + '%' }" > < / div >
< div class = "battery" : style = "{ left: deviceInfo.device.battery.capacity_percent + '%' }" >
< div class = "battery" : style = "{ left: deviceInfo.device.battery.capacity_percent + '%' }" >
{ { Math . floor ( deviceInfo . device . battery . remain _flight _time / 60 ) } } :
{ { Math . floor ( deviceInfo . device . battery . remain _flight _time / 60 ) } } :
{ { 10 > ( deviceInfo . device . battery . remain _flight _time % 60 ) ? '0' : '' } } { { deviceInfo . device . battery . remain _flight _time % 60 } }
{ { 10 > ( deviceInfo . device . battery . remain _flight _time % 60 ) ? '0' :
'' } } { { deviceInfo . device . battery . remain _flight _time % 60 } }
< / div >
< / div >
< / div >
< / div >
<!-- 飞行指令 -- >
<!-- 飞行指令 -- >
< DroneControlPanel :sn ="osdVisible.gateway_sn" :deviceInfo ="deviceInfo" :payloads ="osdVisible.payloads" > < / DroneControlPanel >
< DroneControlPanel :sn ="osdVisible.gateway_sn" :deviceInfo ="deviceInfo" :payloads ="osdVisible.payloads" >
< / DroneControlPanel >
< / div >
< / div >
<!-- liveview -- >
<!-- liveview -- >
< div class = "liveview" v -if = " livestreamOthersVisible " v -drag -window >
< div class = "liveview" v -if = " livestreamOthersVisible " v -drag -window >
< div style = "height: 40px; width: 100%" class = "drag-title" > < / div >
< div style = "height: 40px; width: 100%" class = "drag-title" > < / div >
< a style = "position: absolute; right: 10px; top: 10px; font-size: 16px; color: white;" @click ="closeLivestreamOthers" > < CloseOutlined / > < / a >
< a style = "position: absolute; right: 10px; top: 10px; font-size: 16px; color: white;"
@ click = "closeLivestreamOthers" >
< CloseOutlined / >
< / a >
< LivestreamOthers / >
< LivestreamOthers / >
< / div >
< / div >
< div class = "liveview" v -if = " livestreamAgoraVisible " v -drag -window >
< div class = "liveview" v -if = " livestreamAgoraVisible " v -drag -window >
< div style = "height: 40px; width: 100%" class = "drag-title" > < / div >
< div style = "height: 40px; width: 100%" class = "drag-title" > < / div >
< a style = "position: absolute; right: 10px; top: 10px; font-size: 16px; color: white;" @click ="closeLivestreamAgora" > < CloseOutlined / > < / a >
< a style = "position: absolute; right: 10px; top: 10px; font-size: 16px; color: white;"
@ click = "closeLivestreamAgora" >
< CloseOutlined / >
< / a >
< LivestreamAgora / >
< LivestreamAgora / >
< / div >
< / div >
< / div >
< / div >
@ -543,7 +647,7 @@ export default defineComponent({
return _home _power : str ,
return _home _power : str ,
} ,
} ,
latitude : 0 ,
latitude : 0 ,
longitude : 0 ,
longitude : 0
} as DeviceOsd
} as DeviceOsd
} )
} )
const shareId = computed ( ( ) => {
const shareId = computed ( ( ) => {
@ -575,7 +679,7 @@ export default defineComponent({
return 'color: red'
return 'color: red'
} )
} )
watch ( ( ) => store . state . deviceStatusEvent ,
watch ( ( ) => store . state . deviceStatusEvent ,
data => {
( data : any ) => {
if ( Object . keys ( data . deviceOnline ) . length !== 0 ) {
if ( Object . keys ( data . deviceOnline ) . length !== 0 ) {
deviceTsaUpdateHook . initMarker ( data . deviceOnline . domain , data . deviceOnline . device _callsign , data . deviceOnline . sn )
deviceTsaUpdateHook . initMarker ( data . deviceOnline . domain , data . deviceOnline . device _callsign , data . deviceOnline . sn )
store . state . deviceStatusEvent . deviceOnline = { } as DeviceStatus
store . state . deviceStatusEvent . deviceOnline = { } as DeviceStatus
@ -629,9 +733,9 @@ export default defineComponent({
let exist = false
let exist = false
if ( Object . keys ( event . mapElementCreat ) . length !== 0 ) {
if ( Object . keys ( event . mapElementCreat ) . length !== 0 ) {
console . log ( event . mapElementCreat )
console . log ( event . mapElementCreat )
const ele = event . mapElementCreat
const ele : any = event . mapElementCreat
store . state . Layers . forEach ( layer => {
store . state . Layers . forEach ( layer => {
layer . elements . forEach ( e => {
layer . elements . forEach ( ( e : any ) => {
if ( e . id === ele . id ) {
if ( e . id === ele . id ) {
exist = true
exist = true
console . log ( 'true' )
console . log ( 'true' )
@ -716,7 +820,7 @@ export default defineComponent({
draw ( isCircle ? MapDoodleEnum . CIRCLE : MapDoodleEnum . POLYGON , true , type )
draw ( isCircle ? MapDoodleEnum . CIRCLE : MapDoodleEnum . POLYGON , true , type )
}
}
function getDrawCallback ( { obj } : { obj : any } ) {
function getDrawCallback ( { obj } : { obj : any } ) {
if ( state . isFlightArea ) {
if ( state . isFlightArea ) {
getDrawFlightAreaCallback ( obj )
getDrawFlightAreaCallback ( obj )
return
return
@ -735,7 +839,7 @@ export default defineComponent({
break
break
}
}
}
}
async function postPinPositionResource ( obj ) {
async function postPinPositionResource ( obj : any ) {
const req = getPinPositionResource ( obj )
const req = getPinPositionResource ( obj )
setLayers ( req )
setLayers ( req )
const coordinates = req . resource . content . geometry . coordinates
const coordinates = req . resource . content . geometry . coordinates
@ -745,7 +849,7 @@ export default defineComponent({
obj . setExtData ( { id : req . id , name : req . name } )
obj . setExtData ( { id : req . id , name : req . name } )
store . state . coverMap [ req . id ] = [ obj ]
store . state . coverMap [ req . id ] = [ obj ]
}
}
async function postPolylineResource ( obj ) {
async function postPolylineResource ( obj : any ) {
const req = getPolylineResource ( obj )
const req = getPolylineResource ( obj )
setLayers ( req )
setLayers ( req )
updateCoordinates ( 'gcj02-wgs84' , req )
updateCoordinates ( 'gcj02-wgs84' , req )
@ -753,7 +857,7 @@ export default defineComponent({
obj . setExtData ( { id : req . id , name : req . name } )
obj . setExtData ( { id : req . id , name : req . name } )
store . state . coverMap [ req . id ] = [ obj ]
store . state . coverMap [ req . id ] = [ obj ]
}
}
async function postPolygonResource ( obj ) {
async function postPolygonResource ( obj : any ) {
const req = getPoygonResource ( obj )
const req = getPoygonResource ( obj )
setLayers ( req )
setLayers ( req )
updateCoordinates ( 'gcj02-wgs84' , req )
updateCoordinates ( 'gcj02-wgs84' , req )
@ -762,10 +866,10 @@ export default defineComponent({
store . state . coverMap [ req . id ] = [ obj ]
store . state . coverMap [ req . id ] = [ obj ]
}
}
function getPinPositionResource ( obj ) {
function getPinPositionResource ( obj : any ) {
const position = obj . getPosition ( )
const position = obj . getPosition ( )
const resource = generatePointContent ( position )
const resource = generatePointContent ( position )
const name = obj . _originOpts . title
const name = obj . _originOpts . title as string
const id = uuidv4 ( )
const id = uuidv4 ( )
return {
return {
id ,
id ,
@ -773,7 +877,7 @@ export default defineComponent({
resource
resource
}
}
}
}
function getPolylineResource ( obj ) {
function getPolylineResource ( obj : any ) {
const path = obj . getPath ( )
const path = obj . getPath ( )
const resource = generateLineContent ( path )
const resource = generateLineContent ( path )
const { name , id } = getBaseInfo ( obj . _opts )
const { name , id } = getBaseInfo ( obj . _opts )
@ -783,7 +887,7 @@ export default defineComponent({
resource
resource
}
}
}
}
function getPoygonResource ( obj ) {
function getPoygonResource ( obj : any ) {
const path = obj . getPath ( )
const path = obj . getPath ( )
const resource = generatePolyContent ( path )
const resource = generatePolyContent ( path )
const { name , id } = getBaseInfo ( obj . _opts )
const { name , id } = getBaseInfo ( obj . _opts )
@ -793,8 +897,8 @@ export default defineComponent({
resource
resource
}
}
}
}
function getBaseInfo ( obj ) {
function getBaseInfo ( obj : any ) {
const name = obj . title
const name = obj . title as string
const id = uuidv4 ( )
const id = uuidv4 ( )
return { name , id }
return { name , id }
}
}
@ -804,7 +908,7 @@ export default defineComponent({
/ / l a y e r . i d = ' p r i v a t e _ l a y e r ' + u u i d v 4 ( )
/ / l a y e r . i d = ' p r i v a t e _ l a y e r ' + u u i d v 4 ( )
/ / l a y e r ? . e l e m e n t s . p u s h ( r e s o u r c e )
/ / l a y e r ? . e l e m e n t s . p u s h ( r e s o u r c e )
if ( layer ? . elements ) {
if ( layer ? . elements ) {
; ( layer ? . elements as any [ ] ) . push ( resource )
; ( layer ? . elements as any [ ] ) . push ( resource )
}
}
console . log ( 'layers' , layers )
console . log ( 'layers' , layers )
store . commit ( 'SET_LAYER_INFO' , layers )
store . commit ( 'SET_LAYER_INFO' , layers )
@ -908,7 +1012,6 @@ export default defineComponent({
< / script >
< / script >
< style lang = "scss" scoped >
< style lang = "scss" scoped >
. g - map - wrapper {
. g - map - wrapper {
height : 100 % ;
height : 100 % ;
width : 100 % ;
width : 100 % ;
@ -917,6 +1020,7 @@ export default defineComponent({
position : absolute ;
position : absolute ;
top : 16 px ;
top : 16 px ;
right : 16 px ;
right : 16 px ;
. g - action - item {
. g - action - item {
width : 28 px ;
width : 28 px ;
height : 28 px ;
height : 28 px ;
@ -927,23 +1031,26 @@ export default defineComponent({
text - align : center ;
text - align : center ;
margin - bottom : 2 px ;
margin - bottom : 2 px ;
}
}
. g - action - item : hover {
. g - action - item : hover {
border : 1 px solid $primary ;
border : 1 px solid $primary ;
border - radius : 2 px ;
border - radius : 2 px ;
}
}
}
}
. selection {
. selection {
border : 1 px solid $primary ;
border : 1 px solid $primary ;
border - radius : 2 px ;
border - radius : 2 px ;
}
}
/ / a n t d b u t t o n 光 晕
/ / a n t d b u t t o n 光 晕
& : deep ( . ant - btn ) {
& : deep ( . ant - btn ) {
& : : after {
& : : after {
display : none ;
display : none ;
}
}
}
}
}
}
. osd - panel {
. osd - panel {
position : absolute ;
position : absolute ;
margin - left : 10 px ;
margin - left : 10 px ;
@ -955,7 +1062,8 @@ export default defineComponent({
border - radius : 2 px ;
border - radius : 2 px ;
opacity : 0.8 ;
opacity : 0.8 ;
}
}
. osd > div : not ( . dock - control - panel ) {
. osd > div : not ( . dock - control - panel ) {
margin - top : 5 px ;
margin - top : 5 px ;
padding - left : 5 px ;
padding - left : 5 px ;
}
}
@ -970,12 +1078,15 @@ export default defineComponent({
. capacity - percent {
. capacity - percent {
background : # 00 ee8b ;
background : # 00 ee8b ;
}
}
. return - home {
. return - home {
background : # ff9f0a ;
background : # ff9f0a ;
}
}
. landing {
. landing {
background : # f5222d ;
background : # f5222d ;
}
}
. white - point {
. white - point {
width : 4 px ;
width : 4 px ;
height : 4 px ;
height : 4 px ;
@ -983,6 +1094,7 @@ export default defineComponent({
background : white ;
background : white ;
bottom : - 0.5 px ;
bottom : - 0.5 px ;
}
}
. battery {
. battery {
background : # 141414 ;
background : # 141414 ;
color : # 00 ee8b ;
color : # 00 ee8b ;
@ -993,7 +1105,8 @@ export default defineComponent({
padding : 0 5 px ;
padding : 0 5 px ;
}
}
}
}
. battery - slide > div {
. battery - slide > div {
position : absolute ;
position : absolute ;
min - height : 2 px ;
min - height : 2 px ;
border - radius : 2 px ;
border - radius : 2 px ;