| | |
| | | <div class="sub-tab"> |
| | | <div class="tab" :class="{ 'select-on-tab': tabTypeTwo == 0 }" @click="houseTabClick(0)"> |
| | | <div class="tab-title-small">场所数量:</div> |
| | | <div class="tab-title-small">1754</div> |
| | | <div class="tab-title-small">{{ placeNum }}</div> |
| | | </div> |
| | | <div class="tab" :class="{ 'select-on-tab': tabTypeTwo == 1 }" @click="houseTabClick(1)"> |
| | | <div class="tab-title-small">隐患数量:</div> |
| | | <div class="tab-title-small">2465</div> |
| | | <div class="tab-title-small">{{ dangerNum }}</div> |
| | | </div> |
| | | </div> |
| | | <div id="houseEcharts" class="echarts-box"></div> |
| | |
| | | |
| | | <script> |
| | | import { fontSize } from '@/utils/fontSize.js' |
| | | import { getAreaStatisticInfo, getVillageStatisticData, getVillageStatisticDetail, getPlaceOfConcernStatisticData, getPlaceOfConcernStatisticDetail, getVillageDetailAndPlaceStatisticNumber } from "@/api/home/index.js" |
| | | import { |
| | | getAreaStatisticInfo, |
| | | getVillageStatisticData, |
| | | getVillageStatisticDetail, |
| | | getPlaceOfConcernStatisticData, |
| | | getPlaceOfConcernStatisticDetail, |
| | | getVillageDetailAndPlaceStatisticNumber, |
| | | getNineStatistics |
| | | } from "@/api/home/index.js" |
| | | import { schoolJSON } from '../homeleft/school' |
| | | import { hospitalJSON } from '../homeleft/hospital' |
| | | import { hotelJSON } from '../homeleft/hotel' |
| | |
| | | |
| | | data () { |
| | | return { |
| | | placeNum: 0, |
| | | dangerNum: 0, |
| | | tabType: 0, |
| | | personEchartsLoading: false, |
| | | houseEchartsLoading: false, |
| | |
| | | window.addEventListener("resize", this.echartsResize) |
| | | }) |
| | | |
| | | this.getVillageDetailAndPlaceStatisticNumber({ deptId: this.userInfo.dept_id }) |
| | | // this.getVillageDetailAndPlaceStatisticNumber({ deptId: this.userInfo.dept_id }) |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | this.tabType = 0//解决下拉选择派出所重点人员显示bug |
| | | this.personTabClick(this.tabType) |
| | | |
| | | this.getNineStatistics(true) |
| | | this.houseTabClick(this.tabTypeTwo) |
| | | |
| | | this.landTabClick(this.tabTypeThree) |
| | |
| | | this.$parent.getAllPoliceStationCenter() |
| | | }, |
| | | |
| | | /** |
| | | * @description: 获取现有住宅信息 |
| | | * @param {*} deptld |
| | | * @param {*} isFollow |
| | | * @return {*} |
| | | */ |
| | | getHouseStatisticInfo (isFollow) { |
| | | getHouseStatisticInfo(this.policeStaionID != '' ? this.policeStaionID : this.userInfo.dept_id, isFollow).then(res => { |
| | | this.disposeHouseEchart() |
| | | |
| | | let xDate = [] |
| | | let yDate = [] |
| | | if (isFollow == 1) { |
| | | this.keyPlaceNum = res.data.data.count |
| | | } else { |
| | | this.realHouseNum = res.data.data.count |
| | | } |
| | | res.data.data.data.forEach(item => { |
| | | xDate.push(item.name) |
| | | yDate.push(item.num) |
| | | }) |
| | | if (this.userInfo.dept_id == '1596020515064381442') { |
| | | this.keyPlaceNum = 28 |
| | | this.realHouseNum = 205 |
| | | if (isFollow == 2) { |
| | | xDate = ['学校', '医院', '宾馆酒店', '房屋建筑业', '数字经济', '批发业', '零售业'] |
| | | yDate = [34, 2, 33, 11, 22, 30, 14] |
| | | this.inithouseEcharts(xDate, yDate) |
| | | } else { |
| | | xDate = ['反恐重点目标', '危爆品', '重点服务对象', '困难儿童'] |
| | | yDate = [14, 13, 10, 17] |
| | | this.inithouseEcharts(xDate, yDate) |
| | | } |
| | | |
| | | this.clickHouseChart() |
| | | } else { |
| | | this.inithouseEcharts(xDate, yDate) |
| | | } |
| | | setTimeout(() => { |
| | | this.houseEchartsLoading = false |
| | | }, 500) |
| | | }).catch(res => { |
| | | setTimeout(() => { |
| | | this.houseEchartsLoading = false |
| | | }, 500) |
| | | }) |
| | | }, |
| | | |
| | | // 现有住宅和关注场所统计总数 |
| | | getVillageDetailAndPlaceStatisticNumber (params) { |
| | | getVillageDetailAndPlaceStatisticNumber(params).then(res => { |
| | |
| | | }, |
| | | |
| | | houseTabClick (type) { |
| | | let typeData = ['小生产加工企业', '小美容洗浴场所', '小歌舞娱乐场所', '小餐饮场所', '小网吧', '小医院', '小学校', '小旅馆', '小商店',] |
| | | this.tabTypeTwo = type |
| | | |
| | | this.houseEchartsLoading = true |
| | | |
| | | this.disposeHouseEchart() |
| | | if (type == 1) { |
| | | // this.getHouseStatisticInfo(2) |
| | | this.inithouseEcharts( |
| | | typeData, |
| | | [297, 130, 62, 376, 7, 26, 38, 45, 1484,] |
| | | ) |
| | | |
| | | // this.getVillageStatisticData({ deptId: this.userInfo.dept_id }) |
| | | } else { |
| | | // this.getHouseStatisticInfo(1) |
| | | this.inithouseEcharts( |
| | | typeData, |
| | | [513, 99, 23, 262, 6, 34, 35, 29, 753,] |
| | | ) |
| | | this.getNineStatistics() |
| | | |
| | | // this.getPlaceOfConcernStatisticData({ deptId: this.userInfo.dept_id }) |
| | | } |
| | | // 隐患数量 |
| | | // this.getHouseStatisticInfo(2) |
| | | |
| | | this.houseEchartsLoading = false |
| | | // 场所数量 |
| | | // this.getHouseStatisticInfo(1) |
| | | }, |
| | | |
| | | getNineStatistics (flag = false) { |
| | | getNineStatistics({ deptId: this.policeStaionID != '' ? this.policeStaionID : this.userInfo.dept_id }).then(res => { |
| | | let xDate = [] |
| | | let yDate = [] |
| | | |
| | | this.realHouseNum = res.data.data.count |
| | | |
| | | 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 |
| | | }, 0) |
| | | this.dangerNum = dangerList.reduce((pre, cur) => { |
| | | return pre + cur.num |
| | | }, 0) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (this.tabTypeTwo == 1) { |
| | | dangerList.forEach(item => { |
| | | xDate.push(item.nineTypeName) |
| | | yDate.push(item.num) |
| | | }) |
| | | } else { |
| | | placeList.forEach(item => { |
| | | xDate.push(item.nineTypeName) |
| | | yDate.push(item.num) |
| | | }) |
| | | } |
| | | |
| | | this.inithouseEcharts(xDate, yDate) |
| | | |
| | | setTimeout(() => { |
| | | this.houseEchartsLoading = false |
| | | }, 500) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * @description: 获取现有住宅信息 |
| | | * @param {*} deptld |
| | | * @param {*} isFollow |
| | | * @return {*} |
| | | */ |
| | | getHouseStatisticInfo (isFollow) { |
| | | getHouseStatisticInfo(this.policeStaionID != '' ? this.policeStaionID : this.userInfo.dept_id, isFollow).then(res => { |
| | | this.disposeHouseEchart() |
| | | |
| | | let xDate = [] |
| | | let yDate = [] |
| | | if (isFollow == 1) { |
| | | this.keyPlaceNum = res.data.data.count |
| | | } else { |
| | | this.realHouseNum = res.data.data.count |
| | | } |
| | | res.data.data.data.forEach(item => { |
| | | xDate.push(item.name) |
| | | yDate.push(item.num) |
| | | }) |
| | | if (this.userInfo.dept_id == '1596020515064381442') { |
| | | this.keyPlaceNum = 28 |
| | | this.realHouseNum = 205 |
| | | if (isFollow == 2) { |
| | | xDate = ['学校', '医院', '宾馆酒店', '房屋建筑业', '数字经济', '批发业', '零售业'] |
| | | yDate = [34, 2, 33, 11, 22, 30, 14] |
| | | this.inithouseEcharts(xDate, yDate) |
| | | } else { |
| | | xDate = ['反恐重点目标', '危爆品', '重点服务对象', '困难儿童'] |
| | | yDate = [14, 13, 10, 17] |
| | | this.inithouseEcharts(xDate, yDate) |
| | | } |
| | | |
| | | this.clickHouseChart() |
| | | } else { |
| | | this.inithouseEcharts(xDate, yDate) |
| | | } |
| | | setTimeout(() => { |
| | | this.houseEchartsLoading = false |
| | | }, 500) |
| | | }).catch(res => { |
| | | setTimeout(() => { |
| | | this.houseEchartsLoading = false |
| | | }, 500) |
| | | }) |
| | | }, |
| | | |
| | | initLandOptions (xDate, yDate) { |
| | |
| | | */ |
| | | disposeHouseEchart () { |
| | | if (houseMyChart != null && houseMyChart != '' && houseMyChart != undefined) { |
| | | houseMyChart.clear() |
| | | houseMyChart.dispose() |
| | | houseMyChart.off('click') |
| | | } |