shuishen
2023-02-15 3c7e9de421d95fc9aa33931b83024ef0d02d51b2
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs
8 files modified
289 ■■■■ changed files
src/api/activity/index.js 30 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue 20 ●●●● patch | view | raw | blame | history
src/styles/base/index.scss 14 ●●●● patch | view | raw | blame | history
src/styles/media/index.scss 75 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue 104 ●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue 2 ●●● patch | view | raw | blame | history
src/views/house/index.vue 2 ●●● patch | view | raw | blame | history
src/views/video/region.vue 42 ●●●●● patch | view | raw | blame | history
src/api/activity/index.js
@@ -89,6 +89,21 @@
}
/**
 * 活动删除警车
 * @param {*} ids 数据唯一标识
 * @returns
 */
export const deleteActivityCar = (ids) => {
    return request({
        url: `/api/securityManageCar/securityManageCar/remove`,
        method: 'post',
        params: {
            ids
        }
    })
}
/**
 * 活动添加警员
 * @param {*} policemanId  警员ID
 * @param {*} position  坐标
@@ -110,6 +125,21 @@
}
/**
 * 活动删除警员
 * @param {*} ids 数据唯一标识
 * @returns
 */
export const deleteActivityPolice = (ids) => {
    return request({
        url: `/api/securityManage/securityManage/remove`,
        method: 'post',
        params: {
            ids
        }
    })
}
/**
 * 活动修改警员
 * @param {*} policemanId  警员ID
 * @param {*} id 数据唯一标识
src/components/map/index.vue
@@ -215,18 +215,18 @@
            // global.viewer.addTerrain(terrain)
            // 内网
            that.switchImg()
            // that.switchImg()
            // 外网
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
                    url: 'http://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
                    subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
                    format: 'image/jpeg',
                    show: true,
                    maximumLevel: 18
                })
            )
            // global.viewer.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
            //         url: 'http://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
            //         subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
            //         format: 'image/jpeg',
            //         show: true,
            //         maximumLevel: 18
            //     })
            // )
            // 设置地图初始位置,角度等
            global.viewer.camera.setView({
src/styles/base/index.scss
@@ -753,13 +753,18 @@
        .el-dialog__body {
            .el-button {
                padding: 0;
                background-color: #409eff;
                background-color: rgba(8, 56, 185, 0.9);
                border: 1px solid rgba(8, 56, 185, 0.9);
                color: #fff;
                width: 60px;
                height: 30px;
                text-align: center;
                margin-top: 40px;
            }
        }
        .el-button:hover {
            background-color: #409EFF;
        }
    }
}
@@ -778,7 +783,8 @@
        .el-dialog__body {
            .el-button {
                padding: 0;
                background-color: #409eff;
                background-color: rgba(8, 56, 185, 0.9);
                border: 1px solid rgba(8, 56, 185, 0.9);
                color: #fff;
                width: 60px;
                height: 30px;
@@ -786,6 +792,10 @@
                margin-top: 10px;
            }
            .el-button:hover {
                background-color: #409EFF;
            }
            &>div {
                display: flex;
                justify-content: center;
src/styles/media/index.scss
@@ -2126,7 +2126,6 @@
                            width: countSizeVw(60, 1920);
                            height: countSizeVh(30);
                            margin-top: countSizeVh(40);
                            background-color: rgba(8, 56, 185, 0.9);
                            border: countSizeVh(1) solid rgba(8, 56, 185, 0.9);
                        }
@@ -2135,6 +2134,80 @@
                        }
                    }
                    .edit-line-box {
                        .el-dialog {
                            width: countSizeVw(300, 1920);
                            height: countSizeVh(190);
                            .el-dialog__body {
                                .el-button {
                                    width: countSizeVw(60, 1920);
                                    height: countSizeVh(30);
                                    margin-top: countSizeVh(10);
                                }
                                &>div {
                                    margin-bottom: countSizeVh(10);
                                }
                                .input-width-box {
                                    input {
                                        width: countSizeVw(140, 1920);
                                        height: countSizeVh(28);
                                        border-radius: countSizeVh(4);
                                        padding-left: countSizeVw(15, 1920);
                                    }
                                }
                                .value-name-box {
                                    height: countSizeVh(32);
                                    line-height: countSizeVh(32);
                                }
                                .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);
                                    }
                                    &>div:hover {
                                        border: countSizeVh(1) solid #eee;
                                    }
                                }
                            }
                        }
                    }
                    .add-polygon-box {
                        .el-dialog {
                            width: countSizeVw(300, 1920);
                            height: countSizeVh(140);
                            .el-dialog__body {
                                .el-button {
                                    width: countSizeVw(60, 1920);
                                    height: countSizeVh(30);
                                    margin-top: countSizeVh(10);
                                }
                                &>div {
                                    margin-bottom: countSizeVh(10);
                                }
                            }
                        }
                    }
                }
                .flexible-btn {
src/views/activity/index.vue
@@ -477,6 +477,7 @@
                </el-select>
                <el-button @click="determine">确定</el-button>
                <el-button @click="cancel">取消</el-button>
                <el-button @click="deletePoliceElement" v-show="isdeleteBtnShow">删除</el-button>
            </div>
        </el-dialog>
@@ -537,7 +538,7 @@
</template>
<script>
import { getSecurityList, getPoliceList, getCarList, addCarAndRange, addActivityPolice, getSecurityPoliceList, getSecurityCarList, updateActivityPolice, updateActivityCar, getServiceDictionary, getActivityType, addSecurityPlot, getSecurityPlotList, updateSecurityPlot } from '@/api/activity/index.js'
import { getSecurityList, getPoliceList, getCarList, addCarAndRange, addActivityPolice, getSecurityPoliceList, getSecurityCarList, updateActivityPolice, updateActivityCar, getServiceDictionary, getActivityType, addSecurityPlot, getSecurityPlotList, updateSecurityPlot, deleteActivityCar, deleteActivityPolice } from '@/api/activity/index.js'
import { getSearchExtensively } from '@/api/dept/index.js'
import { getRegionList, getDevices } from '@/api/video/index.js'
import flvjs from 'flv.js'
@@ -760,17 +761,11 @@
            polygonAddVisible: false,
            polygonName: '',
            polygonPositionStr: '',
            optionColors: [
                global.DC.Namespace.Cesium.Color.fromBytes(199, 237, 204, 400),
                global.DC.Namespace.Cesium.Color.fromBytes(250, 249, 222, 400),
                global.DC.Namespace.Cesium.Color.fromBytes(255, 242, 226, 400),
                global.DC.Namespace.Cesium.Color.fromBytes(220, 226, 241, 400),
                global.DC.Namespace.Cesium.Color.fromBytes(233, 235, 254, 400),
            ],
            chooseColor: '#FF0000',
            chooseLineData: {},
            lineWidth: 100,
            linePosition: '',
            isdeleteBtnShow: true,
        }
    },
    created () {
@@ -946,7 +941,8 @@
                        })
                    } else if (item.type == 3 && pointShow) {
                        let positionObj = this.convertBillboardPositionDate(item.position, 'policeman', item.id, item.policemanId)
                        console.log(item, 363636)
                        let positionObj = this.convertBillboardPositionDate(item.position, 'policeman', item.id, item.policemanId, item.deptId)
                        this.$EventBus.$emit('layerPointAdd', {
                            layerName: 'newDrawLayers',
                            type: 'billboard',
@@ -973,22 +969,10 @@
                this.isHaveLine = res.data.data.some(item => {
                    return item.type == 1
                })
                // let count = 0
                res.data.data.forEach(item => {
                    if (item.type == 1 && polylineShow) {
                        let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type)
                        item.positionStr = positionNewArr
                        // count++
                        // if (count == 1) {
                        // if (tc) {
                        //     tc.clear()
                        // }
                        // tc = new global.DC.TrackController(global.viewer)
                        // track = new global.DC.Track(positionNewArr, 15)
                        // track.setModel('/model/qiche.gltf', {
                        //     scale: 0.5
                        // })
                        // tc.addTrack(track)
                        let coords = global.DC.GeoTools.polylineBuffer(positionNewArr, item.width != -1 ? item.width : 100)
                        let polygon = new global.DC.Polygon(coords)
                        let color = ''
@@ -1004,12 +988,6 @@
                        polygon._positions.forEach(item => {
                            position += item._lng + ',' + item._lat + ';'
                        })
                        // polygon.setStyle({
                        //     material: color
                        // })
                        // polylineAreaLayer.addOverlay(polygon)
                        // polylineAreaLayer.attrParams = item
                        // polylineAreaLayer.on(global.DC.MouseEventType.CLICK, this.lineOverlayTypeClick)
                        this.$EventBus.$emit('layerPolygonAdd', {
                            layerName: 'newCarDrawLayers',
                            positions: position,
@@ -1030,7 +1008,6 @@
                            material: global.DC.Color.RED.withAlpha(0.8),
                            width: 3,
                            params: item,
                            // incident: this.lineOverlayTypeClick
                        })
                    } else if (item.type == 2) {
                        let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type)
@@ -1042,7 +1019,6 @@
                                id: item.id,
                                carId: item.carId
                            },
                            // incident: this.overlayTypeClick
                        })
                    } else if (item.type == 3 && pointShow) {
@@ -1127,6 +1103,16 @@
        // 活动添加警车和范围
        addCarAndRange (carId, position, securityId, type) {
            addCarAndRange(carId, position, securityId, type).then(res => {
                if (res.data.success) {
                    this.$message({
                        message: '添加成功',
                        type: 'warning'
                    })
                } else {
                    this.$message({
                        message: '添加失败'
                    })
                }
                this.getSecurityCarList(securityId, this.policeSwitch, this.polylineBtnSwitch)
            })
        },
@@ -1147,12 +1133,22 @@
        // 活动添加警员
        addActivityPolice (policemanId, position, securityId, type) {
            addActivityPolice(policemanId, position, securityId, type).then(res => {
                if (res.data.success) {
                    this.$message({
                        message: '添加成功',
                        type: 'warning'
                    })
                } else {
                    this.$message({
                        message: '添加失败'
                    })
                }
                this.getSecurityPoliceList(securityId, this.policeSwitch)
            })
        },
        // 转换 点 坐标数据
        convertBillboardPositionDate (data, iconName, plotId, policeId) {
        convertBillboardPositionDate (data, iconName, plotId, policeId, deptId) {
            let positionStr = data
            positionStr = data.slice(6, positionStr.length - 1)
            let positionArr = positionStr.split(" ")
@@ -1160,7 +1156,7 @@
            if (iconName == 'activity') {
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/activity.png' }
            } else if (iconName == 'policeman') {
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/police-people.png', id: plotId, policemanId: policeId }
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/police-people.png', id: plotId, policemanId: policeId, deptId: deptId }
            } else if (iconName == 'policecar') {
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 100, url: '/img/icon/car.png', id: plotId, carId: policeId }
            }
@@ -1367,6 +1363,7 @@
                                    that.policeChooseTitle = '选择警车'
                                    that.policeOption = that.policecarOption
                                }
                                that.isdeleteBtnShow = false
                                that.policeChooseVisible = true
                                flag = false
                            } else if (flag == true && poltType == 'polyline') {
@@ -1553,6 +1550,7 @@
        // 地图绘制元素点击事件
        overlayTypeClick (e) {
            this.isdeleteBtnShow = true
            this.policeIconIsCreated = true
            if ('policemanId' in e.overlay.attrParams) {
                this.policeChooseTitle = '选择警员'
@@ -1862,6 +1860,50 @@
            this.chooseColor = color
        },
        // 删除警车
        deleteActivityCar (id) {
            deleteActivityCar(id).then(res => {
                console.log(res, 1111)
                if (res.data.success) {
                    this.$message({
                        message: '删除成功',
                        type: 'warning'
                    })
                } else {
                    this.$message({
                        message: '删除失败'
                    })
                }
                this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch)
            })
        },
        // 删除警员
        deleteActivityPolice (id) {
            deleteActivityPolice(id).then(res => {
                if (res.data.success) {
                    this.$message({
                        message: '删除成功',
                        type: 'warning'
                    })
                } else {
                    this.$message({
                        message: '删除失败'
                    })
                }
                this.getSecurityPoliceList(this.showingSecurityId, this.policeSwitch)
            })
        },
        // 点击删除
        deletePoliceElement () {
            if (this.policeChooseTitle == '选择警员') {
                this.deleteActivityPolice(this.policeIconId)
            } else if (this.policeChooseTitle == '选择警车') {
                this.deleteActivityCar(this.policeIconId)
            }
            this.policeChooseVisible = false
        },
    },
src/views/home/components/leftContainer.vue
@@ -932,7 +932,7 @@
                    let nameArr = []
                    let countArr = []
                    res.data.data.data.forEach(item => {
                        nameArr.push(item.name.replace('派出', ''))
                        nameArr.push(item.name.replace('派出', '').replace('居民委员会', ''))
                        countArr.push({ value: item.count, id: item.id })
                    })
                    landData = [nameArr, countArr]
src/views/house/index.vue
@@ -928,12 +928,12 @@
         */
        currentChangeHandle (current, currentNode) {
            if (current.hasChildren == true) return
            this.filterText = ''
            this.prop = current.name
            this.getResidentialQuartersInfo(current.id, '361102')
            this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', current.id, '1|3')
            this.getVillageInfo(current.id)
            circleLayer.clear()
            circleLayer.remove()
src/views/video/region.vue
@@ -86,6 +86,9 @@
            </div>
        </div>
        <div class="item video1" v-show="isShowVideo.video1">
            <div class="close" @click="isShowVideo.video1 = false">
                <i class="el-icon-close"></i>
            </div>
            <div class="select" v-show="isShowSelect.video1">
                <el-select
                    size="small"
@@ -114,6 +117,9 @@
            </div>
        </div>
        <div class="item video2" v-show="isShowVideo.video2">
            <div class="close" @click="isShowVideo.video2 = false">
                <i class="el-icon-close"></i>
            </div>
            <div class="select" v-show="isShowSelect.video2">
                <el-select
                    size="small"
@@ -142,6 +148,9 @@
            </div>
        </div>
        <div class="item video3" v-show="isShowVideo.video3">
            <div class="close" @click="isShowVideo.video3 = false">
                <i class="el-icon-close"></i>
            </div>
            <div class="select" v-show="isShowSelect.video3">
                <el-select
                    size="small"
@@ -170,6 +179,9 @@
            </div>
        </div>
        <div class="item video4" v-show="isShowVideo.video4">
            <div class="close" @click="isShowVideo.video4 = false">
                <i class="el-icon-close"></i>
            </div>
            <div class="select" v-show="isShowSelect.video4">
                <el-select
                    size="small"
@@ -198,6 +210,9 @@
            </div>
        </div>
        <div class="item video5" v-show="isShowVideo.video5">
            <div class="close" @click="isShowVideo.video5 = false">
                <i class="el-icon-close"></i>
            </div>
            <div class="select" v-show="isShowSelect.video5">
                <el-select
                    size="small"
@@ -226,6 +241,9 @@
            </div>
        </div>
        <div class="item video6" v-show="isShowVideo.video6">
            <div class="close" @click="isShowVideo.video6 = false">
                <i class="el-icon-close"></i>
            </div>
            <div class="select" v-show="isShowSelect.video6">
                <el-select
                    size="small"
@@ -254,6 +272,9 @@
            </div>
        </div>
        <div class="item video7" v-show="isShowVideo.video7">
            <div class="close" @click="isShowVideo.video7 = false">
                <i class="el-icon-close"></i>
            </div>
            <div class="select" v-show="isShowSelect.video7">
                <el-select
                    size="small"
@@ -284,6 +305,9 @@
            </div>
        </div>
        <div class="item video8" v-show="isShowVideo.video8">
            <div class="close" @click="isShowVideo.video8 = false">
                <i class="el-icon-close"></i>
            </div>
            <div class="select" v-show="isShowSelect.video8">
                <el-select
                    size="small"
@@ -421,7 +445,6 @@
        handleCurrentChange: function (currentPage) {
            this.currentPage = currentPage
            this.getRegionSaveList(this.currentPage, this.pagesize, this.userInfo.dept_id)
        },
        // getVideoList (current, size) {
@@ -639,7 +662,7 @@
                let lat = item.split(' ')[1]
                positionNewStr += lng + ',' + lat + ';'
            })
            getRegionList(1, 15, positionNewStr).then(res => {
            getRegionList(1, 150, positionNewStr).then(res => {
                let monitorData = res.data.data.list
                console.log(res.data.data.list, 123)
                this.monitoringList = res.data.data.list
@@ -652,6 +675,7 @@
                monitorData.forEach((item, index) => {
                    let flvUrl = ''
                    if (item.status == 0) return
                    this.getDevices(item.channelId).then(res => {
                        flvUrl = res
@@ -999,6 +1023,20 @@
        width: calc((1920 - 400) / 4 / 1920 * 100vw);
        height: calc((1080 - 60) / 3 / 1080 * 100vh);
        .close {
            position: absolute;
            top: 3%;
            left: 45%;
            width: 100%;
            z-index: 999;
            color: #fff;
            font-size: 22px;
            cursor: pointer;
        }
        .close:hover {
            background-color: #65b1ff;
        }
        .select {
            position: absolute;
            top: 6%;