1
guanqb
2022-11-23 3251ab08cfd28068ae564d9141ed035255ade4de
1
1 files modified
11 ■■■■ changed files
src/views/video/list.vue 11 ●●●● patch | view | raw | blame | history
src/views/video/list.vue
@@ -270,7 +270,7 @@
            }
            const that = this
            graphicLayer.activate(type, (lastEventData) => {
                console.log('数据更新', lastEventData)
                console.log('数据更新')
                this.drawInfo = lastEventData
                this.isDrawed = true
                this.getRegionList(type, JSON.stringify(lastEventData))
@@ -288,8 +288,7 @@
        // 修改范围
        setRegion (range) {
            graphicLayer.addPolyLineGon(range, (lastEventData) => {
                // console.log('数据更新', JSON.stringify(lastEventData))
                console.log('数据更新', lastEventData)
                console.log('数据更新')
                this.drawInfo = lastEventData
                this.getRegionList('polyline', JSON.stringify(lastEventData))
            })
@@ -336,20 +335,17 @@
                if (this.isDrawed == false) {
                    alert('请先绘制线或者面')
                } else {
                    console.log(this.drawInfo, 222)
                    let drawPositionStr = ''
                    if (this.drawType == 1) {
                        this.drawInfo.forEach(item => {
                            drawPositionStr += item[0] + ' ' + item[1] + ','
                        })
                        drawPositionStr = drawPositionStr.slice(0, drawPositionStr.length - 1)
                        console.log(333, drawPositionStr)
                    } else {
                        this.drawInfo.forEach(item => {
                            drawPositionStr += item.lng + ' ' + item.lat + ','
                        })
                        drawPositionStr += this.drawInfo[0].lng + ' ' + this.drawInfo[0].lat
                        console.log(333, drawPositionStr)
                    }
                    this.insertRegionSaveList(this.drawType, drawPositionStr, this.drawName)
@@ -362,8 +358,7 @@
        insertRegionSaveList (type, positions, name) {
            insertRegionSaveList(type, positions, name).then(res => {
                console.log(res)
                console.log('已保存')
            })
        },
    },