From 1a57e85833a971b825ba6d5d59d689766572d54c Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 16 十一月 2023 18:20:47 +0800
Subject: [PATCH] 主题库swtich修复

---
 Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index 2aa34be..69351e6 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -867,7 +867,7 @@
   methods: {
     // switch
     switchChange(){
-      this.TreeAddform.isParticipateCheck = this.TreeAddform.codeKeyAttrValue ? 1 : 0;
+      this.TreeAddform.isParticipateCheck = this.TreeAddform.codeKeyAttrValue === true ? 1 : 0;
       // console.log(this.TreeAddform.isParticipateCheck)
     },
     //瀛樺偍鐨勪笟鍔$被鍨嬪叧闂�
@@ -1154,10 +1154,14 @@
     },
     //鏍戣妭鐐瑰彇娑堜簨浠�
     TreeEscHandler() {
-      this.TreeAddform = {};
-      this.TreeAddFormVisible = false;
+      for (let key in this.TreeAddform) {
+        if (key !== 'codeKeyAttrValue' && key !== 'isParticipateCheck') {
+          this.TreeAddform[key] = "";
+        }
+      }
       this.TreeAddform.codeKeyAttrValue = true;
       this.TreeAddform.isParticipateCheck = 1;
+      this.TreeAddFormVisible = false;
       // 鍏抽棴寮圭獥娓呯┖鏍¢獙
       this.$refs.myForm.clearValidate();
     },
@@ -1371,7 +1375,7 @@
           this.crudOid = ''
         }
         this.TreeList = res3.data.data;
-        if(!this.TreeList.isParticipateCheck){
+        if(this.TreeList.isParticipateCheck === null || this.TreeList.isParticipateCheck === undefined ||this.TreeList.isParticipateCheck === ""){
           this.$set(this.TreeList,"isParticipateCheck",1)
           return
         }

--
Gitblit v1.9.3