You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
3.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import { request } from 'umi';
import type { TableListItem } from './data';
/** 获取考试列表 GET /dsideal_yy/zygh/training/examination/getExaminationList */
export async function queryExaminationList(
params: {
// query
/** 当前的页码 */
current?: number;
/** 页面的容量 */
pageSize?: number;
},
options?: Record<string, any>,
) {
return request<{
data: TableListItem[];
/** 列表的内容总数 */
total_row?: number;
/** 页面的容量 */
page_size?: number;
success?: boolean;
}>('/api/zygh/training/examination/getExaminationList', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 获取证书列表 GET /dsideal_yy/zygh/training/examination/getExaminationList */
export async function queryCertificateList(
params: {
// query
/** 当前的页码 */
current?: number;
/** 页面的容量 */
pageSize?: number;
},
options?: Record<string, any>,
) {
return request<{
data: TableListItem[];
/** 列表的内容总数 */
total_row?: number;
/** 页面的容量 */
page_size?: number;
success?: boolean;
}>('/api/zygh/training/examination/getCertificateList', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 新建/修改考试 POST /dsideal_yy/ypt/careerTraining/course/save */
export async function saveExamination(data: Record<string, any>, options?: Record<string, any>) {
return request<TableListItem>('/dsideal_yy/ypt/careerTraining/course/save', {
data,
method: 'POST',
...(options || {}),
});
}
/** 删除考试 POST /dsideal_yy/ypt/careerTraining/course/delete */
export async function removeExamination(data: { key: number[] }, options?: Record<string, any>) {
return request<Record<string, any>>('/dsideal_yy/ypt/careerTraining/course/delete', {
data,
method: 'POST',
...(options || {}),
});
}
/** saveRegistration */
export async function saveRegistration(data: { key: number[] }, options?: Record<string, any>) {
return request<Record<string, any>>('/dsideal_yy/ypt/careerTraining/course/delete', {
data,
method: 'POST',
...(options || {}),
});
}
/** removeRegistration */
export async function removeRegistration(data: { key: number[] }, options?: Record<string, any>) {
return request<Record<string, any>>('/dsideal_yy/ypt/careerTraining/course/delete', {
data,
method: 'POST',
...(options || {}),
});
}
/** 查看考试仅仅获取考试详情不标记浏览量GET /dsideal_yy/ypt/careerTraining/course/view */
export async function queryExaminationView(data: Record<string, any>, options?: Record<string, any>) {
return request<TableListItem>('/dsideal_yy/ypt/careerTraining/course/view', {
data,
method: 'POST',
...(options || {}),
});
}
/** 获取报名列表 GET Mock /api/queryRegistrationList */
export async function queryRegistrationList(
params: {
// query
/** 当前的页码 */
current?: number;
/** 页面的容量 */
pageSize?: number;
},
options?: Record<string, any>,
) {
return request<{
data: TableListItem[];
/** 列表的内容总数 */
total?: number;
success?: boolean;
}>('/api/getRegistrationList', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}