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: {