From 1ec6e15f8a7d351ce8537567cf6e956e99d4167f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 09 八月 2023 10:16:05 +0800
Subject: [PATCH] 1.编码规格完成90%

---
 src/views/basicSettings/roleList.vue |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/views/basicSettings/roleList.vue b/src/views/basicSettings/roleList.vue
index 8c98f45..1af65de 100644
--- a/src/views/basicSettings/roleList.vue
+++ b/src/views/basicSettings/roleList.vue
@@ -131,7 +131,7 @@
                     <div v-for="(item,index) in treeCenter[0].children" :key="item.menucode">
 
                       <div
-                        v-if="item.buttoncodelist ===null "
+                        v-if="!item.buttoncodelist"
                         style="margin-left: 40px;height:26px;display: flex;"
                       />
 
@@ -179,7 +179,7 @@
                   <div v-if="treeCenter.length>0">
                     <div v-for="item in treeCenter[0].children" :key="item.menucode">
                       <div
-                        v-if="item.datacodelist ===null "
+                        v-if="!item.datacodelist"
                         style="margin-left: 40px;height:26px;display: flex;"
                       />
 
@@ -339,7 +339,7 @@
       this.treeCenter[0].children.forEach(item => {
         if (item.children && item.children.length) {
           item.children.forEach(it => {
-            it.buttoncodelist = it.buttoncodelist !== null ? it.buttoncodelist.split(',') : []
+            it.buttoncodelist = it.buttoncodelist !== '' && it.buttoncodelist !== null ? it.buttoncodelist.split(',') : []
             if (it.buttoncodelist && it.buttoncodelist.length > 0) {
               it.buttoncodelist = this.$ButtonData.filter(j =>
                 it.buttoncodelist.includes(j.buttoncode)
@@ -463,7 +463,7 @@
     },
     // 鍗曚釜鎸夐挳鏀瑰彉
     handleCheckedButtonChange(oldValue, index, code, newValue, flag) {
-      console.log(oldValue, index, code, newValue, 2)
+      // console.log(oldValue, index, code, newValue, 2)
       // 鍒ゆ柇鏄惁鍖呭惈鍦ㄥ唴
       if (!flag) {
         if (!this.menuCheckedCodeArr.includes(code) && oldValue.length === 0 && newValue.length === 1) { // 鍚�
@@ -528,7 +528,6 @@
     // 澶勭悊涓棿鏍戝舰閫変腑鍊兼敼鍙�
     handleTreeCenterCheckChange(obj, selfChecked, selfChildrenTreeCheck) {
       // console.log(obj, selfChecked, selfChildrenTreeCheck, '鐜嬭�佸悏')
-      console.log(selfChecked, 10)
       if (!selfChildrenTreeCheck) {
         if (!selfChecked) { // 浠庨�変腑鍒颁笉閫変腑
           obj.buttonChecked = []
@@ -536,7 +535,6 @@
           this.menuCheckedCodeArr = this.menuCheckedCodeArr.filter(i => i !== obj.menucode)
         }
         if (selfChecked) { // 浠庝笉閫変腑鍒伴�変腑
-          console.log(obj, 9)
           obj.buttonCheckedCode = []
           this.treeCenter[0].children.forEach(item => {
             if (item.children && item.children.length) {
@@ -642,7 +640,7 @@
         }
       })
 
-      console.log(arr, 'arr')
+      // console.log(arr, 'arr')
       const rolecode = this.$refs.treeLeftRef.getCurrentKey()
       const res = await RolePermissionSava(JSON.stringify(arr), rolecode, this.activeName)
       if (res.code === '200') {

--
Gitblit v1.9.3