shuishen
2023-02-22 d907842fe252876352ce61919c4eafb9d08a71ba
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
6 files modified
209 ■■■■ changed files
public/static/config copy.js 2 ●●● patch | view | raw | blame | history
src/api/activity/index.js 7 ●●●● patch | view | raw | blame | history
src/styles/base/index.scss 53 ●●●● patch | view | raw | blame | history
src/styles/media/index.scss 48 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue 95 ●●●● patch | view | raw | blame | history
src/views/video/list.vue 4 ●●●● patch | view | raw | blame | history
public/static/config copy.js
@@ -29,7 +29,7 @@
    VUE_APP_INTRANET_VIDEO: 'http://10.141.11.11:18185/api',
    // 设备通道号
    VUE_APP_OUTER_NET_EQUIPMENT: '34020000002000000003',
    VUE_APP_OUTER_NET_EQUIPMENT: '36110000002009999000',
    VUE_APP_INTRANET_EQUIPMENT: '36110000002009999000',
    // 模型地址
src/api/activity/index.js
@@ -262,14 +262,11 @@
 * @param {*} securityId  活动ID
 * @returns
 */
export const updateSecurityPlot = (id, position) => {
export const updateSecurityPlot = (params) => {
    return request({
        url: `/api/securityPlot/securityPlot/update`,
        method: 'post',
        data: {
            id,
            position
        }
        data: params
    })
}
src/styles/base/index.scss
@@ -744,14 +744,13 @@
        display: flex;
        flex-direction: column;
        width: 320px;
        height: 300px;
        height: 180px;
        top: 50%;
        left: 50% !important;
        transform: translate(-50%, -50%);
        .el-dialog__body {
            &>div {
                overflow: hidden;
                position: absolute;
                width: 100%;
                height: 100%;
@@ -781,9 +780,10 @@
            height: 100px;
            overflow-y: scroll;
            position: absolute;
            right: -10px;
            top: 46px;
            width: 100%;
            width: calc(100% - 16px);
            background-color: rgba(8, 56, 185, 0.6);
            z-index: 99;
        }
        .el-input {
@@ -977,13 +977,13 @@
    color: #fff;
}
.delete-plot-box {
.edit-plot-box {
    .el-dialog {
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        width: 240px;
        height: 80px;
        height: 130px;
        top: 50%;
        left: 50% !important;
        transform: translate(-50%, -50%);
@@ -1004,6 +1004,47 @@
                justify-content: center;
                margin-bottom: 10px;
            }
            .value-name-box {
                height: 32px;
                line-height: 32px;
                width: 120px;
            }
            .color-box {
                display: flex;
                width: 140px;
                height: 32px;
                background-color: rgba(8, 56, 185, 0.5);
                padding: 6px;
                &>div {
                    width: 20px;
                    height: 20px;
                    line-height: 20px;
                    border: 1px solid #409EFF;
                    margin-right: 10px;
                    cursor: pointer;
                    user-select: none;
                }
                &>div:hover {
                    border: 1px solid #eee;
                }
                .red-color {
                    background-color: red;
                }
                .green-color {
                    background-color: green;
                }
                .blue-color {
                    background-color: blue;
                }
            }
        }
    }
}
src/styles/media/index.scss
@@ -2148,7 +2148,7 @@
                        .el-dialog {
                            width: countSizeVw(320, 1920);
                            height: countSizeVh(240);
                            height: countSizeVh(180);
                        }
                        .el-dialog .el-dialog__body .el-button {
@@ -2163,9 +2163,9 @@
                        }
                        .el-tree {
                            height: countSizeVh(100);
                            right: -countSizeVw(10, 1920);
                            height: countSizeVh(240);
                            top: countSizeVh(46);
                            width: calc(100% - countSizeVw(16, 1920));
                        }
                        .el-input {
@@ -2173,7 +2173,7 @@
                        }
                        .police-btn-box {
                            top: countSizeVh(126);
                            top: countSizeVh(60);
                        }
                    }
@@ -2290,6 +2290,46 @@
                        }
                    }
                    .edit-plot-box {
                        .el-dialog {
                            width: countSizeVw(240, 1920);
                            height: countSizeVh(130);
                            .el-dialog__body {
                                .el-button {
                                    width: countSizeVw(60, 1920);
                                    height: countSizeVh(30);
                                    margin-top: countSizeVh(10);
                                }
                                &>div {
                                    margin-bottom: countSizeVh(10);
                                }
                                .value-name-box {
                                    height: countSizeVh(32);
                                    line-height: countSizeVh(32);
                                    width: countSizeVw(120, 1920);
                                }
                                .color-box {
                                    width: countSizeVw(140, 1920);
                                    height: countSizeVh(32);
                                    padding: countSizeVh(6);
                                    &>div {
                                        width: countSizeVw(20, 1920);
                                        height: countSizeVh(20);
                                        line-height: countSizeVh(20);
                                        border: countSizeVh(1) solid #409EFF;
                                        margin-right: countSizeVw(10, 1920);
                                    }
                                }
                            }
                        }
                    }
                }
                .flexible-btn {
src/views/activity/index.vue
@@ -539,6 +539,7 @@
                    @mousedown.native="preventFocusLost"
                    ref="policeTree"
                    :filter-node-method="filterPoliceNode"
                    v-show="searchTreeShowFlag"
                ></el-tree>
                <div class="police-btn-box">
                    <el-button @click="determine" v-show="!isChoosePoliceElementDisabled">确定</el-button>
@@ -608,15 +609,34 @@
        </el-dialog>
        <el-dialog
            title="是否删除该标绘"
            title="修改标绘"
            :modal="false"
            :visible.sync="deletePlotVisible"
            :visible.sync="editPlotVisible"
            :close-on-click-modal="true"
            class="delete-plot-box"
            class="edit-plot-box"
        >
            <div>
                <div class="value-name-box">选择标绘颜色:</div>
                <div class="color-box">
                    <div
                        class="red-color"
                        @click="changePlotColor('#FF0000')"
                    >{{ choosePlotColor == '#FF0000'?'√':'' }}</div>
                    <div
                        class="green-color"
                        @click="changePlotColor('#00FF00')"
                    >{{ choosePlotColor == '#00FF00'?'√':'' }}</div>
                    <div
                        class="blue-color"
                        @click="changePlotColor('#0000FF')"
                    >{{ choosePlotColor == '#0000FF'?'√':'' }}</div>
                </div>
            </div>
            <div>
                <el-button @click="savePlot">保存</el-button>
                <el-button @click="editPlot">编辑</el-button>
                <el-button @click="deletePlot">删除</el-button>
                <el-button @click="deletePlotVisible = false">取消</el-button>
                <el-button @click="editPlotVisible = false">取消</el-button>
            </div>
        </el-dialog>
    </div>
@@ -830,12 +850,13 @@
            polygonName: '',
            polygonPositionStr: '',
            chooseColor: '#FF0000',
            choosePlotColor: '#FF0000',
            chooseLineData: {},
            lineWidth: 100,
            linePosition: '',
            isChoosePoliceElementDisabled: false,
            isShowActivityEditBox: false,
            deletePlotVisible: false,
            editPlotVisible: false,
            plotId: '',
            polygonPosition: '',
            cameraList: [],
@@ -847,6 +868,7 @@
            searchPoliceTreeName: '',
            searchPoliceTreeId: '',
            searchTreeShowFlag: false,
            plotOverlayData: null,
        }
    },
    created () {
@@ -963,7 +985,6 @@
        },
        inputChange (e) {
            // console.log(e)
            if (this.searchActivity == '') {
                this.isShowActivityClearBtn = false
            } else {
@@ -1303,7 +1324,6 @@
        // 树形控件选中事件
        treeCheckClick (e1, e2) {
            // console.log(e1, e2, 112233)
            const that = this
            this.$EventBus.$emit('mapRemoveLayer', {
                layerName: 'activeHeatLayer',
@@ -1457,7 +1477,7 @@
        // 切换作战标绘
        switchArrowBtnChange (e) {
            this.getSecurityPlotList(this.securityIdy, this.arrowBtnSwitch)
            this.getSecurityPlotList(this.securityId, this.arrowBtnSwitch)
        },
        // 切换轨迹播放控件
@@ -1530,6 +1550,8 @@
                        document.oncontextmenu = function () {
                            if (flag == true && poltType == 'billboard') {
                                if (policeType == 'policeman') {
                                    this.searchPoliceTreeId = ''
                                    this.searchPoliceTreeName = ''
                                    that.policeChooseVisible = true
                                } else if (policeType == 'policecar') {
                                    that.policeOption = that.policecarOption
@@ -1711,7 +1733,7 @@
                if (this.policeChooseCarVisible == true) {
                    this.policeChooseCarVisible = false
                    this.addCarAndRange(this.policeType, position, this.showingSecurityId, type)
                } else if (this.policeChooseCarVisible == true) {
                } else if (this.policeChooseVisible == true) {
                    this.policeChooseVisible = false
                    this.addActivityPolice(this.searchPoliceTreeId, position, this.showingSecurityId, type)
                }
@@ -1738,7 +1760,8 @@
            if ('policemanId' in e.overlay.attrParams) {
                this.policeIconId = e.overlay.attrParams.id
                this.policeType = e.overlay.attrParams.policemanId
                // let list = this.platFn(res.data.data).find(item => item.id == "1627542311989243905").name
                let choosePoliceName = this.platFn(this.policeTreeData).find(item => item.id == e.overlay.attrParams.policemanId).name
                this.searchPoliceTreeName = choosePoliceName
                this.policeIconIsCreated = true
                this.policeChooseVisible = true
            } else if ('carId' in e.overlay.attrParams) {
@@ -1812,12 +1835,24 @@
                        //     "font": "30px",
                        // })
                    }
                    chooseArrow.attrParams = { 'id': item.id }
                    let color = ''
                    if (item.color == '') {
                        color = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150)
                    } else {
                        let r = parseInt(item.color.slice(1, 3), 16)
                        let g = parseInt(item.color.slice(3, 5), 16)
                        let b = parseInt(item.color.slice(5, 7), 16)
                        color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 150)
                    }
                    if (item.id == 202) {
                        console.log('item', item)
                    }
                    chooseArrow.attrParams = { 'id': item.id, 'color': item.color }
                    arrowsListLayer.addOverlay(chooseArrow)
                    chooseArrow.setStyle({
                        "material": global.DC.Color.ORANGE.withAlpha(0.4),
                        "material": color,
                    })
                    chooseArrow.on(global.DC.MouseEventType.DB_CLICK, this.reeditArrowDbClick)
                    // chooseArrow.on(global.DC.MouseEventType.DB_CLICK, this.reeditArrowDbClick)
                    chooseArrow.on(global.DC.MouseEventType.CLICK, this.reeditArrowClick)
                })
            })
@@ -1833,28 +1868,43 @@
                })
                position = position.slice(0, position.length - 1)
                drawArrowLayers.addOverlay(overlayData)
                this.updateSecurityPlot(overlayData.attrParams.id, position)
                this.updateSecurityPlot({ id: overlayData.attrParams.id, position: position })
            })
        },
        // 单击。标绘箭头
        reeditArrowClick (e) {
            this.plotOverlayData = e
            this.choosePlotColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color : '#FF0000'
            console.log('this.choosePlotColor', this.choosePlotColor, e.overlay.attrParams)
            if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) {
                this.plotId = e.overlay.attrParams.id
                this.deletePlotVisible = true
                this.editPlotVisible = true
            }
        },
        updateSecurityPlot (id, position, name) {
            updateSecurityPlot(id, position, name).then(res => {
        // 编辑标绘
        editPlot () {
            this.editPlotVisible = false
            this.reeditArrowDbClick(this.plotOverlayData)
        },
        // 保存标绘修改
        savePlot () {
            this.updateSecurityPlot({ id: this.plotOverlayData.overlay.attrParams.id, color: this.choosePlotColor })
            this.editPlotVisible = false
        },
        updateSecurityPlot (params) {
            updateSecurityPlot(params).then(res => {
                if (res.data.success) {
                    this.$message({
                        message: '删除成功',
                        message: '修改成功',
                        type: 'warning'
                    })
                } else {
                    this.$message({
                        message: '删除失败'
                        message: '修改失败'
                    })
                }
                this.getSecurityPlotList(this.showingSecurityId, this.arrowBtnSwitch)
@@ -2086,6 +2136,11 @@
            this.chooseColor = color
        },
        // 改变标绘颜色
        changePlotColor (color) {
            this.choosePlotColor = color
        },
        // 删除警车
        deleteActivityCar (id) {
            deleteActivityCar(id).then(res => {
@@ -2157,7 +2212,7 @@
        // 删除活动标绘
        deletePlot () {
            this.deleteSecurityPlot(this.plotId)
            this.deletePlotVisible = false
            this.editPlotVisible = false
        },
        // 获取设备列表
src/views/video/list.vue
@@ -24,10 +24,10 @@
            <div class="draw-btn">
                搜索范围:
                <!-- <el-button type="primary" size="mini" @click="draw('polygon')">绘制面</el-button> -->
                <el-button type="primary" size="mini" @click="draw('polygon')">绘制面</el-button>
                <el-button type="primary" size="mini" @click="draw('polyline')">巡查路线</el-button>
                <el-button type="primary" size="mini" @click="removeDrawLayer">清除</el-button>
                <el-button type="primary" size="mini" @click="saveDraw">保存</el-button>
                <!-- <el-button type="primary" size="mini" @click="saveDraw">保存</el-button> -->
            </div>
            <div class="range-input" v-show="inputpopup">
                <div class="close" @click="closeRangeInput"></div>