From 2a7cf2e186cb2bab4c6fb53aae933706f684b5e0 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Tue, 22 Oct 2024 10:32:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=92=E8=89=B2=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/AuthApi.ts | 13 ++++ src/pages/RoleManage.vue | 163 ++++++++++++--------------------------- 2 files changed, 61 insertions(+), 115 deletions(-) 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 @@