shuishen
2023-03-08 12b97dc27b3ab546db2ac4ea00148faa847fb36a
活动及其他
6 files modified
135 ■■■■ changed files
src/styles/media/index.scss 3 ●●●● patch | view | raw | blame | history
src/views/activity/components/drawBtnBox.vue 60 ●●●● patch | view | raw | blame | history
src/views/activity/index.vue 4 ●●● patch | view | raw | blame | history
src/views/home/components/rightContainer.vue 4 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 17 ●●●● patch | view | raw | blame | history
src/views/police/index.vue 47 ●●●● patch | view | raw | blame | history
src/styles/media/index.scss
@@ -1511,9 +1511,10 @@
                        .draw-btn-box {
                            padding: countSizeVh(8);
                            left: countSizeVw(692, 1920);
                            bottom: countSizeVh(40);
                            border-radius: countSizeVh(8);
                            width: countSizeVw(520, 1920);
                            width: countSizeVw(536, 1920);
                            z-index: 99;
                            .left {
src/views/activity/components/drawBtnBox.vue
@@ -97,6 +97,10 @@
let drawLabelStatus = 'end'
let labelPositionChange = false
let labelOverLayerID = []
let eventLast = 0
export default {
    props: [
        'dialogVisible', 'isShowActivityEditBox', 'showingSecurityId',
@@ -108,8 +112,8 @@
            addLabelVisible: false,// 文字标注的窗口(内容是名称)
            labelInput: '',
            addLabelPosition: null,
            labelPopupTitle:'添加文字标注',
            labelId:'',
            labelPopupTitle: '添加文字标注',
            labelId: '',
        }
    },
@@ -323,6 +327,8 @@
        removeDrawArrow () {
            drawArrowLayers != null && drawArrowLayers.clear()
            labelOverLayerID = []
        },
        plotEdit (overlayData, type) {
@@ -429,9 +435,9 @@
                    type: 'error'
                })
            } else {
                if(this.labelPopupTitle == "添加文字标注"){
                if (this.labelPopupTitle == "添加文字标注") {
                    this.$parent.addSecurityPlot({ securityId: this.showingSecurityId, position: this.addLabelPosition, type: 9, name: this.labelInput })
                }else{
                } else {
                    this.updateSecurityPlot({ id: this.labelId, name: this.labelInput })
                }
                this.cancelSaveLabel()
@@ -439,28 +445,41 @@
        },
        lableAllEvent (label) {
            labelOverLayerID.push(label.attrParams.id)
            label.on(global.DC.MouseEventType.CLICK, this.reEditLabel)
            label.on(global.DC.MouseEventType.LEFT_DOWN, this.labelDowm)
        },
        labelDowm (e) {
            labelPositionChange = true
            curLabelOverLayer = e.overlay
            global.viewer.scene.screenSpaceCameraController.enableRotate = false
            global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, this.updateLableMove)
            eventLast = 0
            setTimeout(() => {
                if (eventLast == 0) {
                    labelPositionChange = true
                    curLabelOverLayer = e.overlay
                    global.viewer.scene.screenSpaceCameraController.enableRotate = false
                    global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, this.updateLableMove)
                }
            }, 500)
        },
        labelUp (e) {
            eventLast = new Date().getTime()
            if (labelPositionChange == true) {
                global.viewer.scene.screenSpaceCameraController.enableRotate = true
                global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, this.updateLableMove)
                // curLabelOverLayer 中的位置就是移动后的位置
                let position = curLabelOverLayer._position._lng + ' ' + curLabelOverLayer._position._lat  + ',' + curLabelOverLayer._position._lng  + ' ' + curLabelOverLayer._position._lat
                let position = curLabelOverLayer._position._lng + ' ' + curLabelOverLayer._position._lat + ',' + curLabelOverLayer._position._lng + ' ' + curLabelOverLayer._position._lat
                this.updateSecurityPlot({ id: curLabelOverLayer.attrParams.id, position: position })
                labelPositionChange = false
            }
        },
        updateLableMove (e) {
            global.viewer.tooltip.enable = false
            curLabelOverLayer.position = {
                lng: e.wgs84SurfacePosition.lng,
                lat: e.wgs84SurfacePosition.lat,
@@ -472,7 +491,21 @@
        },
        viewerLableMove (e) {
            isAddLabel == true && global.viewer.tooltip.showAt(e.windowPosition, '单击选择文字标注位置')
            if (isAddLabel == true) {
                global.viewer.tooltip.showAt(e.windowPosition, '单击选择文字标注位置')
            } else {
                if (e.overlay) {
                    const flag = labelOverLayerID.some(item => item == e.overlay.attrParams.id)
                    if (flag == true) {
                        global.viewer.tooltip.enable = true
                        global.viewer.tooltip.showAt(e.windowPosition, '长按开启拖拽,单击修改名称')
                    }
                } else {
                    global.viewer.tooltip.enable = false
                }
            }
        },
        // 关闭添加标注弹窗
@@ -483,8 +516,8 @@
        },
        // 单击文字标绘
        reEditLabel(e){
            console.log(66,e);
        reEditLabel (e) {
            global.viewer.tooltip.enable = false
            this.labelId = e.overlay.attrParams.id
            this.labelPopupTitle = "修改文字标注"
            this.labelInput = e.overlay.attrParams.item.name
@@ -501,6 +534,8 @@
        drawArrowLayers.clear()
        drawArrowLayers = null
        labelOverLayerID = []
        global.viewer.off(global.DC.MouseEventType.CLICK, this.viewerClick)
        global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, this.viewerLableMove)
        global.viewer.off(global.DC.MouseEventType.LEFT_UP, this.labelUp)
@@ -513,7 +548,6 @@
    position: fixed;
    display: flex;
    // left: 50%;
    left: calc(810 / 1920 * 100vw);
    bottom: 40px;
    color: #fff;
    background: $bg-one-color;
src/views/activity/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-08 16:18:18
 * @LastEditTime: 2023-03-08 21:52:10
 * @FilePath: \srs-police-affairs\src\views\activity\index.vue
 * @Description: 安保活
 *
@@ -830,8 +830,6 @@
                        position = position.split(';')[0].split(',')
                        position = new global.DC.Position(Number(position[0]), Number(position[1]))
                        let label = new global.DC.Label(position, item.name)
                        label.on(global.DC.MouseEventType.LEFT_UP, e => console.log(e))
                        label.on(global.DC.MouseEventType.CLICK, this.$refs.DRAWBTNBOX.reEditLabel)
                        label.attrParams = { 'id': item.id, item }
                        this.$refs.DRAWBTNBOX.lableAllEvent(label)
                        arrowsListLayer.addOverlay(label)
src/views/home/components/rightContainer.vue
@@ -429,8 +429,8 @@
            const typeIndexData = {
                '车辆': 0,
                '摄像头': 1,
                '执法记录仪': 2,
                '手台': 3,
                '手台': 2,
                '执法记录仪': 3,
            }
            let data = []
src/views/home/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-08 17:45:07
 * @LastEditTime: 2023-03-08 21:04:10
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
@@ -1579,20 +1579,11 @@
        async showequimentdetail (name, typeVale, type) {
            this.equimentTitle = name
            switch (name) {
                case '执法记录仪':
                    this.getPoliceCameraEquimentPage()
                    break
                case '手台':
                    this.getTalkEquimentPage()
                    break
                default:
                    this.equimentCurrentSelect = {}
            this.equimentCurrentSelect = {}
                    this.equimentCurrentSelect[type] = typeVale
            this.equimentCurrentSelect[type] = typeVale
                    await this.getEquipmentPaging(this.equimentCurrentSelect)
            }
            await this.getEquipmentPaging(this.equimentCurrentSelect)
            this.equimentVisible = true
        },
src/views/police/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-02-23 08:46:42
 * @LastEditTime: 2023-03-08 22:28:51
 * @FilePath: \srs-police-affairs\src\views\police\index.vue
 * @Description: 辖区管理
 * 
@@ -32,19 +32,21 @@
                        :cell-style="{ 'text-align': 'center', borderColor: '#324e75', cursor: 'pointer' }"
                        :height="currentTableHeight">
                        <el-table-column prop="newName" :show-overflow-tooltip="true" label="名称"
                            :min-width="typeValue == 0 ? '56%' : '68%'"></el-table-column>
                        <el-table-column prop="status" label="状态" :min-width="typeValue == 0 ? '14%' : '14%'">
                            :min-width="typeValue == 0 || typeValue == 2 ? '56%' : '68%'"></el-table-column>
                        <el-table-column prop="status" label="状态"
                            :min-width="typeValue == 0 || typeValue == 2 ? '14%' : '14%'">
                            <template slot-scope="scope">
                                <div class="state-box" :class="{ online: scope.row.status == '1' }"></div>
                            </template>
                        </el-table-column>
                        <el-table-column label="操作" align="center" :min-width="typeValue == 0 ? '30%' : '18%'">
                        <el-table-column label="操作" align="center"
                            :min-width="typeValue == 0 || typeValue == 2 ? '30%' : '18%'">
                            <template slot-scope="scope">
                                <el-button @click="rowClick(scope.row)" type="text" size="small" title="定位">
                                    <i class="el-icon-location"></i>
                                </el-button>
                                <el-button v-show="navType == 0" @click="equipmentTrack(scope.row)" type="text" size="small"
                                    title="轨迹">
                                <el-button v-show="navType == 0 || navType == 2" @click="equipmentTrack(scope.row)"
                                    type="text" size="small" title="轨迹">
                                    <i class="el-icon-position"></i>
                                </el-button>
                                <el-button @click="play(scope.row)" type="text" size="small" title="播放视频">
@@ -162,6 +164,14 @@
                {
                    value: '1',
                    label: '摄像头'
                },
                {
                    value: '2',
                    label: '手台'
                },
                {
                    value: '3',
                    label: '执法记录仪'
                }
                // , {
                //     value: '3',
@@ -245,6 +255,8 @@
                        let newName = ''
                        if (params.type == 0) {
                            newName = item.name.replace('上饶-', '')
                        } else if (params.type == 2 || params.type == 3) {
                            newName = item.name
                        } else {
                            if (item.name.charAt(7) == '-') {
                                newName = item.name.slice(8)
@@ -274,6 +286,26 @@
                                params: {
                                    ...item,
                                    url: '/img/icon/camera.png'
                                },
                                incident: this.siteClick
                            })
                        } else if (this.navType == 2) {
                            this.$EventBus.$emit('layerPointAdd', {
                                layerName: 'policeMonitoringLayers',
                                type: 'billboard',
                                params: {
                                    ...item,
                                    url: '/img/icon/p-talk.png'
                                },
                                incident: this.siteClick
                            })
                        } else if (this.navType == 3) {
                            this.$EventBus.$emit('layerPointAdd', {
                                layerName: 'policeMonitoringLayers',
                                type: 'billboard',
                                params: {
                                    ...item,
                                    url: '/img/icon/p-b-camera.png'
                                },
                                incident: this.siteClick
                            })
@@ -327,6 +359,7 @@
                return
            }
            console.log(row)
            this.$EventBus.$emit('toPosition', {
                layerName: 'carLayers',
                siteJd: row.lng,
@@ -440,7 +473,7 @@
            })
            let positionsArr = []
            await this.getHistoricalTrack({ start: start, end: end, channelId: this.currentSelectEquipment.channelId }).then(res => {
            await this.getHistoricalTrack({ start: start, end: end, channelId: this.currentSelectEquipment.channelId, type: this.navType }).then(res => {
                positionsArr = res
            })