From 189ec3fe9344dfdc4c3d13b154b482d201e2d413 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 28 四月 2023 15:06:53 +0800
Subject: [PATCH] 1.提交
---
src/views/jcsz/jsqd.vue | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index 0813aea..a536a38 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -452,7 +452,7 @@
</el-button>
</div>
<el-table
- ref="multipleTable"
+ ref="multipleTableRef"
:data="dialogFormUserTable"
border
:row-class-name="tableRowClassName"
@@ -1056,7 +1056,7 @@
},
/* 鍏宠仈鐢ㄦ埛妯″潡*/
- async userClick(row) {
+ userClick(row) {
if (row.role_code === 'S001') {
return this.$message.info('姝よ鑹叉棤娉曟搷浣滐紒')
}
@@ -1070,29 +1070,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)
}
})
})
@@ -1139,7 +1141,7 @@
this.dialogFormUser.orgcode = ''
this.dialogFormUser.isrole = ''
this.$refs.dialogCascaderUser.checkedValue = ''
- this.$refs.multipleTable.clearSelection()
+ this.$refs.multipleTableRef.clearSelection()
},
// 鍏宠仈鐢ㄦ埛瀵硅瘽妗嗗叧闂�
userDialogVisibleCancel() {
--
Gitblit v1.9.3