| | |
| | | class="peopleTap" |
| | | :class="{ choosed: peopletype == 0 }" |
| | | @click="peopleTabClick(0)" |
| | | >现有人员</span> |
| | | / |
| | | >现有人员</span>/ |
| | | <span |
| | | class="peopleTap" |
| | | :class="{ choosed: peopletype == 1 }" |
| | |
| | | </div> |
| | | <div> |
| | | 共 |
| | | <span class="peopleNum" :class="{ choosed: peopletype == 0 }">100</span> |
| | | / |
| | | <span |
| | | class="peopleNum" |
| | | :class="{ choosed: peopletype == 1 }" |
| | | >1</span>人 |
| | | <span class="peopleNum" :class="{ choosed: peopletype == 0 }">100</span>/ |
| | | <span class="peopleNum" :class="{ choosed: peopletype == 1 }">1</span>人 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="sub-tab" v-show="peopletype == 0"> |
| | | <div class="tab" :class="{ on: tabType == 0 }" @click="personTabClick(0)"> |
| | | <div class="num">164.57万人</div> |
| | |
| | | <div class="type">境外人口</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="PersonEcharts" class="echarts-box"></div> |
| | | <!-- :class="{'people-table' : peopletype == 1 }" --> |
| | | <!-- <div id="keyPersonEcharts" class="people-table" v-show="peopletype == 1"></div> --> |
| | | |
| | | <div |
| | | class="back" |
| | | title="返回上一级" |
| | | v-show="dataDeep == 2 && peopletype == 0" |
| | | @click="backBegin" |
| | | > |
| | | <i class="el-icon-back"></i> |
| | | </div> |
| | | ></div> |
| | | </div> |
| | | <div class="house-box"> |
| | | <div class="title">现有房屋</div> |
| | |
| | | <div class="num">关注场所</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="houseEcharts" class="echarts-box"></div> |
| | | </div> |
| | | <div class="land-box"> |
| | |
| | | this.inithouseEcharts() |
| | | this.clickPeopleChart() |
| | | this.clickLandChart() |
| | | |
| | | this.$nextTick(() => { |
| | | window.addEventListener("resize", this.echartsResize) |
| | | }) |
| | | }, |
| | | methods: { |
| | | echartsResize () { |
| | | homePersonmyChart && homePersonmyChart != null && homePersonmyChart.resize() |
| | | landMyChart && landMyChart != null && landMyChart.resize() |
| | | keyPersonmyChart && keyPersonmyChart != null && keyPersonmyChart.resize() |
| | | houseMyChart && houseMyChart != null && houseMyChart.resize() |
| | | }, |
| | | |
| | | initPersonEcharts () { |
| | | var chartDom = document.getElementById('PersonEcharts') |
| | | homePersonmyChart = this.$echarts.init(chartDom) |
| | | homePersonmyChart.setOption(this.initPersonOptions(['车站派出所', '沙溪派出所', '灵溪派出所', '北门派出所', '江光派出所'], [881, 2211, 6414, 4321, 1232])) |
| | | window.addEventListener("resize", function () { |
| | | homePersonmyChart.resize() |
| | | }) |
| | | }, |
| | | |
| | | initPersonOptions (xDate, yDate) { |
| | |
| | | inithouseEcharts () { |
| | | var chartDom = document.getElementById('houseEcharts') |
| | | houseMyChart = this.$echarts.init(chartDom) |
| | | |
| | | houseMyChart.setOption(this.initHouseOptions(['商业房屋', '居民住宅', '公共用房', '文化场所', '政府建筑'], [88188, 1222211, 464104, 43201, 12302], [{ 'value': 1222211, 'realValue': 88188 }, { 'value': 1222211, 'realValue': 1222211 }, { 'value': 1222211, 'realValue': 464104 }, { 'value': 1222211, 'realValue': 43201 }, { 'value': 1222211, 'realValue': 12302 }])) |
| | | |
| | | window.addEventListener("resize", function () { |
| | | houseMyChart.resize() |
| | | }) |
| | | }, |
| | | |
| | | initHouseOptions (xDate, y1Date, y2Date) { |
| | |
| | | var chartDom = document.getElementById('landEcharts') |
| | | landMyChart = this.$echarts.init(chartDom) |
| | | landMyChart.setOption(this.initLandOptions(['车站派出所', '沙溪派出所', '灵溪派出所', '北门派出所', '江光派出所'], [6414, 2211, 4321, 1232, 881])) |
| | | window.addEventListener("resize", function () { |
| | | landMyChart.resize() |
| | | }) |
| | | }, |
| | | |
| | | initLandOptions (xDate, yDate) { |
| | |
| | | this.initkeyPersonEcharts() |
| | | this.clickkeyPersonChart() |
| | | } |
| | | |
| | | homePersonmyChart.resize() |
| | | }) |
| | | }, |
| | |
| | | keyPersonmyChart = this.$echarts.init(chartDom) |
| | | let dataArr = this.getKeyPersonCount(this.keyPersonSelectArr) |
| | | keyPersonmyChart.setOption(this.initkeyPersonOption(dataArr)) |
| | | window.addEventListener("resize", function () { |
| | | homePersonmyChart.resize() |
| | | }) |
| | | }, |
| | | |
| | | initkeyPersonOption (dataArr) { |
| | |
| | | this.keyPersonSelectArr = this.keyPersonSelectSaveArr |
| | | } |
| | | this.initkeyPersonEcharts() |
| | | } |
| | | }, |
| | | |
| | | // echartsResize (echartsName) { |
| | | // echartsName.resize() |
| | | // }, |
| | | |
| | | }, |
| | | |
| | | destroyed () { |
| | | if (!homePersonmyChart) { |
| | | return |
| | | } |
| | | if (!houseMyChart) { |
| | | return |
| | | } |
| | | if (!landMyChart) { |
| | | return |
| | | } |
| | | if (!keyPersonmyChart) { |
| | | return |
| | | } |
| | | window.removeEventListener("resize", this.echartsResize) |
| | | |
| | | homePersonmyChart.dispose() |
| | | houseMyChart.dispose() |
| | | landMyChart.dispose() |
| | | keyPersonmyChart.dispose() |
| | | |
| | | homePersonmyChart = null |
| | | houseMyChart = null |
| | | landMyChart = null |
| | | keyPersonmyChart = null |
| | | if (homePersonmyChart) { |
| | | homePersonmyChart.dispose() |
| | | homePersonmyChart = null |
| | | } |
| | | if (houseMyChart) { |
| | | houseMyChart.dispose() |
| | | houseMyChart = null |
| | | } |
| | | if (landMyChart) { |
| | | landMyChart.dispose() |
| | | landMyChart = null |
| | | } |
| | | if (keyPersonmyChart) { |
| | | keyPersonmyChart.dispose() |
| | | keyPersonmyChart = null |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | .back:hover { |
| | | color: #43bafe; |
| | | } |
| | | .back::after { |
| | | font-family: element-icons; |
| | | content: '\e6ea'; |
| | | } |
| | | } |
| | | |
| | | .house-box { |