From 806dd53e32d43a03db0e30304fad3c989f38fbcf Mon Sep 17 00:00:00 2001 From: zyd Date: Tue, 30 Aug 2022 23:59:46 +0800 Subject: [PATCH] =?UTF-8?q?add:=E6=9C=BA=E6=9E=84=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B9=E6=8D=AE=E9=83=A8=E9=97=A8=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E9=85=8D=E7=BD=AE=E5=B2=97=E4=BD=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/mechanismManage/pages/mechanism.vue | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/pages/config/pages/mechanismManage/pages/mechanism.vue b/src/pages/config/pages/mechanismManage/pages/mechanism.vue index 9c570751a..e2696eecb 100644 --- a/src/pages/config/pages/mechanismManage/pages/mechanism.vue +++ b/src/pages/config/pages/mechanismManage/pages/mechanism.vue @@ -72,6 +72,9 @@ 批量配置岗位 + + 根据部门批量配置岗位 + @@ -186,7 +189,6 @@ 加载中... - 导入中... 确定 取消 + 导入中... @@ -284,9 +288,11 @@ export default { data: [], // table数据 treeLoading: false, Loading: false, + butionLoading: false, id: '', // 批量配置岗位勾选暂存 manageData: [], + configOrgManage:false, drawerTitle: '配置岗位' } }, @@ -301,26 +307,43 @@ export default { }, resetFormPost() { this.modalPost = false + this.postList = [] this.page1 = 1 }, PostSubmit() { + this.butionLoading = true if (this.drawerTitle === '配置岗位') { this.$http.postData('sarUser/user/position', { positionIds: this.$refs.tree2.getCheckedKeys(), userId: this.userId }, {}, res => { if (res.ok) { + this.butionLoading = false this.$message.success('配置岗位成功') this.modalPost = false this.getData() } }) - } else { + } else if(this.configOrgManage){ + //批量配置岗位信息 + this.$http.postData('sarUser/user/positionBatchByOrgId', { + positionIds: this.$refs.tree2.getCheckedKeys(), + orgId: this.id + }, {}, res => { + if (res.ok) { + this.butionLoading = false + this.$message.success('批量配置岗位成功') + this.modalPost = false + this.getData() + } + }) + }else{ this.$http.postData('sarUser/user/positionBatch', { positionIds: this.$refs.tree2.getCheckedKeys(), userId: this.userId }, {}, res => { if (res.ok) { + this.butionLoading = false this.$message.success('配置岗位成功') this.modalPost = false this.getData() @@ -539,6 +562,7 @@ export default { }, selectEdit() { + this.configOrgManage = false this.getTree2() if(this.manageData.length){ this.userId = [] @@ -551,6 +575,13 @@ export default { this.$message.warning('请选择需要批量配置岗位的角色') } }, + selectEditOfOrg() { + this.configOrgManage = true + this.getTree2() + this.drawerTitle = '批量配置岗位' + this.modalPost = true + }, + }, computed: {}, watch: {