guanqb
2023-01-09 dcb08e7da48f4ec291884b2363ba937e3878b03d
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
6 files modified
2 files added
150 ■■■■ changed files
.env.development 2 ●●●●● patch | view | raw | blame | history
.env.production 2 ●●●●● patch | view | raw | blame | history
.gitignore 1 ●●●● patch | view | raw | blame | history
prod.env.js 33 ●●●●● patch | view | raw | blame | history
src/api/police/index.js 6 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 42 ●●●● patch | view | raw | blame | history
src/router/axios.js 30 ●●●● patch | view | raw | blame | history
src/views/home/components/bottomContainer.vue 34 ●●●● patch | view | raw | blame | history
.env.development
New file
@@ -0,0 +1,2 @@
# 开发
NODE_ENV = 'development'
.env.production
New file
@@ -0,0 +1,2 @@
# 生产
NODE_ENV = 'production'
.gitignore
@@ -5,7 +5,6 @@
/public/sd
/vue.config.js
# local env files
.env.local
.env.*.local
prod.env.js
@@ -1,6 +1,33 @@
/*
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-12-26 14:30:02
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-01-09 11:22:15
 * @FilePath: \srs-police-affairs\prod.env.js
 * @Description:
 *
 * Copyright (c) 2023 by shuishen 1109946754@qq.com, All Rights Reserved.
 */
'use strict'
module.exports = {
    NODE_ENV: '"production"',
    BASE_API: '"http://192.168.0.105:18080"',
    OUTSIDE_API: '"http://192.168.0.115:82"'
    // 丰图数据
    // 本地开发
    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_INTRANET_VIDEO: 'http://10.141.11.11:18185/api',
}
src/api/police/index.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-11-15 15:10:41
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-01-07 11:57:46
 * @LastEditTime: 2023-01-09 10:14:34
 * @FilePath: \srs-police-affairs\src\api\police\index.js
 * @Description: 
 * 
@@ -18,9 +18,9 @@
export const getHistoricalTrack = (params, requestBaseUrl = 'outside') => {
    return request({
        // 平台ID在这里更换,不要传了内网使用
        // url: `/position/history/36110000002009999000`,
        url: `/position/history/36110000002009999000`,
        // 开发使用
        url: `/position/history/34020000001320000001`,
        // url: `/position/history/34020000001320000001`,
        method: 'get',
        requestBaseUrl,
        params: 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-01-07 11:09:38
 * @LastEditTime: 2023-01-09 10:15:17
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -171,29 +171,29 @@
            // global.viewer.addTerrain(terrain)
            // 天地图 影像
            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.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
            //         url: "http://10.141.11.11:8090/MapTileService/wmts?STORETYPE=merged-dat&PROJECTION=4326",
            //         layer: "wmts_4326_361100",
            //         style: "default",
            //         format: "image/png",
            //         tileMatrixSetID: "c",
            //         tileMatrixLabels: new Array(18).fill(0).map((v, i) => i + 1),
            //         tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
            //     })
            // )
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
                    url: "http://10.141.11.11:8090/MapTileService/wmts?STORETYPE=merged-dat&PROJECTION=4326",
                    layer: "wmts_4326_361100",
                    style: "default",
                    format: "image/png",
                    tileMatrixSetID: "c",
                    tileMatrixLabels: new Array(18).fill(0).map((v, i) => i + 1),
                    tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
                })
            )
            // 设置地图初始位置,角度等
            global.viewer.camera.setView({
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-06 17:13:56
 * @LastEditTime: 2023-01-09 11:37:35
 * @FilePath: \srs-police-affairs\src\router\axios.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
@@ -21,6 +21,23 @@
import { Base64 } from 'js-base64'
import * as auth from '@/utils/auth'
import prodEnv from "../../prod.env"
let defaultApi = ''
let searchAllApi = ''
let videoApi = ''
if (process.env.NODE_ENV == 'development') {
    // 开发
    defaultApi = prodEnv.VUE_APP_INTRANET
    searchAllApi = prodEnv.VUE_APP_OUTER_NET_SEARCH
    videoApi = prodEnv.VUE_APP_OUTER_NET_VIDEO
} else {
    // 部署
    defaultApi = prodEnv.VUE_APP_INTRANET
    searchAllApi = prodEnv.VUE_APP_INTRANET_SEARCH
    videoApi = prodEnv.VUE_APP_INTRANET_VIDEO
}
// 调用后台管理的
const service = axios.create({
@@ -40,16 +57,11 @@
    (config) => {
        // 调用监控平台的
        if (config.requestBaseUrl == "outside") {
            // 内网部署地址
            // config.baseURL = 'http://10.141.11.11:18185/api'
            config.baseURL = 'http://192.168.0.126:18185/api'
            // config.baseURL = "http://192.168.0.129:18185/api"
            config.baseURL = videoApi
        } else if (config.requestBaseUrl == "fengt") {
            // feng tu 数据
            // config.baseURL = "http://10.141.11.11:18080"
            config.baseURL = "http://192.168.0.112:18080"
            config.baseURL = defaultApi
        } else if (config.requestBaseUrl == "fengtDS") {
            config.baseURL = "http://192.168.0.112:9091"
            config.baseURL = searchAllApi
        }
        //headers判断是否需要
src/views/home/components/bottomContainer.vue
@@ -29,6 +29,7 @@
                </div>
            </div>
            <!-- v-if="historytype == 0" -->
            <div class="body" ref="tableBox" @click="handleSelectClick($event)">
                <ul class="title-header">
                    <li>
@@ -50,7 +51,7 @@
                    <ul class="item">
                        <li v-for="(item, index) in listCurrentData" :key="index" :data-obj="JSON.stringify(item)"
                            class="row">
                            <span class="num" v-text="index + 1"></span>
                            <span class="num" v-text="index"></span>
                            <span class="receiving-alarm-unit" v-text="item.JJDWMC"></span>
                            <span class="receiving-alarm-people" v-text="item.JJYXM"></span>
                            <span class="receiving-alarm-time" :title="item.JJSJ"
@@ -69,6 +70,29 @@
                    暂无数据
                </div>
            </div>
            <!-- <div class="body" v-else>
                <div class="list-box">
                    <el-table :data="monitoringList" style="width: 100%"
                        :header-cell-style="{ 'text-align': 'center', 'background-color': 'rgba(9, 40, 199, 0.5)', 'borderColor': '#324e75' }"
                        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" @cell-click="rowClick">
                        <el-table-column prop="index" label="序号" min-width="35%"></el-table-column>
                        <el-table-column prop="JJDWMC" label="接警单位" min-width="35%"></el-table-column>
                        <el-table-column prop="JJYXM" label="接警员" min-width="35%"></el-table-column>
                        <el-table-column :title="item.JJSJ" :prop="JJSJ.substring(0, 10)" label="接警时间" min-width="35%"></el-table-column>
                        <el-table-column prop="BJRXM" label="报警人" min-width="35%"></el-table-column>
                        <el-table-column prop="LXDH" label="联系电话" min-width="35%"></el-table-column>
                        <el-table-column prop="BJNR" label="报警内容" min-width="35%"></el-table-column>
                        <el-table-column prop="SFDZ" label="事发地址" min-width="35%"></el-table-column>
                        <el-table-column prop="BJLX" label="报警类型" min-width="35%"></el-table-column>
                        <el-table-column prop="MEMO" label="备注" min-width="35%"></el-table-column>
                    </el-table>
                </div>
                <div class="pages">
                    <el-pagination background layout="prev, pager, next" :page-size="pagesize" :page-count="pagesCount"
                        :current-page="currentPage" @current-change="handleCurrentChange"></el-pagination>
                </div>
            </div> -->
        </div>
        <svg class="border-svg">
@@ -104,9 +128,8 @@
<script>
import vueSeamlessScroll from 'vue-seamless-scroll'
import historyArr from '@/assets/data/policeSituationArr/historyArr.js'
import { getCallPolices, getAnswerPolices, getAlarmList } from "@/api/home/index.js"
import { getAnswerPolices, getAlarmList } from "@/api/home/index.js"
export default {
    data () {
@@ -117,7 +140,6 @@
            policeSituationRealtimeArr: [],
            // 历史
            policeSituationHistoryArr: [],
            policeSituationHistorySaveArr: [],
            eventTime: '',
            currentWeekTime: '',
            currentMonthTime: '',
@@ -196,7 +218,7 @@
        getAnswerPolices () {
            getAnswerPolices().then(res => {
                this.policeSituationRealtimeArr = res.data.result.map((item, index) => {
                    return { ...item, lng: item.ZDDWXZB, lat: item.ZDDWYZB }
                    return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB }
                })
            })
@@ -289,7 +311,7 @@
        getAlarmList (type, time) {
            getAlarmList(type, time).then(res => {
                this.policeSituationHistoryArr = res.data.data.records.map((item, index) => {
                    return { ...item, lng: item.ZDDWXZB, lat: item.ZDDWYZB }
                    return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB }
                })
            })
        },