| | |
| | | <div class="land-box" style="position: relative;"> |
| | | <div class="box"> |
| | | <div class="title">现有地</div> |
| | | <div class="sub-tab"> |
| | | <div class="sub-tab" v-if="isAllPoliceStation"> |
| | | <div |
| | | class="tab" |
| | | :class="{ 'select-on-tab': tabTypeThree == 0 }" |
| | |
| | | <div class="tab-title-small">{{ areaNum }}个</div> |
| | | </div> |
| | | </div> |
| | | <div class="sub-tab" v-else> |
| | | <div class="tab1 select-on-tab"> |
| | | <div class="tab-title-small">小区:</div> |
| | | <div class="tab-title-small">{{ villageNum }}个</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="landEcharts" class="echarts-box"></div> |
| | | </div> |
| | | |
| | |
| | | policeStationPersonInfo: {}, |
| | | villagePersonStatisticInfoList: [], |
| | | showBack: true, |
| | | isAllPoliceStation: false, |
| | | policeVillageOptionData: [], |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | this.getAreaStatisticInfo(1) |
| | | this.getAreaStatisticInfo(2) |
| | | this.getAreaStatisticInfo(3, this.userInfo.dept_id) |
| | | }, |
| | | |
| | | mounted () { |
| | |
| | | initLandEcharts () { |
| | | var chartDom = document.getElementById('landEcharts') |
| | | landMyChart = this.$echarts.init(chartDom) |
| | | landMyChart.setOption(this.initLandOptions(this.villageOptionData[0], this.villageOptionData[1])) |
| | | if (this.userInfo.dept_id != '1123598813738675201') { |
| | | this.isAllPoliceStation = false |
| | | landMyChart.setOption(this.initLandOptions(this.policeVillageOptionData[0], this.policeVillageOptionData[1])) |
| | | } else { |
| | | this.isAllPoliceStation = true |
| | | landMyChart.setOption(this.initLandOptions(this.villageOptionData[0], this.villageOptionData[1])) |
| | | } |
| | | |
| | | }, |
| | | |
| | | initLandOptions (xDate, yDate) { |
| | |
| | | // echartsName.resize() |
| | | // }, |
| | | |
| | | getAreaStatisticInfo (type) { |
| | | getAreaStatisticInfo(type).then(res => { |
| | | getAreaStatisticInfo (type, deptId) { |
| | | getAreaStatisticInfo(type, deptId).then(res => { |
| | | if (type == 2) { |
| | | this.areaNum = res.data.data.areaNum |
| | | this.villageNum = res.data.data.villageNum |
| | |
| | | countArr.push({ value: item.count, id: item.id }) |
| | | }) |
| | | this.villageOptionData = [nameArr, countArr] |
| | | } else { |
| | | } else if (type == 1) { |
| | | this.areaNum = res.data.data.areaNum |
| | | this.villageNum = res.data.data.villageNum |
| | | let nameArr = [] |
| | |
| | | countArr.push({ value: item.count, id: item.id }) |
| | | }) |
| | | this.areaOptionData = [nameArr, countArr] |
| | | } else if (type == 3) { |
| | | this.villageNum = res.data.data.villageNum |
| | | let nameArr = [] |
| | | let countArr = [] |
| | | res.data.data.data.forEach(item => { |
| | | nameArr.push(item.name.replace('居民委员会', '')) |
| | | countArr.push({ value: item.count, id: item.id }) |
| | | }) |
| | | this.policeVillageOptionData = [nameArr, countArr] |
| | | } |
| | | this.initLandEcharts() |
| | | }) |
| | |
| | | display: flex; |
| | | justify-content: space-around; |
| | | } |
| | | .tab1 { |
| | | width: 50%; |
| | | margin-left: 25%; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | } |
| | | } |
| | | |
| | | .echarts-box { |