| | |
| | | // 获取所有数据并加载 |
| | | this.getHomeAllData() |
| | | |
| | | this.inithouseEcharts() |
| | | this.clickLandChart() |
| | | |
| | | if (this.userInfo.dept_id != '1123598813738675201') { |
| | | this.showBack = false |
| | | this.isAllPoliceStation = false |
| | |
| | | xDate.push(item.name) |
| | | yDate.push(item.num) |
| | | }) |
| | | |
| | | this.inithouseEcharts(xDate, yDate) |
| | | }) |
| | | }, |
| | |
| | | } |
| | | }, |
| | | |
| | | initLandEcharts (landData) { |
| | | var chartDom = document.getElementById('landEcharts') |
| | | landMyChart = this.$echarts.init(chartDom) |
| | | |
| | | landMyChart.setOption(this.initLandOptions(landData[0], landData[1])) |
| | | }, |
| | | |
| | | initLandOptions (xDate, yDate) { |
| | | return { |
| | | grid: { |
| | |
| | | this.getVillagePersonStatisticInfoByPoliceStationId(params.data.id) |
| | | } else { |
| | | this.$emit('showpeopledetail', params.data.id, params.data.name) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | clickLandChart () { |
| | | landMyChart.on('click', params => { |
| | | if (this.tabTypeThree == 0) { |
| | | this.$emit('showlanddetail', params.name, 2, params.data.id) |
| | | } else { |
| | | this.$emit('showlanddetail', params.name, 1, params.data.id) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | * @return {*} |
| | | */ |
| | | landTabClick (type) { |
| | | |
| | | this.tabTypeThree = type |
| | | |
| | | if (type == 0) { |
| | |
| | | } else if (type == 1) { |
| | | this.getAreaStatisticInfo(1) |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | }, |
| | | |
| | | /** |
| | | * @description: 现有地图表渲染 |
| | | * @param {*} landData |
| | | * @return {*} |
| | | */ |
| | | initLandEcharts (landData) { |
| | | var chartDom = document.getElementById('landEcharts') |
| | | |
| | | landMyChart = this.$echarts.init(chartDom) |
| | | |
| | | landMyChart.setOption(this.initLandOptions(landData[0], landData[1])) |
| | | |
| | | this.clickLandChart() |
| | | }, |
| | | |
| | | /** |
| | | * @description: 现有地图表点击事件 |
| | | * @return {*} |
| | | */ |
| | | clickLandChart () { |
| | | landMyChart.off('click') |
| | | |
| | | landMyChart.on('click', params => { |
| | | console.log(params, 95959999) |
| | | if (this.tabTypeThree == 0) { |
| | | this.$emit('showlanddetail', params.name, 2, params.data.id) |
| | | } else { |
| | | this.$emit('showlanddetail', params.name, 1, params.data.id) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | /** |
| | | * @description: 视图窗口改变时,echarts图表重置 |
| | | * @return {*} |
| | | */ |