<template>
|
<div class="waste-water">
|
<el-table
|
class="tableBox"
|
:data="tableData"
|
style="width: 100%"
|
:header-cell-style="tableHeaderColor"
|
: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 ===1"></ChemicalWastewater>
|
<i class="el-icon-caret-right" :class="{active: isActive === $index}" slot="reference"
|
@click="doIcon($index)"></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="企业名称" 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="WasteWaters" width="100px">
|
<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="70px"></el-table-column>
|
<el-table-column prop="MonthOutPut" label="当月" width="70px"></el-table-column>
|
</el-table-column>
|
<el-table-column label="氨氮 (产生量/t)">
|
<el-table-column prop="NH4NPut" label="累计"></el-table-column>
|
<el-table-column prop="NH4NMonth" label="当月"></el-table-column>
|
</el-table-column>
|
<el-table-column label="排放口检测统计状态">
|
<el-table-column prop="normal" label="正常" width="60px">
|
<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="60px"></el-table-column>
|
<el-table-column prop="Abnormal" label="异常" width="60px"></el-table-column>
|
<el-table-column prop="StopProduction" label="停产" width="60px"></el-table-column>
|
<el-table-column prop="deficiency" label="缺失" width="60px">
|
<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'
|
|
export default {
|
name: 'WasteSolid',
|
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'
|
|
}]
|
}
|
},
|
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 lang="less" scoped>
|
.popovers {
|
width: auto !important;
|
background-color: gray !important;
|
}
|
|
.popovers.el-popover {
|
padding: 0;
|
}
|
|
.active {
|
/*color: red;*/
|
transform: rotate(90deg);
|
}
|
|
</style>
|