shuishen
2023-04-21 15194e4e1e5256936f99d1f6b8a265a1f46519ba
src/views/activity/components/polygonPlot.vue
@@ -10,6 +10,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="customImageShow">
                    <div class="value-name-box">
                        选择图片:
@@ -111,7 +121,7 @@
                </div>
                <div v-show="customImageShow" style="font-size: 12px;">
                    <span>建议图像尺寸:32x32、大小:10kb以内</span>
                    <span>建议图像格式:png、尺寸:32x32、大小:10kb以内</span>
                </div>
                <div class="btn-box">
@@ -178,15 +188,15 @@
            restPlotSelectArray: [
                {
                    value: 6,
                    label: '普通群众',
                    label: '群众',
                },
                {
                    value: 7,
                    label: '保护对象',
                    label: '关注对象',
                },
                {
                    value: 8,
                    label: '危险人物',
                    label: '其他对象',
                },
            ],
@@ -270,6 +280,11 @@
            this.curImgUrl = e.overlay.icon
            if (e.overlay.attrParams.item.type == 6 || e.overlay.attrParams.item.type == 7 || e.overlay.attrParams.item.type == 8) {
                this.restPlotType = e.overlay.attrParams.item.type
                this.restSelectBox = true
            }
            if (e.overlay.attrParams.item.type == 11) this.customImageShow = true
            this.choosePlotColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color.slice(0, 7) : '#409EFF'
@@ -339,11 +354,16 @@
        // 保存标绘修改
        savePlot () {
            let obj = {}
            if (this.restSelectBox == true) {
                obj.type = this.restPlotType
            }
            this.$parent.updateSecurityPlot({
                id: plotOverlayData.overlay.attrParams.id,
                color: this.choosePlotColor + ',' + this.choosePlotColorAlpha,
                remark: this.polygonRemark,
                icon: this.curImgUrl
                icon: this.curImgUrl,
                ...obj
            }, plotOverlayData.overlay)
            this.editPlotVisible = false
        },