260720
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { FileRecord } from '@/api/system/file/model';
|
||||
import type { SjqnForm, SjqnFormParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询SjqnForm
|
||||
*/
|
||||
export async function pageSjqnForm(params: SjqnFormParam) {
|
||||
const res = await request.get<ApiResult<PageResult<SjqnForm>>>('/gxmu/sjqn-form/page', {
|
||||
params: { ...params, backendAccess: true }
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户分页查询SjqnForm
|
||||
*/
|
||||
export async function userPageSjqnForm(params: SjqnFormParam) {
|
||||
const res = await request.get<ApiResult<PageResult<SjqnForm>>>('/gxmu/sjqn-form/userPage', {
|
||||
params: { ...params, backendAccess: true }
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询SjqnForm列表
|
||||
*/
|
||||
export async function listSjqnForm(params?: SjqnFormParam) {
|
||||
const res = await request.get<ApiResult<SjqnForm[]>>('/gxmu/sjqn-form', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询SjqnForm
|
||||
*/
|
||||
export async function getSjqnForm(id: number) {
|
||||
const res = await request.get<ApiResult<SjqnForm>>('/gxmu/sjqn-form/' + id);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加SjqnForm
|
||||
*/
|
||||
export async function addSjqnForm(data: SjqnForm) {
|
||||
const res = await request.post<ApiResult<unknown>>('/gxmu/sjqn-form', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改SjqnForm
|
||||
*/
|
||||
export async function updateSjqnForm(data: SjqnForm) {
|
||||
const res = await request.put<ApiResult<unknown>>('/gxmu/sjqn-form', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除SjqnForm
|
||||
*/
|
||||
export async function removeSjqnForm(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/gxmu/sjqn-form/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除SjqnForm
|
||||
*/
|
||||
export async function removeBatchSjqnForm(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/gxmu/sjqn-form/batch', {
|
||||
data
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出SjqnForm
|
||||
*/
|
||||
export async function exportSjqnForm(params?: SjqnFormParam) {
|
||||
const res = await request.post<ApiResult<FileRecord>>('/gxmu/sjqn-form/export', {
|
||||
...params,
|
||||
backendAccess: true
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import type { ReviewList } from '@/api/gxmu/reviewList/model';
|
||||
|
||||
/**
|
||||
* SjqnForm
|
||||
*/
|
||||
export interface SjqnForm {
|
||||
id?: number;
|
||||
year?: string;
|
||||
applyType?: string;
|
||||
name?: string;
|
||||
gender?: string;
|
||||
birthMonth?: string;
|
||||
nation?: string;
|
||||
politics?: string;
|
||||
education?: string;
|
||||
position?: string;
|
||||
title?: string;
|
||||
unit?: string;
|
||||
awards?: string;
|
||||
experience?: string;
|
||||
mainStory?: string;
|
||||
leagueOpinion?: string;
|
||||
partyOpinion?: string;
|
||||
schoolOpinion?: string;
|
||||
reviewList?: ReviewList[];
|
||||
}
|
||||
|
||||
/**
|
||||
* SjqnForm搜索条件
|
||||
*/
|
||||
export interface SjqnFormParam extends PageParam {
|
||||
backendAccess?: boolean;
|
||||
id?: number;
|
||||
year?: string;
|
||||
name?: string;
|
||||
unit?: string;
|
||||
applyType?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user