From d17d3ac3da20d054223a0b1b31909bd0d9caad4d Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期一, 29 七月 2024 19:48:42 +0800
Subject: [PATCH] 知识库页面解析方法接口调用开发

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

diff --git a/src/api/authority.ts b/src/api/authority.ts
index 0e4e193..3db14ab 100644
--- a/src/api/authority.ts
+++ b/src/api/authority.ts
@@ -8,6 +8,7 @@
   email: string;
   phoneNumber: string;
   dept: any;
+  resources:any;
   createTime: string;
   status: string;
 }
@@ -23,6 +24,26 @@
   status: string;
   address: string;
   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> {
@@ -77,4 +98,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