From 206ec855ef1853430275f6a375142ec7789cc532 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 21 六月 2022 16:54:20 +0800
Subject: [PATCH] 1.优化代码,新增产品部署时不输出console

---
 src/views/jcsz/jsqd.vue |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index 4580a21..b00a1d0 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -975,7 +975,7 @@
           this.$nextTick(() => {
             $('input:checkbox').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
           })
-        }, 1)
+        }, 10)
         this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
       }
       // 3.绗笁绉嶆儏鍐礟C鏈�変腑锛孉PP宸查�変腑
@@ -986,7 +986,7 @@
           this.$nextTick(() => {
             $('input:checkbox').eq(1).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
           })
-        }, 1)
+        }, 10)
         this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightAPPArr[0].code
       }
       // 4.绗洓绉嶆儏鍐礟C宸查�変腑锛孉PP宸查�変腑
@@ -1000,7 +1000,7 @@
             $('input:checkbox').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
             $('input:checkbox').eq(1).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
           })
-        }, 1)
+        }, 10)
         this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
       }
       this.dialogFormRight.rightOperationArr.push({
@@ -1043,8 +1043,12 @@
         }
       })
       this.$nextTick(() => {
-        this.$refs.rightPCRef.setCheckedKeys(this.dialogFormRight.rightPCArrSelected)
-        this.$refs.rightAPPRef.setCheckedKeys(this.dialogFormRight.rightAPPArrSelected)
+        if (this.$refs.rightPCRef) {
+          this.$refs.rightPCRef.setCheckedKeys(this.dialogFormRight.rightPCArrSelected)
+        }
+        if (this.$refs.rightAPPRef) {
+          this.$refs.rightAPPRef.setCheckedKeys(this.dialogFormRight.rightAPPArrSelected)
+        }
       })
     },
     // 鍒嗛厤鏉冮檺鍏抽棴浜嬩欢
@@ -1054,8 +1058,12 @@
       this.dialogFormRight.rightAPPArr = []
       this.dialogFormRight.rightAPPArrSelected = []
       this.dialogFormRight.rightOperationArr = []
-      this.$refs.rightPCRef.setCheckedKeys([])
-      this.$refs.rightAPPRef.setCheckedKeys([])
+      if (this.$refs.rightPCRef) {
+        this.$refs.rightPCRef.setCheckedKeys([])
+      }
+      if (this.$refs.rightAPPRef) {
+        this.$refs.rightAPPRef.setCheckedKeys([])
+      }
     },
     // 鏉冮檺瀵硅瘽妗嗗彇娑堜簨浠�
     rightDialogVisibleCancel() {
@@ -1071,7 +1079,7 @@
           const children = []
           let flag = false // 琛ㄧずchildren閲屾湁鍊紁ush杩涘幓浜�
           item.children.forEach(it => {
-            if (this.dialogFormRight.rightPCArrSelected.includes(it.code)) {
+            if (this.dialogFormRight.rightPCArrSelected.includes(it.code) || this.dialogFormRight.rightPCArrSelected.includes('PC')) {
               flag = true
               children.push(
                 { code: it.code, name: it.name, flag: 'Y' }
@@ -1090,7 +1098,7 @@
           const children = []
           let flag = false // 琛ㄧずchildren閲屾湁鍊紁ush杩涘幓浜�
           item.children.forEach(it => {
-            if (this.dialogFormRight.rightAPPArrSelected.includes(it.code)) {
+            if (this.dialogFormRight.rightAPPArrSelected.includes(it.code) || this.dialogFormRight.rightAPPArrSelected.includes('APP')) {
               flag = true
               children.push(
                 { code: it.code, name: it.name, flag: 'Y' }

--
Gitblit v1.9.3