From 5ff5e947cbd5cc0d0819be8da5bbc18df8965a06 Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期四, 01 八月 2024 11:06:36 +0800
Subject: [PATCH] 知识库文件的下载

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

diff --git a/src/api/authority.ts b/src/api/authority.ts
index 0e4e193..0a68b1b 100644
--- a/src/api/authority.ts
+++ b/src/api/authority.ts
@@ -8,6 +8,8 @@
   email: string;
   phoneNumber: string;
   dept: any;
+  resources: any;
+  knowledges:any;
   createTime: string;
   status: string;
 }
@@ -23,6 +25,33 @@
   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 Knowledge {
+  "id": string;
+  "createTime": string;
+  "updateTime": string;
+  "name": string;
 }
 
 export interface Result<T> {
@@ -77,4 +106,31 @@
 
 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);
+}
+
+export function KnowledgeList() {
+  return axios.get<Result<Knowledge>>("/base/system/knowledge/list");
 }
\ No newline at end of file

--
Gitblit v1.8.0