From a7c0a144d06e021b03951f99d24d0cdaa2e1a9b3 Mon Sep 17 00:00:00 2001 From: XaoLi717 <144221124+XaoLi717@users.noreply.github.com> Date: Sat, 14 Sep 2024 14:22:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=94=B6=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home/homepj/index.ts | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/api/home/homepj/index.ts diff --git a/src/api/home/homepj/index.ts b/src/api/home/homepj/index.ts new file mode 100644 index 0000000..a8d9cb8 --- /dev/null +++ b/src/api/home/homepj/index.ts @@ -0,0 +1,48 @@ +import request from '@/config/axios' + +// 主要用于首页的项目数据 VO +export interface pjVO { + pjId: number // id + pjName: string // 项目名称 + pjDone: number // 是否完成0未完成1完成 + pjDescribe: string // 项目描述 + pjContent: string // 项目内容 + pjType: number // 项目类别 + pjEtime: Date // 项目预计完成时间 + pjVtime: Date // 项目实际完成时间 + pjDept: number // 参与部门 + pjNumber: number // 参与人数 +} + +// 主要用于首页的项目数据 API +export const pjApi = { + // 查询主要用于首页的项目数据分页 + getpjPage: async (params: any) => { + return await request.get({ url: `/home/pj/page`, params }) + }, + + // 查询主要用于首页的项目数据详情 + getpj: async (id: number) => { + return await request.get({ url: `/home/pj/get?id=` + id }) + }, + + // 新增主要用于首页的项目数据 + createpj: async (data: pjVO) => { + return await request.post({ url: `/home/pj/create`, data }) + }, + + // 修改主要用于首页的项目数据 + updatepj: async (data: pjVO) => { + return await request.put({ url: `/home/pj/update`, data }) + }, + + // 删除主要用于首页的项目数据 + deletepj: async (id: number) => { + return await request.delete({ url: `/home/pj/delete?id=` + id }) + }, + + // 导出主要用于首页的项目数据 Excel + exportpj: async (params) => { + return await request.download({ url: `/home/pj/export-excel`, params }) + }, +} \ No newline at end of file