Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
75c4d660
authored
Apr 19, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复角色管理数据权限回显问题
parent
22e5b45d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
src/views/system/role/RoleAssignMenuForm.vue
+3
-0
src/views/system/role/RoleDataPermissionForm.vue
+3
-0
src/views/system/role/index.vue
+2
-2
No files found.
src/views/system/role/RoleAssignMenuForm.vue
View file @
75c4d660
...
...
@@ -91,6 +91,7 @@ const open = async (row: RoleApi.RoleVO) => {
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
const
submitForm
=
async
()
=>
{
// 校验表单
if
(
!
formRef
)
return
...
...
@@ -109,6 +110,8 @@ const submitForm = async () => {
await
PermissionApi
.
assignRoleMenu
(
data
)
message
.
success
(
t
(
'common.updateSuccess'
))
dialogVisible
.
value
=
false
// 发送操作成功的事件
emit
(
'success'
)
}
finally
{
formLoading
.
value
=
false
}
...
...
src/views/system/role/RoleDataPermissionForm.vue
View file @
75c4d660
...
...
@@ -107,6 +107,7 @@ const open = async (row: RoleApi.RoleVO) => {
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
const
submitForm
=
async
()
=>
{
formLoading
.
value
=
true
try
{
...
...
@@ -121,6 +122,8 @@ const submitForm = async () => {
await
PermissionApi
.
assignRoleDataScope
(
data
)
message
.
success
(
t
(
'common.updateSuccess'
))
dialogVisible
.
value
=
false
// 发送操作成功的事件
emit
(
'success'
)
}
finally
{
formLoading
.
value
=
false
}
...
...
src/views/system/role/index.vue
View file @
75c4d660
...
...
@@ -156,9 +156,9 @@
<!-- 表单弹窗:添加/修改 -->
<RoleForm
ref=
"formRef"
@
success=
"getList"
/>
<!-- 表单弹窗:菜单权限 -->
<RoleAssignMenuForm
ref=
"assignMenuFormRef"
/>
<RoleAssignMenuForm
ref=
"assignMenuFormRef"
@
success=
"getList"
/>
<!-- 表单弹窗:数据权限 -->
<RoleDataPermissionForm
ref=
"dataPermissionFormRef"
/>
<RoleDataPermissionForm
ref=
"dataPermissionFormRef"
@
success=
"getList"
/>
</template>
<
script
lang=
"ts"
name=
"SystemRole"
setup
>
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment