|
@@ -174,7 +174,7 @@
|
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" ref="deviceTable" :data="specYlgdList" @selection-change="handleSelectionChange" :height="clientHeight"
|
|
|
- :cell-style="tableCellStyle" border>
|
|
|
+ :cell-style="tableCellStyle" border @sort-change="sortList">
|
|
|
<el-table-column type="selection" width="55" align="center" fixed="left" />
|
|
|
<el-table-column :label="$t('装置名称')" align="center" fixed="left" prop="plantCode" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column :label="$t('单元')" align="center" fixed="left" prop="unit" :show-overflow-tooltip="true"/>
|
|
@@ -224,7 +224,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column :label="$t('安全状况等级')" align="center" prop="safeClass" :show-overflow-tooltip="true"/>
|
|
|
|
|
|
- <el-table-column :label="$t('下次定期检验日期')" align="center" prop="nextWarnDate" width="100">
|
|
|
+ <el-table-column :label="$t('下次定期检验日期')" align="center" prop="nextWarnDate" width="100" sortable="custom">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.nextWarnDate, '{y}-{m}-{d}') }}</span>
|
|
|
</template>
|
|
@@ -678,6 +678,7 @@ import HisCheck from "../check/check"
|
|
|
import { addModify } from "@/api/sems/his/modify";
|
|
|
import { listPostUser } from "@/api/system/user";
|
|
|
import HisReform from "./specYlgd-hisReform";
|
|
|
+import {listSpecGl} from "@/api/sems/specGl";
|
|
|
|
|
|
export default {
|
|
|
name: "SpecYlgd",
|
|
@@ -747,6 +748,8 @@ export default {
|
|
|
queryParams: {
|
|
|
dataForm: 0,
|
|
|
pageNum: 1,
|
|
|
+ orderByColumn:null,
|
|
|
+ isAsc:null,
|
|
|
pageSize: 20,
|
|
|
plantCode: null,
|
|
|
unit: null,
|
|
@@ -1132,6 +1135,30 @@ export default {
|
|
|
if (columnIndex == 35 && row.warnFlag == 3){
|
|
|
return "background-color:rgba(255, 68,68, 0.5);"
|
|
|
}
|
|
|
+ },
|
|
|
+ //element表格排序
|
|
|
+ sortList(val){
|
|
|
+ var sort = "asc";
|
|
|
+ let sortTip = val.order
|
|
|
+
|
|
|
+ if(sortTip === 'descending'){
|
|
|
+ sort = 'desc' // 降序
|
|
|
+ }
|
|
|
+ /*else if(sortTip === 'ascending'){
|
|
|
+ sort = 'asc' // 升序
|
|
|
+ }*/
|
|
|
+ this.queryParams.isAsc = sort;
|
|
|
+ this.queryParams.orderByColumn = val.prop;
|
|
|
+
|
|
|
+ this.loading = true;
|
|
|
+ listSpecYlgd(this.queryParams).then(response => {
|
|
|
+ this.specYlgdList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.deviceTable.doLayout(); // 解决表格错位
|
|
|
+ });
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|