shuishen
2023-02-20 76cde2bc853cc4d491749e46dbef83064271d09a
配置地址更新,定时器清除,事件绑定
13 files modified
1 files deleted
1 files added
237 ■■■■■ changed files
prod.env.js 34 ●●●●● patch | view | raw | blame | history
public/config.js 32 ●●●●● patch | view | raw | blame | history
public/index.html 4 ●●● patch | view | raw | blame | history
src/api/home/index.js 19 ●●●●● patch | view | raw | blame | history
src/api/police/index.js 17 ●●●● patch | view | raw | blame | history
src/api/video/index.js 28 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 4 ●●●● patch | view | raw | blame | history
src/main.js 3 ●●●● patch | view | raw | blame | history
src/router/axios.js 15 ●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue 3 ●●●●● patch | view | raw | blame | history
src/views/home/components/rightContainer.vue 5 ●●●●● patch | view | raw | blame | history
src/views/home/index.vue 15 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 18 ●●●● patch | view | raw | blame | history
src/views/layout/index.vue 17 ●●●● patch | view | raw | blame | history
src/views/video/list.vue 23 ●●●●● patch | view | raw | blame | history
prod.env.js
File was deleted
public/config.js
New file
@@ -0,0 +1,32 @@
window.BASE_URL_CONFIG = {
    // 丰图数据
    // 本地开发
    VUE_APP_OUTER_NET: 'http://192.168.0.112:18080',
    // 内网部署
    VUE_APP_INTRANET: 'http://10.141.11.11:18080',
    // 大搜
    // 本地开发
    VUE_APP_OUTER_NET_SEARCH: 'http://192.168.0.112:9091',
    // 内网部署
    VUE_APP_INTRANET_SEARCH: 'http://10.141.11.11:9091',
    // 视频监控平台
    // 本地开发
    VUE_APP_OUTER_NET_VIDEO: 'http://192.168.0.126:18185/api',
    // VUE_APP_OUTER_NET_VIDEO: 'http://192.168.0.129:18185/api',
    // 内网部署
    VUE_APP_INTRANET_VIDEO: 'http://10.141.11.11:18185/api',
    // 设备通道号
    VUE_APP_OUTER_NET_EQUIPMENT: '34020000002000000003',
    VUE_APP_INTRANET_EQUIPMENT: '36110000002009999000',
    // 模型地址
    VUE_APP_OUTER_NET_TILEURL: 'http://192.168.0.112:18080',
    VUE_APP_INTRANET_TILEURL: 'http://10.141.11.11:18080',
    // 后台管理跳转地址
    VUE_APP_OUTER_NET_HTURL: 'http://192.168.0.109:1888',
    VUE_APP_INTRANET_HTURL: 'http://10.141.11.11:8081'
}
public/index.html
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-09-07 09:34:58
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-01-06 17:01:58
 * @LastEditTime: 2023-02-20 10:09:19
 * @FilePath: \srs-police-affairs\public\index.html
 * @Description: 
 * 
@@ -20,6 +20,8 @@
        信州公安VR指挥平台
    </title>
    <script src="./config.js"></script>
    <script src="./depend/vue.min.js"></script>
    <script src="./depend/vue-router.min.js"></script>
src/api/home/index.js
@@ -10,6 +10,15 @@
 */
import request from "@/router/axios.js"
let equipmentNum = ''
if (process.env.NODE_ENV == 'development') {
    // 开发
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_EQUIPMENT
} else {
    // 部署
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_INTRANET_EQUIPMENT
}
/**
 * 获取值班列表
@@ -120,10 +129,7 @@
// 获取设备分页数据 
export const getEquipmentPaging = (params) => {
    return request({
        // 内网
        url: `/device/query/devices/36110000002009999000/channelsCar`,
        // 外网
        // url: `/device/query/devices/34020000002000000003/channelsCar`,
        url: `/device/query/devices/${equipmentNum}/channelsCar`,
        method: 'get',
        requestBaseUrl: 'outside',
        params: {
@@ -139,10 +145,7 @@
        method: 'get',
        params: {
            ...params,
            // 内网
            deviceId: '36110000002009999000'
            // 外网
            // deviceId: '34020000002000000003'
            deviceId: equipmentNum
        }
    })
}
src/api/police/index.js
@@ -2,13 +2,23 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-11-15 15:10:41
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-02-09 10:46:18
 * @LastEditTime: 2023-02-20 10:18:05
 * @FilePath: \srs-police-affairs\src\api\police\index.js
 * @Description: 
 * 
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved. 
 */
import request from "@/router/axios.js"
let equipmentNum = ''
if (process.env.NODE_ENV == 'development') {
    // 开发
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_EQUIPMENT
} else {
    // 部署
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_INTRANET_EQUIPMENT
}
/**
 * 获取设备历史轨迹
@@ -17,10 +27,7 @@
 */
export const getHistoricalTrack = (params, requestBaseUrl = 'outside') => {
    return request({
        // 内网
        url: `/position/history/36110000002009999000`,
        // 外网
        // url: `/position/history/34020000002000000003`,
        url: `/position/history/${equipmentNum}`,
        method: 'get',
        requestBaseUrl,
        params: params
src/api/video/index.js
@@ -2,13 +2,24 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-11-15 15:10:41
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-02-17 10:34:10
 * @LastEditTime: 2023-02-20 10:18:43
 * @FilePath: \srs-police-affairs\src\api\video\index.js
 * @Description: 
 * 
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved. 
 */
import request from "@/router/axios.js"
let equipmentNum = ''
if (process.env.NODE_ENV == 'development') {
    // 开发
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_EQUIPMENT
} else {
    // 部署
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_INTRANET_EQUIPMENT
}
/**
 * 获取设备列表
@@ -20,10 +31,7 @@
 */
export const getVideoList = (page, count, query, params = {}) => {
    return request({
        // 内网
        url: '/device/query/devices/36110000002009999000/channels',
        // 外网
        // url: '/device/query/devices/34020000002000000003/channels',
        url: `/device/query/devices/${equipmentNum}/channels`,
        method: 'get',
        requestBaseUrl: 'outside',
        params: {
@@ -42,10 +50,7 @@
 */
export const getDevices = (channelId) => {
    return request({
        // 内网
        url: `/play/start/36110000002009999000/${channelId}`,
        // 外网
        // url: `/play/start/34020000002000000003/${channelId}`,
        url: `/play/start/${equipmentNum}/${channelId}`,
        method: 'get',
        requestBaseUrl: 'outside'
    })
@@ -172,10 +177,7 @@
        url: '/api/deviceChannel/deviceChannel/getDeviceChannelByMileage',
        method: 'get',
        params: {
            // 内网
            deviceId: '36110000002009999000',
            // 外网
            // deviceId: '34020000002000000003',
            deviceId: equipmentNum,
            ...params
        }
    })
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-02-17 08:48:00
 * @LastEditTime: 2023-02-20 09:01:16
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -610,7 +610,7 @@
                    fillColor: global.DC.Color.CRIMSON,
                    style: global.DC.Namespace.Cesium.LabelStyle.FILL_AND_OUTLINE,
                    outlineColor: global.DC.Color.WHITE, // 边框颜色
                    outlineWidth: 4, // 边框大小,
                    outlineWidth: params.outW || 4, // 边框大小,
                    font: '16px sans-serif',
                    pixelOffset: { x: 0, y: -30 },
                    distanceDisplayCondition: distanceDisplayCondition
src/main.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-09-07 09:34:58
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-11-12 10:02:24
 * @LastEditTime: 2023-02-20 09:52:16
 * @FilePath: \srs-police-affairs\src\main.js
 * @Description: 
 * 
@@ -12,7 +12,6 @@
import App from './App.vue'
import router from './router/page'
import store from './store'
import '../prod.env'
import { EventBus } from '@/eventBus/event-bus'
src/router/axios.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-07-29 15:19:13
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-01-16 15:43:03
 * @LastEditTime: 2023-02-20 10:11:07
 * @FilePath: \srs-police-affairs\src\router\axios.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
@@ -21,7 +21,6 @@
import { Base64 } from 'js-base64'
import * as auth from '@/utils/auth'
import prodEnv from "../../prod.env"
let defaultApi = ''
let searchAllApi = ''
@@ -29,14 +28,14 @@
if (process.env.NODE_ENV == 'development') {
    // 开发
    defaultApi = prodEnv.VUE_APP_OUTER_NET
    searchAllApi = prodEnv.VUE_APP_OUTER_NET_SEARCH
    videoApi = prodEnv.VUE_APP_OUTER_NET_VIDEO
    defaultApi = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET
    searchAllApi = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_SEARCH
    videoApi = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_VIDEO
} else {
    // 部署
    defaultApi = prodEnv.VUE_APP_INTRANET
    searchAllApi = prodEnv.VUE_APP_INTRANET_SEARCH
    videoApi = prodEnv.VUE_APP_INTRANET_VIDEO
    defaultApi = window.BASE_URL_CONFIG.VUE_APP_INTRANET
    searchAllApi = window.BASE_URL_CONFIG.VUE_APP_INTRANET_SEARCH
    videoApi = window.BASE_URL_CONFIG.VUE_APP_INTRANET_VIDEO
}
// 调用后台管理的
src/views/home/components/leftContainer.vue
@@ -940,6 +940,9 @@
                        countArr.push({ value: item.count, id: item.id })
                    })
                    landData = [nameArr, countArr]
                    this.$emit('createCyLinder', res.data.data)
                } else if (type == 1) {
                    // this.areaNum = res.data.data.areaNum
                    // this.villageNum = res.data.data.villageNum
src/views/home/components/rightContainer.vue
@@ -724,6 +724,11 @@
            eventchangemychart = null
        }
        if (timer) {
            clearInterval(timer)
            timer = null
        }
        if (rightTiming != null) {
            clearInterval(rightTiming)
            rightTiming = null
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-02-18 09:53:20
 * @LastEditTime: 2023-02-20 09:19:10
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
@@ -13,6 +13,7 @@
    <div class="home-page container">
        <left-container
            class="left-container"
            @createCyLinder="createCyLinder"
            @showpeopledetail="showpeopledetail"
            @showlanddetail="showlanddetail"
            @showkeypersondetail="showkeypersondetail"
@@ -1069,6 +1070,11 @@
            return [center.geometry.coordinates[0], center.geometry.coordinates[1]]
        },
        /**
         * @description: 小区是否展示
         * @param {*} e
         * @return {*}
         */
        houseChange (e) {
            if (e == true) {
                this.houseList.forEach(item => {
@@ -1085,6 +1091,10 @@
                    type: 'VectorLayer'
                })
            }
        },
        createCyLinder (res) {
            console.log(res, 9599999)
        },
        houseSiteClick (e) {
@@ -1454,7 +1464,8 @@
                            lng: center[0],
                            lat: center[1],
                            alt: 1,
                            text: item.name
                            text: item.name,
                            outW: 20
                        },
                        distanceDisplayCondition: { "near": 0, "far": 200000 }
                    })
src/views/house/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-17 14:18:40
 * @LastEditTime: 2023-02-20 10:40:21
 * @FilePath: \srs-police-affairs\src\views\house\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -658,6 +658,17 @@
</template>
<script>
let tile3DUrl = ''
if (process.env.NODE_ENV == 'development') {
    // 开发
    tile3DUrl = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_TILEURL
} else {
    // 部署
    tile3DUrl = window.BASE_URL_CONFIG.VUE_APP_INTRANET_TILEURL
}
let circleLayer = null
let timer = []
@@ -825,10 +836,7 @@
            this.$EventBus.$emit('addMxTileset', {
                titlesetName: 'sdTilesetLayer',
                // 内网
                // titlesetUrl: 'http://10.141.11.11:18080/sf3d/361102/model/wanda/tileset.json',
                // 外网
                titlesetUrl: 'http://192.168.0.112:18080/sf3d/361102/model/wanda/tileset.json',
                titlesetUrl: `${tile3DUrl}/sf3d/361102/model/wanda/tileset.json`,
                incident: that.getAoiByPtStd
            })
src/views/layout/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:24
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-02-14 10:55:48
 * @LastEditTime: 2023-02-20 10:42:35
 * @FilePath: \srs-police-affairs\src\views\layout\index.vue
 * @Description: 
 * 
@@ -123,6 +123,16 @@
</template>
<script>
let HTUrl = ''
if (process.env.NODE_ENV == 'development') {
    // 开发
    HTUrl = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_HTURL
} else {
    // 部署
    HTUrl = window.BASE_URL_CONFIG.VUE_APP_INTRANET_HTURL
}
import { getUserInfo, getToken } from '@/utils/auth'
export default {
    provide () {
@@ -193,10 +203,7 @@
            this.menuRightList.push({
                menuName: '运维管理',
                openExternal: true,
                // 内网
                path: 'http://10.141.11.11:8081/#/security/security'
                // 外网
                // path: 'http://192.168.0.109:1888/#/security/security'
                path: HTUrl
            })
        }
    },
src/views/video/list.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-17 10:06:38
 * @LastEditTime: 2023-02-20 10:43:51
 * @FilePath: \srs-police-affairs\src\views\video\list.vue
 * @Description: 辖区管理
 * 
@@ -142,6 +142,17 @@
</template>
<script>
let equipmentNum = ''
if (process.env.NODE_ENV == 'development') {
    // 开发
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_EQUIPMENT
} else {
    // 部署
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_INTRANET_EQUIPMENT
}
import EntityDraw from "@/utils/EntityDraw.js"
import {
    getDevices,
@@ -276,10 +287,7 @@
                this.searchTreeData = []
                getSearchTreeDevices({
                    // 内网
                    deviceId: '36110000002009999000',
                    // 外网
                    // deviceId: '34020000002000000003',
                    deviceId: equipmentNum,
                    parentId: '361102',
                    deptId: this.userInfo.dept_id,
                    name: this.searchValue.trim()
@@ -575,10 +583,7 @@
            }
            await getTreeDevices({
                // 内网
                deviceId: '36110000002009999000',
                // 外网
                // deviceId: '34020000002000000003',
                deviceId: equipmentNum,
                parentId,
                deptId: this.userInfo.dept_id,
                type,