| | |
| | | :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> |
| | | <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="序号" |
| | |
| | | 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" |
| | |
| | | prop="normal" |
| | | label="正常" |
| | | width="60px"> |
| | | <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 slot="reference" style="color: #00ffff">{{row.normal}}</u> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="overProof" |
| | |
| | | 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" |
| | | width="200" |
| | | trigger="click" |
| | | title="监测点排放明细" |
| | | > |
| | | <MissingAlarm></MissingAlarm> |
| | | <u slot="reference" style="color: #00ffff">{{row.deficiency}}</u> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import ChemicalWastewater from '@components/table/components/componented/ChemicalWastewater' |
| | | import Refinery from '@components/table/components/componented/refinery' |
| | | import MissingAlarm from '@components/table/components/componented/MissingAlarm' |
| | | export default { |
| | | name: 'WasteGas', |
| | | components: { |
| | | MissingAlarm, |
| | | Refinery, |
| | | ChemicalWastewater |
| | | }, |
| | | data () { |
| | | return { |
| | | isActive: '', |
| | | isShowIcon: false, |
| | | tableData: [{ |
| | | UserName: '集团名称', |
| | | WasteWaters: '', |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | tableHeaderColor ({ row, column, owIndex, columnIndex }) { |
| | | 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' |
| | | }, |
| | | // 获取点击的表格 |
| | | 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 scoped> |
| | | |
| | | .active { |
| | | /*color: red;*/ |
| | | transform:rotate(90deg); |
| | | } |
| | | </style> |