| | |
| | | </el-button> |
| | | </div> |
| | | <el-table |
| | | ref="multipleTable" |
| | | ref="multipleTableRef" |
| | | :data="dialogFormUserTable" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | |
| | | }, |
| | | |
| | | /* 关联用户模块*/ |
| | | async userClick(row) { |
| | | userClick(row) { |
| | | if (row.role_code === 'S001') { |
| | | return this.$message.info('此角色无法操作!') |
| | | } |
| | |
| | | |
| | | this.userForm.roleName = row.role_name |
| | | this.dialogFormUser.rolecode = row.role_code |
| | | const res = await this.getRoleAssociationUser() |
| | | |
| | | this.getRoleAssociationUser().then(res => { |
| | | if (res.code === '200') { |
| | | setTimeout(() => { |
| | | loading.close() |
| | | this.userDialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.multipleTable.doLayout() |
| | | this.$refs.multipleTableRef.doLayout() |
| | | }) |
| | | }, 1000) |
| | | }) |
| | | } else { |
| | | loading.close() |
| | | } |
| | | }) |
| | | }, |
| | | // 获取角色清单关联用户 |
| | | async getRoleAssociationUser() { |
| | | const res = await RoleAssociationUser(this.dialogFormUser) |
| | | this.dialogFormUserTable = res.data |
| | | this.dialogFormUserTableLength = res.count |
| | | this.userDialogVisible = true |
| | | this.$nextTick(() => { |
| | | this.dialogFormUserTable.forEach((item, index) => { |
| | | if (item.flag === 'Y') { |
| | | this.$refs.multipleTable.toggleRowSelection(this.dialogFormUserTable[index], true) |
| | | this.$refs.multipleTableRef.toggleRowSelection(this.dialogFormUserTable[index], true) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | this.dialogFormUser.orgcode = '' |
| | | this.dialogFormUser.isrole = '' |
| | | this.$refs.dialogCascaderUser.checkedValue = '' |
| | | this.$refs.multipleTable.clearSelection() |
| | | this.$refs.multipleTableRef.clearSelection() |
| | | }, |
| | | // 关联用户对话框关闭 |
| | | userDialogVisibleCancel() { |