From c424ee76e4e5145292cb86619899e65fe27ab1ba Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 22 Mar 2023 22:11:03 +0800 Subject: [PATCH] =?UTF-8?q?Vue3=20=E9=87=8D=E6=9E=84=EF=BC=9AREVIEW=20?= =?UTF-8?q?=E5=B2=97=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/post/index.ts | 26 ++----- src/views/bpm/taskAssignRule/index.vue | 4 +- .../system/post/{form.vue => PostForm.vue} | 18 +++-- src/views/system/post/index.vue | 78 ++++++++++--------- src/views/system/user/index.vue | 4 +- 5 files changed, 63 insertions(+), 67 deletions(-) rename src/views/system/post/{form.vue => PostForm.vue} (91%) 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 @@