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