shuishen
2023-04-02 5a825f8ae5b3247574482dae5636df0fc88bd931
视频监控和电子沙盘调整
8 files modified
120 ■■■■ changed files
src/api/video/index.js 9 ●●●●● patch | view | raw | blame | history
src/styles/base/index.scss 8 ●●●● patch | view | raw | blame | history
src/views/activity/components/drawBtnBox.vue 27 ●●●● patch | view | raw | blame | history
src/views/activity/components/polygonPlot.vue 3 ●●●●● patch | view | raw | blame | history
src/views/activity/components/publicIndex.vue 11 ●●●●● patch | view | raw | blame | history
src/views/activity/components/twoDrawBtnBox.vue 24 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue 15 ●●●●● patch | view | raw | blame | history
src/views/video/list.vue 23 ●●●●● patch | view | raw | blame | history
src/api/video/index.js
@@ -72,6 +72,15 @@
    })
}
export const getRegionListAll = (params) => {
    return request({
        url: '/device/query/spatialQueryListAll',
        method: 'post',
        requestBaseUrl: 'outside',
        data: params
    })
}
/**
 * 历史线面数据更新
 * @param {*} type 线面类型
src/styles/base/index.scss
@@ -1314,12 +1314,16 @@
    }
    .el-message-box__btns {
        .el-button--primary {
        .el-button--primary,
        .btn-custom-cancel {
            color: #fff;
            background: rgba(8, 56, 185, 0.9) !important;
            border-color: rgba(8, 56, 185, 0.9) !important;
        }
        .el-button--primary:hover {
        .el-button--primary:hover,
        .btn-custom-cancel:hover {
            background: #66b1ff !important;
            border-color: #66b1ff !important;
        }
src/views/activity/components/drawBtnBox.vue
@@ -32,6 +32,9 @@
                    <li>
                        <button @click="drawThreeArrow('polygon', 'polygon', 'polygon')" title="多边形">多边形</button>
                    </li>
                    <li>
                        <button @click="drawThreeArrow('brokenline', 'brokenline', 'brokenline')" title="折线">折线</button>
                    </li>
                </ul>
            </div>
            <div>
@@ -97,7 +100,6 @@
        drawThreeArrow (type, billboardType = '', typeValue = '') {
            let flag
            this.$EventBus.$emit('tilesetLayerFlag', plotType, (e) => { flag = e })
            console.log(flag, 366666)
            if (flag != true) return
            drawFlag = false
@@ -163,9 +165,14 @@
                drawConfig = {
                    material: global.DC.Namespace.Cesium.Color.fromBytes(28, 160, 133, 122),
                }
            } else if (type == 'brokenline') {
                drawConfig = {
                    material: global.DC.Namespace.Cesium.Color.fromBytes(64, 158, 255, 122),
                    width: 4
                }
            }
            drawThreeTool.draw(type, overlay => {
            drawThreeTool.draw(type == 'brokenline' ? 'polyline' : type, overlay => {
                if (drawFlag) return
                if (overlay) {
                    if (type == 'polygon') {
@@ -201,6 +208,17 @@
                        }, 100)
                    }
                    if (type == 'brokenline') {
                        addPlotOverlayData = overlay
                        overlay.customType = 'brokenline'
                        that.$parent.addArrowsListLayer(overlay)
                        let polylinePosition = overlay.positions.map(item => `${item.lng} ${item.lat}`).join()
                        const altitude = overlay.positions.map(item => item.alt).join()
                        setTimeout(() => {
                            that.$parent.addSaveNewDraw(polylinePosition, 10, altitude)
                        }, 100)
                    }
                    global.viewer.scene.globe.depthTestAgainstTerrain = false
                    currentStatus = ''
                    that.startDrawFlag = false
@@ -217,7 +235,7 @@
            currentStatus = 'emit'
            currentEmitEl = overlayData
            global.viewer.scene.globe.depthTestAgainstTerrain = true
            if (overlayData.customType == 'polygon') {
            if (overlayData.customType == 'polygon' || overlayData.customType == 'brokenline') {
                drawThreeTool.edit(overlayData, (e) => {
                    let polygonPosition = e.positions.map(item => `${item.lng} ${item.lat}`).join()
                    const altitude = e.positions.map(item => item.alt).join()
@@ -286,6 +304,9 @@
                this.$parent.isHaveArrow = true
            } else {
                addPlotOverlayData.setStyle({
                    material: color
                })
                this.$parent.isHaveArrow = true
            }
        },
src/views/activity/components/polygonPlot.vue
@@ -248,7 +248,10 @@
                positionStr = polygonPlotData
            } else if (this.plotSaveType == 6 || this.plotSaveType == 7 || this.plotSaveType == 8) {
                positionStr = polygonPlotData + ',' + polygonPlotData
            } else if (this.plotSaveType == 10) {
                positionStr = polygonPlotData
            }
            this.addSecurityPlot({
                securityId: this.showingSecurityId,
                position: positionStr,
src/views/activity/components/publicIndex.vue
@@ -327,6 +327,7 @@
                this.$parent.tailedAttackArrowList = res.data.data.filter(item => item.type == 3)
                this.$parent.fineArrowList = res.data.data.filter(item => item.type == 4)
                this.$parent.polygonList = res.data.data.filter(item => item.type == 5)
                this.$parent.borkenList = res.data.data.filter(item => item.type == 10)
                this.isHaveArrow = res.data.data.some(item => {
                    return item.type != 6 && item.type != 7 && item.type != 8
@@ -376,6 +377,9 @@
                        chooseArrow.size = [32, 32]
                        chooseArrow.on(global.DC.MouseEventType.CLICK, this.reeditArrowClick)
                        pointCircleCarLayer.addOverlay(chooseArrow)
                    } else if (item.type == 10) {
                        this.initLayersCoverage('Polyline', color, item, position, altitude)
                        continue
                    }
                }
            })
@@ -418,6 +422,13 @@
                })
                coverage.customType = 'polygon'
            } else if (type == 'Polyline') {
                coverage.setStyle({
                    material: color.curColor,
                    width: 4
                })
                coverage.customType = 'brokenline'
            } else {
                coverage.setStyle({
                    material: color.curColor,
src/views/activity/components/twoDrawBtnBox.vue
@@ -44,6 +44,9 @@
                    <li>
                        <button @click="drawThreeArrow('polygon', 'polygon', 'polygon')" title="多边形">多边形</button>
                    </li>
                    <li>
                        <button @click="drawThreeArrow('brokenline', 'brokenline', 'brokenline')" title="折线">折线</button>
                    </li>
                </ul>
            </div>
            <div>
@@ -230,6 +233,25 @@
                    outlineColor: global.DC.Namespace.Cesium.Color.fromBytes(64, 158, 255, 255),
                    outlineWidth: 4.0,
                })
            } else if (type == 'brokenline') {
                drawThreeTool && drawThreeTool.draw('polyline', overlay => {
                    if (drawFlag) return
                    if (overlay) {
                        addPlotOverlayData = overlay
                        overlay.customType = 'brokenline'
                        that.$parent.addArrowsListLayer(overlay)
                        let polygonPosition = overlay.positions.map(item => `${item.lng} ${item.lat}`).join()
                        const altitude = overlay.positions.map(item => item.alt).join()
                        setTimeout(() => {
                            that.$parent.addSaveNewDraw(polygonPosition, 10, altitude)
                        }, 100)
                        currentStatus = ''
                        that.startDrawFlag = false
                    }
                }, {
                    material: global.DC.Namespace.Cesium.Color.fromBytes(64, 158, 255, 122),
                    width: 4
                })
            } else if (type == 'billboard') {
                drawThreeTool && drawThreeTool.draw(type, overlay => {
                    if (drawFlag) return
@@ -278,7 +300,7 @@
        // 编辑标绘位置
        plotEdit (overlayData, type) {
            currentEmitEl = overlayData
            if (overlayData.customType == 'polygon') {
            if (overlayData.customType == 'polygon' || overlayData.customType == 'brokenline') {
                currentStatus = 'emit'
                drawThreeTool.edit(overlayData, (e) => {
                    let polygonPosition = e.positions.map(item => `${item.lng} ${item.lat}`).join()
src/views/activity/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-24 16:36:55
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-30 15:41:16
 * @LastEditTime: 2023-04-02 10:05:16
 * @FilePath: \srs-police-affairs\src\views\activity\index.vue
 * @Description: 
 * 
@@ -139,6 +139,17 @@
                                                </ul>
                                            </el-collapse-item>
                                        </el-collapse>
                                        <el-collapse v-model="borkenlineIndex" accordion>
                                            <el-collapse-item title="折线" :name="dbx">
                                                <ul>
                                                    <li v-for="(polygonItem, index) in borkenList" :key="polygonItem.id"
                                                        @click="carOrPoliceItemClick(polygonItem.position, 'polygon')">
                                                        折线{{ index + 1 }}
                                                    </li>
                                                </ul>
                                            </el-collapse-item>
                                        </el-collapse>
                                    </el-collapse>
                                </el-collapse-item>
                            </el-collapse>
@@ -222,6 +233,8 @@
            tailedAttackArrowList: [],
            fineArrowList: [],
            polygonList: [],
            borkenlineIndex: '',
            borkenList: [],
            normalPeopleList: [],
            protectedPeopleList: [],
            dangerousPeopleList: [],
src/views/video/list.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-01 17:47:19
 * @LastEditTime: 2023-04-02 10:33:36
 * @FilePath: \srs-police-affairs\src\views\video\list.vue
 * @Description: 辖区管理
 * 
@@ -133,7 +133,7 @@
import {
    getDevices,
    getRegionList,
    getRegionListAll,
    getTreeDevices,
    getSearchTreeDevices,
} from '@/api/video/index.js'
@@ -402,7 +402,7 @@
            drawPlotData = null
            this.getEquipmentAll({ type: 1, deptid: this.userInfo.dept_id })
            this.searchChange(this.searchValue)
        },
        // 大小重置
@@ -415,11 +415,11 @@
            this.searchLazyFlag = false
            this.searchValue = ''
            this.drawDialogVisible = false
            this.loading()
            this.searchTreeData = []
            const color = this.chooseRangeColor + ',' + this.choosePlotColorAlpha
@@ -437,10 +437,10 @@
                type: 'VectorLayer'
            })
            this.getRegionList(drawPlotData)
            this.getRegionListAll(drawPlotData)
        },
        getRegionList ({ customType, positions }) {
        getRegionListAll ({ customType, positions }) {
            let positionStr = ''
            const color = this.chooseRangeColor + ',' + this.choosePlotColorAlpha
@@ -477,12 +477,9 @@
                positionStr = positionStr + positions[0].lng + ',' + positions[0].lat + ';'
            }
            this.searchTreeData = []
            getRegionList({
                page: 1,
                count: 20,
                range: positionStr
            getRegionListAll({
                range: positionStr,
                name: this.searchValue
            }).then(res => {
                this.searchTreeData = res.data.data