From 056b07abcb28ef7ea86d7f3c2c8f6a40a01d07f3 Mon Sep 17 00:00:00 2001 From: jameszow Date: Wed, 4 Oct 2023 14:41:44 +0800 Subject: [PATCH] Fix role permission do not refresh data --- src/views/sys/role/RolePermissionModal.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/sys/role/RolePermissionModal.vue b/src/views/sys/role/RolePermissionModal.vue index 8c5b6c0..aeee23f 100644 --- a/src/views/sys/role/RolePermissionModal.vue +++ b/src/views/sys/role/RolePermissionModal.vue @@ -27,7 +27,7 @@ import {addOrUpdateRolePermissionReq} from "@/api/sys/model/roleModel"; const treeData = ref([]); - + const emit = defineEmits(['success', 'register']); const [registerForm, {setFieldsValue, validate}] = useForm({ labelWidth: 90, baseColProps: { span: 24 }, @@ -54,9 +54,10 @@ menuIds: values.menuIds } console.info(object) - await rolePermission(object); - - + const result = await rolePermission(object); + if(result.code === 'A0008') { + emit('success'); + } } finally { closeModal(); setModalProps({ confirmLoading: false });