| | |
| | | <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">{{ dangerNum }}</div> |
| | | <div class="tab-title-small">其它场所:</div> |
| | | <div class="tab-title-small">{{ otherPlaceNum }}</div> |
| | | </div> |
| | | </div> |
| | | <div id="houseEcharts" class="echarts-box"></div> |
| | |
| | | data () { |
| | | return { |
| | | placeNum: 0, |
| | | dangerNum: 0, |
| | | otherPlaceNum: 0, |
| | | tabType: 0, |
| | | personEchartsLoading: false, |
| | | houseEchartsLoading: false, |
| | |
| | | this.tabTypeThree = type |
| | | this.houseEchartsLoading = true |
| | | houseMyChart.on('click', params => { |
| | | this.$emit('showplacedetail', type, '九小场所列表', params.name, this.areaId) |
| | | console.log(type, 1122) |
| | | if (type == 1) { |
| | | this.$emit('showplacedetail', type, '其它场所列表', params.data.id, this.areaId) |
| | | } else { |
| | | this.$emit('showplacedetail', type, '九小场所列表', params.name, this.areaId) |
| | | } |
| | | }) |
| | | }, |
| | | // 九小场所 |
| | |
| | | |
| | | this.getNineStatistics() |
| | | |
| | | // 隐患数量 |
| | | // 其它场所 |
| | | // this.getHouseStatisticInfo(2) |
| | | |
| | | // 场所数量 |
| | |
| | | |
| | | this.realHouseNum = res.data.data.count |
| | | |
| | | let dangerList = res.data.data.dangerList.reverse() |
| | | let otherList = res.data.data.otherList.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) => { |
| | | this.otherPlaceNum = otherList.reduce((pre, cur) => { |
| | | return pre + cur.num |
| | | }, 0) |
| | | |
| | | // return |
| | | return |
| | | } |
| | | |
| | | if (this.tabTypeTwo == 1) { |
| | | dangerList.forEach(item => { |
| | | otherList.forEach(item => { |
| | | xDate.push(item.nineTypeName) |
| | | yDate.push(item.num) |
| | | yDate.push({ |
| | | value: item.num, |
| | | id: item.id |
| | | }) |
| | | }) |
| | | } else { |
| | | placeList.forEach(item => { |