diff --git a/src/components/earthMap/Toolbar.vue b/src/components/earthMap/Toolbar.vue index 38db0cc..592dec3 100644 --- a/src/components/earthMap/Toolbar.vue +++ b/src/components/earthMap/Toolbar.vue @@ -93,7 +93,7 @@ - + @@ -202,6 +202,7 @@ // 监控点弹窗 const addMonitorPointComShow = ref(false); + const msCameraSiteHandle = ref(false); // 微波弹窗 const addWaveComShow = ref(false); // 雷达弹窗 @@ -264,10 +265,15 @@ drawShapePackage.value = res; }); //调用创建/编辑区域 addArea方法 - $mitt.on('addAreaHandler', function (res: any) { - // console.log("addAreaHandlerres",res); + $mitt.on('msMapLineHandler', function (res: any) { + // console.log("msMapLineHandlerres",res); addArea(res) }); + //调用创建/编辑区域 addMonitorPoint方法 + $mitt.on('msCameraSiteHandle', function (res: any) { + // console.log("msMapLineHandlerres",res); + addMonitorPoint(res) + }); } //数据绑定 @@ -994,7 +1000,7 @@ } function openPopModal(id, e) { - let popModal = document.getElementById(id); + let popModal: any = document.getElementById(id); let node = e.target; if (node.nodeName === 'IMG') { node = node.parentNode; @@ -1015,9 +1021,9 @@ popModalDisplay === 'block' ? (popModal.style.display = 'none') : (popModal.style.display = 'block'); } - function closePopModal(type, menu = null, button = null) { - let popModalList = document.getElementsByClassName('popModal'); - let tbImgHoverList = document.getElementsByClassName('tbImgHover'); + function closePopModal(type, menu: any = null, button: any = null) { + let popModalList: any = document.getElementsByClassName('popModal'); + let tbImgHoverList: any = document.getElementsByClassName('tbImgHover'); switch (type) { case 'all': // 关闭所有 @@ -1044,7 +1050,7 @@ } break; default: - let popModal = document.getElementById(menu); + let popModal: any = document.getElementById(menu); button.classList.remove('tbImgHover'); popModal.style.display = 'none'; break; @@ -1085,8 +1091,9 @@ } // 添加监控点 - function addMonitorPoint() { + function addMonitorPoint(data= false) { addMonitorPointComShow.value = true; + msCameraSiteHandle.value = data; } // 添加微波 function addWave() { @@ -1096,9 +1103,9 @@ function addRadar() { addRadarComShow.value = true; } - // 添加区域, addAreaHandler标识 后台区域管理调用 - function addArea(addAreaHandler = null) { - // console.log("添加区域",addAreaHandler); + // 添加区域, msMapLineHandler标识 后台区域管理调用 + function addArea(msMapLineHandler = null) { + // console.log("添加区域",msMapLineHandler); $mitt.emit('drawShapeShow', { show: true, title: '区域创建工具', from: 'addArea' }); $mitt.on('addAreaFinished', (t: any) => { @@ -1131,7 +1138,7 @@ * */ nextTick(() => { - addPolyline(positions,addAreaHandler); + addPolyline(positions,msMapLineHandler); }); } else { } @@ -1144,9 +1151,9 @@ } /** * @params 需要调用 addArea 方法进行绘图,获取坐标点position - * @params addAreaHandler标识 后台区域管理调用 + * @params msMapLineHandler标识 后台区域管理调用 */ - function addPolyline(positions: any = null, addAreaHandler =null) { + function addPolyline(positions: any = null, msMapLineHandler =null) { // console.log('positions', positions); // 关闭此窗体 @@ -1162,9 +1169,9 @@ // console.log('currentModel', currentModel); // 获取地图ui对象 const earthUI = window.$uia; - // console.log("addAreaHandler",addAreaHandler); + // console.log("msMapLineHandler",msMapLineHandler); //后台区域管理调用,直接return终止 - if(addAreaHandler){ + if(msMapLineHandler){ $mitt.emit('toMsMapLineForm',currentModel) return } @@ -1358,7 +1365,8 @@ $mitt.off('warnInfoMan'); $mitt.off('addAreaFinished'); $mitt.off('drawShapeShow'); - $mitt.off('addAreaHandler'); + $mitt.off('msMapLineHandler'); + $mitt.off('msCameraSiteHandle'); }); return { @@ -1426,6 +1434,7 @@ addArea, addModelWinShow, addMonitorPointComShow, + msCameraSiteHandle, addWaveComShow, addRadarComShow, roamPathListShow, diff --git a/src/components/earthMap/toolbar/AddMonitorPointCom.vue b/src/components/earthMap/toolbar/AddMonitorPointCom.vue index c0a1014..bd17d17 100644 --- a/src/components/earthMap/toolbar/AddMonitorPointCom.vue +++ b/src/components/earthMap/toolbar/AddMonitorPointCom.vue @@ -1,19 +1,8 @@ diff --git a/src/views/earthMap/edit/EarthComp.vue b/src/views/earthMap/edit/EarthComp.vue index d05dccc..0d45a43 100644 --- a/src/views/earthMap/edit/EarthComp.vue +++ b/src/views/earthMap/edit/EarthComp.vue @@ -309,10 +309,15 @@ import { nextTick } from 'vue'; default: false, }, //后台区域管理事件 - addAreaHandler: { + msMapLineHandler: { type: Boolean, default: false, }, + //后台监控点位管理事件 + msCameraSiteHandle: { + type: Object, + default: null, + }, }, }) export default class EarthComp extends Vue { @@ -542,14 +547,25 @@ import { nextTick } from 'vue'; this.cameraModalShow = false; } - //区域编辑 + // 后台区域管理事件 areaHandler(){ // 取消双击旋转事件 window.$viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction( window.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK ); this.$nextTick(() => { - $mitt.emit('addAreaHandler', this.addAreaHandler); + $mitt.emit('msMapLineHandler', this.msMapLineHandler); + }) + } + + // 后台监控点位管理事件 + cameraSiteHandler(){ + // 取消双击旋转事件 + window.$viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction( + window.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK + ); + this.$nextTick(() => { + $mitt.emit('msCameraSiteHandle', this.msCameraSiteHandle); }) } @@ -755,7 +771,10 @@ import { nextTick } from 'vue'; if (this.PropsCreateBBHLineOpen) await this.createBBHLine(); //使用后台区域管理事件 绘制区域等操作 - if (this.addAreaHandler) this.areaHandler() + if (this.msMapLineHandler) this.areaHandler() + + //使用后台监控点位管理事件 设置监控杆等操作 + if (this.msCameraSiteHandle) this.cameraSiteHandler() }); } diff --git a/src/views/military/modules/earthMap/camera/components/MsCameraSiteForm.vue b/src/views/military/modules/earthMap/camera/components/MsCameraSiteForm.vue index 22b9f17..6a327bc 100644 --- a/src/views/military/modules/earthMap/camera/components/MsCameraSiteForm.vue +++ b/src/views/military/modules/earthMap/camera/components/MsCameraSiteForm.vue @@ -35,22 +35,18 @@ - - + @@ -115,6 +111,7 @@ import locationPng from '@/assets/images/getLocation.png'; import { useUserStore } from '/@/store/modules/user'; import EarthComp from '@/views/earthMap/edit/EarthComp.vue'; + import $mitt from '@/utils/earthMap/mitt'; const userStore = useUserStore(); const lineSelect: any = ref([]); @@ -169,21 +166,7 @@ }); //线路选择框 function setSelectList() { - // defHttp - // .get( - // { - // url: '/military/msMapLine/mapLineSelect', - // }, - // { isTransformResponse: false } - // ) - // // getAction(this.url.querySelectList, {}) - // .then((res) => { - // if (res.success) { - // lineSelect.value = res.result; - // } - // }); - defHttp - .get( + defHttp.get( { url: '/military/msMapLine/list', params: { @@ -195,8 +178,6 @@ lineSelect.value = res.result.records; } }); - - } /** @@ -214,6 +195,7 @@ resetFields(); //赋值 Object.assign(formData, record); + formData.lineId = record.line_id? record.line_id: undefined }); } @@ -300,7 +282,7 @@ formData.roll = CMath.toDegrees(rotation[2]); // subObject.value.viewDistance = fov; - }; + }; const earthMapModal: any = ref(null); // 打开地图时飞入到指定位置 const moveChinaPosition = function () { @@ -318,7 +300,14 @@ function destroyed() { nextTick(() => { mapVisible.value = false }) - +} +function ok() { + + $mitt.emit("msCameraSiteHandleOK",{ destroyed: destroyed, callback:(data)=>{ + // console.log("data", data); + //数据融合 + Object.assign(formData, data); + }}) } defineExpose({ diff --git a/src/views/military/modules/earthMap/camera/components/MsCameraSiteFormDeprecated.vue b/src/views/military/modules/earthMap/camera/components/MsCameraSiteFormDeprecated.vue new file mode 100644 index 0000000..c62d0ed --- /dev/null +++ b/src/views/military/modules/earthMap/camera/components/MsCameraSiteFormDeprecated.vue @@ -0,0 +1,350 @@ + + + + + + diff --git a/src/views/military/modules/earthMap/msMapLine/components/MsMapLineForm.vue b/src/views/military/modules/earthMap/msMapLine/components/MsMapLineForm.vue index 7a5b826..77690d3 100644 --- a/src/views/military/modules/earthMap/msMapLine/components/MsMapLineForm.vue +++ b/src/views/military/modules/earthMap/msMapLine/components/MsMapLineForm.vue @@ -96,10 +96,10 @@ - + - + diff --git a/src/views/military/modules/earthMap/scene/model/mapModel/EarthMapModal copy.vue b/src/views/military/modules/earthMap/scene/model/mapModel/EarthMapModal copy.vue deleted file mode 100644 index e6ae9d3..0000000 --- a/src/views/military/modules/earthMap/scene/model/mapModel/EarthMapModal copy.vue +++ /dev/null @@ -1,827 +0,0 @@ - - - \ No newline at end of file