init: 初始系统模板

This commit is contained in:
TsMask
2023-09-05 14:38:23 +08:00
parent a5bc16ae4f
commit 1075c8ae4f
130 changed files with 22531 additions and 1 deletions

78
src/api/system/post.ts Normal file
View File

@@ -0,0 +1,78 @@
import { request } from '@/plugins/http-fetch';
/**
* 岗位列表导出
* @param query 查询参数
* @returns bolb
*/
export function exportPost(query: Record<string, any>) {
return request({
url: '/system/post/export',
method: 'post',
data: query,
responseType: 'blob',
});
}
/**
* 查询岗位列表
* @param query 查询参数
* @returns object
*/
export function listPost(query: Record<string, any>) {
return request({
url: '/system/post/list',
method: 'get',
params: query,
});
}
/**
* 查询岗位详细
* @param postId 岗位ID
* @returns object
*/
export function getPost(postId: string | number) {
return request({
url: `/system/post/${postId}`,
method: 'get',
});
}
/**
* 新增岗位
* @param data 岗位对象
* @returns object
*/
export function addPost(data: Record<string, any>) {
return request({
url: '/system/post',
method: 'post',
data: data,
});
}
/**
* 修改岗位
* @param data 岗位对象
* @returns object
*/
export function updatePost(data: Record<string, any>) {
return request({
url: '/system/post',
method: 'put',
data: data,
});
}
/**
* 删除岗位
* @param postId 岗位ID
* @returns object
*/
export function delPost(postId: string | number) {
return request({
url: `/system/post/${postId}`,
method: 'delete',
});
}