Browse Source

联锁增改弹窗

yuhan 9 months ago
parent
commit
73737bbaa8

+ 11 - 11
src/views/module_interLock/InterlockSummary/modules/InterlockConditionForm.vue

@@ -19,13 +19,13 @@
           <a-col :span="24">
             <a-form-model-item label="仪表状态判定依据" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentStatusJuge">
               <a-radio-group name="radioGroup" v-model="model.instrumentStatusJuge" @change="instrumentStatusJugeChange">
-                <a-radio :value="1"> 位号读取 </a-radio>
-                <a-radio :value="2"> 高低限判断 </a-radio>
-                <a-radio :value="3"> 突变超限判断 </a-radio>
+                <a-radio :value="0"> 位号读取 </a-radio>
+                <a-radio :value="1"> 高低限判断 </a-radio>
+                <a-radio :value="2"> 突变超限判断 </a-radio>
               </a-radio-group>
             </a-form-model-item>
           </a-col>
-          <template v-if="model.instrumentStatusJuge === 1">
+          <template v-if="model.instrumentStatusJuge === 0">
             <a-col :span="24">
               <a-form-model-item label="仪表状态位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentStatusData">
                 <a-cascader
@@ -38,7 +38,7 @@
               </a-form-model-item>
             </a-col>
           </template>
-          <template v-if="model.instrumentStatusJuge === 2">
+          <template v-if="model.instrumentStatusJuge === 1">
             <a-col :span="24">
               <a-form-model-item label="原始模拟量位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ysmnlData">
                 <a-cascader
@@ -62,7 +62,7 @@
               </a-form-model-item>
             </a-col>
           </template>
-          <template v-if="model.instrumentStatusJuge === 3">
+          <template v-if="model.instrumentStatusJuge === 2">
             <a-col :span="24">
               <a-form-model-item label="原始模拟量位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ysmnlData">
                 <a-cascader
@@ -312,11 +312,11 @@
             this.model.interlockConditionModuleName = this.model.interlockConditionData[1]
             this.model.interlockConditionTag = (this.model.interlockConditionData[2].split('&'))[0]
             this.model.interlockSetValue = (this.model.interlockConditionData[2].split('&'))[1]
-            // 仪表状态
-            this.model.instrumentStatusDeviceId = this.model.currentValueData[0]
-            this.model.instrumentStatusModuleName = this.model.currentValueData[1]
-            this.model.instrumentStatusTag = (this.model.currentValueData[2].split('&'))[0]
-            this.model.instrumentStatusValue = (this.model.currentValueData[2].split('&'))[1]
+            // 仪表状态-仪表状态位号
+            this.model.instrumentStatusDeviceId = this.model.instrumentStatusData[0]
+            this.model.instrumentStatusModuleName = this.model.instrumentStatusData[1]
+            this.model.instrumentStatusTag = (this.model.instrumentStatusData[2].split('&'))[0]
+            this.model.instrumentStatusValue = (this.model.instrumentStatusData[2].split('&'))[1]
             
             // 当前值
             this.model.currentValueDeviceId = this.model.currentValueData[0]

+ 12 - 1
src/views/module_interLock/InterlockSummary/modules/InterlockSummaryForm.vue

@@ -282,13 +282,19 @@
           }
         })
       },
+      // 联锁条件弹窗-取消
       handleConditionCancel(){
         this.conditionVisible = false
       },
+      // 联锁条件弹窗-确认
       handleConditionOk(){
         this.$refs.conditionForm.submitForm();
       },
+      // 联锁条件弹窗-确认回调
       submitCallback(model){
+        // if(model.staticId){
+
+        // }
         console.log(model)
         this.dataSource.push(model)
         this.conditionVisible = false
@@ -320,13 +326,18 @@
       },
       // 编辑联锁条件
       handleEditCondition(record){
-        this.$refs.conditionForm.edit(record);
+        // console.log(this.$refs)
         this.conditionVisible = true
+        this.$nextTick(()=>{
+          this.$refs.conditionForm.edit(record);
+        })
       },
+      // 新增联锁-弹窗
       add () {  
         // this.edit(this.modelDefault);
         this.visible = true;
       },
+      // 编辑联锁-弹窗
       edit (record) {
         // this.model = Object.assign({}, record);
         // 编辑时获取当前联锁所有详细信息