diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index 9e2540f0..98df227f 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -10,49 +10,37 @@ export interface PostVO { createTime?: Date } -export interface PostPageReqVO extends PageParam { - code?: string - name?: string - status?: number -} - -export interface PostExportReqVO { - code?: string - name?: string - status?: number -} - // 查询岗位列表 -export const getPostPageApi = async (params: PostPageReqVO) => { +export const getPostPage = async (params: PageParam) => { return await request.get({ url: '/system/post/page', params }) } // 获取岗位精简信息列表 -export const listSimplePostsApi = async () => { +export const getSimplePostList = async () => { return await request.get({ url: '/system/post/list-all-simple' }) } // 查询岗位详情 -export const getPostApi = async (id: number) => { +export const getPost = async (id: number) => { return await request.get({ url: '/system/post/get?id=' + id }) } // 新增岗位 -export const createPostApi = async (data: PostVO) => { +export const createPost = async (data: PostVO) => { return await request.post({ url: '/system/post/create', data }) } // 修改岗位 -export const updatePostApi = async (data: PostVO) => { +export const updatePost = async (data: PostVO) => { return await request.put({ url: '/system/post/update', data }) } // 删除岗位 -export const deletePostApi = async (id: number) => { +export const deletePost = async (id: number) => { return await request.delete({ url: '/system/post/delete?id=' + id }) } // 导出岗位 -export const exportPostApi = async (params: PostExportReqVO) => { +export const exportPost = async (params) => { return await request.download({ url: '/system/post/export', params }) } diff --git a/src/views/bpm/taskAssignRule/index.vue b/src/views/bpm/taskAssignRule/index.vue index 6e1432b6..8db7b578 100644 --- a/src/views/bpm/taskAssignRule/index.vue +++ b/src/views/bpm/taskAssignRule/index.vue @@ -139,7 +139,7 @@ import { FormInstance } from 'element-plus' // 业务相关的 import import * as TaskAssignRuleApi from '@/api/bpm/taskAssignRule' import { listSimpleRolesApi } from '@/api/system/role' -import { listSimplePostsApi } from '@/api/system/post' +import { getSimplePostList } from '@/api/system/post' import { getSimpleUserList } from '@/api/system/user' import { listSimpleUserGroup } from '@/api/bpm/userGroup' import { listSimpleDeptApi } from '@/api/system/dept' @@ -336,7 +336,7 @@ onMounted(() => { }) // 获得岗位列表 postOptions.value = [] - listSimplePostsApi().then((data) => { + getSimplePostList().then((data) => { postOptions.value.push(...data) }) // 获得用户列表 diff --git a/src/views/system/post/form.vue b/src/views/system/post/PostForm.vue similarity index 91% rename from src/views/system/post/form.vue rename to src/views/system/post/PostForm.vue index d5d65dd1..14aa9651 100644 --- a/src/views/system/post/form.vue +++ b/src/views/system/post/PostForm.vue @@ -37,6 +37,7 @@