From 8e79b5c74f4c0f52cff9f18991cde9cfc16d270f Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Mon, 01 Jul 2024 14:57:05 +0800
Subject: [PATCH] fix: /subscribeTopic /unsubscribeTopic 注释
---
src/components/common/sidebar.vue | 3 +
src/utils/cesium/use-map-draw.ts | 64 +++++++++++++++++++++++--------
vite.config.ts | 1
.gitignore | 1
src/components/waylinetool/event-edit.vue | 6 ++-
src/components/waylinetool/component/interval-shoot.vue | 4 +-
src/pages/page-web/projects/tsa.vue | 3 +
7 files changed, 59 insertions(+), 23 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8b3eb3a..f089e4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
node_modules
.DS_Store
dist
+drone-web
dist-ssr
*.local
node_modules/
diff --git a/src/components/common/sidebar.vue b/src/components/common/sidebar.vue
index b70b687..c70f83c 100644
--- a/src/components/common/sidebar.vue
+++ b/src/components/common/sidebar.vue
@@ -75,7 +75,8 @@
async function goBack () {
const query = toRefs(osdVisible.value)
snList.value.forEach(async (v: string) => {
- await UnBind(v)
+ // TODO:暂时注释
+ // await UnBind(v)
})
store.commit('SET_OSD_VISIBLE_INFO', { ...query, visible: false })
store.commit('SET_SELECT_WAYLINE_INFO', {})
diff --git a/src/components/waylinetool/component/interval-shoot.vue b/src/components/waylinetool/component/interval-shoot.vue
index a6bda31..9dde677 100644
--- a/src/components/waylinetool/component/interval-shoot.vue
+++ b/src/components/waylinetool/component/interval-shoot.vue
@@ -2,9 +2,9 @@
* @Author: GuLiMmo 2820890765@qq.com
* @Date: 2024-03-27 15:15:50
* @LastEditors: GuLiMmo 2820890765@qq.com
- * @LastEditTime: 2024-03-28 09:36:06
+ * @LastEditTime: 2024-04-02 11:15:06
* @FilePath: /drone-web/src/components/waylinetool/component/interval-shoot.vue
- * @Description: 航点事件-单拍
+ * @Description: 航点事件-等距拍摄
* Copyright (c) 2024 by GuLiMmo, All Rights Reserved.
-->
diff --git a/src/components/waylinetool/event-edit.vue b/src/components/waylinetool/event-edit.vue
index 89c6c36..4d76d29 100644
--- a/src/components/waylinetool/event-edit.vue
+++ b/src/components/waylinetool/event-edit.vue
@@ -11,13 +11,15 @@
<span @click="handleDelAction"><DeleteOutlined /></span>
</div>
</div>
- {{ currentPointEvent.aciton }}
<div class="event-edit">
<take-photo
v-model:serial="serial"
v-if="['takePhoto', 'startRecord'].includes(currentPointEvent.aciton.key)"
/>
- <interval-shoot v-model:serial="serial" />
+ <interval-shoot
+ v-model:serial="serial"
+ v-if="['distance'].includes(currentPointEvent.aciton.key)"
+ />
</div>
</div>
<div class="map-box"></div>
diff --git a/src/pages/page-web/projects/tsa.vue b/src/pages/page-web/projects/tsa.vue
index 346dd25..2a6c295 100644
--- a/src/pages/page-web/projects/tsa.vue
+++ b/src/pages/page-web/projects/tsa.vue
@@ -522,7 +522,8 @@
onlineDevices.data.push(device)
}
snList.push(gateway.device_sn)
- bind(gateway.device_sn)
+ // TODO: 暂时注释
+ // bind(gateway.device_sn)
})
store.commit('SET_SN_LIST', snList)
})
diff --git a/src/utils/cesium/use-map-draw.ts b/src/utils/cesium/use-map-draw.ts
index ecfb633..4c2b631 100644
--- a/src/utils/cesium/use-map-draw.ts
+++ b/src/utils/cesium/use-map-draw.ts
@@ -5,7 +5,7 @@
import { ref } from 'vue'
import { cesiumOperation } from '/@/hooks/use-cesium-tsa'
import { XMLToJSON } from './kmz'
-import _ from 'lodash'
+import _, { includes } from 'lodash'
const { addPolyline, getEntityById, removeAllDataSource, removeAllPoint } = cesiumOperation()
const getResource = (name: string) => {
@@ -51,12 +51,12 @@
icon: getResource('waylinetool/camera-off.png'),
},
{
- key: 'time',
+ key: 'multipleTiming',
name: '开始等时间隔拍照',
icon: getResource('waylinetool/shoot1.png'),
},
{
- key: 'distance',
+ key: 'multipleDistance',
name: '开始等距间隔拍照',
icon: getResource('waylinetool/shoot2.png'),
},
@@ -91,7 +91,7 @@
key: 'panoShot',
name: '全景拍摄',
icon: getResource('waylinetool/panoramicview.png'),
- }
+ },
]
const waylinePointsEvent = ref<tragetPoint[]>([])
@@ -315,30 +315,60 @@
}
const kmlJson = XMLToJSON(kmlRes).Document
const points = Array.isArray(kmlJson.Folder?.Placemark) ? kmlJson.Folder.Placemark : [kmlJson.Folder.Placemark]
- let takePhotoNum = 0
points?.forEach((point: { actionGroup: any }, index: number) => {
if (point !== undefined) {
if (Reflect.has(point, 'actionGroup')) {
- const action = point.actionGroup.action
- if (Array.isArray(action)) {
- action.forEach((item) => {
- const { actionActuatorFunc } = item
- actionActuatorFunc?.['#text'] === 'takePhoto' && takePhotoNum++
- const actionObj: eventParmas | any = actionList.find((event) => actionActuatorFunc['#text'] === event.key)
- waylinePointsEvent.value[index].eventList?.push(actionObj)
+ if (Array.isArray(point.actionGroup)) {
+ const actionGroups = point.actionGroup
+ actionGroups.forEach((actionGroup) => {
+ const action = actionGroup.action
+ const actionTrigger = actionGroup.actionTrigger
+ pointActionShow(action, actionTrigger, index)
})
} else {
- action?.actionActuatorFunc['#text'] === 'takePhoto' && takePhotoNum++
- const actionObj: eventParmas | any = actionList.find(
- (item) => action?.actionActuatorFunc['#text'] === item.key,
- )
- waylinePointsEvent.value[index].eventList?.push(actionObj)
+ const action = point.actionGroup.action
+ const actionTrigger = point.actionGroup.actionTrigger
+ pointActionShow(action, actionTrigger, index)
}
}
}
})
waylineDetails[3].value = takePhotoNum
}
+
+ let takePhotoNum = 0
+ const pointActionShow = (
+ action: { forEach: (arg0: (item: any) => void) => void; actionActuatorFunc: { [x: string]: string } },
+ actionTrigger: { actionTriggerType: { [x: string]: string } },
+ index: number,
+ ) => {
+ if (Array.isArray(action)) {
+ action.forEach((item) => {
+ const { actionActuatorFunc } = item
+ actionActuatorFunc?.['#text'] === 'takePhoto' && takePhotoNum++
+ const actionObj: eventParmas | any = actionList.find((event) => {
+ if (actionTrigger?.actionTriggerType['#text'] === event.key) {
+ return actionTrigger?.actionTriggerType['#text'] === event.key
+ } else {
+ return actionActuatorFunc['#text'] === event.key
+ }
+ })
+ waylinePointsEvent.value[index].eventList?.push(actionObj)
+ })
+ } else {
+ action?.actionActuatorFunc['#text'] === 'takePhoto' && takePhotoNum++
+ const actionObj: eventParmas | any = actionList.find((item) => {
+ const actionTriggerType = actionTrigger.actionTriggerType['#text']
+ if (['multipleDistance', 'multipleTiming'].includes(actionTriggerType)) {
+ return actionTriggerType === item.key
+ } else {
+ return action?.actionActuatorFunc['#text'] === item.key
+ }
+ })
+ waylinePointsEvent.value[index].eventList?.push(actionObj)
+ }
+ }
+
const clearWaylineData = () => {
kmlEntities.value = []
waylinePointsEvent.value = []
diff --git a/vite.config.ts b/vite.config.ts
index 3e4c986..8076f49 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -96,6 +96,7 @@
build: {
target: ['es2015'], // 最低支持 es2015
sourcemap: true,
+ outDir: 'drone-web'
},
}
})
--
Gitblit v1.9.3