From 83fc308eebae3606eff50121829cf84408a556df Mon Sep 17 00:00:00 2001 From: hhyykk Date: Thu, 11 Jul 2024 21:28:21 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/category/index.ts | 43 +++++ src/views/infra/category/CategoryForm.vue | 127 ++++++++++++++ src/views/infra/category/index.vue | 199 ++++++++++++++++++++++ 3 files changed, 369 insertions(+) create mode 100644 src/api/infra/category/index.ts create mode 100644 src/views/infra/category/CategoryForm.vue create mode 100644 src/views/infra/category/index.vue diff --git a/src/api/infra/category/index.ts b/src/api/infra/category/index.ts new file mode 100644 index 00000000..b422d2d4 --- /dev/null +++ b/src/api/infra/category/index.ts @@ -0,0 +1,43 @@ +import request from '@/config/axios' + +// 文件目录 VO +export interface CategoryVO { + id: number // 主键 + code: string // 编号 + name: string // 文件夹名称 + parentId: number // 父id + description: string // 描述 +} + +// 文件目录 API +export const CategoryApi = { + // 查询文件目录列表 + getCategoryList: async (params) => { + return await request.get({ url: `/infra/category/list`, params }) + }, + + // 查询文件目录详情 + getCategory: async (id: number) => { + return await request.get({ url: `/infra/category/get?id=` + id }) + }, + + // 新增文件目录 + createCategory: async (data: CategoryVO) => { + return await request.post({ url: `/infra/category/create`, data }) + }, + + // 修改文件目录 + updateCategory: async (data: CategoryVO) => { + return await request.put({ url: `/infra/category/update`, data }) + }, + + // 删除文件目录 + deleteCategory: async (id: number) => { + return await request.delete({ url: `/infra/category/delete?id=` + id }) + }, + + // 导出文件目录 Excel + exportCategory: async (params) => { + return await request.download({ url: `/infra/category/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/views/infra/category/CategoryForm.vue b/src/views/infra/category/CategoryForm.vue new file mode 100644 index 00000000..31b1adfc --- /dev/null +++ b/src/views/infra/category/CategoryForm.vue @@ -0,0 +1,127 @@ + + diff --git a/src/views/infra/category/index.vue b/src/views/infra/category/index.vue new file mode 100644 index 00000000..8b27f69a --- /dev/null +++ b/src/views/infra/category/index.vue @@ -0,0 +1,199 @@ + + +