shuishen
2023-04-10 c92a12b5123281189f5ef26f0c649346f5475e6c
电子沙盘及警情信息修改
6 files modified
1 files added
177 ■■■■■ changed files
src/api/icons/index.js 23 ●●●●● patch | view | raw | blame | history
src/components/imagesSelect/index.vue 30 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 28 ●●●● patch | view | raw | blame | history
src/views/activity/components/publicIndex.vue 68 ●●●● patch | view | raw | blame | history
src/views/activity/index.vue 10 ●●●●● patch | view | raw | blame | history
src/views/police/index.vue 12 ●●●●● patch | view | raw | blame | history
vue.config.js 6 ●●●● patch | view | raw | blame | history
src/api/icons/index.js
New file
@@ -0,0 +1,23 @@
/*
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-04-10 17:28:21
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-10 17:29:29
 * @FilePath: \srs-police-affairs\src\api\icons\index.js
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
 */
import request from "@/router/axios.js"
/**
 * 获取派出所和责任区数据
 * @param {*} params
 * @returns
 */
export const getIconsAll = () => {
    return request({
        url: '/api/data/getPictureUrlDataList',
        method: 'get',
    })
}
src/components/imagesSelect/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-04-04 16:24:42
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-07 15:59:41
 * @LastEditTime: 2023-04-10 17:33:40
 * @FilePath: \srs-police-affairs\src\components\imagesSelect\index.vue
 * @Description: 
 * 
@@ -14,15 +14,12 @@
            <div class="content">
                <img :src="item.url" alt="">
            </div>
            <div class="name">
                {{ item.name }}
            </div>
        </div>
    </div>
</template>
<script>
import axios from "axios"
import { getIconsAll } from "@/api/icons/index"
export default {
    name: 'ImagesSelect',
@@ -39,14 +36,8 @@
    methods: {
        requireImage () {
            axios.get('/icons').then(res => {
                res.data.forEach(item => {
                    this.imageUrls.push({
                        url: `/icons/${item}`,
                        name: item.substring(0, item.length - 4)
                    })
                })
            getIconsAll().then(res => {
                this.imageUrls = res.data.data
                this.loading = false
            })
        },
@@ -68,7 +59,7 @@
    flex-wrap: wrap;
    width: 560px;
    height: 360px;
    max-height: 360px;
    overflow-x: hidden;
    overflow-y: auto;
    background: $el-dialog-bg-color;
@@ -78,7 +69,7 @@
        padding: 6px;
        margin: 10px;
        width: 100px;
        height: 60px;
        height: 40px;
        cursor: pointer;
        border: 1px solid #fff;
        border-radius: 8px;
@@ -103,15 +94,6 @@
                width: 40px;
                height: 40px;
            }
        }
        .name {
            height: 20px;
            line-height: 20px;
            font-size: 12px;
            overflow: hidden; //超出的文本隐藏
            text-overflow: ellipsis; //溢出用省略号显示
            white-space: nowrap; //溢出不换行
        }
    }
}
src/components/map/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 17:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-09 15:52:50
 * @LastEditTime: 2023-04-10 16:42:50
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -20,12 +20,12 @@
        <!-- 全屏控制按钮 -->
        <div class="screen-full-btn">
            <!-- <el-tooltip v-if="isFullscreen" content="缩放" placement="top" effect="dark">
                                                                                            <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                        </el-tooltip> -->
                                                                                                    <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                                </el-tooltip> -->
            <!-- <el-tooltip v-if="!isFullscreen" content="全屏" placement="top" effect="dark">
                                                                                                <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                            </el-tooltip> -->
                                                                                                        <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                                    </el-tooltip> -->
            <el-tooltip content="显示/隐藏" placement="top" effect="dark">
                <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="switchShowHomeContent"></i>
            </el-tooltip>
@@ -294,15 +294,15 @@
            that.switchImg()
            // 外网
            // global.viewer.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
            //         url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_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=vec_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/views/activity/components/publicIndex.vue
@@ -180,7 +180,6 @@
            this.$refs.DRAWBTNBOX && this.$refs.DRAWBTNBOX.removeDrawArrow()
            this.$parent.showingSecurityId = ''
            this.$EventBus.$emit('mapRemoveLayer', {
                layerName: 'activityCameraLayers',
@@ -216,8 +215,53 @@
            this.arrowBtnSwitch = false
            this.polylineBtnSwitch = false
            this.$refs.VIDEOCONTROLBOX && this.$refs.VIDEOCONTROLBOX.closeVideo()
            this.$parent.showingSecurityId = ''
            this.$parent.currentTreeItem = ''
            this.$parent.activeActivityIndex = ''
            this.clearOrRemoveLayerAll('clear')
            this.$refs.DRAWBTNBOX && this.$refs.DRAWBTNBOX.stopDraw()
        },
        closeCurrentItem () {
            this.$parent.cleartAllTimer()
            this.$refs.DRAWBTNBOX && this.$refs.DRAWBTNBOX.removeDrawArrow()
            this.$EventBus.$emit('mapRemoveLayer', {
                layerName: 'activityCameraLayers',
                type: 'VectorLayer'
            })
            // 警车
            this.$EventBus.$emit('mapRemoveLayer', {
                layerName: 'activityCarLayers',
                type: 'VectorLayer'
            })
            // 手台-公网
            this.$EventBus.$emit('mapRemoveLayer', {
                layerName: 'activityTalkBackEquipmentPublicLayers',
                type: 'VectorLayer'
            })
            // 手台-专网
            this.$EventBus.$emit('mapRemoveLayer', {
                layerName: 'activityTalkBackEquipmentLayers',
                type: 'VectorLayer'
            })
            // 执法记录仪
            this.$EventBus.$emit('mapRemoveLayer', {
                layerName: 'activityPoliceCameraLayers',
                type: 'VectorLayer'
            })
            this.dialogVisible = false
            this.policeSwitch = false
            this.arrowBtnSwitch = false
            this.polylineBtnSwitch = false
            this.$refs.VIDEOCONTROLBOX && this.$refs.VIDEOCONTROLBOX.closeVideo()
            this.clearOrRemoveLayerAll('clear')
            this.$refs.DRAWBTNBOX && this.$refs.DRAWBTNBOX.stopDraw()
@@ -248,9 +292,11 @@
        },
        reloadAll (params) {
            this.$store.commit('SET_ACTIVITYPOLICEPOPUP', false)
            this.currentPlotType = params.item.plotType
            this.closeActivityDetails()
            this.closeCurrentItem()
            // 当前选中的ID
            this.showingSecurityId = params.item.id
@@ -473,8 +519,8 @@
                this.addMapCarAndPersonLayers(
                    res.data.data.filter(item => item.type == 3),
                    'policeman',
                    pointCircleCarLayer,
                    'newFactorResourcesLayers')
                    pointCircleCarLayer
                )
            })
        },
@@ -498,8 +544,7 @@
                this.addMapCarAndPersonLayers(
                    res.data.data.filter(item => item.type == 3),
                    'policecar',
                    pointCircleCarLayer,
                    'newFactorResourcesLayers')
                    pointCircleCarLayer)
                this.addMapLineLayers(res.data.data.filter(item => item.type == 1))
            })
        },
@@ -575,8 +620,6 @@
            }
            hoverData.Data = e.overlay.attrParams
            console.log(hoverData, 95999)
            this.$store.commit('SET_ACTIVITYPOLICEPOPUPDATA', hoverData)
@@ -666,10 +709,6 @@
            if (type == 'clear') {
                // 要素的
                pointCircleCarLayer != null && pointCircleCarLayer.clear()
                this.$EventBus.$emit('mapClearLayer', {
                    layerName: 'newFactorResourcesLayers',
                    type: 'VectorLayer'
                })
                // 作战的
                arrowsListLayer != null && arrowsListLayer.clear()
@@ -689,10 +728,6 @@
            } else {
                // 要素的
                pointCircleCarLayer != null && pointCircleCarLayer.remove(), pointCircleCarLayer = null
                this.$EventBus.$emit('mapRemoveLayer', {
                    layerName: 'newFactorResourcesLayers',
                    type: 'VectorLayer'
                })
                // 作战的
                arrowsListLayer != null && arrowsListLayer.remove(), arrowsListLayer = null
@@ -715,7 +750,6 @@
        // 切换轨警力资源显示
        switchChange (e) {
            pointCircleCarLayer.show = e
            this.$EventBus.$emit('layerShow', { layerName: 'newFactorResourcesLayers', flag: e })
        },
        // 切换作战标绘
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-04-07 16:45:36
 * @LastEditTime: 2023-04-10 17:26:11
 * @FilePath: \srs-police-affairs\src\views\activity\index.vue
 * @Description: 
 * 
@@ -465,6 +465,8 @@
                this.fineArrowList = res.data.data.filter(item => item.type == 4)
                this.polygonList = res.data.data.filter(item => item.type == 5)
                this.borkenList = res.data.data.filter(item => item.type == 10)
                this.$store.commit('SET_ACTIVITYPOLICEPOPUP', false)
            })
        },
@@ -473,11 +475,15 @@
            if (type == 'policeman') {
                getSecurityPoliceList(securityId).then(res => {
                    this.chooseActivityPoliceManList = res.data.data.filter(item => item.type == 3)
                    this.$store.commit('SET_ACTIVITYPOLICEPOPUP', false)
                })
            } else {
                getSecurityCarList(securityId).then(res => {
                    this.chooseActivityPoliceCarList = res.data.data.filter(item => item.type == 3)
                    this.chooseActivityLineList = res.data.data.filter(item => item.type == 1)
                    this.$store.commit('SET_ACTIVITYPOLICEPOPUP', false)
                })
            }
        },
@@ -606,6 +612,7 @@
        // 分页页码变化事件
        handleCurrentChange (currentPage) {
            this.$store.commit('SET_ACTIVITYPOLICEPOPUP', false)
            this.currentPage = currentPage
            this.currentTreeItem = ''
            this.activeActivityIndex = ''
@@ -1021,6 +1028,7 @@
        global.viewer.scene.globe.depthTestAgainstTerrain = false
        this.$store.commit('SET_ACTIVITYPOLICEPOPUP', false)
        this.$parent.$parent.resize('0px')
    }
}
src/views/police/index.vue
@@ -289,9 +289,19 @@
            this.equimentTableData = []
            this.equimentLoading = true
            this.emptyText = ""
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'carLayers',
                type: 'VectorLayer'
            })
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'policeMonitoringLayers',
                type: 'VectorLayer'
            })
            getEquipmentPaging({ page: this.equimentPage.currentPage, count: this.equimentPage.pageSize, ...params, query: this.searchValue, dwbh: this.userInfo.dept_id }).then(res => {
                var total = res.data.data.total
                console.log('getEquipmentPaging', total)
                if (total == 0) {
                    if (this.navType == 0) {
                        this.emptyText = "暂无警车数据"
vue.config.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-09-07 09:37:07
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-09 15:06:57
 * @LastEditTime: 2023-04-10 16:40:05
 * @FilePath: \srs-police-affairs\vue.config.js
 * @Description:
 *
@@ -161,8 +161,8 @@
        proxy: {
            "/api": {
                // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
                target: "http://localhost:82",
                // target: "http://192.168.0.100:82",
                // target: "http://localhost:82",
                target: "http://192.168.0.100:82",
                // target: "http://17.20.10.3:82",
                // target: "http://10.141.11.11:8081/api",
                // ws: true, //启用webSocket6566