yuhan 4 ヶ月 前
コミット
3742f21049

+ 13 - 8
src/views/module_interLock/InterlockSummary/modules/InterlockConditionForm.vue

@@ -396,10 +396,11 @@
       setDefaultValue(){
         console.log('set',this.itSystemDefaultValue, this.model)
         // this.$set(this.model, 'inputStatusDefault', this.itSystemDefaultValue.controlSystemStatusNormal)
-        this.model.inputStatusDefault = this.itSystemDefaultValue.controlSystemStatusNormal
-        this.model.outputStatusDefault = this.itSystemDefaultValue.controlSystemStatusNormal
-        this.model.mpStatusDefault = this.itSystemDefaultValue.controlSystemStatusNormal
-        this.model.bypassNo = this.itSystemDefaultValue.bypassYes
+        var instrumentStatusDefault = this.itSystemDefaultValue.instrumentStatusNormalName +'('+ this.itSystemDefaultValue.controlSystemStatusNormal+')'
+        this.model.inputStatusDefault = instrumentStatusDefault
+        this.model.outputStatusDefault = instrumentStatusDefault
+        this.model.mpStatusDefault = instrumentStatusDefault
+        this.model.bypassNo = this.itSystemDefaultValue.bypassYesName +'('+ this.itSystemDefaultValue.bypassYes +')'
       },
       // 获取所有位号
       // getTagInfo(){
@@ -536,7 +537,8 @@
             // 旁路位号
             if(this.model.ifBypass === '0'){
               // 否
-              this.model.bypass = this.model.bypassNo
+              // this.model.bypass = this.model.bypassNo
+              this.model.bypass = this.itSystemDefaultValue.bypassYes
             }
             if(this.model.ifBypass === '1'){
               // 是
@@ -557,7 +559,10 @@
               this.model.inputStatusDeviceId = null
               this.model.inputStatusModuleName = null
               this.model.inputStatusTag = null
-              this.model.inputStatus = this.model.inputStatusDefault
+              // 由于需要变成正常(0)的状态,且默认是正常,所以直接用系统的正常状态赋值
+              // 如果需要改成下拉选择,就得换个方式写了
+              // this.model.inputStatus = this.model.inputStatusDefault
+              this.model.inputStatus = this.itSystemDefaultValue.controlSystemStatusNormal
             }
             
             // 输出卡件状态
@@ -570,7 +575,7 @@
               this.model.outputStatusDeviceId = null
               this.model.outputStatusModuleName = null
               this.model.outputStatusTag = null
-              this.model.outputStatus = this.model.outputStatusDefault
+              this.model.outputStatus = this.itSystemDefaultValue.controlSystemStatusNormal
             }
 
             // MP状态
@@ -583,7 +588,7 @@
               this.model.mpStatusDeviceId = null
               this.model.mpStatusModuleName = null
               this.model.mpStatusTag = null
-              this.model.mpStatus = this.model.mpStatusDefault
+              this.model.mpStatus = this.itSystemDefaultValue.controlSystemStatusNormal
             }
             console.log(this.model)
             this.$emit('ok', this.model)

+ 5 - 5
src/views/module_interLock/InterlockSummary/modules/InterlockSummaryForm.vue

@@ -102,7 +102,7 @@
             <!-- 是否旁路 -->
             <span slot="ifBypass" slot-scope="text, record">
               <span v-if="record.ifBypass === '1'">{{ record.bypassTag }}</span>
-              <span v-if="record.ifBypass === '0'">{{ record.bypass }}</span>
+              <span v-if="record.ifBypass === '0'">{{ itSystemDefaultValue.bypassYesName+'('+record.bypass+')' }}</span>
             </span>
             <!-- 操作 -->
             <span slot="action" slot-scope="text, record, index">
@@ -291,7 +291,7 @@
               if(record.inputStatusTag){
                 return record.inputStatusTag
               } else {
-                return record.inputStatus
+                return this.itSystemDefaultValue.instrumentStatusNormalName +'('+ record.inputStatus+')'
               }
             }
           },
@@ -303,7 +303,7 @@
               if(record.outputStatusTag){
                 return record.outputStatusTag
               } else {
-                return record.outputStatus
+                return this.itSystemDefaultValue.instrumentStatusNormalName +'('+ record.outputStatus+')'
               }
             }
           },
@@ -315,7 +315,7 @@
               if(record.mpStatusTag){
                 return record.mpStatusTag
               } else {
-                return record.mpStatus
+                return this.itSystemDefaultValue.instrumentStatusNormalName +'('+ record.mpStatus+')'
               }
             }
           },
@@ -379,7 +379,6 @@
       // 获取所有位号
       getTagInfo(){
         postAction(this.url.getTagInfo).then(res => {
-          console.log(res)
           this.tagDataOptions = res.result
           this.confirmLoading = false
         })
@@ -551,6 +550,7 @@
     margin-bottom: 10px;
     border-bottom: 1px solid #f3f3f3;
     color: #323233;
+    font-weight: 600;
   }
   .u-flex-jab{
     display: flex;