【新增】试卷任务训练、考试、高考模拟前端
This commit is contained in:
@@ -1,92 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/**
|
||||
* 分页查询试卷人员分配
|
||||
*/
|
||||
export async function pagePersons(params) {
|
||||
const res = await request.get('/exam/person/list', { params });
|
||||
if (res.data.code === 200) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部试卷人员分配
|
||||
*/
|
||||
export async function listPersons(params) {
|
||||
const res = await request.get('/exam/person/list', { params });
|
||||
if (res.data.code === 200) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询试卷人员分配
|
||||
*/
|
||||
export async function getPerson(id) {
|
||||
const res = await request.get('/exam/person/' + id);
|
||||
if (res.data.code === 200) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加试卷人员分配
|
||||
*/
|
||||
export async function addPerson(data) {
|
||||
const res = await request.post('/exam/person', data);
|
||||
if (res.data.code === 200) {
|
||||
return res.data.msg;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷人员分配
|
||||
*/
|
||||
export async function updatePerson(data) {
|
||||
const res = await request.put('/exam/person', data);
|
||||
if (res.data.code === 200) {
|
||||
return res.data.msg;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷人员分配
|
||||
*/
|
||||
export async function removePerson(id) {
|
||||
const res = await request.delete('/exam/person/' + id);
|
||||
if (res.data.code === 200) {
|
||||
return res.data.msg;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除试卷人员分配
|
||||
*/
|
||||
export async function removePersons(ids) {
|
||||
const res = await request.delete('/exam/person/' + ids.join());
|
||||
if (res.data.code === 200) {
|
||||
return res.data.msg;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出试卷人员分配
|
||||
*/
|
||||
export async function exportPersons(params) {
|
||||
// const res = await request({
|
||||
// url: '/exam/person/export',
|
||||
// method: 'POST',
|
||||
// data: toFormData(params),
|
||||
// responseType: 'blob'
|
||||
// });
|
||||
// await checkDownloadRes(res);
|
||||
// download(res.data, `person_${Date.now()}.xlsx`);
|
||||
}
|
70
src/api/system/person/index.ts
Normal file
70
src/api/system/person/index.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/**
|
||||
* 分页查询试卷人员分配
|
||||
*/
|
||||
|
||||
export const pagePersons = (params) => {
|
||||
return request.get({ url: '/exam/person/getList', params })
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询试卷人员分配
|
||||
*/
|
||||
export async function getPerson(id) {
|
||||
return await request.get({ url: '/exam/person' + id })
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加试卷人员分配
|
||||
*/
|
||||
export async function addPerson(data) {
|
||||
return await request.post({ url: '/exam/person' , data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷人员分配
|
||||
*/
|
||||
export async function updatePerson(data) {
|
||||
return await request.put({ url: '/exam/person' , data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷人员分配
|
||||
*/
|
||||
export async function removePerson(id) {
|
||||
return await request.delete({ url: '/exam/person/' + id })
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 导出试卷人员分配
|
||||
*/
|
||||
export async function exportPersons(params) {
|
||||
// const res = await request({
|
||||
// url: '/exam/person/export',
|
||||
// method: 'POST',
|
||||
// data: toFormData(params),
|
||||
// responseType: 'blob'
|
||||
// });
|
||||
// await checkDownloadRes(res);
|
||||
// download(res.data, `person_${Date.now()}.xlsx`);
|
||||
}
|
||||
export const getSessionStuBySearch = (params) => {
|
||||
return request.get({ url: '/exam/person/getSessionStuBySearch', params })
|
||||
}
|
||||
|
||||
export async function setSessionStu(data) {
|
||||
return await request.post({ url: '/exam/person/setSessionStu' , data })
|
||||
}
|
||||
export async function removeSessionStu(data) {
|
||||
return await request.delete({ url: '/exam/person/removeSessionStu' ,data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除试卷人员分配
|
||||
*/
|
||||
export async function removePersons(data) {
|
||||
return await request.delete({ url: '/exam/person/removeTaskStu' ,data })
|
||||
}
|
@@ -85,5 +85,16 @@ export async function updateSessionStatus(sessionId: string, status: number) {
|
||||
})
|
||||
}
|
||||
|
||||
export async function getSessionStu(params) {
|
||||
|
||||
|
||||
return await request.get({ url: '/exam/person/getSessionStu' , params })
|
||||
|
||||
}
|
||||
|
||||
export async function fetch(taskId) {
|
||||
return await request.get({ url: '/exam/param/check-can-enter-step4/' + taskId })
|
||||
}
|
||||
|
||||
export async function fetchNoMes(taskId) {
|
||||
return await request.get({ url: '/exam/param/check-can-enter-step4NoMsg/' + taskId })
|
||||
}
|
@@ -85,19 +85,12 @@ export async function updateTaskStatus(taskId: string, status: number) {
|
||||
// download(res.data, `task_${Date.now()}.xlsx`);
|
||||
}
|
||||
export async function getSpecialtyList() {
|
||||
|
||||
|
||||
return await request.get({ url: '/exam/task/getSpeciality' })
|
||||
|
||||
}
|
||||
|
||||
|
||||
export async function submitSelection(data) {
|
||||
|
||||
|
||||
|
||||
return await request.post({ url: '/exam/task/submitSelection' , data })
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user