| | |
| | | <template> |
| | | <div class="Waste-water"> |
| | | <el-table |
| | | class="tableBox" |
| | | :data="tableData" |
| | | :header-cell-style="tableHeaderColor" |
| | | :cell-style="rowClass" |
| | | @cell-click="handle" |
| | | > |
| | | <el-table-column |
| | | width="30px" |
| | | label="" |
| | | > |
| | | <template> |
| | | <i class="el-icon-caret-right"></i> |
| | | <span style="margin-left: 10px"></span> |
| | | </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> |
| | | <el-table class="tableBox" :data="tableData" :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 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 |
| | | prop="WasteWaters" |
| | | label="工业外排废水量(m³)" |
| | | width="100px"> |
| | | <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 label="二氧化硫 (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 prop="WasteWaters" label="工业外排废水量(m³)" width="100px"></el-table-column> |
| | | <el-table-column label="二氧化硫 (产生量/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="累计产生量" |
| | | width="70px"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="NH4NMonth" |
| | | label="当月生产量" |
| | | width="70px"> |
| | | </el-table-column> |
| | | <el-table-column label="氨氧化物 (产生量/t)"> |
| | | <el-table-column prop="NH4NPut" label="累计" width="70px"></el-table-column> |
| | | <el-table-column prop="NH4NMonth" label="当月" width="70px"></el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="VOCs (t)"> |
| | | <el-table-column |
| | | prop="NH4NPut" |
| | | label="累计产生量" |
| | | width="70px"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="NH4NMonth" |
| | | label="当月生产量" |
| | | width="70px"> |
| | | </el-table-column> |
| | | <el-table-column label="VOCs (产生量/t)"> |
| | | <el-table-column prop="NH4NPut" label="累计" width="70px"></el-table-column> |
| | | <el-table-column prop="NH4NMonth" label="当月" width="70px"></el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="排放口检测状态"> |
| | | <el-table-column |
| | | prop="normal" |
| | | label="正常" |
| | | width="60px"> |
| | | <el-table-column prop="normal" label="正常" width="40px"> |
| | | <template slot-scope="{row,$index}"> |
| | | <u v-if="$index!=1" >{{row.normal}}</u> |
| | | <el-popover v-else |
| | | placement="bottom-end" |
| | | width="200" |
| | | trigger="click" |
| | | title="监测点排放明细" |
| | | > |
| | | <refinery></refinery> |
| | | <u v-if="$index!==1" >{{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="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"> |
| | | <el-table-column prop="overProof" label="超标" width="40px"></el-table-column> |
| | | <el-table-column prop="Abnormal" label="异常" width="40px"></el-table-column> |
| | | <el-table-column prop="StopProduction" label="停产" width="40px"></el-table-column> |
| | | <el-table-column prop="deficiency" label="缺失" width="40px"> |
| | | <template slot-scope="{row,$index}"> |
| | | <u v-if="$index!=1" >{{row.deficiency}}</u> |
| | | <el-popover v-else |
| | | placement="bottom-end" |
| | | width="200" |
| | | trigger="click" |
| | | title="监测点排放明细" |
| | | > |
| | | <u v-if="$index!==1" >{{row.deficiency}}</u> |
| | | <el-popover v-else placement="bottom-end" trigger="click" popper-class="popovers" title="监测点排放明细"> |
| | | <MissingAlarm></MissingAlarm> |
| | | <u slot="reference" style="color: #00ffff">{{row.deficiency}}</u> |
| | | </el-popover> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import ChemicalWastewater from '@components/table/components/componented/ChemicalWastewater' |
| | | import ChemicalWastewater from '@components/table/components/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: 'WasteGas', |
| | | components: { |
| | | MissingAlarm, |
| | | Refinery |
| | | // ChemicalWastewater |
| | | Refinery, |
| | | ChemicalWastewater |
| | | }, |
| | | props: { |
| | | searchNameToPosition: { |
| | | type: Function |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | 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' |
| | | |
| | | }] |
| | | isActive: '', |
| | | isShowIcon: false, |
| | | tableData: null, |
| | | tableHeader1: [ |
| | | { name: '排放点', width: '140', propS: 'value1' }, |
| | | { name: '单位部门', width: '80', propS: 'value2' }, |
| | | { name: '废气排放量(m³)', width: '120', propS: 'value3' }, |
| | | { name: '二氧化硫(t)', width: '100', propS: 'value4' }, |
| | | { name: '氮氧化物(t)', width: '100', propS: 'value5' }, |
| | | { name: 'VOCs(t)', 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' } |
| | | ] |
| | | } |
| | | }, |
| | | async mounted () { |
| | | this.tableData = await mapApi.getWasteGasStatistics() |
| | | }, |
| | | 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' |
| | | tableHeaderColor ({ 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' |
| | | return 'height:.3rem' |
| | | }, |
| | | // 获取点击的表格 |
| | | 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 |
| | | }, |
| | | 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> |
| | | |
| | | <style scoped lang="less"> |
| | | .active { |
| | | /*color: red;*/ |
| | | transform:rotate(90deg); |
| | | } |
| | | .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> |