guanqb
2023-03-28 5ef164c7e1b45557d2e644bffdda44336241931f
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs
6 files modified
120 ■■■■■ changed files
public/index.html 6 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 22 ●●●● patch | view | raw | blame | history
src/permission.js 9 ●●●● patch | view | raw | blame | history
src/router/axios.js 46 ●●●● patch | view | raw | blame | history
src/views/activity/index.vue 29 ●●●●● patch | view | raw | blame | history
src/views/home/index.vue 8 ●●●● patch | view | raw | blame | history
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-02-21 14:16:53
 * @LastEditTime: 2023-03-24 17:06:34
 * @FilePath: \srs-police-affairs\public\index.html
 * @Description: 
 * 
@@ -35,6 +35,10 @@
    <script src="./depend/echarts.min.js"></script>
    <script>
        window._axiosPromiseArr = []
    </script>
</head>
<body>
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-03-23 11:12:34
 * @LastEditTime: 2023-03-24 17:09:15
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -249,7 +249,7 @@
            global.viewer.setPitchRange(-90, -45)
            // global.viewer.scene.globe.depthTestAgainstTerrain = false
            global.viewer.scene.globe.depthTestAgainstTerrain = false
            // 去除logo
            let primitiveArr = global.viewer.scene.primitives._primitives
@@ -313,15 +313,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/permission.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:16:10
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-01-16 15:39:08
 * @LastEditTime: 2023-03-24 17:16:46
 * @FilePath: \srs-police-affairs\src\permission.js
 * @Description: 路由守卫
 * 
@@ -14,6 +14,13 @@
} from './utils/auth'
router.beforeEach((to, from, next) => {
    window._axiosPromiseArr && window._axiosPromiseArr.length && window._axiosPromiseArr.forEach((ele, index) => {
        ele.cancel()
        delete window._axiosPromiseArr[index]
        console.clear()
    })
    const meta = to.meta || {}
    // next()
    if (getToken()) {
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-02-20 15:59:57
 * @LastEditTime: 2023-03-24 17:15:12
 * @FilePath: \srs-police-affairs\src\router\axios.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
@@ -16,7 +16,6 @@
import axios from "axios"
import router from "@/router/page/index.js"
import { Message } from "element-ui"
// 获取公共配置域名
import { Base64 } from 'js-base64'
@@ -54,6 +53,10 @@
// http request拦截
service.interceptors.request.use(
    (config) => {
        config.cancelToken = new axios.CancelToken(cancel => {
            window._axiosPromiseArr.push({ cancel })
        })
        // 调用监控平台的
        if (config.requestBaseUrl == "outside") {
            config.baseURL = videoApi
@@ -94,25 +97,26 @@
)
// http response 拦截
// service.interceptors.response.use(
//     (res) => {
//         const code = res.data.code
//         if (code == 401 || code == 403 || res.data.data == "token 验证失败!") {
//             // sessionStorage.removeItem('token')
//             router.push("/login")
//         } else {
//             return res
//         }
//     },
//     (error) => {
//         Message({
//             message: error.message,
//             type: "error",
//             duration: 5 * 1000,
//         })
service.interceptors.response.use(
    (res) => {
        const code = res.data.code
        if (code == 401 || code == 403 || res.data.data == "token 验证失败!") {
            // sessionStorage.removeItem('token')
            router.push("/login")
        } else {
            return res
        }
    },
    (error) => {
        // Message({
        //     message: error.message,
        //     type: "error",
        //     duration: 5 * 1000,
        // })
        // console.log(error)
//         return Promise.reject(new Error(error))
//     }
// )
        return Promise.reject(new Error(error))
    }
)
export default service
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-22 16:11:13
 * @LastEditTime: 2023-03-24 16:44:07
 * @FilePath: \srs-police-affairs\src\views\activity\index.vue
 * @Description: 电子沙盘
 *
@@ -57,17 +57,17 @@
                            <div>
                                <div class="category">详情:</div>
                                <div class="category-value">{{ item.content }}</div>
                                                                                                                                                                                                                       </div>
                                                                                                                                                                                                                   </div>
                                                                                                                                                                                                               </div>
                                                                                                                                                                                                                                   </div>
                                                                                                                                                                                                                               </div>
                                                                                                                                                                                                                           </div>
                                                                                                                                                                                                               <div v-show="activityList == 0" class="no-data">暂无数据</div>
                                                                                                                                                                                                           </div>
                                                                                                                                                                                                           <div class="pages all-pagination-sty">
                                                                                                                                                                                                               <el-pagination background layout="prev, pager, next" :page-size="pagesize" :page-count="pagesCount"
                                                                                                                                                                                                                   :current-page="currentPage" @current-change="handleCurrentChange"></el-pagination>
                                                                                                                                                                                                           </div>
                                                                                                                                                                                               </div> -->
                                                                                                                                                                                                                           <div v-show="activityList == 0" class="no-data">暂无数据</div>
                                                                                                                                                                                                                       </div>
                                                                                                                                                                                                                       <div class="pages all-pagination-sty">
                                                                                                                                                                                                                           <el-pagination background layout="prev, pager, next" :page-size="pagesize" :page-count="pagesCount"
                                                                                                                                                                                                                               :current-page="currentPage" @current-change="handleCurrentChange"></el-pagination>
                                                                                                                                                                                                                       </div>
                                                                                                                                                                                                           </div> -->
            <el-collapse v-model="activeActivityIndex" accordion @change="handleActivityChange" class="activity-list">
                <el-collapse-item v-for="item in activityList" :name="item.id" :key="item.id">
@@ -659,6 +659,8 @@
            plotPointPositionStr: '',
            pointAreaWidth: 100,
            dataTreeCheckedNodes: [],
            currentTreeItem: ''
        }
    },
@@ -726,12 +728,15 @@
    methods: {
        // 展开活动列表面板
        handleActivityChange (val) {
            if (this.currentTreeItem == val) return
            if (!val) return
            let unfoldingItem = this.activityList.find((item) => {
                if (item.id === val) {
                    return item
                }
            })
            this.currentTreeItem = val
            this.activityListClick(unfoldingItem, val)
        },
@@ -871,7 +876,7 @@
            })
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'polygonLayer',
                layerName: 'polygonWallLayer',
                type: 'VectorLayer'
            })
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-23 11:11:50
 * @LastEditTime: 2023-03-24 16:55:40
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
@@ -620,8 +620,6 @@
            // 现有地搜索条件-小区名称
            landSearchAoiName: '',
            destroyFlag: true,
            flvPlayer: null,
            videoPlayShow: false,
@@ -713,8 +711,6 @@
        // 加载首页下拉列表数据
        getPoliceStationTree (type, id = '') {
            getPoliceStationTree(type, id).then(res => {
                if (this.destroyFlag == false) return
                if (type == 1) {
                    this.policeStationOptions = res.data.data
@@ -2076,8 +2072,6 @@
    },
    destroyed () {
        this.destroyFlag = false
        this.clearPolygonLayer()
        // cylinderLayer != null && cylinderLayer != undefined && cylinderLayer != '' && cylinderLayer.remove()