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.

133 lines
3.0 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 queryRulesList(
params: {
// query
/** 当前的页码 */
current?: number;
/** 页面的容量 */
pageSize?: number;
},
options?: Record<string, any>,
) {
return request<{
data: TableListItem[];
/** 列表的内容总数 */
total_row?: number;
/** 页面的容量 */
page_size?: number;
success?: boolean;
}>('/dsideal_yy/zygh/training/rules/getRulesList', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 新建/修改考试 POST /dsideal_yy/zygh/training/rules/updateRules */
export async function saveRules(data: Record<string, any>, options?: Record<string, any>) {
return request<TableListItem>('/dsideal_yy/zygh/training/rules/updateRules', {
data,
method: 'POST',
requestType: "form",
...(options || {}),
});
}
/** 获取考试规则详情 GET /dsideal_yy/zygh/training/examination/getExaminationList */
export async function queryRulesView(
params: {
// query
/** 当前的页码 */
id?: number;
},
options?: Record<string, any>,
) {
return request('/dsideal_yy/zygh/training/rules/getRulesById', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/**
* 获取主题列表
* http://10.10.14.252:8080/workspace/myWorkspace.do?projectId=382#6426
* @param params
* @returns
*/
export async function querySubjectList(params: {
page_size: number;
//count: number;
}): Promise<{ data: { list: CardListItemDataType[] } }> {
return request('/dsideal_yy/ypt/careerTraining/subject/listSubject', {
params,
});
}
/** 删除考试 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 || {}),
});
}
/** 查看考试仅仅获取考试详情不标记浏览量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 || {}),
});
}