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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
| <template>
| <div class="waste-water">
| <el-table class="tableBox" :data="tableData" style="width: 100%" @cell-click="handle">
| <el-table-column width="30px" label="">
| <template slot-scope="{row,$index}">
| <el-popover placement="bottom" trigger="click" :disabled="!isShowIcon" popper-class="popovers">
| <ChemicalWastewater v-show="$index ===1"></ChemicalWastewater>
| <i class="el-icon-caret-right" :class="{active: isActive === $index}" slot="reference" @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="企业名称" width="120px">
| <template slot-scope="scope">
| <div v-if="scope.row.UserName==='集团名称'" style="color: #00ffff">{{scope.row.UserName}}</div>
| <div v-else-if="scope.row.UserName==='天津石化'" style="color: #00ffff">{{scope.row.UserName}}</div>
| <div v-else >{{scope.row.UserName}}</div>
| </template>
| </el-table-column>
| <el-table-column prop="normal" >
| <div slot="header">
| <span>一级风险地块(个)</span>
| </div>
| <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 :tableHeader="tableHeader1" :tableContent="tableContent1" ></refinery>
| <u slot="reference" style="color: #00ffff">{{row.normal}}</u>
| </el-popover>
| </template>
| </el-table-column>
| <el-table-column prop="normal" >
| <div slot="header">
| <span>二级风险地块(个)</span>
| </div>
| <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 :tableHeader="tableHeader1" :tableContent="tableContent1"></refinery>
| <u slot="reference" style="color: #00ffff">{{row.normal}}</u>
| </el-popover>
| </template>
| </el-table-column>
| <el-table-column prop="normal" >
| <div slot="header">
| <span>三级风险地块(个)</span>
| </div>
| <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 :tableHeader="tableHeader1" :tableContent="tableContent1"></refinery>
| <u slot="reference" style="color: #00ffff">{{row.normal}}</u>
| </el-popover>
| </template>
| </el-table-column>
| <el-table-column prop="normal" >
| <div slot="header">
| <span>土壤采样点(个)</span>
| </div>
| <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 :tableHeader="tableHeader2" :tableContent="tableContent1"></refinery>
| <u slot="reference" style="color: #00ffff">{{row.normal}}</u>
| </el-popover>
| </template>
| </el-table-column>
| <el-table-column prop="normal" >
| <div slot="header">
| <span>地下水采样点(个)</span>
| </div>
| <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 :tableHeader="tableHeader2" :tableContent="tableContent1"></refinery>
| <u slot="reference" style="color: #00ffff">{{row.normal}}</u>
| </el-popover>
| </template>
| </el-table-column>
| </el-table>
| </div>
| </template>
|
| <script>
| // import ChemicalWastewater from './componented/ChemicalWastewater'
| import Refinery from '@components/table/components/componented/refinery'
| // import MissingAlarm from '@components/table/components/componented/MissingAlarm'
| export default {
| name: 'WasteWater',
| components: {
| // MissingAlarm,
| Refinery
| // ChemicalWastewater
| },
| data () {
| return {
| isActive: '',
| isShowIcon: false,
| tableData: [{
| UserName: '集团名称',
| WasteWaters: '',
| AddOutPut: '',
| MonthOutPut: '',
| NH4NPut: '',
| NH4NMonth: '',
| normal: '',
| overProof: '',
| Abnormal: '',
| StopProduction: '',
| deficiency: ''
| }, {
| UserName: '天津石化',
| WasteWaters: '116.6',
| AddOutPut: '58.3',
| MonthOutPut: '13.1',
| NH4NPut: '58.3',
| NH4NMonth: '13.1',
| normal: '21',
| overProof: '2',
| Abnormal: '2',
| StopProduction: '2',
| deficiency: '2'
| }, {
| UserName: 'xxxx炼化3',
| WasteWaters: '116.6',
| MonthOutPut: '13.1',
| NH4NPut: '58.3',
| NH4NMonth: '13.1',
| normal: '21',
| overProof: '2',
| Abnormal: '2',
| StopProduction: '2',
| deficiency: '2'
| }, {
| UserName: 'xxxx4',
| WasteWaters: '116.6',
| AddOutPut: '58.3',
| MonthOutPut: '13.1',
| NH4NPut: '58.3',
| NH4NMonth: '13.1',
| normal: '21',
| overProof: '2',
| Abnormal: '2',
| StopProduction: '2',
| deficiency: '2'
|
| }],
| tableHeader1: [
| { name: '企业名称', width: '140', propS: 'value1' },
| { name: '地块名称', width: '140', propS: 'value2' },
| { name: '地块信息', width: '140', propS: 'value3' },
| { name: '地下水(个)', width: '140', propS: 'value4' },
| { name: '土壤(个)', width: '140', propS: 'value5' }
| ],
| tableHeader2: [
| { name: '土壤名称', width: '140', propS: 'value1' },
| { name: 'PH', width: '80', propS: 'value2' },
| { name: '六价格', width: '100', propS: 'value3' },
| { name: '铅', width: '100', propS: 'value4' },
| { name: '汞', width: '100', propS: 'value5' }
| ],
| tableContent1: [
| { value1: '1', value2: '2', value3: '3', value4: '4', value5: '5' },
| { value1: '1', value2: '2', value3: '3', value4: '4', value5: '5' }
| ]
| }
| },
| 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 'text-align: center;background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;width:64px'
| },
| // 获取点击的表格
| handle (row, column, event, cell) {
| console.log(row.UserName)
| },
| doIcon (index) {
| if (index !== 1) {
| this.isShowIcon = false
| this.isActive = ''
| return
| }
| this.isShowIcon = !this.isShowIcon
| if (index === this.isActive) {
| this.isActive = ''
| return
| }
| this.isActive = index
| }
| }
| }
| </script>
|
| <style>
|
| </style>
|
|