|
@@ -78,37 +78,34 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
+ <el-table-column label="企业名称" align="center" prop="enterpriseName"/>
|
|
|
<el-table-column label="储罐名称" align="center" prop="storagetankName"/>
|
|
|
- <el-table-column
|
|
|
- label="液体液位"
|
|
|
- align="center"
|
|
|
- prop="level"
|
|
|
- :formatter="formatLevel"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="温度"
|
|
|
- align="center"
|
|
|
- prop="heat"
|
|
|
- :formatter="formatHeat"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="内部气压"
|
|
|
- align="center"
|
|
|
- prop="pressure"
|
|
|
- :formatter="formatPressure"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="周边可燃性气体泄漏"
|
|
|
- align="center"
|
|
|
- prop="gasLeak"
|
|
|
- :formatter="formatGasLeak"
|
|
|
- />
|
|
|
+ <el-table-column label="液体液位" align="center" prop="level">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :class="getColumnClass(scope.row, 'level')">{{ scope.row.level }} m</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="温度" align="center" prop="heat">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :class="getColumnClass(scope.row, 'heat')">{{ scope.row.heat }} ℃</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="内部气压" align="center" prop="pressure">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :class="getColumnClass(scope.row, 'pressure')">{{ scope.row.pressure }} MPa</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="周边可燃性气体泄漏" align="center" prop="gasLeak">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :class="getColumnClass(scope.row, 'gasLeak')">{{ scope.row.gasLeak }} %LEL</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="运行状态" align="center" prop="runState">
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="dict.type.yes_no" :value="scope.row.runState"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="数据创建时间" align="center" prop="createTime"/>
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTime"/>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- <el-button
|
|
@@ -387,18 +384,21 @@ export default {
|
|
|
...this.queryParams
|
|
|
}, `储罐运营数据_${format_date(new Date())}.xlsx`)
|
|
|
},
|
|
|
- formatLevel(cellValue) {
|
|
|
- return `${cellValue.level} m`;
|
|
|
- },
|
|
|
- formatHeat(cellValue) {
|
|
|
- return `${cellValue.heat} ℃`;
|
|
|
- },
|
|
|
- formatPressure(cellValue) {
|
|
|
- return `${cellValue.pressure} MPa`;
|
|
|
- },
|
|
|
- formatGasLeak(cellValue){
|
|
|
- return `${cellValue.gasLeak} %LEL`;
|
|
|
+ getColumnClass(row, columnProp) {
|
|
|
+ const runState = row.securityState.split(',');
|
|
|
+ const columnMappings = {
|
|
|
+ level: '1',
|
|
|
+ heat: '2',
|
|
|
+ pressure: '3',
|
|
|
+ gasLeak: '4'
|
|
|
+ };
|
|
|
+ return runState.includes(columnMappings[columnProp]) ? 'red-font' : '';
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+<style>
|
|
|
+.red-font {
|
|
|
+ color: red;
|
|
|
+}
|
|
|
+</style>
|