刘妍 2 months ago
commit 88ea91185c

@ -1503,6 +1503,7 @@
if (graphicLayer.options.id == props.nowShowAreaData.id) {
graphicLayer.setStyle({
label: {
text: props.nowShowAreaData.name,
color: graphicLayer.options.style.color,
},
});
@ -1572,6 +1573,15 @@
},
);
watch(
() => area_noland_PolygonGraphicData,
() => {
console.log(area_noland_PolygonGraphicData);
},
{
deep: true,
},
);
// --
function showAllAreaDataList() {
//
@ -1608,6 +1618,7 @@
// --线
if (item.type == 'noland' && item.geomtype == 'Polygon') {
let nolandPolygonGraphic = new mars3d.graphic.PolygonEntity({
id: item.id,
positions: item.coordinates,
style: {
clampToGround: item.properties.clampToGround,

@ -20,7 +20,7 @@ import FeiXingQi from './widget/FeiXingQi.vue'
import YuanChengTiaoShi from './widget/YuanChengTiaoShi.vue'
const emits = defineEmits(['openWainInfo'])
const props = defineProps(['deviceInfoList', 'controlSN', 'controlChildSN', 'controlItems'])
console.log('deviceInfoList', props.deviceInfoList)
const openWainInfo = () =>{
emits('openWainInfo')
}

@ -38,14 +38,14 @@
</div>
<div class="textbox"> 电池SN: -- </div>
</div>
<div class="commonbox heightbox flex jc-sb ai-c">
<!-- <div class="commonbox heightbox flex jc-sb ai-c">
<div class="fw-b">保养服务</div>
<div class="textbox cursor" title="距下次常规保养496航时/326天"> 496航时/326 <RightOutlined /> </div>
</div>
<div class="commonbox heightbox flex jc-sb ai-c">
<div class="fw-b">行业无忧</div>
<div class="textbox cursor" title="行业无忧到期日2026-06-29"> 2026-06-29 <RightOutlined /> </div>
</div>
</div> -->
</div>
<div class="flex-1">
<div class="flex ai-c device-container">

@ -42,14 +42,14 @@
</a-button>
</div>
</div>
<div class="commonbox heightbox flex jc-sb ai-c">
<!-- <div class="commonbox heightbox flex jc-sb ai-c">
<div class="fw-b">保养服务</div>
<div class="textbox cursor" title="距下次基础保养144天"> 144 <RightOutlined /> </div>
</div>
<div class="commonbox heightbox flex jc-sb ai-c">
<div class="fw-b">行业无忧</div>
<div class="textbox cursor" title="行业无忧到期日2026-06-29"> 2026-06-29 <RightOutlined /> </div>
</div>
</div> -->
</div>
<div class="flex-1 flex wrap">
<div class="device-item flex ai-c column">
@ -125,11 +125,11 @@
<div> 倾斜角度 </div>
</div>
<div class="device-item flex ai-c column">
<div class="color2 fw-b div">{{ rainfallOptions[props.deviceInfoList[props.controlSN]?.poe_link_status] || '--' }}</div>
<div class="color2 fw-b div"> -- </div>
<div> PoE 输出接口 </div>
</div>
<div class="device-item flex ai-c column">
<div class="color2 fw-b div">{{ rainfallOptions[props.deviceInfoList[props.controlSN]?.poe_power_output] || '--' }}</div>
<div class="color2 fw-b div"> -- </div>
<div> PoE 输出功率 </div>
</div>
</div>

@ -24,7 +24,7 @@
<span class="fz-12 color3">机场系统</span>
</div>
</div>
<a-button size="small" @click="changeState('device_reboot')" :disabled="props.deviceInfoList[props.controlSN].mode_code != 2">重启</a-button>
<a-button @click="changeState('device_reboot')" :disabled="props.deviceInfoList[props.controlSN].mode_code != 2">重启</a-button>
</div>
<div class="sectonsitem flex ai-c jc-sb">
<div class="flex ai-c">
@ -37,7 +37,6 @@
</div>
</div>
<a-button
type="small"
@click="changeState(props.deviceInfoList[props.controlSN].cover_state == 0? 'cover_open': 'cover_close')"
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
{{props.deviceInfoList[props.controlSN].cover_state == 0? '打开': '关闭'}}
@ -56,14 +55,13 @@
</div>
</div>
<a-button
v-if="props.deviceInfoList[props.controlSN]?.air_conditioner.air_conditioner_state != 0"
type="small"
v-if="props.deviceInfoList[props.controlSN]?.air_conditioner.air_conditioner_state != 0"
@click="changeState('air_conditioner_mode_switch',0)"
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
停止
</a-button>
<a-dropdown v-else placement="bottom" :disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
<a-button type="small">开启</a-button>
<a-button >开启</a-button>
<template #overlay>
<a-menu>
<a-menu-item @click="changeState('air_conditioner_mode_switch',1)"></a-menu-item>
@ -83,8 +81,7 @@
<span class="fz-12 color3">静音模式</span>
</div>
</div>
<a-button
type="small"
<a-button
@click=""
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
{{props.deviceInfoList[props.controlSN].silent_mode == 0? '开启': '关闭'}}
@ -100,8 +97,7 @@
<span class="fz-12 color3">机场声光报警</span>
</div>
</div>
<a-button
type="small"
<a-button
@click="changeState('alarm_state_switch',props.deviceInfoList[props.controlSN].alarm_state == 0? 1: 0)"
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
{{props.deviceInfoList[props.controlSN].alarm_state == 0? '开启': '关闭'}}
@ -120,8 +116,7 @@
<span class="fz-12 color3">机场存储</span>
</div>
</div>
<a-button
type="small"
<a-button
@click="changeState('device_format')"
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
格式化
@ -135,8 +130,7 @@
<span class="fz-12 color3">机场增强图传</span>
</div>
</div>
<a-button
type="small"
<a-button
@click=""
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
设置
@ -150,8 +144,7 @@
<span class="fz-12 color3">限飞解禁证书</span>
</div>
</div>
<a-button
type="small"
<a-button
@click=""
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
设置
@ -174,8 +167,7 @@
<span class="fz-12 color3">飞行器电源</span>
</div>
</div>
<a-button
type="small"
<a-button
@click="changeDeviceState(props.deviceInfoList[props.controlSN]?.sub_device?.device_online_status == 0? 'drone_open': 'drone_close')"
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
{{props.deviceInfoList[props.controlSN]?.sub_device?.device_online_status == 0? '开机': '关机'}}
@ -191,8 +183,7 @@
<span class="fz-12 color3">飞行器充电</span>
</div>
</div>
<a-button
type="small"
<a-button
@click="changeDeviceState(props.deviceInfoList[props.controlSN]?.drone_charge_state?.state == 0? 'charge_open': 'charge_close')"
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
{{props.deviceInfoList[props.controlSN]?.drone_charge_state?.state == 0? '充电': '停止'}}
@ -208,8 +199,7 @@
<span class="fz-12 color3">增强图传</span>
</div>
</div>
<a-button
type="small"
<a-button
@click="changeDeviceState('sdr_workmode_switch',props.deviceInfoList[props.controlSN]?.wireless_link?.['4g_link_state'] == 0? 1: 0, 'link_workmode')"
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
{{props.deviceInfoList[props.controlSN]?.wireless_link?.['4g_link_state'] == 0? '开启': '关闭'}}
@ -223,8 +213,7 @@
<span class="fz-12 color3">飞行器存储</span>
</div>
</div>
<a-button
type="small"
<a-button
@click="changeDeviceState('drone_format')"
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
格式化
@ -240,8 +229,7 @@
<span class="fz-12 color3">飞行器增强图传</span>
</div>
</div>
<a-button
type="small"
<a-button
@click=""
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
设置
@ -260,8 +248,7 @@
<img class="img" src="/public/operation/bgimg2.png" />
<div>可通过中继发出的远程接入信号远程连接中继满足复杂场景下飞行器的图传要求</div>
</div>
</div>
</div>
</div>
</div>
</div>
@ -274,7 +261,7 @@
<span class="fz-12 color3">连接状态</span>
</div>
</div>
<a-button size="small" disabled>远程连接</a-button>
<a-button :disabled="props.deviceInfoList[props.controlSN].mode_code != 2">远程连接</a-button>
</div>
</div>
</div>

@ -164,7 +164,7 @@
</div>
<div class="setting-table-title-div">
<div class="table-title-item" style="width: 119px;">
人员项目呼号
设备名称
<div class="sort-icon"></div>
</div>
<div class="table-title-item" style="width: 94px;">
@ -224,20 +224,20 @@ import cloneDeep from 'lodash/cloneDeep'
import { message } from "ant-design-vue";
import dayjs from "dayjs";
const props = defineProps(['addModal', 'modalType','map', 'updateProject'])
const props = defineProps(['addModal', 'modalType','map', 'updateProject', 'graphicLayer'])
const emits = defineEmits(['update:addModal', 'getProjectList'])
let graphicLayer
// let graphicLayer
let clickHandler
watch(() => props.map, (val) => {
if (val) {
initGraphicLayer(val)
}
}, { immediate: true })
function initGraphicLayer(map) {
graphicLayer = new mars3d.layer.GraphicLayer()
map.addLayer(graphicLayer)
}
// watch(() => props.map, (val) => {
// if (val) {
// initGraphicLayer(val)
// }
// }, { immediate: true })
// function initGraphicLayer(map) {
// graphicLayer = new mars3d.layer.GraphicLayer()
// map.addLayer(graphicLayer)
// }
watch(() => props.addModal, (newValue) => {
console.log('addModal',newValue,props.modalType,props.map)
@ -254,14 +254,14 @@ watch(() => props.addModal, (newValue) => {
}else if(newValue && props.modalType == 'update'){
let userId = props.updateProject.users.map(item => item.id)
let userlist = userList.value.filter(item => userId.includes(item.id))
let deviceId = props.updateProject.lasaDronePort.map(item => item.id)
let deviceArray = deviceList.value.filter(item => deviceId.includes(item.id))
// let deviceId = props.updateProject.lasaDronePort.map(item => item.id)
// let deviceArray = deviceList.value.filter(item => deviceId.includes(item.id))
project.value = {
...props.updateProject.workspace,
requestCodeCutOffTime: props.updateProject.workspace.requestCodeCutOffTime? dayjs(props.updateProject.workspace.requestCodeCutOffTime): '',
userIds: userlist,
lockfly: props.updateProject.lasaSpaceLockFlies,
deviceIds: deviceArray
deviceIds: props.updateProject.lasaDronePort
}
}
})
@ -344,8 +344,8 @@ onMounted(() => {
})
const closeAddModal = () => {
emits('update:addModal',false)
if(graphicLayer){
graphicLayer.clear()
if(props.graphicLayer){
props.graphicLayer.clear()
}
props.map.container.style.cursor = "default"
if (clickHandler) {
@ -425,8 +425,8 @@ const getLocationCenter = () => {
}
}
})
graphicLayer.clear()
graphicLayer.addGraphic(pointGraphic)
props.graphicLayer.clear()
props.graphicLayer.addGraphic(pointGraphic)
}
props.map.on('click', clickHandler)
}
@ -484,8 +484,8 @@ const saveProject = () => {
emits('getProjectList')
})
}
if(graphicLayer){
graphicLayer.clear()
if(props.graphicLayer){
props.graphicLayer.clear()
}
props.map.container.style.cursor = "default"
if (clickHandler) {

@ -26,7 +26,13 @@
</div>
</div>
<!-- 添加项目组件 -->
<AddProject v-model:addModal="addModal" :modalType="modalType" :map="props.map" :updateProject="updateProject" @getProjectList="getProjectList"/>
<AddProject
v-model:addModal="addModal"
:modalType="modalType"
:map="props.map"
:updateProject="updateProject"
:graphicLayer="graphicLayer"
@getProjectList="getProjectList"/>
</div>
</template>
@ -37,6 +43,8 @@ import { GetWorkspaceList, GetWorkSpaceById, DeleteWorkspace } from '@/api/demo/
import { message, Modal } from 'ant-design-vue'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
import { getClient, createConnection, clientSubscribe, destroyConnection } from '@/utils/mqtt';
import * as mars3d from "mars3d";
import * as Cesium from "mars3d-cesium"
onMounted(() => {
getProjectList()
@ -50,16 +58,29 @@ const projectList = ref([])
const updateProject = ref({})
const lastSubscriptUrl = ref('')
const getList = ref(false)
const graphicLayer = ref()
const addProject = () => {
modalType.value = 'insert'
addModal.value = true
}
watch(() => [getList.value, props.connect], (value) => {
const check = value.every(item => item === true)
watch(() => [getList.value, props.connect, graphicLayer.value], (value) => {
const check = value.every(item => {
return item
})
console.log('check',check)
if(check){
selectProject(projectList.value[0])
}
})
watch(() => props.map, (val) => {
if (val) {
initGraphicLayer(val)
}
}, { immediate: true })
function initGraphicLayer(map) {
graphicLayer.value = new mars3d.layer.GraphicLayer()
map.addLayer(graphicLayer.value)
}
const selectProject = (item) => {
if(props.activeProject != item.Id){
props.airPort.latitude = null
@ -76,6 +97,30 @@ const selectProject = (item) => {
lastSubscriptUrl.value = topicUrl
clientSubscribe(topicUrl, { qos: 0 });
})
let { centerLat:lat, centerLng: lon } = res.workspace
const position:any = [lon, lat]
const pointGraphic = new mars3d.graphic.PointEntity({
position: position,
style: {
color: '#ff0000',
pixelSize: 10,
outlineColor: '#ffffff',
outlineWidth: 2,
clampToGround: true,
label: {
text: `${res.workspace.workspaceName}`,
font_size: 16,
color: '#000000',
outline: true,
outlineColor: '#ffffff',
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
pixelOffsetY: -20
}
}
})
graphicLayer.value.clear()
graphicLayer.value.addGraphic(pointGraphic)
})
}
const getProjectList = () => {

Loading…
Cancel
Save