From e612ba2e4847765022d5166323af3ec090427dfb Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 31 Mar 2023 17:13:47 +0800
Subject: [PATCH] 电子沙盘和视频监控和大搜调整

---
 src/views/activity/components/polygonPlot.vue |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/views/activity/components/polygonPlot.vue b/src/views/activity/components/polygonPlot.vue
index 7b3df0d..9ce360c 100644
--- a/src/views/activity/components/polygonPlot.vue
+++ b/src/views/activity/components/polygonPlot.vue
@@ -116,15 +116,23 @@
             polygonAltArray = `${positions.alt},${positions.alt}`
             polygonPlotData = `${positions.lng} ${positions.lat}`
 
+            let color = ''
+
             if (type == 'icon1') {
                 this.plotSaveType = 6
+                color = '#ff0000'
             } else if (type == 'icon2') {
                 this.plotSaveType = 7
+                color = '#ff0000'
             } else if (type == 'icon3') {
                 this.plotSaveType = 8
+                color = '#ff0000'
+            } else {
+                color = '#1e32e6'
             }
+
             this.isNeedPolygonType = false
-            this.choosePlotColor = type == 'icon3' ? '#d81e06' : '#409EFF'
+            this.choosePlotColor = color
             this.choosePlotColorAlpha = 100
             this.polygonAddVisible = true
         },
@@ -174,13 +182,20 @@
 
         // 删除标绘
         deletePlot () {
-            this.deleteSecurityPlot(this.plotId)
-            this.editPlotVisible = false
+            this.$confirm('确定要删除吗?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning',
+                customClass: 'draw-delete-confirm'
+            }).then(() => {
+                this.deleteSecurityPlot(this.plotId)
+            }).catch(() => { })
         },
 
         // 删除标绘接口
         deleteSecurityPlot (id) {
             deleteSecurityPlot(id).then(res => {
+                this.editPlotVisible = false
                 if (res.data.success) {
                     plotOverlayData != null && plotOverlayData.overlay != null && plotOverlayData.overlay.remove()
                     if (plotOverlayData != null && plotOverlayData.overlay != null && 'pointOverlayData' in plotOverlayData.overlay.attrParams) {

--
Gitblit v1.9.3