From db93e7dadc36919d787eaf76108068caf9a0ddbc Mon Sep 17 00:00:00 2001
From: yinbangzhong <zhongbangyin@126.com>
Date: 星期五, 16 八月 2024 15:31:02 +0800
Subject: [PATCH] 角色
---
src/api/authority.ts | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/src/api/authority.ts b/src/api/authority.ts
index f3a9039..6e7240a 100644
--- a/src/api/authority.ts
+++ b/src/api/authority.ts
@@ -3,6 +3,7 @@
export interface User {
userId: string;
+ loginName:string;
userName: string;
nickName: string;
email: string;
@@ -14,6 +15,9 @@
dialogs: any;
createTime: string;
status: string;
+ psw:string;
+ role:string;
+ roleName:string;
}
export interface Organization {
@@ -63,6 +67,47 @@
total: number;
}
+export interface Role {
+ roleId: string;
+ createTime: string;
+ updateTime: string;
+ roleName: string;
+ remark: string;
+ iconCls: string;
+ roleSort: string;
+ status: string;
+ roleKey: string;
+ dataScope: string;
+ dept: any;
+ resources: any;
+ knowledges: any;
+ dialogs: any;
+ agents: any;
+}
+
+export function RoleList(params: Pagination) {
+ return axios.get<Result<Role[]>>('/base/system/role/list', { params });
+}
+
+export function RoleDelete(id) {
+ return axios.delete('/base/system/role/' + id);
+}
+
+export function RoleEdit(role) {
+ return axios.put('/base/system/role', { role });
+}
+
+export function RoleAdd(role) {
+ return axios.post('/base/system/role', { role });
+}
+
+export function Rolestatus(roleId, status) {
+ return axios.put('/base/system/role/changeStatus', {
+ roleId: roleId,
+ status: status,
+ });
+}
+
export function UserList(params: Pagination) {
return axios.get<Result<User[]>>('/base/system/user/list', { params });
}
--
Gitblit v1.8.0