shuishen
2026-02-10 abd285e6d013128aa57c9e30e851b2aa76d60ec5
src/views/activity/components/polygonPlot.vue
@@ -80,7 +80,8 @@
                <div class="line" v-show="isNeedPolygonType">
                    <div class="value-name-box">选择类型:</div>
                    <div class="select-type" style="flex: 1;">
                        <el-select size="small" v-model="polygonAreaType" placeholder="请选择区域类型">
                        <el-select size="small" v-model="polygonAreaType" placeholder="请选择区域类型"
                            @change="polygonAreaTypeChange">
                            <el-option v-for="item in polygonAreaOption" :key="item.value" :label="item.label"
                                :value="item.value"></el-option>
                        </el-select>
@@ -96,6 +97,18 @@
                                style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 999; width: 20px; height: 20px;" />
                        </el-button>
                        <images-select v-show="imagesListShow" @curClick="curClick"></images-select>
                    </div>
                </div>
                <div class="line" v-show="warningImageShow">
                    <div class="value-name-box">警戒线样式:</div>
                    <div class="select-image" style="position: relative; display: flex; align-items: center;">
                        <el-button style="margin-top: 0; position: relative; background: transparent; border-color: #fff;"
                            @click="imagesListShow = !imagesListShow">
                            <img :src="warningImgUrl" alt
                                style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 999; width: 20px; height: 20px;" />
                        </el-button>
                        <Warning-select v-show="imagesListShow" @curClick="curClick"></Warning-select>
                    </div>
                </div>
@@ -140,7 +153,7 @@
export default {
    inject: ['userInfo'],
    props: ['showingSecurityId'],
    props: ['showingSecurityId', 'activityDeptId'],
    data () {
        return {
@@ -175,8 +188,13 @@
                label: '多边形'
            }, {
                value: 2,
                label: '电子围栏'
                label: '跑马灯'
            }, {
                value: 3,
                label: '瀑布墙'
            }],
            warningImageShow: false,
            restPlotSelectArray: [
                {
@@ -199,12 +217,17 @@
            imagesListShow: false,
            restPlotType: 6,
            restSelectBox: false,
            curImgUrl: '/img/icon/custom.png'
            curImgUrl: '/img/icon/custom.png',
            warningImgUrl: '/images/jjx3.png'
        }
    },
    methods: {
        curClick (item) {
            this.curImgUrl = item
        curClick (item, type) {
            if (type == 1) {
                this.curImgUrl = item
            } else {
                this.warningImgUrl = item
            }
            this.imagesListShow = false
        },
@@ -214,6 +237,7 @@
            polygonPlotData = `${positions.lng} ${positions.lat}`
            this.customImageShow = false
            this.restSelectBox = false
            this.warningImageShow = false
            this.restPlotType = 6
            let color = ''
@@ -252,6 +276,8 @@
            this.polygonRemark = ''
            this.choosePlotColorAlpha = 48
            this.customImageShow = false
            this.warningImageShow = false
            this.restSelectBox = false
            if (type == 5) {
                this.polygonAreaType = 1
@@ -267,6 +293,7 @@
        setCurOver (e) {
            this.restSelectBox = false
            this.customImageShow = false
            this.warningImageShow = false
            plotOverlayData = e
@@ -385,6 +412,9 @@
                    positionStr = polygonPlotData
                } else if (this.plotSaveType == 5) {
                    positionStr = polygonPlotData
                    if (this.polygonAreaType == 2) {
                        iconUrl = { iconUrl: this.warningImgUrl }
                    }
                } else if (this.plotSaveType == 6 || this.plotSaveType == 7 || this.plotSaveType == 8) {
                    positionStr = polygonPlotData + ',' + polygonPlotData
                } else if (this.plotSaveType == 10) {
@@ -429,8 +459,11 @@
                    })
                }
            })
        }
        },
        polygonAreaTypeChange (e) {
            e == 2 ? this.warningImageShow = true : this.warningImageShow = false
        }
    },
}
</script>