| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="echarts-box" style="overflow-y: auto;" ref="REFPERSONECHARTS"> |
| | | <div v-show="tabType == 0" class="echarts-box" style="overflow-y: auto;" ref="REFPERSONECHARTS"> |
| | | <div id="PersonEcharts" :style="{ height: personEchartsHeight }"></div> |
| | | </div> |
| | | |
| | | <div class="person-list-box" v-show="tabType == 1"> |
| | | <div class="person-category-item" v-for="(item, index) in keyPersonnelData" :key="index"> |
| | | <div class="label"> |
| | | {{ item.name }} |
| | | </div> |
| | | |
| | | <div class="value" @click="keyPersonItemClick(item)"> |
| | | {{ item.value }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-main> |
| | | |
| | |
| | | isFirstMounted: true, |
| | | clickPoliceStationId: '', |
| | | areaId: null, |
| | | |
| | | keyPersonnelData: [], |
| | | } |
| | | }, |
| | | |
| | |
| | | * @return {*} |
| | | */ |
| | | personTabClick (type) { |
| | | this.keyPersonnelData = [] |
| | | console.log('type', type, 'this.tabType', this.tabType, 'this.isFirstMounted', this.isFirstMounted) |
| | | if (type == 0) { |
| | | if (this.tabType == 0 && !this.isFirstMounted) { |
| | |
| | | console.log('personInfo', personInfo) |
| | | keyPeopleDataLength = personInfo.length |
| | | |
| | | this.keyPersonnelData = [...personInfo] |
| | | |
| | | const high = this.$refs.REFPERSONECHARTS.offsetHeight |
| | | |
| | | // if (personInfo.length * (high / 7) > high) { |
| | |
| | | this.personEchartsHeight = '100%' |
| | | // } |
| | | |
| | | this.$nextTick(() => { |
| | | var chartDom = document.getElementById('PersonEcharts') |
| | | keyPersonmyChart = this.$echarts.init(chartDom) |
| | | keyPersonmyChart.setOption(this.initkeyPersonOption(personInfo)) |
| | | // this.$nextTick(() => { |
| | | // var chartDom = document.getElementById('PersonEcharts') |
| | | // keyPersonmyChart = this.$echarts.init(chartDom) |
| | | // keyPersonmyChart.setOption(this.initkeyPersonOption(personInfo)) |
| | | |
| | | this.clickkeyPersonChart() |
| | | if (personInfo.length > 1) { |
| | | this.keyPeopleEchartsCarousel() |
| | | } else { |
| | | clearInterval(timer) |
| | | keyPersonmyChart.off("mouseover") |
| | | keyPersonmyChart.off("mouseout") |
| | | } |
| | | }) |
| | | // this.clickkeyPersonChart() |
| | | // if (personInfo.length > 1) { |
| | | // this.keyPeopleEchartsCarousel() |
| | | // } else { |
| | | // clearInterval(timer) |
| | | // keyPersonmyChart.off("mouseover") |
| | | // keyPersonmyChart.off("mouseout") |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | setTimeout(() => { |
| | |
| | | }, |
| | | |
| | | /** |
| | | * @description: 重点人员列表的点击事件 |
| | | * @return {*} |
| | | */ |
| | | keyPersonItemClick (item) { |
| | | this.$emit('showkeypersondetail', item.name) |
| | | }, |
| | | |
| | | /** |
| | | * @description: 现有小区切换 |
| | | * @param {*} type |
| | | * @return {*} |