From 3f6e622083cd63400fd3fc8f5dee4f4c5f2a4ab9 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期一, 08 七月 2024 15:55:46 +0800
Subject: [PATCH] #

---
 zy-asrs-admin/src/views/base/locType/edit.vue |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/zy-asrs-admin/src/views/base/locType/edit.vue b/zy-asrs-admin/src/views/base/locType/edit.vue
index 1274ac1..040e925 100644
--- a/zy-asrs-admin/src/views/base/locType/edit.vue
+++ b/zy-asrs-admin/src/views/base/locType/edit.vue
@@ -67,11 +67,16 @@
 }
 
 watch(formData, (newVal, oldVal) => {
-    let contain = JSON.parse(formData.value.contain)
-    if (contain != null && contain.length > 0) {
-        locTypeSelected.value = contain;
-    }else {
+    if(formData.value.contain == null) {
         locTypeSelected.value = [];
+        return
+    }
+
+    if(formData.value.contain.length == 0) {
+        locTypeSelected.value = [];
+    }else {
+        let contain = JSON.parse(formData.value.contain);
+        locTypeSelected.value = contain;
     }
 })
 

--
Gitblit v1.9.1