Parcourir la source

联锁加单位以及悬浮设置等

yuhan il y a 2 mois
Parent
commit
39b93d3154

+ 104 - 17
src/views/module_interLock/interlockHistoryDetail/InterlockHistoryDetailList.vue

@@ -54,29 +54,91 @@
             @change="handleTableChange">
             <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
 
+            <!-- 旁路状态 -->
+            <span slot="bypass" slot-scope="text, record">
+              <template v-if="record.bypassTag">
+                <a-tooltip placement="top">
+                  <template slot="title">
+                    {{ record.bypassTag }}
+                  </template>
+                  {{ text }}
+                </a-tooltip>
+              </template>
+              <template v-else>
+                {{ text }}
+              </template>
+            </span>
             <!-- 仪表状态 -->
             <span slot="instrumentStatus" slot-scope="text, record">
-              <span :class="record.instrumentStatus === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
-                {{ text }}
-              </span>
+              <template v-if="record.instrumentStatusTag">
+                <a-tooltip placement="top">
+                  <template slot="title">
+                    {{ record.instrumentStatusTag }}
+                  </template>
+                  <span :class="record.instrumentStatus === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
+                    {{ text }}
+                  </span>
+                </a-tooltip>
+              </template>
+              <template v-else>
+                <span :class="record.instrumentStatus === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
+                  {{ text }}
+                </span>
+              </template>
             </span>
             <!-- 输入卡件状态 -->
             <span slot="inputStatus" slot-scope="text, record">
-              <span :class="record.inputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
-                {{ text }}
-              </span>
+              <template v-if="record.inputStatusTag">
+                <a-tooltip>
+                  <template slot="title">
+                    {{ record.inputStatusTag }}
+                  </template>
+                  <span :class="record.inputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                    {{ text }}
+                  </span>
+                </a-tooltip>
+              </template>
+              <template v-else>
+                <span :class="record.inputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                  {{ text }}
+                </span>
+              </template>
             </span>
             <!-- 输出卡件状态 -->
             <span slot="outputStatus" slot-scope="text, record">
-              <span :class="record.outputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
-                {{ text }}
-              </span>
+              <template v-if="record.outputStatusTag">
+                <a-tooltip>
+                  <template slot="title">
+                    {{ record.outputStatusTag }}
+                  </template>
+                  <span :class="record.outputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                    {{ text }}
+                  </span>
+                </a-tooltip>
+              </template>
+              <template v-else>
+                <span :class="record.outputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                  {{ text }}
+                </span>
+              </template>
             </span>
             <!-- MP状态 -->
             <span slot="mpStatus" slot-scope="text, record">
-              <span :class="record.mpStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
-                {{ text }}
-              </span>
+              <template v-if="record.mpStatusTag">
+                <a-tooltip>
+                  <template slot="title">
+                    {{ record.mpStatusTag }}
+                  </template>
+                  <span :class="record.mpStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                    {{ text }}
+                  </span>
+                </a-tooltip>
+              </template>
+              <template v-else>
+                <span :class="record.mpStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                  {{ text }}
+                </span>
+              </template>
             </span>
 
             <template slot="htmlSlot" slot-scope="text">
@@ -182,7 +244,19 @@
             // title:'联锁条件点位',
             title:'联锁条件',
             align:"center",
-            dataIndex: 'interlockConditionTag'
+            dataIndex: 'interlockCondition',
+            customRender:(text,record,index)=> {
+              var interlockCondition = record.interlockSetUnit ? text + record.interlockSetUnit : text
+              var children = (
+                <a-tooltip>
+                  <template slot="title">
+                    { record.interlockConditionTag }
+                  </template>
+                  { interlockCondition }
+                </a-tooltip>
+              )
+              return children
+            },
           },
           {
             title:'描述',
@@ -200,7 +274,11 @@
           {
             title:'联锁设定值',
             align:"center",
-            dataIndex: 'interlockSetValue'
+            dataIndex: 'interlockSetValue',
+            customRender:function (t,r,index) {
+              var data = r.interlockSetUnit ? t + r.interlockSetUnit : t
+              return data
+            },
           },
           // {
           //   title:'当前值',
@@ -208,16 +286,25 @@
           //   dataIndex: 'currentValue'
           // },
           {
-            title:'是否旁路',
+            title:'旁路状态',
             align:"center",
-            dataIndex: 'bypassName'
+            dataIndex: 'bypassName',
+            scopedSlots: { customRender: 'bypass' }
           },
           {
             title:'联锁输出值',
             align:"center",
             dataIndex: 'interlockOutValue',
             customRender:function (t,r,index) {
-              return {children: t,attrs: {rowSpan:r.rowSpan3}};
+              var children = (
+                <a-tooltip>
+                  <template slot="title">
+                    { r.interlockOutValueTag }
+                  </template>
+                  { t }
+                </a-tooltip>
+              )
+              return {children: children,attrs: {rowSpan:r.rowSpan3}};
             },
           },
           {

+ 104 - 17
src/views/module_interLock/interlockSummaryDetail/InterlockSummaryDetailList.vue

@@ -76,29 +76,91 @@
             <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
 
 
+            <!-- 旁路状态 -->
+            <span slot="bypass" slot-scope="text, record">
+              <template v-if="record.bypassTag">
+                <a-tooltip placement="top">
+                  <template slot="title">
+                    {{ record.bypassTag }}
+                  </template>
+                  {{ text }}
+                </a-tooltip>
+              </template>
+              <template v-else>
+                {{ text }}
+              </template>
+            </span>
             <!-- 仪表状态 -->
             <span slot="instrumentStatus" slot-scope="text, record">
-              <span :class="record.instrumentStatus === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
-                {{ text }}
-              </span>
+              <template v-if="record.instrumentStatusTag">
+                <a-tooltip placement="top">
+                  <template slot="title">
+                    {{ record.instrumentStatusTag }}
+                  </template>
+                  <span :class="record.instrumentStatus === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
+                    {{ text }}
+                  </span>
+                </a-tooltip>
+              </template>
+              <template v-else>
+                <span :class="record.instrumentStatus === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
+                  {{ text }}
+                </span>
+              </template>
             </span>
             <!-- 输入卡件状态 -->
             <span slot="inputStatus" slot-scope="text, record">
-              <span :class="record.inputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
-                {{ text }}
-              </span>
+              <template v-if="record.inputStatusTag">
+                <a-tooltip>
+                  <template slot="title">
+                    {{ record.inputStatusTag }}
+                  </template>
+                  <span :class="record.inputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                    {{ text }}
+                  </span>
+                </a-tooltip>
+              </template>
+              <template v-else>
+                <span :class="record.inputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                  {{ text }}
+                </span>
+              </template>
             </span>
             <!-- 输出卡件状态 -->
             <span slot="outputStatus" slot-scope="text, record">
-              <span :class="record.outputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
-                {{ text }}
-              </span>
+              <template v-if="record.outputStatusTag">
+                <a-tooltip>
+                  <template slot="title">
+                    {{ record.outputStatusTag }}
+                  </template>
+                  <span :class="record.outputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                    {{ text }}
+                  </span>
+                </a-tooltip>
+              </template>
+              <template v-else>
+                <span :class="record.outputStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                  {{ text }}
+                </span>
+              </template>
             </span>
             <!-- MP状态 -->
             <span slot="mpStatus" slot-scope="text, record">
-              <span :class="record.mpStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
-                {{ text }}
-              </span>
+              <template v-if="record.mpStatusTag">
+                <a-tooltip>
+                  <template slot="title">
+                    {{ record.mpStatusTag }}
+                  </template>
+                  <span :class="record.mpStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                    {{ text }}
+                  </span>
+                </a-tooltip>
+              </template>
+              <template v-else>
+                <span :class="record.mpStatus === record.controlSystemStatusNormal ? 'normal-tag':'abnormal-tag'">
+                  {{ text }}
+                </span>
+              </template>
             </span>
     
             <template slot="htmlSlot" slot-scope="text">
@@ -203,7 +265,19 @@
             // title:'联锁条件点位',
             title:'联锁条件',
             align:"center",
-            dataIndex: 'interlockConditionTag'
+            dataIndex: 'interlockCondition',
+            customRender:(text,record,index)=> {
+              var interlockCondition = record.interlockSetUnit ? text + record.interlockSetUnit : text
+              var children = (
+                <a-tooltip>
+                  <template slot="title">
+                    { record.interlockConditionTag }
+                  </template>
+                  { interlockCondition }
+                </a-tooltip>
+              )
+              return children
+            },
           },
           {
             title:'描述',
@@ -221,7 +295,11 @@
           {
             title:'联锁设定值',
             align:"center",
-            dataIndex: 'interlockSetValue'
+            dataIndex: 'interlockSetValue',
+            customRender:function (t,r,index) {
+              var data = r.interlockSetUnit ? t + r.interlockSetUnit : t
+              return data
+            },
           },
           // {
           //   title:'当前值',
@@ -229,16 +307,25 @@
           //   dataIndex: 'currentValue'
           // },
           {
-            title:'是否旁路',
+            title:'旁路状态',
             align:"center",
-            dataIndex: 'bypassName'
+            dataIndex: 'bypassName',
+            scopedSlots: { customRender: 'bypass' }
           },
           {
             title:'联锁输出值',
             align:"center",
             dataIndex: 'interlockOutValue',
             customRender:function (t,r,index) {
-              return {children: t,attrs: {rowSpan:r.rowSpan3}};
+              var children = (
+                <a-tooltip>
+                  <template slot="title">
+                    { r.interlockOutValueTag }
+                  </template>
+                  { t }
+                </a-tooltip>
+              )
+              return {children: children,attrs: {rowSpan:r.rowSpan3}};
             },
           },
           {

+ 5 - 0
src/views/module_interLock/interlockSummarySet/InterlockConditionForm.vue

@@ -21,6 +21,11 @@
               <a-input v-model="model.interlockSetValue" placeholder="请输入联锁设定值"></a-input>
             </a-form-model-item>
           </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="interlockSetUnit">
+              <a-input v-model="model.interlockSetUnit" placeholder="请输入单位"></a-input>
+            </a-form-model-item>
+          </a-col>
           <!-- <a-col :span="24">
             <a-form-model-item label="当前值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentValueData">
               <a-cascader