diff --git a/yanzhu-ui/src/views/base/assetsType/index.vue b/yanzhu-ui/src/views/base/assetsType/index.vue index 79081a3..f5d6fde 100644 --- a/yanzhu-ui/src/views/base/assetsType/index.vue +++ b/yanzhu-ui/src/views/base/assetsType/index.vue @@ -82,8 +82,8 @@ @pagination="getList" /> - + @@ -109,8 +109,8 @@
- + {{ it.text }} @@ -275,7 +275,7 @@ export default { deptId: this.queryParams.defaultDeptId, type: null, name: null, - sunit: null, + sunit: "", unit: null, isDel: null, createBy: null, @@ -327,22 +327,22 @@ export default { handleUpdate(row) { this.reset(); const id = row.id || this.ids - let tmps=row.unit.split(",").filter(d=>d); - let uns=this.units.map(d=>d.text).join(",") - tmps.forEach(it=>{ - if((","+uns+",").indexOf(","+it+",")==-1){ + let tmps = row.unit.split(",").filter(d => d); + let uns = this.units.map(d => d.text).join(",") + tmps.forEach(it => { + if (("," + uns + ",").indexOf("," + it + ",") == -1) { this.units.push({ - text:it, - del:false, - sys:false + text: it, + del: false, + sys: false }) } }); - this.units.forEach(it=>{ - it.sel=(","+row.unit+",").indexOf(","+it.text+",")>=0; + this.units.forEach(it => { + it.sel = ("," + row.unit + ",").indexOf("," + it.text + ",") >= 0; }); getAssetsType(id).then(response => { - this.form = {...response.data,sunit:''}; + this.form = { ...response.data, sunit: '' }; this.open = true; this.title = "修改物资类型"; }); @@ -439,4 +439,5 @@ export default { } } } -} \ No newline at end of file +} + \ No newline at end of file diff --git a/yanzhu-ui/src/views/system/role/authUser.vue b/yanzhu-ui/src/views/system/role/authUser.vue index 147aa33..6129aa1 100644 --- a/yanzhu-ui/src/views/system/role/authUser.vue +++ b/yanzhu-ui/src/views/system/role/authUser.vue @@ -1,23 +1,13 @@ @@ -143,10 +104,10 @@ export default { getList() { this.loading = true; allocatedUserList(this.queryParams).then(response => { - this.userList = response.rows; - this.total = response.total; - this.loading = false; - } + this.userList = response.rows; + this.total = response.total; + this.loading = false; + } ); }, // 返回按钮 @@ -176,23 +137,23 @@ export default { /** 取消授权按钮操作 */ cancelAuthUser(row) { const roleId = this.queryParams.roleId; - this.$modal.confirm('确认要取消该用户"' + row.userName + '"角色吗?').then(function() { + this.$modal.confirm('确认要取消该用户"' + row.userName + '"角色吗?').then(function () { return authUserCancel({ userId: row.userId, roleId: roleId }); }).then(() => { this.getList(); this.$modal.msgSuccess("取消授权成功"); - }).catch(() => {}); + }).catch(() => { }); }, /** 批量取消授权按钮操作 */ cancelAuthUserAll(row) { const roleId = this.queryParams.roleId; const userIds = this.userIds.join(","); - this.$modal.confirm('是否取消选中用户授权数据项?').then(function() { + this.$modal.confirm('是否取消选中用户授权数据项?').then(function () { return authUserCancelAll({ roleId: roleId, userIds: userIds }); }).then(() => { this.getList(); this.$modal.msgSuccess("取消授权成功"); - }).catch(() => {}); + }).catch(() => { }); } } }; diff --git a/yanzhu-ui/src/views/system/user/index.vue b/yanzhu-ui/src/views/system/user/index.vue index 1e7336c..9c87208 100644 --- a/yanzhu-ui/src/views/system/user/index.vue +++ b/yanzhu-ui/src/views/system/user/index.vue @@ -128,7 +128,7 @@ - + @@ -346,6 +346,7 @@ export default { this.form.deptId=undefined; },400); }else{ + debugger if(a.data.level==1){//公司 this.roleOptions=this.oldRoleOptions.filter(d=>{ return d.roleName=="公司管理员"||d.roleName=="普通角色"; @@ -354,13 +355,16 @@ export default { this.roleOptions=this.oldRoleOptions.filter(d=>{ return d.roleName=="段队管理员"||d.roleName=="普通角色"; }); - }else if(a.data.level==300){//项目 + }else if(a.data.level==300){//项目 this.roleOptions=this.oldRoleOptions.filter(d=>{ - return d.roleName=="项目管理员"||d.roleName=="普通角色"; + return [2,3,4,5,8].indexOf(d.roleId)>=0; }); }else{ + let node=this.$refs.treeSel.selectedNodes[0]; + let plevel=node.parentNode?.raw?.data?.level||0; + let roles=[2,3,4,5]; this.roleOptions=this.oldRoleOptions.filter(d=>{ - return d.roleName=="公司管理员"||d.roleName=="普通角色"; + return roles.indexOf(d.roleId)>=0; }); } @@ -465,6 +469,7 @@ export default { handleAdd() { this.reset(); getUser().then(response => { + debugger this.postOptions = response.posts; this.roleOptions = response.roles; this.oldRoleOptions=response.roles;