diff --git a/src/api/AuthApi.ts b/src/api/AuthApi.ts index 3ce2134..c39fb6f 100644 --- a/src/api/AuthApi.ts +++ b/src/api/AuthApi.ts @@ -77,6 +77,19 @@ export async function getRoleInfo(id: number): Promise { return response.data; } +/** + * 角色配置 + * @param id 角色id + * @param data + */ +export function roleConfig(id: number, data: string) { + return api.post(`${AuthBase}/config/${id}`, data, { + headers: { + 'Content-Type': 'text/plain', + }, + }); +} + interface LinkRole { id: number; roleList: number[]; diff --git a/src/pages/RoleManage.vue b/src/pages/RoleManage.vue index 49903ef..46456c1 100644 --- a/src/pages/RoleManage.vue +++ b/src/pages/RoleManage.vue @@ -15,35 +15,21 @@ binary-state-sort @request="onRequest" > - + - - - -
{{ roleInfo.id ? '编辑' : '新建' }}
-
- -
- +
+ + + + +
配置角色信息
+ + + -
- + +
@@ -91,18 +71,10 @@