|
|
|
@ -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) {
|
|
|
|
|