Преглед на файлове

fix: 设备档案新增是否校准为否时候清空相关字段数据

johnsen преди 4 месеца
родител
ревизия
8d5813ff75
променени са 1 файла, в които са добавени 21 реда и са изтрити 0 реда
  1. 21 0
      src/views/component/device/deviceDialog.vue

+ 21 - 0
src/views/component/device/deviceDialog.vue

@@ -1543,6 +1543,23 @@ export default {
           )
         }
       }
+    },
+    'form.shiFouXiaoZhun': {
+      handler(value) {
+        if (value !== '是') {
+          const arr = [
+            'xiaoZhunZQ',
+            'shiYongKeShi',
+            'yiXiaoRiQi',
+            'xiaoZhunYouXia',
+            'zhengShuBianHa',
+            'jianDingXiao',
+            'zuiDaYunCha',
+            'xiuZhengZhiXiu'
+          ]
+          arr.forEach((t) => (this.form[t] = ''))
+        }
+      }
     }
   },
 
@@ -1770,6 +1787,10 @@ export default {
       if (this.isEdit) {
         const { data } = await getequipmentCard({ id: this.params.id })
         this.form = data
+        console.log(this.form.xiaoZhunZQ)
+        if (!this.form.xiaoZhunZQ) {
+          this.form.xiaoZhunYouXia = ''
+        }
       } else {
         this.isFirstbianZhiBuMen = false
         this.isFirstyiXiaoRiQi = false