shuishen
2023-03-17 dcea093a466fb6d8ded62de1c0953762b1acbd5f
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
6 files modified
173 ■■■■■ changed files
src/store/modules/popupParams.js 3 ●●●● patch | view | raw | blame | history
src/styles/base/index.scss 52 ●●●●● patch | view | raw | blame | history
src/styles/media/index.scss 28 ●●●● patch | view | raw | blame | history
src/views/activity/components/drawBtnBox.vue 7 ●●●● patch | view | raw | blame | history
src/views/activity/components/mapSearchBox.vue 4 ●●● patch | view | raw | blame | history
src/views/activity/index.vue 79 ●●●●● patch | view | raw | blame | history
src/store/modules/popupParams.js
@@ -23,6 +23,7 @@
        videoListPopup: false,
        videoListPopupData: {}
    },
    mutations: {
        SET_DETAILSPOPUP (state, detailsPopup) {
            state.detailsPopup = detailsPopup
@@ -33,7 +34,6 @@
        SET_ACTIVITYPOLICEPOPUP (state, activityPolicePopup) {
            state.activityPolicePopup = activityPolicePopup
            console.log('isshowPopup', activityPolicePopup)
        },
        SET_ACTIVITYPOLICEPOPUPDATA (state, activityPolicePopupData) {
@@ -49,6 +49,7 @@
        },
    },
    actions: {
    }
src/styles/base/index.scss
@@ -764,8 +764,12 @@
        .police-btn-box {
            position: absolute;
            top: 84px;
            top: 124px;
            width: 100%;
        }
        .area {
            top: 92px;
        }
        .line {
@@ -779,6 +783,29 @@
            height: 32px;
            line-height: 32px;
            width: 100px;
        }
        .width-box {
            display: flex;
            align-items: center;
        }
        .input-width-box {
            input {
                outline: none;
                width: 80px;
                height: 28px;
                background-color: rgba(8, 56, 185, 0.5);
                border: none;
                color: #fff;
                border-radius: 4px;
                padding-left: 15px;
            }
            input:focus {
                border-color: #409EFF;
                border: 1px solid #409EFF;
            }
        }
    }
}
@@ -822,6 +849,29 @@
            width: 130px;
        }
        .width-box {
            display: flex;
            align-items: center;
        }
        .input-width-box {
            input {
                outline: none;
                width: 80px;
                height: 28px;
                background-color: rgba(8, 56, 185, 0.5);
                border: none;
                color: #fff;
                border-radius: 4px;
                padding-left: 15px;
            }
            input:focus {
                border-color: #409EFF;
                border: 1px solid #409EFF;
            }
        }
    }
}
src/styles/media/index.scss
@@ -2129,7 +2129,7 @@
                        .el-dialog {
                            width: countSizeVw(320, 1920);
                            height: countSizeVh(190);
                            height: countSizeVh(220);
                        }
                        .el-dialog .el-dialog__body .el-button {
@@ -2154,7 +2154,7 @@
                        }
                        .police-btn-box {
                            top: countSizeVh(88);
                            top: countSizeVh(124);
                        }
                        .value-name-box {
@@ -2165,6 +2165,19 @@
                        .line {
                            top: countSizeVh(52);
                        }
                        .area {
                            top: countSizeVh(92);
                        }
                        .input-width-box {
                            input {
                                width: countSizeVw(80, 1920);
                                height: countSizeVh(28);
                                border-radius: countSizeVh(4);
                                padding-left: countSizeVw(15, 1920);
                            }
                        }
                    }
@@ -2184,7 +2197,7 @@
                        .el-dialog {
                            width: countSizeVw(320, 1920);
                            height: countSizeVh(180);
                            height: countSizeVh(220);
                        }
                        .el-dialog .el-dialog__body .el-button {
@@ -2203,6 +2216,15 @@
                            line-height: countSizeVh(32);
                            width: countSizeVw(130, 1920);
                        }
                        .input-width-box {
                            input {
                                width: countSizeVw(80, 1920);
                                height: countSizeVh(28);
                                border-radius: countSizeVh(4);
                                padding-left: countSizeVw(15, 1920);
                            }
                        }
                    }
                    .edit-line-box {
src/views/activity/components/drawBtnBox.vue
@@ -528,6 +528,8 @@
                areaPolygon.on(global.DC.MouseEventType.CLICK, this.$parent.lineOverlayTypeClick)
           } else {
               let positionObj = this.$parent.convertBillboardPositionDate(data, type)
               positionObj.lng = positionObj.lng.slice(1,positionObj.lng.length-1)
               positionObj.lat = positionObj.lat.slice(0,positionObj.lat.length-2)
               let positionArr = data.position.slice(7, data.position.length - 2).split(',')[0].split(' ')
               let position = new global.DC.Position(Number(positionArr[0]), Number(positionArr[1]))
               let point = new global.DC.Point(position)
@@ -598,7 +600,7 @@
        // 修改警车样式
        editPoliceStyle(params,overlay) {
            if('color' in params && 'pointOverlayData' in overlay.attrParams){
                overlay.attrParams.color = params.color
                overlay.attrParams.data.color = params.color
                overlay.attrParams.pointOverlayData.attrParams.color = params.color
                let r = parseInt(params.color.slice(1, 3), 16)
                let g = parseInt(params.color.slice(3, 5), 16)
@@ -621,10 +623,11 @@
            }
            if('width' in params){
                if(overlay.attrParams&&overlay.attrParams.data&&overlay.attrParams.data.type&&overlay.attrParams.data.type == 3) return
                let linePosition = ''
                if('position' in params){
                    linePosition = params.position.replace(/,/g, ";").replace(/ /g, ",")
                }else{
                } else {
                    linePosition = overlay.attrParams.linePositionStr
                }
                let coords = global.DC.GeoTools.polylineBuffer(linePosition, params.width)
src/views/activity/components/mapSearchBox.vue
@@ -75,7 +75,9 @@
            } else {
                this.searchExtensivelyValBoxShow = true
                this.isShowClearBtn = true
                this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
                this.$nextTick(()=>{
                    this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
                })
            }
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'searchLayer',
src/views/activity/index.vue
@@ -125,6 +125,15 @@
                        </el-color-picker>
                    </div>
                </div>
                <div class="line area">
                    <div class="value-name-box">预警范围:</div>
                    <div class="width-box">
                        <div class="input-width-box">
                            <input type="text" v-model="pointAreaWidth" placeholder="请输入..." />
                        </div>
                        <div class="units">米</div>
                    </div>
                </div>
                <el-button @click="determine" v-show="!isChoosePoliceElementDisabled">确定</el-button>
                <el-button @click="deletePoliceElement"
                    v-show="!isChoosePoliceElementDisabled && policeIconIsCreated">删除</el-button>
@@ -146,6 +155,15 @@
                    <div class="pick-color-box">
                        <el-color-picker v-model="choosePoliceColor" :predefine="predefineColors" size="small">
                        </el-color-picker>
                    </div>
                </div>
                <div class="line area">
                    <div class="value-name-box">预警范围:</div>
                    <div class="width-box">
                        <div class="input-width-box">
                            <input type="text"  v-model="pointAreaWidth" placeholder="请输入..." />
                        </div>
                        <div class="units">米</div>
                    </div>
                </div>
                <div class="police-btn-box">
@@ -473,6 +491,7 @@
            }],
            isNeedPolygonType: false,
            plotPointPositionStr: '',
            pointAreaWidth:100,
        }
    },
@@ -987,6 +1006,14 @@
                point.on(global.DC.MouseEventType.MOUSE_OVER, this.pointMouseOver)
                point.on(global.DC.MouseEventType.MOUSE_OUT, this.pointMouseOut)
                positionObj.pointOverlayData = point
                // 预警范围先不显示
                // let circle = new global.DC.Circle(position, item.width != -1 ? item.width : 100)
                // curLayer.addOverlay(circle)
                // circle.setStyle({
                //     "material": global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 100), //颜色
                // })
                this.$EventBus.$emit('layerPointAdd', {
                    layerName: mapLayer,
                    type: 'billboard',
@@ -1431,14 +1458,20 @@
                            message: '请选择警车',
                            type: 'warning'
                        })
                    } else {
                    } else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) {
                        this.$message({
                            message: '范围必须为正整数',
                            type: 'warning'
                        })
                    }else {
                        this.policeChooseCarVisible = false
                        this.addCarAndRange({
                            carId: this.policeType,
                            position: position,
                            securityId: this.showingSecurityId,
                            type: type,
                            color: this.chooseCarColor
                            color: this.chooseCarColor,
                            width:this.pointAreaWidth
                        })
                        this.policeIconIsCreated = false
                    }
@@ -1449,19 +1482,48 @@
                            message: '请选择警员',
                            type: 'warning'
                        })
                    }else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) {
                        this.$message({
                            message: '范围必须为正整数',
                            type: 'warning'
                        })
                    } else {
                        this.policeChooseVisible = false
                        this.addActivityPolice({ policemanId: this.searchPoliceTreeId, position: position, securityId: this.showingSecurityId, type: type, color: this.choosePoliceColor })
                        this.addActivityPolice({ policemanId: this.searchPoliceTreeId, position: position, securityId: this.showingSecurityId, type: type, color: this.choosePoliceColor ,width:this.pointAreaWidth})
                        this.policeIconIsCreated = false
                    }
                }
            } else {
                if (this.policeChooseVisible == true) {
                    this.$refs.DRAWBTNBOX.updateActivityPolice({ id: this.policeIconId, policemanId: this.searchPoliceTreeId, color: this.choosePoliceColor },policeOverlayData.overlay)
                    this.policeChooseVisible = false
                    if (this.searchPoliceTreeId == ''|| this.searchPoliceTreeName == '') {
                        this.$message({
                            message: '请在列表中选择警员',
                            type: 'warning'
                        })
                    } else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) {
                        this.$message({
                            message: '范围必须为正整数',
                            type: 'warning'
                        })
                    } else {
                         this.$refs.DRAWBTNBOX.updateActivityPolice({ id: this.policeIconId, policemanId: this.searchPoliceTreeId, color: this.choosePoliceColor,width:this.pointAreaWidth },policeOverlayData.overlay)
                         this.policeChooseVisible = false
                    }
                } else if (this.policeChooseCarVisible == true) {
                    this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, carId: this.policeType, color: this.chooseCarColor },policeOverlayData.overlay)
                    this.policeChooseCarVisible = false
                    if (this.policeType == '') {
                        this.$message({
                            message: '请选择警车',
                            type: 'warning'
                        })
                    } else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) {
                        this.$message({
                            message: '范围必须为正整数',
                            type: 'warning'
                        })
                    } else {
                        this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, carId: this.policeType, color: this.chooseCarColor,width:this.pointAreaWidth },policeOverlayData.overlay)
                        this.policeChooseCarVisible = false
                    }
                }
                this.policeIconIsCreated = false
            }
@@ -1484,8 +1546,10 @@
            if ('policemanId' in e.overlay.attrParams.data) {
                this.policeIconId = e.overlay.attrParams.data.id
                this.policeType = e.overlay.attrParams.data.policemanId
                this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width :100
                this.choosePoliceColor = e.overlay.attrParams.data.color != '' ? e.overlay.attrParams.data.color : '#FF0000'
                let choosePoliceName = this.platFn(this.policeTreeData).find(item => item.id == e.overlay.attrParams.data.policemanId).name
                this.searchPoliceTreeId = e.overlay.attrParams.data.policemanId
                this.searchPoliceTreeName = choosePoliceName
                this.policeIconIsCreated = true
                this.policeChooseVisible = true
@@ -1493,6 +1557,7 @@
                this.policeOption = policecarOption
                this.policeIconId = e.overlay.attrParams.data.id
                this.policeType = e.overlay.attrParams.data.carId
                this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width :100
                this.chooseCarColor = e.overlay.attrParams.data.color != '' ? e.overlay.attrParams.data.color : '#FF0000'
                this.policeIconIsCreated = true
                this.policeChooseCarVisible = true