From d4ada9e9323b871f0e3b998cff54a1ccaa4aa953 Mon Sep 17 00:00:00 2001
From: anhc <3442943606@qq.com>
Date: Thu, 14 Jul 2022 17:36:22 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E7=AE=A1=E7=90=86=20?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90=E6=A0=91option=E7=9A=84che?=
=?UTF-8?q?cked=E8=A1=8C=E4=B8=BA=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/role/PermCopy.vue | 2 +-
.../src/views/role/RoleUpdate.vue | 34 +++++++++++++++++--
2 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/com.actionsoft.apps.coe.pal.cooperation/src/views/role/PermCopy.vue b/com.actionsoft.apps.coe.pal.cooperation/src/views/role/PermCopy.vue
index 7540135..6e4ae1b 100644
--- a/com.actionsoft.apps.coe.pal.cooperation/src/views/role/PermCopy.vue
+++ b/com.actionsoft.apps.coe.pal.cooperation/src/views/role/PermCopy.vue
@@ -73,7 +73,7 @@ export default {
initData() {
const that = this;
that.loading = true;
- console.log("teams",that.teamMembers);
+ // console.log("teams",that.teamMembers);
that.teamMembers.forEach(member=>{
let option = {
value: member.userId,
diff --git a/com.actionsoft.apps.coe.pal.cooperation/src/views/role/RoleUpdate.vue b/com.actionsoft.apps.coe.pal.cooperation/src/views/role/RoleUpdate.vue
index f62c3d0..936ddae 100644
--- a/com.actionsoft.apps.coe.pal.cooperation/src/views/role/RoleUpdate.vue
+++ b/com.actionsoft.apps.coe.pal.cooperation/src/views/role/RoleUpdate.vue
@@ -61,7 +61,8 @@
{{node.label}}
- {{dataAction.value}}
+ {{dataAction.value}}
@@ -500,13 +501,20 @@
let data = ro.data;
for (let i = 0; i < data.length; i++) {
let item = data[i];
+ Object.assign(item,{dataActionPermOpts: that.dataActionPermOpts})
if (that.dataActionPerm[item.versionId] != undefined){
Object.assign(item,{dataActionPerm:that.dataActionPerm[item.versionId]})
+ if (that.dataActionPerm[item.versionId].includes('d') || that.dataActionPerm[item.versionId].includes('v')){
+ item.dataActionPermOpts.forEach(item=>{
+ if (item.label == 'w'){
+ item.disabled = true;
+ }
+ })
+ }
}else {
Object.assign(item,{dataActionPerm:[]})
}
}
- // console.log("data",data)
resolve(data);
that.loading = false;
if (node.level == 0 && ro.data.length > 0) {
@@ -533,6 +541,28 @@
},100)
},
+ checkBoxDisabledHandle(data,dataAction){
+ let dataActionPerm = data.dataActionPerm;
+ let actionOpts = data.dataActionPermOpts;
+
+ let flag = dataActionPerm.includes('d') || dataActionPerm.includes('v')
+ if ((dataAction.label == 'd' || dataAction.label == 'v') && flag){
+ if (!dataActionPerm.includes('w')){
+ dataActionPerm.push('w');
+ }
+ actionOpts.forEach(item=>{
+ if (item.label == 'w'){
+ item.disabled = true;
+ }
+ })
+ }else {
+ actionOpts.forEach(item=>{
+ if (item.label == 'w'){
+ item.disabled = false;
+ }
+ })
+ }
+ }
},
watch: {