| | |
| | | }, |
| | | nineType: "", |
| | | policeName: "", |
| | | areaId:null |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | * @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; |
| | |
| | | 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; |
| | |
| | | gzcsPhone: '', |
| | | isFirstMounted: true, |
| | | clickPoliceStationId: '', |
| | | areaId:null, |
| | | } |
| | | }, |
| | | |
| | |
| | | }, 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 |
| | | |
| | |
| | | this.tabTypeThree = type |
| | | this.houseEchartsLoading = true |
| | | houseMyChart.on('click', params => { |
| | | this.$emit('showplacedetail', type, '九小场所列表', params.name) |
| | | this.$emit('showplacedetail', type, '九小场所列表', params.name,this.areaId) |
| | | }) |
| | | }, |
| | | // 九小场所 |
| | |
| | | }, |
| | | |
| | | 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 = [] |
| | | |
| | |
| | | |
| | | 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 |
| | |
| | | return pre + cur.num |
| | | }, 0) |
| | | |
| | | return |
| | | // return |
| | | } |
| | | |
| | | if (this.tabTypeTwo == 1) { |
| | |
| | | |
| | | 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) |
| | | } |
| | | }, |
| | | |