From be42041980a4eb8faba9d4639d8eae9f5df56931 Mon Sep 17 00:00:00 2001 From: helloxujingliang <3225043@qq.com> Date: Sat, 12 Jul 2025 08:42:23 +0800 Subject: [PATCH 1/7] merge --- package.json | 3 +- .../airlinemanagement/index.vue | 2 +- .../workplan/components/createWorkPlan.vue | 50 +++++++++++++++++++ .../workplan/components/map.vue | 15 +++--- .../demo/workmanagement/workplan/index.vue | 2 +- 5 files changed, 63 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 4daf9c1..1e85002 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,8 @@ "vxe-table-plugin-export-xlsx": "^3.1.0", "xe-utils": "^3.5.14", "xlsx": "^0.18.5", - "xml-js": "^1.6.11" + "xml-js": "^1.6.11", + "vue3-cron-plus":"^0.1.9" }, "devDependencies": { "@commitlint/cli": "^18.4.4", diff --git a/src/views/demo/workmanagement/airlinemanagement/index.vue b/src/views/demo/workmanagement/airlinemanagement/index.vue index b7c0cc5..30ff0b2 100644 --- a/src/views/demo/workmanagement/airlinemanagement/index.vue +++ b/src/views/demo/workmanagement/airlinemanagement/index.vue @@ -39,7 +39,7 @@ const flyToTherePosition = ref({ const flyToThere = (e)=>{ - console.log(e); + } const planListShow = ref(true); const workPlanFormShow = ref(false); diff --git a/src/views/demo/workmanagement/workplan/components/createWorkPlan.vue b/src/views/demo/workmanagement/workplan/components/createWorkPlan.vue index c6e6c85..9e5dde8 100644 --- a/src/views/demo/workmanagement/workplan/components/createWorkPlan.vue +++ b/src/views/demo/workmanagement/workplan/components/createWorkPlan.vue @@ -88,6 +88,13 @@ + + + + 选择时间 + + + @@ -152,19 +159,51 @@ 确定 + + + + + + + diff --git a/src/views/demo/workmanagement/flightoperation/src/LoadControl.vue b/src/views/demo/workmanagement/flightoperation/src/LoadControl.vue index b2e11cd..d459d9f 100644 --- a/src/views/demo/workmanagement/flightoperation/src/LoadControl.vue +++ b/src/views/demo/workmanagement/flightoperation/src/LoadControl.vue @@ -300,14 +300,15 @@ let data = { payload_index: uav.camera_index, locked: true, - pitch_speed: 8, - yaw_speed: 8, + pitch_speed: 0, + yaw_speed: 0, }; if (val == 'up') { data[type] = 8; } else { data[type] = -8; } + console.log('data', data); // 画面拖动控制 servicesTopicReize({ bid: buildGUID(), From ffc56b708bf94b7cc3ddb3708a196aabd45cff21 Mon Sep 17 00:00:00 2001 From: zhufu <17863654727@163.com> Date: Sat, 12 Jul 2025 15:46:59 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=9C=BA=E5=9C=BA=E4=BD=8D=E7=BD=AE=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=9C=BA=E5=9C=BA=E5=9B=BE=E6=A0=87=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E9=A3=9E=E8=A1=8C=E4=BD=9C=E4=B8=9A=E7=94=BB=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flightoperation/src/SelectComponent.vue | 7 ++- .../projecthome/ProjectList/index.vue | 25 ++++++++-- .../demo/workmanagement/projecthome/index.vue | 46 ++++++++++++++++--- .../workplan/components/map.vue | 16 +++++-- 4 files changed, 78 insertions(+), 16 deletions(-) diff --git a/src/views/demo/workmanagement/flightoperation/src/SelectComponent.vue b/src/views/demo/workmanagement/flightoperation/src/SelectComponent.vue index 3ef41bf..984980e 100644 --- a/src/views/demo/workmanagement/flightoperation/src/SelectComponent.vue +++ b/src/views/demo/workmanagement/flightoperation/src/SelectComponent.vue @@ -67,7 +67,12 @@ value: item.Id, }; }); - selectVal.project = optionsArr.projectOptions[0].value; + if(sessionStorage.getItem('homeToFlightId')){ + selectVal.project = sessionStorage.getItem('homeToFlightId'); + sessionStorage.removeItem('homeToFlightId') + } else { + selectVal.project = optionsArr.projectOptions[0].value; + } getAirPort(selectVal.project); } else { optionsArr.projectOptions = []; diff --git a/src/views/demo/workmanagement/projecthome/ProjectList/index.vue b/src/views/demo/workmanagement/projecthome/ProjectList/index.vue index 58b743b..9719dc7 100644 --- a/src/views/demo/workmanagement/projecthome/ProjectList/index.vue +++ b/src/views/demo/workmanagement/projecthome/ProjectList/index.vue @@ -10,7 +10,7 @@
-
+
{{ item.WorkspaceName }}
@@ -36,23 +36,40 @@ import { ref, defineProps, onMounted, createVNode } from "vue" import { GetWorkspaceList, GetWorkSpaceById, DeleteWorkspace } from '@/api/demo/projecthome' import { message, Modal } from 'ant-design-vue' import { ExclamationCircleOutlined } from '@ant-design/icons-vue' +import { getClient, createConnection, clientSubscribe, destroyConnection } from '@/utils/mqtt'; onMounted(() => { getProjectList() }) -const props = defineProps(['map']) +const props = defineProps(['map', 'activeProject', 'airPort']) +const emits = defineEmits(['update:activeProject']) const addModal = ref(false) const modalType = ref('') const projectList = ref([]) -const activeProject = ref('') const updateProject = ref({}) +const lastSubscriptUrl = ref('') const addProject = () => { modalType.value = 'insert' addModal.value = true } const selectProject = (item) => { - activeProject.value = item.Id + if(props.activeProject != item.Id){ + props.airPort.latitude = null + props.airPort.longitude = null + getClient().unsubscribe(lastSubscriptUrl.value,(error, res) => {}) + } + emits('update:activeProject',item.Id) + let params = { + id: item.Id + } + GetWorkSpaceById(params).then(res => { + res.lasaDronePort.forEach(item => { + const topicUrl = 'thing/product/' + item.sn + '/osd'; + lastSubscriptUrl.value = topicUrl + clientSubscribe(topicUrl, { qos: 0 }); + }) + }) } const getProjectList = () => { GetWorkspaceList().then(res => { diff --git a/src/views/demo/workmanagement/projecthome/index.vue b/src/views/demo/workmanagement/projecthome/index.vue index e262095..6c9d254 100644 --- a/src/views/demo/workmanagement/projecthome/index.vue +++ b/src/views/demo/workmanagement/projecthome/index.vue @@ -1,11 +1,11 @@ diff --git a/src/views/demo/workmanagement/workplan/components/map.vue b/src/views/demo/workmanagement/workplan/components/map.vue index 3c9f61e..399b8b9 100644 --- a/src/views/demo/workmanagement/workplan/components/map.vue +++ b/src/views/demo/workmanagement/workplan/components/map.vue @@ -148,7 +148,7 @@ const generatePreviewPoint = (placemark)=>{ } }; - const emits = defineEmits(['exitDraw', 'flyToThere']); + const emits = defineEmits(['exitDraw', 'flyToThere', 'mapOnLoad', 'clickAirPort']); const airPoints = ref([]); const currentAirPoint = ref({}); @@ -199,6 +199,9 @@ const generatePreviewPoint = (placemark)=>{ // 航点连接线 let lineGroundPointLayer: mars3d.layer.GraphicLayer; + // 机场位置 + let startGraphic; + let graphic = null; const exitDraw = () => { @@ -457,6 +460,7 @@ const generatePreviewPoint = (placemark)=>{ } // 加载长光高清影像 loadChangGuangLayer(); + emits('mapOnLoad',map) }); }; @@ -1553,7 +1557,8 @@ const loadChangGuangLayer = ()=>{ // // 创建点的经纬度信息 let position = [props.airPort.longitude, props.airPort.latitude, 70]; // 更新航点 - if (point) { + if (startGraphic) { + startGraphic.position = position // point.setOptions({ // id: 'set-airport', // name: '机场位置', @@ -1576,7 +1581,7 @@ const loadChangGuangLayer = ()=>{ // }, // }); } else { - let startGraphic = new mars3d.graphic.BillboardEntity({ + startGraphic = new mars3d.graphic.BillboardEntity({ id: 'set-airport', position: position, style: { @@ -1596,8 +1601,11 @@ const loadChangGuangLayer = ()=>{ }, }, }); + startGraphic.on(mars3d.EventType.click, function (event) { + emits('clickAirPort') + }); graphicLayer.addGraphic(startGraphic); - } + } }; // 设置无人机轨迹 From 2a98edf563d05409f55456f1445a006ff42b32ab Mon Sep 17 00:00:00 2001 From: zhufu <17863654727@163.com> Date: Sat, 12 Jul 2025 16:01:57 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=9C=BA=E5=9C=BA=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E5=92=8C=E6=97=A0=E4=BA=BA=E6=9C=BA=E7=9B=B4=E6=92=AD=E5=BF=AB?= =?UTF-8?q?=E9=80=9F=E5=BC=80=E5=90=AF=E5=92=8C=E5=85=B3=E9=97=AD=E6=97=B6?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/workmanagement/flightoperation/src/AirportLive.vue | 6 ++++-- .../demo/workmanagement/flightoperation/src/LivePreview.vue | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/views/demo/workmanagement/flightoperation/src/AirportLive.vue b/src/views/demo/workmanagement/flightoperation/src/AirportLive.vue index 7621364..1f515c1 100644 --- a/src/views/demo/workmanagement/flightoperation/src/AirportLive.vue +++ b/src/views/demo/workmanagement/flightoperation/src/AirportLive.vue @@ -154,8 +154,10 @@ }; // 销毁视频控件 onBeforeUnmount(() => { - player.dispose(); - player = null; + if(player){ + player.dispose(); + player = null; + } }); diff --git a/src/views/demo/system/mediaLibrary/path/pathAreaInfo.vue b/src/views/demo/system/mediaLibrary/path/pathAreaInfo.vue index 641e390..2165b03 100644 --- a/src/views/demo/system/mediaLibrary/path/pathAreaInfo.vue +++ b/src/views/demo/system/mediaLibrary/path/pathAreaInfo.vue @@ -2,17 +2,17 @@
-
自定义飞行区
+
自定义飞行区
-
+
-
+
-
+
-
+
自定义作业区绘制后,飞行器只能在该区域内飞行
-
+
自定义禁降区绘制后,飞行器不能在绘制区域内自动降落
-
+
自定义作业区绘制后,飞行器只能在该区域内飞行
-
更多信息
+
更多信息
-
启用状态
+
启用状态
-
+
{{ props.nowShowAreaData.state == 0 ? '已启用' : '已禁用' }}
- - -
水平距离
+ + +
水平周长
- -
{{ nowAreaData.length.toFixed(1) }}m
+ +
{{ length.toFixed(2) }}m
-
水平面积
+
水平面积
-
{{ nowAreaData.area.toFixed(2) }}㎡
-
- - -
水平周长
-
- -
{{ nowAreaData.length.toFixed(1) }}m
+
{{ area.toFixed(2) }}㎡
-
半径
+
半径
-
+
- - -
宽度
-
- -
-
- -
-
- - {{ nowAreaData.properties.width }} - - - m -
-
- -
-
-
-
绘制者
+
绘制者
-
{{ props.nowShowAreaData.createdUser }}
+
{{ props.nowShowAreaData.createdUser }}
@@ -195,85 +152,16 @@ ]); const nowAreaData: any = ref(props.nowShowAreaData); - watch( - () => nowAreaData.value, - () => { - emits('setNowShowAreaData', nowAreaData.value, false); - }, - { - deep: true, - }, - ); - - // 宽度---------------------------------------------------------------------- - const numInputFlag = ref(false); - const focusInputRef = ref(); - // input鼠标聚焦 - function focusInput() { - numInputFlag.value = true; - nextTick(() => { - if (focusInputRef.value && focusInputRef.value.focus) { - focusInputRef.value.focus(); - } - }); - } - // input鼠标聚焦后离开or点击Enter - function blurInput() { - numInputFlag.value = false; - // 检测是否是数字 - if (/^-?\d+(\.\d+)?$/.test(nowAreaData.value.properties.width.toString())) { - if (nowAreaData.value.properties.width > 100) { - // 不能大于100 - nowAreaData.value.properties.width = 100; - } else if (nowAreaData.value.properties.width < 10) { - // 不能小于10 - nowAreaData.value.properties.width = 10; - } else { - // 保存小数点后两位 - let newnum = cloneDeep(nowAreaData.value.properties.width); - nowAreaData.value.properties.width = parseFloat(parseFloat(newnum).toFixed(2)); - } - } else { - // 不是数字 - nowAreaData.value.properties.width = 10; - } - } - // 宽度-减少 - function removeRecordNum() { - let newnum = cloneDeep(nowAreaData.value.properties.width); - if (newnum == 10) { - return; - } - newnum -= 5; - nowAreaData.value.properties.width = parseFloat(newnum.toFixed(2)); - } - // 宽度-增加 - function addRecordNum() { - let newnum = cloneDeep(nowAreaData.value.properties.width); - if (newnum == 100) { - return; - } - newnum += 5; - nowAreaData.value.properties.width = parseFloat(newnum.toFixed(2)); - } - // 关闭 function closePathAreaInfo() { emits('closePathAreaInfo'); } // 移动到中心位置 function handlerLocation() { - if (props.nowShowAreaData.geomtype == 'Circle') { - emits('handlerLocation', { - lng: props.nowShowAreaData.properties.centerPoint[0], - lat: props.nowShowAreaData.properties.centerPoint[1], - }); - } else { - emits('handlerLocation', { - lng: props.nowShowAreaData.properties.centerPoint[0], - lat: props.nowShowAreaData.properties.centerPoint[1], - }); - } + emits('handlerLocation', { + lng: props.nowShowAreaData.properties.centerPoint[0], + lat: props.nowShowAreaData.properties.centerPoint[1], + }); } // 删除此区域 function deleteArea() { @@ -287,19 +175,37 @@ }); } + // 水平周长和水平面积 + const length: any = ref(); + const area: any = ref(); + + watch( + () => nowAreaData.value, + () => { + emits('setNowShowAreaData', nowAreaData.value, false); + }, + { + deep: true, + }, + ); watch( () => props.nowShowAreaData, () => { nowAreaData.value = props.nowShowAreaData; - // 水平面积 - // getArea(); - if (props.nowShowAreaData.type == 'noland') { - // 水平距离 - // getDistance(); - } if (props.nowShowAreaData.geomtype == 'Polygon') { // 水平距离 - // getDistance(); + length.value = mars3d.MeasureUtil.getDistance(nowAreaData.value.coordinates[0]); + // 水平面积 + area.value = mars3d.MeasureUtil.getArea(nowAreaData.value.coordinates[0]); + } + if (props.nowShowAreaData.geomtype == 'Circle') { + // 水平距离 + length.value = 2 * Math.PI * parseFloat(nowAreaData.value.properties.radius); + // 水平面积 + area.value = + Math.PI * + parseFloat(nowAreaData.value.properties.radius) * + parseFloat(nowAreaData.value.properties.radius); } }, { @@ -323,7 +229,7 @@ padding: 15px; } - .markTitle { + .annotationTitle { display: flex; align-items: center; justify-content: flex-start; @@ -334,7 +240,7 @@ width: 100%; flex-wrap: wrap; - .markTitleButton_right { + .annotationTitleButton_right { height: 20px; width: 20px; display: flex; @@ -343,7 +249,7 @@ margin-right: 12px; font-size: 18px; } - .markTitleButton { + .annotationTitleButton { height: 20px; width: 20px; display: flex; @@ -354,7 +260,7 @@ } } - .markContent { + .annotationContent { display: flex; align-items: center; justify-content: flex-start; @@ -365,7 +271,7 @@ color: #ffffff; } - .markButton { + .annotationButton { display: flex; align-items: center; justify-content: flex-start; @@ -375,7 +281,7 @@ flex-wrap: wrap; } - .markPrompt { + .annotationPrompt { display: flex; align-items: center; justify-content: flex-start; diff --git a/src/views/demo/system/mediaLibrary/path/pathLeftMenu.vue b/src/views/demo/system/mediaLibrary/path/pathLeftMenu.vue index df01a12..59ebc33 100644 --- a/src/views/demo/system/mediaLibrary/path/pathLeftMenu.vue +++ b/src/views/demo/system/mediaLibrary/path/pathLeftMenu.vue @@ -24,13 +24,14 @@
@@ -103,10 +104,10 @@
-
- - - - +
+ + + +
- +
-
{{ show.name }}
+
{{ show.name }}
@@ -286,9 +289,9 @@
@@ -407,12 +410,7 @@ CheckCircleOutlined, StopOutlined, } from '@ant-design/icons-vue'; - import { - GetWorkAreaList, - AddWorkArea, - UpdateWorkArea, - DeleteWorkArea, - } from '@/api/demo/mediaLibrary'; + import { UpdateWorkArea, UpdateAnnotation } from '@/api/demo/mediaLibrary'; import { cloneDeep } from 'lodash-es'; import { useMessage } from '@/hooks/web/useMessage'; const { createMessage, createConfirm } = useMessage(); @@ -420,8 +418,8 @@ const props = defineProps([ 'pathRecord', 'leftMenuShow', - 'allMarkDataList', - 'nowShowMarkData', + 'allAnnotationDataList', + 'nowShowAnnotationData', 'allImageDataList', 'nowShowImageData', 'allAreaDataList', @@ -431,19 +429,20 @@ 'changeLeftMenuShow', 'handlerLocation', 'closePathModal', - 'changeMarkInfoShow', - 'setNowShowMarkData', + 'changeAnnotationInfoShow', + 'setNowShowAnnotationData', 'setNowShowImageData', 'setNowShowAreaData', 'setAllAreaData', - 'deleteMark', + 'setAllAnnotationData', + 'deleteAnnotation', 'deleteArea', ]); - const showMenuInfoList = ref(props.allMarkDataList); + const showMenuInfoList = ref(props.allAnnotationDataList); const showMenuInfoName = ref('地图标注'); function updateShowMenuInfoList(type) { if (type == '地图标注') { - showMenuInfoList.value = props.allMarkDataList; + handleChangeAnnotationSearch(); } if (type == '地图照片') { showMenuInfoList.value = props.allImageDataList; @@ -461,7 +460,6 @@ function closePathModal() { emits('closePathModal'); } - // 地图图片-加载到地图上 function funAddOrRemoveToMap(show) { show.show_on_map = !show.show_on_map; @@ -472,9 +470,51 @@ } } + // 地图标注-搜索 + const filterAfterAnnotationDataList = ref(props.allAnnotationDataList); + function handleChangeAnnotationSearch() { + let filterAnnotationData = props.allAnnotationDataList; + // if (areatype.value !== 'all') { + // filterAnnotationData = filterAnnotationData.filter((item) => item.type == areatype.value); + // } + // if (areastate.value !== 'all') { + // filterAnnotationData = filterAnnotationData.filter((item) => item.state == areastate.value); + // } + filterAfterAnnotationDataList.value = filterAnnotationData; + showMenuInfoList.value = filterAfterAnnotationDataList.value; + } // 地图标注-删除标注 - function deleteMark(show) { - emits('deleteMark', show); + function deleteAnnotation(show) { + show.deleteClickNum = 0; + emits('deleteAnnotation', show); + } + // 地图标注-显示该标注 + function showThisAnnotation(value) { + setNowShowAnnotationData({ + ...value, + state: 0, + }); + UpdateAnnotation({ + ...value, + properties: JSON.stringify(value.properties), + state: 0, + }).then((res) => { + emits('setAllAnnotationData'); + }); + } + // 地图标注-隐藏该标注 + function hideThisAnnotation(value) { + setNowShowAnnotationData({ + ...value, + state: 1, + }); + UpdateAnnotation({ + ...value, + properties: JSON.stringify(value.properties), + state: 1, + }).then((res) => { + emits('setAllAnnotationData'); + }); } // 地图作业区域------------------------------------------------- @@ -519,12 +559,7 @@ }); UpdateWorkArea({ ...value, - // id: value.id, - // name: value.name, - // type: value.type, properties: JSON.stringify(value.properties), - // geom: value.geom, - // workSpaceId: '1', state: 0, }).then((res) => { emits('setAllAreaData'); @@ -537,13 +572,8 @@ state: 1, }); UpdateWorkArea({ - // id: value.id, - // name: value.name, - // type: value.type, ...value, properties: JSON.stringify(value.properties), - // geom: value.geom, - // workSpaceId: '1', state: 1, }).then((res) => { emits('setAllAreaData'); @@ -555,8 +585,8 @@ } // 设定当前标记 - function setNowShowMarkData(value) { - emits('setNowShowMarkData', value); + function setNowShowAnnotationData(value) { + emits('setNowShowAnnotationData', value); } // 设定当前图片 function setNowShowImageData(value) { @@ -689,7 +719,7 @@ padding-bottom: 5px; gap: 10px; - .leftMenu_buttonList_mark { + .leftMenu_buttonList_annotation { position: relative; border-radius: 5px; height: 40px; @@ -739,7 +769,7 @@ max-height: 800px; // 地图标注 - .showMenuInfo_mark { + .showMenuInfo_annotation { position: relative; display: flex; align-items: center; diff --git a/src/views/demo/system/mediaLibrary/path/pathMap.vue b/src/views/demo/system/mediaLibrary/path/pathMap.vue index 9932398..4161975 100644 --- a/src/views/demo/system/mediaLibrary/path/pathMap.vue +++ b/src/views/demo/system/mediaLibrary/path/pathMap.vue @@ -1,6 +1,6 @@