1
guanqb
2023-02-24 42f5ae3b76d69b8d8197bb843c2b809e96330a2c
1
1 files modified
62 ■■■■■ changed files
src/views/video/region.vue 62 ●●●●● patch | view | raw | blame | history
src/views/video/region.vue
@@ -39,10 +39,10 @@
                                </el-table-column>
                                <el-table-column prop="id" label="操作" min-width="50%">
                                    <template slot-scope="scope">
                                        <el-button @click="flytoRange(scope.row)" type="text" size="small" title="定位">
                                        <el-button @click.stop="flytoRange(scope.row)" type="text" size="small" title="定位">
                                            <i class="el-icon-location"></i>
                                        </el-button>
                                        <el-button @click="deleteRegionSaveList(scope.row.id)" type="text" size="small"
                                        <el-button @click.stop="deleteRegionSaveList(scope.row.id)" type="text" size="small"
                                            title="删除">
                                            <i class="el-icon-delete"></i>
                                        </el-button>
@@ -561,7 +561,10 @@
                        }
                    })
                }
                this.$EventBus.$emit('mapRemoveLayer', {
                    layerName: 'monitoringLayers',
                    type: 'VectorLayer'
                })
            } else {
                this.isShowVideo = {
                    video1: false,
@@ -583,8 +586,8 @@
                    type7: '',
                    type8: ''
                }
                getRegionList({
                if(row.type == 2){
                    getRegionList({
                    page: 1,
                    count: 20,
                    id: row.id
@@ -618,6 +621,52 @@
                        }
                    })
                })
                }else{
                    let positionStr = row.positions.replace(/,/g,';')
                    positionStr = positionStr.replace(/ /g,',')
                    positionStr += ';'
                    let coords = global.DC.GeoTools.polylineBuffer(positionStr, row.width)
                    let polygon = new global.DC.Polygon(coords)
                    let position = ''
                    polygon._positions.forEach(item => {
                        position += item._lng + ',' + item._lat + ';'
                    })
                    getRegionList({
                    page: 1,
                    count: 20,
                    range: position
                }).then(res => {
                    let monitorData = res.data.data.list
                    this.monitoringList = res.data.data.list
                    this.$EventBus.$emit('mapRemoveLayer', {
                        layerName: 'monitoringLayers',
                        type: 'VectorLayer'
                    })
                    this.initMonitoringIcon()
                    this.monitorOption = []
                    monitorData.forEach((item, index) => {
                        this.monitorOption.push({ value: index, label: item.name, item })
                        if (index < 8) {
                            const ind = index + 1
                            this.isShowVideo[`video${ind}`] = true
                            this.monitor[`type${ind}`] = item.name
                            if (item.status == 0) {
                                this.isShowOutline[`video${ind}`] = true
                            }
                            this.getDevices(item.channelId).then(res => {
                                this.playVideoList(`flvPlayer${ind}`, `${res}`, `videoElement${ind}`)
                            })
                        }
                    })
                })
                }
            }
            this.saveRangeID = row.id
        },
@@ -737,6 +786,8 @@
            }
        },
        //#region
        // enterVideoBox (num) {
        //     for (let key in this.isShowSelect) {
        //         this.isShowSelect[key] = false
@@ -785,6 +836,7 @@
        // enterSelectBox (num) {
        //     this.isShowSelect[`video${num}`] = true
        // },
        // #endregion
    },