From e2f341b73943753e6ea96cf6d85a09ce070e2ee1 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 07 Apr 2023 10:46:03 +0800
Subject: [PATCH] 社区、电子沙盘

---
 src/views/activity/components/polygonPlot.vue |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/views/activity/components/polygonPlot.vue b/src/views/activity/components/polygonPlot.vue
index 29a7248..257da4a 100644
--- a/src/views/activity/components/polygonPlot.vue
+++ b/src/views/activity/components/polygonPlot.vue
@@ -3,20 +3,27 @@
         <el-dialog title="修改标绘" :visible.sync="editPlotVisible" :modal="true" :close-on-click-modal="false"
             :modal-append-to-body="false" class="edit-plot-box">
             <div>
+                <div class="value-name-box">描述:</div>
+                <div class="input-width-box" style="flex: 1;">
+                    <input style="width: 100%;" type="text" v-model="polygonRemark" placeholder="请输入..." />
+                </div>
+            </div>
+
+            <div>
                 <div class="value-name-box">选择标绘颜色:</div>
                 <div class="pick-color-box">
                     <el-color-picker v-model="choosePlotColor" :predefine="predefineColors" size="small">
                     </el-color-picker>
                 </div>
             </div>
-            <div v-show="!polygonName" class="placeholder"></div>
+
             <div>
                 <div class="value-name-box">设置透明度:</div>
                 <div class="alpha">
                     <el-slider :min="1" v-model="choosePlotColorAlpha" :format-tooltip="formatTooltip"></el-slider>
                 </div>
             </div>
-            <div v-show="!polygonName" class="placeholder"></div>
+
             <div class="edit-plot-btn-box">
                 <el-button @click="savePlot">保存</el-button>
                 <el-button @click="editPlot">编辑</el-button>
@@ -27,6 +34,13 @@
 
         <el-dialog title="新增标绘" :visible.sync="polygonAddVisible" :modal="true" :close-on-click-modal="false"
             :modal-append-to-body="false" class="add-polygon-box" :before-close="cancelSavePolygon">
+            <div class="line">
+                <div class="value-name-box">描述:</div>
+                <div class="input-width-box" style="flex: 1;">
+                    <input style="width: 100%;" type="text" v-model="polygonRemark" placeholder="请输入..." />
+                </div>
+            </div>
+
             <div class="line" v-show="isNeedPolygonType">
                 <div class="value-name-box">选择类型:</div>
                 <div class="select-type">
@@ -36,6 +50,7 @@
                     </el-select>
                 </div>
             </div>
+
             <div class="line">
                 <div class="value-name-box">选择标绘颜色:</div>
                 <div class="pick-color-box">
@@ -49,7 +64,7 @@
                     <el-slider :min="1" v-model="choosePlotColorAlpha" :format-tooltip="formatTooltip"></el-slider>
                 </div>
             </div>
-            <div class="placeholder" v-show="!isNeedPolygonType"></div>
+
             <div class="add-polygon-btn-box">
                 <el-button @click="savePolygonInfo">保存</el-button>
                 <el-button @click="cancelSavePolygon">取消</el-button>
@@ -94,6 +109,7 @@
                 '#c7158577'
             ],
             choosePlotColor: '#409EFF',
+            polygonRemark: '',
             choosePlotColorAlpha: 48,
             polygonAreaType: 1,
             isNeedPolygonType: false,
@@ -133,6 +149,7 @@
 
             this.isNeedPolygonType = false
             this.choosePlotColor = color
+            this.polygonRemark = ''
             this.choosePlotColorAlpha = 100
             this.polygonAddVisible = true
         },
@@ -142,6 +159,7 @@
             polygonPlotData = positions
             this.plotSaveType = type
             this.choosePlotColor = '#409EFF'
+            this.polygonRemark = ''
             this.choosePlotColorAlpha = 48
 
             if (type == 5) {
@@ -158,6 +176,7 @@
         setCurOver (e) {
             plotOverlayData = e
 
+            this.polygonRemark = e.overlay.attrParams.remark
             this.choosePlotColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color.slice(0, 7) : '#409EFF'
             this.choosePlotColorAlpha = e.overlay.attrParams.color != '' ? Number(e.overlay.attrParams.color.split(',')[1]) : 100
 
@@ -225,7 +244,11 @@
 
         // 保存标绘修改
         savePlot () {
-            this.$parent.updateSecurityPlot({ id: plotOverlayData.overlay.attrParams.id, color: this.choosePlotColor + ',' + this.choosePlotColorAlpha }, plotOverlayData.overlay)
+            this.$parent.updateSecurityPlot({
+                id: plotOverlayData.overlay.attrParams.id,
+                color: this.choosePlotColor + ',' + this.choosePlotColorAlpha,
+                remark: this.polygonRemark
+            }, plotOverlayData.overlay)
             this.editPlotVisible = false
         },
 
@@ -258,6 +281,7 @@
                 position: positionStr,
                 type: this.plotSaveType,
                 color: this.choosePlotColor + ',' + this.choosePlotColorAlpha,
+                remark: this.polygonRemark,
                 areaType: this.polygonAreaType,
                 altitude: polygonAltArray
             })

--
Gitblit v1.9.3