fix(projects): 修复自定义数据权限没有保存角色部门bug
This commit is contained in:
parent
8bb31b1c36
commit
a0f33664ec
@ -36,6 +36,15 @@ export function fetchUpdateRoleStatus(data: Api.System.RoleOperateParams) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 修改角色数据权限 */
|
||||||
|
export function fetchUpdateRoleDataScope(data: Api.System.RoleOperateParams) {
|
||||||
|
return request<boolean>({
|
||||||
|
url: '/system/role/dataScope',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 批量删除角色信息 */
|
/** 批量删除角色信息 */
|
||||||
export function fetchBatchDeleteRole(roleIds: CommonType.IdType[]) {
|
export function fetchBatchDeleteRole(roleIds: CommonType.IdType[]) {
|
||||||
return request<boolean>({
|
return request<boolean>({
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { computed, reactive, ref, watch } from 'vue';
|
import { computed, reactive, ref, watch } from 'vue';
|
||||||
import { useLoading } from '@sa/hooks';
|
import { useLoading } from '@sa/hooks';
|
||||||
import { dataScopeOptions } from '@/constants/business';
|
import { dataScopeOptions } from '@/constants/business';
|
||||||
import { fetchGetRoleDeptTreeSelect, fetchUpdateRole } from '@/service/api/system/role';
|
import { fetchGetRoleDeptTreeSelect, fetchUpdateRoleDataScope } from '@/service/api/system/role';
|
||||||
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import DeptTree from '@/components/custom/dept-tree.vue';
|
import DeptTree from '@/components/custom/dept-tree.vue';
|
||||||
@ -86,7 +86,7 @@ async function handleSubmit() {
|
|||||||
|
|
||||||
const { roleId, roleName, roleKey, roleSort, dataScope, deptIds, menuIds } = model;
|
const { roleId, roleName, roleKey, roleSort, dataScope, deptIds, menuIds } = model;
|
||||||
|
|
||||||
const { error } = await fetchUpdateRole({
|
const { error } = await fetchUpdateRoleDataScope({
|
||||||
roleId,
|
roleId,
|
||||||
roleName,
|
roleName,
|
||||||
roleKey,
|
roleKey,
|
||||||
|
Loading…
Reference in New Issue
Block a user