shuishen
2023-02-17 62da5471a615eba7f442fe495c6582ef20f5f366
解决模块切换时axios请求发送延迟导致的数据加载
1 files modified
16 ■■■■ changed files
src/views/home/index.vue 16 ●●●● patch | view | raw | blame | history
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-17 15:44:25
 * @LastEditTime: 2023-02-17 16:43:28
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
@@ -760,7 +760,9 @@
            policeStaionID: '',
            // 现有地搜索条件-小区名称
            landSearchAoiName: ''
            landSearchAoiName: '',
            destroyFlag: true
        }
    },
@@ -816,6 +818,7 @@
        // 加载首页下拉列表数据
        getPoliceStationTree (type, id = '') {
            getPoliceStationTree(type, id).then(res => {
                if (this.destroyFlag == false) return
                if (type == 1) {
                    this.policeStationOptions = res.data.data
@@ -1632,7 +1635,6 @@
                if (res.data.data.list.length > 0) {
                    this.equimentTableData = res.data.data.list
                    console.log(this.equimentTableData[0], 22323)
                    this.equimentPagingTotal = res.data.data.total
                } else {
@@ -1997,6 +1999,13 @@
            showBtn: false
        })
        global.viewer.dataSources.removeAll()
        this.$EventBus.$emit('mapRemoveLayer', {
            layerName: 'polygonLayer',
            type: 'VectorLayer'
        })
        this.$EventBus.$emit('mapRemoveLayer', {
            layerName: 'carLayers',
            type: 'VectorLayer'
@@ -2026,6 +2035,7 @@
            layerName: 'activityLayers',
            type: 'ClusterLayer'
        })
        if (cylinderLayer != null) {
            cylinderLayer.clear()
            cylinderLayer.remove()