From 5a825f8ae5b3247574482dae5636df0fc88bd931 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sun, 02 Apr 2023 10:34:38 +0800
Subject: [PATCH] 视频监控和电子沙盘调整

---
 src/views/activity/components/twoDrawBtnBox.vue |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/src/views/activity/components/twoDrawBtnBox.vue b/src/views/activity/components/twoDrawBtnBox.vue
index 81d41f7..84e2a57 100644
--- a/src/views/activity/components/twoDrawBtnBox.vue
+++ b/src/views/activity/components/twoDrawBtnBox.vue
@@ -44,6 +44,9 @@
                     <li>
                         <button @click="drawThreeArrow('polygon', 'polygon', 'polygon')" title="多边形">多边形</button>
                     </li>
+                    <li>
+                        <button @click="drawThreeArrow('brokenline', 'brokenline', 'brokenline')" title="折线">折线</button>
+                    </li>
                 </ul>
             </div>
             <div>
@@ -230,6 +233,25 @@
                     outlineColor: global.DC.Namespace.Cesium.Color.fromBytes(64, 158, 255, 255),
                     outlineWidth: 4.0,
                 })
+            } else if (type == 'brokenline') {
+                drawThreeTool && drawThreeTool.draw('polyline', overlay => {
+                    if (drawFlag) return
+                    if (overlay) {
+                        addPlotOverlayData = overlay
+                        overlay.customType = 'brokenline'
+                        that.$parent.addArrowsListLayer(overlay)
+                        let polygonPosition = overlay.positions.map(item => `${item.lng} ${item.lat}`).join()
+                        const altitude = overlay.positions.map(item => item.alt).join()
+                        setTimeout(() => {
+                            that.$parent.addSaveNewDraw(polygonPosition, 10, altitude)
+                        }, 100)
+                        currentStatus = ''
+                        that.startDrawFlag = false
+                    }
+                }, {
+                    material: global.DC.Namespace.Cesium.Color.fromBytes(64, 158, 255, 122),
+                    width: 4
+                })
             } else if (type == 'billboard') {
                 drawThreeTool && drawThreeTool.draw(type, overlay => {
                     if (drawFlag) return
@@ -278,7 +300,7 @@
         // 编辑标绘位置
         plotEdit (overlayData, type) {
             currentEmitEl = overlayData
-            if (overlayData.customType == 'polygon') {
+            if (overlayData.customType == 'polygon' || overlayData.customType == 'brokenline') {
                 currentStatus = 'emit'
                 drawThreeTool.edit(overlayData, (e) => {
                     let polygonPosition = e.positions.map(item => `${item.lng} ${item.lat}`).join()

--
Gitblit v1.9.3