派生自 wuyushui/SewerAndRainNetwork

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<template>
   <div class="waste-water">
           <el-table class="tableBox" :data="tableData" style="width: 100%" :cell-style="rowClass" @cell-click="handle">
               <el-table-column width="30px" label="">
                 <template slot-scope="{row,$index}">
<!--                   <i class="el-icon-caret-right" v-if="$index ===1"></i>-->
                 <el-popover placement="bottom" trigger="click" :disabled="!isShowIcon" popper-class="popovers">
                   <ChemicalWastewater v-show="$index ===2"></ChemicalWastewater>
                   <i class="el-icon-caret-right showBottomTableBtn" @click="showBottomTable" slot="reference"></i>
<!--                   <i class="el-icon-caret-bottom"   slot="reference" v-else @click="doIcon($index)"></i>-->
                 </el-popover>
                   </template>
               </el-table-column>
               <el-table-column label="序号" width="45px" type="index"></el-table-column>
               <el-table-column prop="UserName" label="企业名称" >
                 <template slot-scope="{row}">
                   <u @click="searchNameToPosition" style="cursor: pointer">{{row.UserName}}</u>
                 </template>
               </el-table-column>
               <el-table-column prop="WasteWaters" width="80">
                   <div slot="header">
                      <span>外排废水量</span>
                       <div>(m³)</div>
                   </div>
               </el-table-column>
               <el-table-column label="COD  (产生量/t)">
                   <el-table-column prop="AddOutPut" label="累计" width="70"></el-table-column>
                   <el-table-column prop="MonthOutPut" label="当月" width="70"></el-table-column>
               </el-table-column>
               <el-table-column label="氨氮  (产生量/t)">
                   <el-table-column prop="NH4NPut" label="累计" width="70"></el-table-column>
                   <el-table-column prop="NH4NMonth" label="当月" width="70"></el-table-column>
               </el-table-column>
               <el-table-column label="排放口检测统计状态 (个)">
                   <el-table-column prop="normal" label="正常" width="60">
                     <template slot-scope="{row,$index}">
                       <u v-if="$index!=2" >{{row.normal}}</u>
                       <el-popover v-else placement="bottom-end" trigger="click" popper-class="popovers" title="监测点明细表">
                         <refinery></refinery>
                         <u slot="reference" style="color: #00ffff">{{row.normal}}</u>
                         <!--                       <i class="el-icon-caret-bottom" v-else-if="isShowIcon&&scope.row.index===1"></i>-->
                         <!--                       <i v-if="isShowIcon" class="el-icon-caret-bottom" slot="reference" @click="isbtn"></i>-->
                         <!--                   <i v-else class="el-icon-caret-right" slot="reference" @click="isbtn"></i>-->
                       </el-popover>
                     </template>
                   </el-table-column>
                   <el-table-column prop="overProof" label="超标" width="60"></el-table-column>
                   <el-table-column prop="Abnormal" label="异常" width="60"></el-table-column>
                   <el-table-column prop="StopProduction" label="停产" width="60"></el-table-column>
                   <el-table-column prop="deficiency" label="缺失" width="60">
                     <template slot-scope="{row,$index}">
                       <u v-if="$index!=1" >{{row.deficiency}}</u>
                       <el-popover v-else placement="bottom-end" trigger="click" title="天津石化监测点缺失报警明细" popper-class="popovers">
                         <MissingAlarm></MissingAlarm>
                         <u slot="reference" style="color: #00ffff">{{row.deficiency}}</u>
                       </el-popover>
                     </template>
                   </el-table-column>
               </el-table-column>
           </el-table>
<!--       <ChemicalWastewater v-show="isShowIcon"></ChemicalWastewater>-->
<!--           </el-col>-->
<!--       </el-row>-->
   </div>
</template>
 
<script>
import ChemicalWastewater from './componented/ChemicalWastewater'
import Refinery from '@components/table/components/componented/refinery'
import MissingAlarm from '@components/table/components/componented/MissingAlarm'
import mapApi from '@/api/mapApi'
export default {
  name: 'WasteWater',
  components: {
    MissingAlarm,
    Refinery,
    ChemicalWastewater
  },
  data () {
    return {
      isActive: '',
      isShowIcon: false,
      tableData: null
    }
  },
  props: {
    searchNameToPosition: {
      type: Function
    }
  },
  async mounted () {
    this.tableData = await mapApi.getWasteWaterStatistics()
  },
  methods: {
    tableHeaderColor ({ row, column, owIndex, columnIndex }) {
    //  return 'background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;font-wight:500;font-size:12px;text-align:center;height:0px'
    },
    // 表头样式设置
    rowClass  () {
      return 'height:.3rem'
    },
    // 获取点击的表格
    handle (row, column, event, cell) {
      console.log(row.UserName)
    },
    showBottomTable (e) {
      if (e.path[0].classList.contains('go') === true) {
        e.path[0].classList.remove('go')
        e.path[0].classList.add('aa')
      } else {
        const newList = document.querySelectorAll('i.showBottomTableBtn')
        for (let i = 0; i < newList.length; i++) {
          newList[i].classList.remove('go')
        }
        e.path[0].classList.remove('aa')
        e.path[0].classList.add('go')
      }
    }
  }
}
</script>
 
<style scoped lang="less">
/deep/ .el-tabs__item:focus.is-active.is-focus:not(:active) {
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}
.waste-water{
.el-icon-caret-right{
  position: absolute;
  top: .11rem;
  left: .04rem;
  font-size: .14rem;
  cursor: pointer;
}
}
.aa{
  transition: all .2s;
}
.go{
  transform:rotate(90deg);
  transition: all .2s;
}
</style>