diff --git a/fund-admin/src/api/post.js b/fund-admin/src/api/post.js new file mode 100644 index 0000000..262f354 --- /dev/null +++ b/fund-admin/src/api/post.js @@ -0,0 +1,85 @@ +import request from '../utils/request' + +/** + * 获取岗位列表(分页) + */ +export const getPostList = (params) => { + return request({ + url: '/sys/api/v1/post/list', + method: 'get', + params + }) +} + +/** + * 根据部门ID获取岗位列表 + */ +export const getPostListByDept = (deptId) => { + return request({ + url: `/sys/api/v1/post/list/dept/${deptId}`, + method: 'get' + }) +} + +/** + * 获取所有启用的岗位列表 + */ +export const getPostListEnabled = () => { + return request({ + url: '/sys/api/v1/post/list/enabled', + method: 'get' + }) +} + +/** + * 获取岗位详情 + */ +export const getPostById = (postId) => { + return request({ + url: `/sys/api/v1/post/${postId}`, + method: 'get' + }) +} + +/** + * 创建岗位 + */ +export const createPost = (data) => { + return request({ + url: '/sys/api/v1/post', + method: 'post', + data + }) +} + +/** + * 更新岗位 + */ +export const updatePost = (postId, data) => { + return request({ + url: `/sys/api/v1/post/${postId}`, + method: 'put', + data + }) +} + +/** + * 删除岗位 + */ +export const deletePost = (postId) => { + return request({ + url: `/sys/api/v1/post/${postId}`, + method: 'delete' + }) +} + +/** + * 更新岗位状态 + */ +export const updatePostStatus = (postId, status) => { + return request({ + url: `/sys/api/v1/post/${postId}/status`, + method: 'put', + params: { status } + }) +} diff --git a/fund-admin/src/views/system/post.vue b/fund-admin/src/views/system/post.vue new file mode 100644 index 0000000..5954e80 --- /dev/null +++ b/fund-admin/src/views/system/post.vue @@ -0,0 +1,415 @@ + + + + +