zrj
2024-06-22 b58a5193d305ecef0a655fd9037c15012b553b1f
九小场所新增责任区查询
3 files modified
31 ■■■■ changed files
src/views/home/components/dialog/placeDetailsBox.vue 7 ●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue 22 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 2 ●●●●● patch | view | raw | blame | history
src/views/home/components/dialog/placeDetailsBox.vue
@@ -166,6 +166,7 @@
      },
      nineType: "",
      policeName: "",
      areaId:null
    };
  },
  computed: {
@@ -266,8 +267,9 @@
     * @param {*} value 类型参数
     * @return {*}
     */
    showplacedetail(type, name, value) {
    showplacedetail(type, name, value,areaId) {
      this.type = type;
      this.areaId = areaId
      this.visible = true;
      this.title = name;
      this.pages.current = 1;
@@ -322,7 +324,8 @@
        nineType: this.typeValue,
        placeName: this.placeName,
        isDanger: this.type==1?1:"",
        deptId: this.policeStaionID
        deptId: this.policeStaionID,
        areaId:this.areaId
      })
        .then((res) => {
          const data = res.data.data;
src/views/home/components/leftContainer.vue
@@ -216,6 +216,7 @@
            gzcsPhone: '',
            isFirstMounted: true,
            clickPoliceStationId: '',
            areaId:null,
        }
    },
@@ -320,12 +321,24 @@
                }, 1000)
            })
        },
        /**
         * 责任区查询
         * @param {*} areaId
         */
        getHomeAllDataByAreaId(policeStationId,areaId){
            // if(areaId){
                this.policeStaionID = policeStationId
                this.areaId = areaId
                this.getNineStatistics(true)
            // }
        },
        /**
         * @description: 获取首页的所有数据
         * @return {*}
         */
        getHomeAllData (id = '') {
            this.areaId = null
            this.policeStaionID = id
            this.clickPoliceStationId = id
@@ -816,7 +829,7 @@
            this.tabTypeThree = type
            this.houseEchartsLoading = true
            houseMyChart.on('click', params => {
                this.$emit('showplacedetail', type, '九小场所列表', params.name)
                this.$emit('showplacedetail', type, '九小场所列表', params.name,this.areaId)
            })
        },
        // 九小场所
@@ -1099,7 +1112,9 @@
        },
        getNineStatistics (flag = false) {
            getNineStatistics({ deptId: this.policeStaionID != '' ? this.policeStaionID : this.userInfo.dept_id }).then(res => {
            getNineStatistics({ deptId: this.policeStaionID != '' ? this.policeStaionID : this.userInfo.dept_id,
                areaId:this.areaId
             }).then(res => {
                let xDate = []
                let yDate = []
@@ -1107,7 +1122,6 @@
                let dangerList = res.data.data.dangerList.reverse()
                let placeList = res.data.data.placeList.reverse()
                if (flag) {
                    this.placeNum = placeList.reduce((pre, cur) => {
                        return pre + cur.num
@@ -1116,7 +1130,7 @@
                        return pre + cur.num
                    }, 0)
                    return
                    // return
                }
                if (this.tabTypeTwo == 1) {
src/views/home/index.vue
@@ -1732,9 +1732,11 @@
            if (item.name == "全部") {
                this.initAreaOptionLayer()
                this.$refs.leftContainer.getHomeAllDataByAreaId(this.policeStaionID,null)
            } else {
                this.areaChecked = item
                this.getPoliceStationTree(3, item.id)
                this.$refs.leftContainer.getHomeAllDataByAreaId(this.policeStaionID,item.id)
            }
        },