From c822554b3b7a00b45ca3af84ff694027758e896b Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 26 四月 2023 13:12:15 +0800
Subject: [PATCH] 1.提交
---
src/views/basicSettings/roleList.vue | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/src/views/basicSettings/roleList.vue b/src/views/basicSettings/roleList.vue
index a079c45..f43c7dc 100644
--- a/src/views/basicSettings/roleList.vue
+++ b/src/views/basicSettings/roleList.vue
@@ -396,7 +396,7 @@
</el-button>
</div>
<el-table
- ref="multipleTable"
+ ref="multipleTableRef"
:data="dialogFormUserTable"
border
:row-class-name="tableRowClassName"
@@ -1107,7 +1107,7 @@
},
/* 鍏宠仈鐢ㄦ埛妯″潡*/
- async userClick(row) {
+ userClick(row) {
if (row.role_code === 'S001') {
return this.$message.info('姝よ鑹叉棤娉曟搷浣滐紒')
}
@@ -1121,29 +1121,31 @@
this.userForm.roleName = row.role_name
this.dialogFormUser.rolecode = row.role_code
- const res = await this.getRoleAssociationUser()
- if (res.code === '200') {
- setTimeout(() => {
- loading.close()
- this.userDialogVisible = true
- this.$nextTick(() => {
- this.$refs.multipleTable.doLayout()
+ this.getRoleAssociationUser().then(res => {
+ if (res.code === '200') {
+ setTimeout(() => {
+ loading.close()
+
+ this.$nextTick(() => {
+ this.$refs.multipleTableRef.doLayout()
+ })
})
- }, 1000)
- } else {
- loading.close()
- }
+ } 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)
}
})
})
@@ -1190,7 +1192,7 @@
this.dialogFormUser.orgcode = ''
this.dialogFormUser.isrole = ''
this.$refs.dialogCascaderUser.checkedValue = ''
- this.$refs.multipleTable.clearSelection()
+ this.$refs.multipleTableRef.clearSelection()
},
// 鍏宠仈鐢ㄦ埛瀵硅瘽妗嗗叧闂�
userDialogVisibleCancel() {
--
Gitblit v1.9.3