yuhan před 2 měsíci
rodič
revize
1aab950289

+ 25 - 11
src/views/module_interLock/interlockSummarySet/InterlockConditionForm.vue

@@ -11,7 +11,9 @@
                 :options="tagDataOptions"
                 :fieldNames="customFieldNames"
                 expand-trigger="hover"
-                placeholder="请选择点位"/>
+                placeholder="请选择点位"
+                @change="changeCascader"
+                />
                 <!-- :display-render="displayRender" -->
                 <!-- @change="dianwerChange" -->
             </a-form-model-item>
@@ -52,6 +54,7 @@
                   :fieldNames="customFieldNames"
                   expand-trigger="hover"
                   placeholder="请选择输入卡件状态"
+                  @change="changeCascader"
                   />
               </template>
             </a-form-model-item>
@@ -72,6 +75,7 @@
                   :fieldNames="customFieldNames"
                   expand-trigger="hover"
                   placeholder="请选择输出卡件状态"
+                  @change="changeCascader"
                 />
               </template>
             </a-form-model-item>
@@ -92,6 +96,7 @@
                   :fieldNames="customFieldNames"
                   expand-trigger="hover"
                   placeholder="请选择MP状态"
+                  @change="changeCascader"
                 />
               </template>
             </a-form-model-item>
@@ -119,11 +124,13 @@
             <a-col :span="24">
               <a-form-model-item label="仪表位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentStatusData">
                 <a-cascader
-                v-model="model.instrumentStatusData"
-                :options="tagDataOptions"
-                :fieldNames="customFieldNames"
-                expand-trigger="hover"
-                placeholder="请选择仪表位号"/>
+                  v-model="model.instrumentStatusData"
+                  :options="tagDataOptions"
+                  :fieldNames="customFieldNames"
+                  expand-trigger="hover"
+                  placeholder="请选择仪表位号"
+                  @change="changeCascader"
+                />
               </a-form-model-item>
             </a-col>
           </template>
@@ -136,6 +143,7 @@
                   :fieldNames="customFieldNames"
                   expand-trigger="hover"
                   placeholder="请选择原始模拟量"
+                  @change="changeCascader"
                 />
               </a-form-model-item>
             </a-col>
@@ -161,6 +169,7 @@
                   :fieldNames="customFieldNames"
                   expand-trigger="hover"
                   placeholder="请选择原始模拟量"
+                  @change="changeCascader"
                 />
               </a-form-model-item>
             </a-col>
@@ -219,11 +228,13 @@
             <a-col :span="24">
               <a-form-model-item label="旁路" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bypassData">
                 <a-cascader
-                v-model="model.bypassData"
-                :options="tagDataOptions"
-                :fieldNames="customFieldNames"
-                expand-trigger="hover"
-                placeholder="请选择旁路"/>
+                  v-model="model.bypassData"
+                  :options="tagDataOptions"
+                  :fieldNames="customFieldNames"
+                  expand-trigger="hover"
+                  placeholder="请选择旁路"
+                  @change="changeCascader"
+                />
               </a-form-model-item>
             </a-col>
           </template>
@@ -385,6 +396,9 @@
       this.modelDefault = JSON.parse(JSON.stringify(this.model));
     },
     methods: {
+      changeCascader(){
+        this.model = {...this.model}
+      },
       statusRadioChange(e){
       //   console.log(e)
       //   console.log(this.model.inputStatusRadio)

+ 3 - 3
src/views/module_interLock/interlockSummarySet/InterlockSummarySet.vue

@@ -137,7 +137,7 @@
                   :fieldNames="customFieldNames"
                   expand-trigger="hover"
                   placeholder="请选择"
-                  @change="dianwerChange"
+                  @change="changeCascader"
                   />
                   <!-- :display-render="displayRender" -->
               </a-form-model-item>
@@ -433,8 +433,8 @@
       //   return labels[labels.length - 1];
       // },
       // 位号选择改变
-      dianwerChange(e){
-        console.log(e)
+      changeCascader(){
+        this.model = {...this.model}
       },
       // 新增联锁条件
       handleAddCondition(){