From 8240149e4184a8226b31d9f183bc3f2c644d18bd Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 24 Mar 2025 21:17:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20post=20demo=E3=80=90e9a08079=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api/system/post/index.ts | 46 ++++++++ apps/web-antd/src/views/system/post/index.vue | 106 ++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 apps/web-antd/src/api/system/post/index.ts create mode 100644 apps/web-antd/src/views/system/post/index.vue diff --git a/apps/web-antd/src/api/system/post/index.ts b/apps/web-antd/src/api/system/post/index.ts new file mode 100644 index 000000000..c6d096c92 --- /dev/null +++ b/apps/web-antd/src/api/system/post/index.ts @@ -0,0 +1,46 @@ +import { requestClient } from '#/api/request'; + +export interface PostVO { + id?: number; + name: string; + code: string; + sort: number; + status: number; + remark: string; + createTime?: Date; +} + +/** 查询岗位列表 */ +export function getPostPage(params: any) { + return requestClient.get('/system/post/page', { params }); +} + +/** 获取岗位精简信息列表 */ +export function getSimplePostList() { + return requestClient.get('/system/post/simple-list'); +} + + /** 查询岗位详情 */ +export function getPost(id: number) { + return requestClient.get(`/system/post/get?id=${id}`); +} + +/** 新增岗位 */ +export function createPost(data: PostVO) { + return requestClient.post('/system/post/create', data); +} + +/** 修改岗位 */ +export function updatePost(data: PostVO) { + return requestClient.put('/system/post/update', data); +} + +/** 删除岗位 */ +export function deletePost(id: number) { + return requestClient.delete(`/system/post/delete?id=${id}`); +} + +/** 导出岗位 */ +export function exportPost(params: any) { + return requestClient.download('/system/post/export', params); +} diff --git a/apps/web-antd/src/views/system/post/index.vue b/apps/web-antd/src/views/system/post/index.vue new file mode 100644 index 000000000..a71ba7683 --- /dev/null +++ b/apps/web-antd/src/views/system/post/index.vue @@ -0,0 +1,106 @@ + + +