shuishen
2024-12-19 ec7581b10bf25ef575b1ec701aace9fe08a63a3c
隐患数量去除增加重点场所
1 files modified
28 ■■■■■ changed files
src/views/home/components/leftContainer.vue 28 ●●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue
@@ -79,8 +79,8 @@
              <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>
@@ -177,7 +177,7 @@
  data () {
    return {
      placeNum: 0,
      dangerNum: 0,
      otherPlaceNum: 0,
      tabType: 0,
      personEchartsLoading: false,
      houseEchartsLoading: false,
@@ -825,7 +825,12 @@
      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)
        }
      })
    },
    // 九小场所
@@ -1100,7 +1105,7 @@
      this.getNineStatistics()
      // 隐患数量
      // 其它场所
      // this.getHouseStatisticInfo(2)
      // 场所数量
@@ -1117,23 +1122,26 @@
        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 => {