From dfd2e9de21f4c80f4d4735e180a0f1a034fca67e Mon Sep 17 00:00:00 2001
From: rain <1679827795@qq.com>
Date: Tue, 06 May 2025 14:22:59 +0800
Subject: [PATCH] 页面风格与其他保持一致,处理中状态上传图片添加必填项限制,去掉“并派发”,下方按钮变更为“受理”、“不受理”、“取消”
---
src/components/map-container/mapContainer.vue | 37 ++++++++++++++++++++++++++++++-------
1 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/src/components/map-container/mapContainer.vue b/src/components/map-container/mapContainer.vue
index e74385f..5cae64e 100644
--- a/src/components/map-container/mapContainer.vue
+++ b/src/components/map-container/mapContainer.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-10-25 15:07:51
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2025-04-14 23:09:33
+ * @LastEditTime: 2025-04-28 11:34:40
* @FilePath: \drone-web-manage\src\components\map-container\mapContainer.vue
* @Description:
*
@@ -19,6 +19,8 @@
</template>
<script setup>
+import * as turf from '@turf/turf'
+
import { nextTick, onMounted, onUnmounted } from 'vue'
import { read } from 'xlsx'
@@ -65,8 +67,13 @@
credit: 'stand_tc',
})
- window.$viewer = new DC.Viewer('viewer-container')
+ window.$viewer = new DC.Viewer('viewer-container', {
+ "sceneMode": 2 //1: 2.5D,2: 2D,3: 3D
+ })
+
window.$viewer.locationBar.enable = false
+
+ window.$viewer?.zoomToPosition(new DC.Position(115.892151, 28.676493, 1000000, 0, -90, 0))
window.$viewer?.imageryLayers.addImageryProvider(imageryProvider_stand)
window.$viewer?.imageryLayers.addImageryProvider(imageryProvider_standZh)
@@ -100,6 +107,8 @@
* @param data 数据 数据格式 [lng, lat]
*/
function addPoint (data) {
+ if (pointLayer) pointLayer.clear()
+
const [lng, lat] = data
if (!lng || !lat) return
@@ -117,6 +126,8 @@
* @param data 数据 数据格式 [[lng, lat], [lng, lat], [lng, lat]]
*/
function addPolyline (data) {
+ if (polylineLayer) polylineLayer.clear()
+
if (data.length === 0) return
const positionStr = data.map(item => {
@@ -129,15 +140,27 @@
let polyline = new DC.Polyline(positionStr)
polyline.setStyle({
- width: 20,
- material: new DC.PolylineLightingTrailMaterialProperty({
- color: DC.Color.BLUE,
- speed: 5.0
+ width: 4,
+ material: new DC.PolylineTrailMaterialProperty({
+ color: DC.Color.DEEPSKYBLUE,
+ speed: 10
}),
clampToGround: true
})
polylineLayer.addOverlay(polyline)
- window.$viewer?.zoomTo(polylineLayer)
+
+ const line = turf.lineString(positionStr.split(';').map(i => i.split(',')))
+ const bbox = turf.bbox(line)
+ const bboxPolygon = turf.bboxPolygon(bbox)
+ const scaledPolygon = turf.transformScale(bboxPolygon, 3)
+ const newBbox = turf.bbox(scaledPolygon)
+
+ window.$viewer?.flyToBounds(
+ newBbox,
+ { heading: 0, pitch: -90, roll: 0 },
+ () => { },
+ 0
+ )
}
onMounted(() => {
--
Gitblit v1.9.3