From 1e4a145667f460778560defccab1137b84139985 Mon Sep 17 00:00:00 2001
From: yinbangzhong <zhongbangyin@126.com>
Date: 星期一, 29 七月 2024 14:10:16 +0800
Subject: [PATCH] 权限资源

---
 src/api/authority.ts |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/src/api/authority.ts b/src/api/authority.ts
index 0e4e193..e322a2e 100644
--- a/src/api/authority.ts
+++ b/src/api/authority.ts
@@ -25,6 +25,26 @@
   parentName: string;
 }
 
+export interface Resource {
+  "menuId": string;
+  "createTime": string;
+  "updateTime": string;
+  "menuName": string;
+  "component": string;
+  "description": string;
+  "icon": string;
+  "orderNum": string;
+  "target": string;
+  "parentId": string;
+  "parentName":string;
+  "children": any;
+  "syesourcetype": string;
+  "status": string;
+  "path": string;
+  "perms": string;
+  "menuType": string;
+}
+
 export interface Result<T> {
   code: number;
   msg: string;
@@ -77,4 +97,27 @@
 
 export function OrganizationById(id) {
   return axios.get<Result<Organization>>("/base/system/dept/" + id);
+}
+
+
+export function ResourceList(key: string) {
+  return axios.get<Result<Resource[]>>("/base/system/menu/treeselect");
+}
+
+
+export function ResourceAdd(resource) {
+  return axios.post("/base/system/menu", { resource });
+}
+
+export function ResourceDelete(id) {
+  return axios.delete("/base/system/menu/" + id);
+}
+
+export function ResourceUpdate(resource) {
+  return axios.put("/base/system/menu", { resource });
+}
+
+
+export function ResourceById(id) {
+  return axios.get<Result<Resource>>("/base/system/menu/" + id);
 }
\ No newline at end of file

--
Gitblit v1.8.0