mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
2022年5月29日从svn移到git
This commit is contained in:
85
src/api/modules/paper.js
Normal file
85
src/api/modules/paper.js
Normal file
@@ -0,0 +1,85 @@
|
||||
// 试卷
|
||||
import ajax from '@/utils/xajax.js'
|
||||
// 分页查询,资源归属,试题模式,关键词查询
|
||||
// pageIndex 第几页
|
||||
// pageSize 一页展示多少行
|
||||
//参数:// ownership2(2级资源归属)
|
||||
// ownership1(1级资源归属)
|
||||
// ownership3(3级资源归属)),paperMode(试卷模式),keyWord(关键词)
|
||||
const querylist = function(query) {
|
||||
return ajax.post('/xboe/m/exam/paper/querylist', query);
|
||||
}
|
||||
// 添加
|
||||
// ownership2(2级资源归属)
|
||||
// ownership1(1级资源归属)
|
||||
// ownership3(3级资源归属),testName(试卷名称),paperType(试卷分类)
|
||||
// paperContent(试卷内容) remark 备注 difficulty难度
|
||||
const save = function(data) {
|
||||
return ajax.postJson('/xboe/m/exam/paper/save', data);
|
||||
}
|
||||
// 删除
|
||||
// id 试卷id
|
||||
const del = function(id) {
|
||||
return ajax.get('/xboe/m/exam/paper/delete?id=' + id);
|
||||
}
|
||||
// 编辑
|
||||
//当前id,// ownership2(2级资源归属)
|
||||
// ownership1(1级资源归属)
|
||||
// ownership3(3级资源归属),testName(试卷名称),paperType(试卷分类)
|
||||
// paperContent(试卷内容) remark 备注 difficulty难度
|
||||
const update = function(data) {
|
||||
return ajax.postJson('/xboe/m/exam/paper/update', data);
|
||||
}
|
||||
/* 编辑详情 */
|
||||
const detail = function(id) {
|
||||
return ajax.get('/xboe/m/exam/paper/query?id=' + id);
|
||||
}
|
||||
|
||||
/* 试卷批量导入计算
|
||||
* num 数目
|
||||
* score 总分
|
||||
* diff1 容易的试题数量
|
||||
* diff2 中等的试题数量
|
||||
* diff3 困难的试题数量
|
||||
* type1 单选的试题数量
|
||||
* type2 单选的试题数量
|
||||
* type3 单选的试题数量
|
||||
*/
|
||||
const batchImportCount = function(data) {
|
||||
return ajax.postJson('/xboe/m/exam/paper/batch-count', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据生成的试题的id查询所有的试题
|
||||
* @param {试题的集合array} ids
|
||||
*/
|
||||
const batchImportData = function(ids) {
|
||||
return ajax.postJson('/xboe/m/exam/paper/batch-count', ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询试卷
|
||||
* @param {pageSize,name} data
|
||||
*/
|
||||
const querypaper = function(data) {
|
||||
return ajax.post('/xboe/m/exam/paper/queryPaper',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回试卷的json内容,字符串
|
||||
* @param {Object} id
|
||||
*/
|
||||
const getPaperContent = function(id) {
|
||||
return ajax.get('/xboe/m/exam/paper/paper-content?id=' + id);
|
||||
}
|
||||
export default {
|
||||
detail,
|
||||
update,
|
||||
del,
|
||||
save,
|
||||
querylist,
|
||||
querypaper,
|
||||
getPaperContent,
|
||||
batchImportCount,
|
||||
batchImportData
|
||||
}
|
||||
Reference in New Issue
Block a user