From a13d37838a97af7176ee9b8b88cfdf0f21b4da0c Mon Sep 17 00:00:00 2001 From: caihaohan Date: Wed, 22 Nov 2023 23:53:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=BA=E6=9E=84=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=85=B3=E8=81=94=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/mechanismManage/pages/mechanism.vue | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/pages/config/pages/mechanismManage/pages/mechanism.vue b/src/pages/config/pages/mechanismManage/pages/mechanism.vue index 4f2358193..cca4c13c9 100644 --- a/src/pages/config/pages/mechanismManage/pages/mechanism.vue +++ b/src/pages/config/pages/mechanismManage/pages/mechanism.vue @@ -70,10 +70,10 @@ - 批量配置岗位 + 批量配置角色 - 根据部门批量配置岗位 + 根据部门批量配置角色 @@ -176,8 +176,8 @@ 禁用 - - 配置岗位 + + 配置角色 @@ -201,7 +201,7 @@ @@ -270,7 +270,7 @@ export default { nodeList: [], modalPost: false, sarPost: { - name: "", // 岗位名称 + name: "", // 角色名称 }, filterText: '', // 树结构检索条件 defaultProps: { @@ -290,10 +290,10 @@ export default { Loading: false, butionLoading: false, id: '', - // 批量配置岗位勾选暂存 + // 批量配置角色勾选暂存 manageData: [], configOrgManage:false, - drawerTitle: '配置岗位' + drawerTitle: '配置角色' } }, methods: { @@ -312,39 +312,39 @@ export default { }, PostSubmit() { this.butionLoading = true - if (this.drawerTitle === '配置岗位') { - this.$http.postData('sarUser/user/position', { - positionIds: this.$refs.tree2.getCheckedKeys(), + if (this.drawerTitle === '配置角色') { + this.$http.postData('sarUser/user/role', { + roleIds: this.$refs.tree2.getCheckedKeys(), userId: this.userId }, {}, res => { if (res.ok) { this.butionLoading = false - this.$message.success('配置岗位成功') + this.$message.success('配置角色成功') this.modalPost = false this.getData() } }) } else if(this.configOrgManage){ - //批量配置岗位信息 - this.$http.postData('sarUser/user/positionBatchByOrgId', { - positionIds: this.$refs.tree2.getCheckedKeys(), + //批量配置角色信息 + this.$http.postData('sarUser/user/roleBatchByOrgId', { + roleIds: this.$refs.tree2.getCheckedKeys(), orgId: this.id }, {}, res => { if (res.ok) { this.butionLoading = false - this.$message.success('批量配置岗位成功') + this.$message.success('批量配置角色成功') this.modalPost = false this.getData() } }) }else{ - this.$http.postData('sarUser/user/positionBatch', { - positionIds: this.$refs.tree2.getCheckedKeys(), + this.$http.postData('sarUser/user/roleBatch', { + roleIds: this.$refs.tree2.getCheckedKeys(), userId: this.userId }, {}, res => { if (res.ok) { this.butionLoading = false - this.$message.success('配置岗位成功') + this.$message.success('配置角色成功') this.modalPost = false this.getData() } @@ -369,14 +369,14 @@ export default { case '禁用': this.disableFlagEdit(command[0], 1) break - case '配置岗位': + case '配置角色': this.postsConfigure(command[0]) break } }, getTree2() { - this.$http.get('sarPosition/position', { + this.$http.get('sarRole/role/allPage', { current: this.page1, pageSize: this.pageSize1, ...this.sarPost, @@ -389,7 +389,7 @@ export default { }, postsConfigure(row) { this.configOrgManage = false - this.drawerTitle = '配置岗位' + this.drawerTitle = '配置角色' var arr = [] this.userId = row.userId row.positions.forEach((item) => { @@ -558,7 +558,7 @@ export default { this.getTree2() }, - /** 批量编辑岗位的勾选数据 */ + /** 批量编辑角色的勾选数据 */ selectedData(val) { this.manageData = val }, @@ -571,16 +571,16 @@ export default { this.manageData.forEach(item=>{ this.userId.push(item.userId) }) - this.drawerTitle = '批量配置岗位' + this.drawerTitle = '批量配置角色' this.modalPost = true }else{ - this.$message.warning('请选择需要批量配置岗位的角色') + this.$message.warning('请选择需要批量配置的角色') } }, selectEditOfOrg() { this.configOrgManage = true this.getTree2() - this.drawerTitle = '批量配置岗位' + this.drawerTitle = '批量配置角色' this.modalPost = true },