refactor ts

This commit is contained in:
LiuHao
2023-04-02 01:01:56 +08:00
parent 5c87f1cb2c
commit 251d2411f2
264 changed files with 15432 additions and 13015 deletions

View File

@ -0,0 +1,46 @@
import request from '@/utils/request';
import { PostForm, PostQuery, PostVO } from './types';
import { AxiosPromise } from 'axios';
// 查询岗位列表
export function listPost(query: PostQuery): AxiosPromise<PostVO[]> {
return request({
url: '/system/post/list',
method: 'get',
params: query
});
}
// 查询岗位详细
export function getPost(postId: string | number): AxiosPromise<PostVO> {
return request({
url: '/system/post/' + postId,
method: 'get'
});
}
// 新增岗位
export function addPost(data: PostForm) {
return request({
url: '/system/post',
method: 'post',
data: data
});
}
// 修改岗位
export function updatePost(data: PostForm) {
return request({
url: '/system/post',
method: 'put',
data: data
});
}
// 删除岗位
export function delPost(postId: string | number | (string | number)[]) {
return request({
url: '/system/post/' + postId,
method: 'delete'
});
}

View File

@ -0,0 +1,23 @@
export interface PostVO extends BaseEntity {
postId: number | string;
postCode: string;
postName: string;
postSort: number;
status: string;
remark: string;
}
export interface PostForm {
postId: number | string | undefined;
postCode: string;
postName: string;
postSort: number;
status: string;
remark: string;
}
export interface PostQuery extends PageQuery {
postCode: string;
postName: string;
status: string;
}