|
@@ -87,6 +87,39 @@
|
|
class="j-table-force-nowrap"
|
|
class="j-table-force-nowrap"
|
|
@change="handleTableChange">
|
|
@change="handleTableChange">
|
|
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
|
|
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
|
|
|
|
+
|
|
|
|
+ <!-- 表头注释 -->
|
|
|
|
+ <span slot="loopHealthLevelTitle">
|
|
|
|
+ 回路健康级别
|
|
|
|
+ <a-tooltip placement="top">
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <span> A代表回路健康;B代表回路有故障;C代表回路有严重故障;D代表回路失效; </span>
|
|
|
|
+ </template>
|
|
|
|
+ <a-icon type="question-circle" />
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </span>
|
|
|
|
+
|
|
|
|
+ <!-- 仪表状态 -->
|
|
|
|
+ <span slot="instrumentStatus" slot-scope="text, record">
|
|
|
|
+ <span :class="record.instrumentStatus === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
|
|
|
|
+ {{ text }}
|
|
|
|
+ </span>
|
|
|
|
+ <!-- <a-tag :color="record.instrumentStatus === record.instrumentStatusNormal ? 'green':'orange'">
|
|
|
|
+ {{ text }}
|
|
|
|
+ </a-tag> -->
|
|
|
|
+ </span>
|
|
|
|
+ <!-- 控制系统状态 -->
|
|
|
|
+ <span slot="controlSystemStatus" slot-scope="text, record">
|
|
|
|
+ <span :class="record.controlSystemStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
|
|
|
|
+ {{ text }}
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
|
|
+ <!-- 旁路状态 -->
|
|
|
|
+ <span slot="bypassStatus" slot-scope="text, record">
|
|
|
|
+ <span :class="record.bypass === record.bypassYes ? 'normal-tag':'abnormal-tag'">
|
|
|
|
+ {{ text }}
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
|
|
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
<div v-html="text"></div>
|
|
<div v-html="text"></div>
|
|
@@ -208,32 +241,58 @@
|
|
{
|
|
{
|
|
title:'仪表状态',
|
|
title:'仪表状态',
|
|
align:"center",
|
|
align:"center",
|
|
- dataIndex: 'instrumentStatusName'
|
|
|
|
|
|
+ dataIndex: 'instrumentStatusName',
|
|
|
|
+ scopedSlots: { customRender: 'instrumentStatus' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:'控制系统状态',
|
|
title:'控制系统状态',
|
|
align:"center",
|
|
align:"center",
|
|
dataIndex: 'controlSystemStatusName',
|
|
dataIndex: 'controlSystemStatusName',
|
|
|
|
+ scopedSlots: { customRender: 'controlSystemStatus' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:'旁路状态',
|
|
title:'旁路状态',
|
|
align:"center",
|
|
align:"center",
|
|
dataIndex: 'bypassName',
|
|
dataIndex: 'bypassName',
|
|
|
|
+ scopedSlots: { customRender: 'bypassStatus' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title:'联锁状态',
|
|
title:'联锁状态',
|
|
align:"center",
|
|
align:"center",
|
|
dataIndex: 'interlockStatusName',
|
|
dataIndex: 'interlockStatusName',
|
|
- customRender:function (t,r,index) {
|
|
|
|
- return {children: t,attrs: {rowSpan:r.rowSpan2}};
|
|
|
|
|
|
+ customRender:function (text,record,index) {
|
|
|
|
+ let classTag = {
|
|
|
|
+ class: `${record.interlockStatus === record.interlockStatusTy ? 'normal-tag':'abnormal-tag'}`
|
|
|
|
+ }
|
|
|
|
+ return {
|
|
|
|
+ children: (
|
|
|
|
+ <span {...classTag}>{text}</span>
|
|
|
|
+ ),
|
|
|
|
+ attrs: {rowSpan:record.rowSpan2}
|
|
|
|
+ };
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title:'回路健康级别',
|
|
|
|
|
|
+ // title:'回路健康级别',
|
|
align:"center",
|
|
align:"center",
|
|
dataIndex: 'loopHealthLevel',
|
|
dataIndex: 'loopHealthLevel',
|
|
- customRender:function (t,r,index) {
|
|
|
|
- return {children: t,attrs: {rowSpan:r.rowSpan3}};
|
|
|
|
|
|
+ slots: { title: 'loopHealthLevelTitle' },
|
|
|
|
+ customRender:(text,record,index)=> {
|
|
|
|
+ var children
|
|
|
|
+ if(text === 'A'){
|
|
|
|
+ children = (<span style="color: #52c41a;font-weight: 600;">{text}</span>)
|
|
|
|
+ // children = (<a-tag style="color: red">{text}</a-tag>)
|
|
|
|
+ }
|
|
|
|
+ if(text === 'B'){
|
|
|
|
+ children = (<span style="color: #FFE31F;font-weight: 600;">{text}</span>)
|
|
|
|
+ }
|
|
|
|
+ if(text === 'C'){
|
|
|
|
+ children = (<span style="color: #FFA300;font-weight: 600;">{text}</span>)
|
|
|
|
+ }
|
|
|
|
+ if(text === 'D'){
|
|
|
|
+ children = (<span style="color: #FF0000;font-weight: 600;">{text}</span>)
|
|
|
|
+ }
|
|
|
|
+ return {children: children, attrs: {rowSpan:record.rowSpan3}};
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
|