From 8872fbb3b6def931350d18515bf6d40f4dab0ce1 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Tue, 18 Apr 2023 15:34:42 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs

---
 src/views/activity/components/polygonPlot.vue |   63 +++++++++++++++++++++++++------
 1 files changed, 51 insertions(+), 12 deletions(-)

diff --git a/src/views/activity/components/polygonPlot.vue b/src/views/activity/components/polygonPlot.vue
index 6a1585b..e33ea1a 100644
--- a/src/views/activity/components/polygonPlot.vue
+++ b/src/views/activity/components/polygonPlot.vue
@@ -61,6 +61,16 @@
                     </div>
                 </div>
 
+                <div class="line" v-show="restSelectBox">
+                    <div class="value-name-box">选择类型:</div>
+                    <div class="select-type" style="flex: 1;">
+                        <el-select size="small" v-model="restPlotType" placeholder="请选择类型">
+                            <el-option v-for="item in restPlotSelectArray" :key="item.value" :label="item.label"
+                                :value="item.value"></el-option>
+                        </el-select>
+                    </div>
+                </div>
+
                 <div class="line" v-show="isNeedPolygonType">
                     <div class="value-name-box">选择类型:</div>
                     <div class="select-type">
@@ -164,11 +174,28 @@
                 value: 2,
                 label: '缓冲区'
             }],
+
+            restPlotSelectArray: [
+                {
+                    value: 6,
+                    label: '普通群众',
+                },
+                {
+                    value: 7,
+                    label: '保护对象',
+                },
+                {
+                    value: 8,
+                    label: '危险人物',
+                },
+            ],
+
             plotId: '',
 
             customImageShow: false,
             imagesListShow: false,
-
+            restPlotType: 6,
+            restSelectBox: false,
             curImgUrl: '/img/icon/custom.png'
         }
     },
@@ -183,6 +210,8 @@
             polygonAltArray = `${positions.alt},${positions.alt}`
             polygonPlotData = `${positions.lng} ${positions.lat}`
             this.customImageShow = false
+            this.restSelectBox = false
+            this.restPlotType = 6
             let color = ''
 
             if (type == 'icon1') {
@@ -197,6 +226,9 @@
             } else if (type == 'icon4') {
                 this.customImageShow = true
                 this.plotSaveType = 11
+                color = '#ff0000'
+            } else if (type == 'icon5') {
+                this.restSelectBox = true
                 color = '#ff0000'
             } else {
                 color = '#1e32e6'
@@ -230,6 +262,8 @@
         },
 
         setCurOver (e) {
+            this.restSelectBox = false
+
             plotOverlayData = e
 
             this.polygonRemark = e.overlay.attrParams.item.remark
@@ -329,23 +363,28 @@
         savePolygonInfo () {
             let positionStr = ''
             let iconUrl = {}
-            if (this.plotSaveType >= 1 && this.plotSaveType <= 4) {
-                positionStr = polygonPlotData
-            } else if (this.plotSaveType == 5) {
-                positionStr = polygonPlotData
-            } else if (this.plotSaveType == 6 || this.plotSaveType == 7 || this.plotSaveType == 8) {
+
+            if (this.restSelectBox) {
                 positionStr = polygonPlotData + ',' + polygonPlotData
-            } else if (this.plotSaveType == 10) {
-                positionStr = polygonPlotData
-            } else if (this.plotSaveType == 11) {
-                positionStr = polygonPlotData + ',' + polygonPlotData
-                iconUrl = { iconUrl: this.curImgUrl }
+            } else {
+                if (this.plotSaveType >= 1 && this.plotSaveType <= 4) {
+                    positionStr = polygonPlotData
+                } else if (this.plotSaveType == 5) {
+                    positionStr = polygonPlotData
+                } else if (this.plotSaveType == 6 || this.plotSaveType == 7 || this.plotSaveType == 8) {
+                    positionStr = polygonPlotData + ',' + polygonPlotData
+                } else if (this.plotSaveType == 10) {
+                    positionStr = polygonPlotData
+                } else if (this.plotSaveType == 11) {
+                    positionStr = polygonPlotData + ',' + polygonPlotData
+                    iconUrl = { iconUrl: this.curImgUrl }
+                }
             }
 
             this.addSecurityPlot({
                 securityId: this.showingSecurityId,
                 position: positionStr,
-                type: this.plotSaveType,
+                type: this.restSelectBox ? this.restPlotType : this.plotSaveType,
                 color: this.choosePlotColor + ',' + this.choosePlotColorAlpha,
                 remark: this.polygonRemark,
                 areaType: this.polygonAreaType,

--
Gitblit v1.9.3