mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 14:26:43 +08:00
56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
// 考试管理
|
||
import ajax from '@/utils/xajax.js'
|
||
// 分页查询
|
||
// 参数 pageIndex 第几页
|
||
// pageSize 每页展示条数
|
||
// keyWord 关键字
|
||
// published true或者false
|
||
// // ownership2(2级资源归属)
|
||
// ownership1(1级资源归属)
|
||
// ownership3(3级资源归属)
|
||
//
|
||
const querylist = function(query) {
|
||
return ajax.post('/xboe/m/exam/test/pageList', query);
|
||
}
|
||
// 新建考试
|
||
// 参数这块我给截图
|
||
const save = function(data) {
|
||
return ajax.postJson('/xboe/m/exam/test/save', data);
|
||
}
|
||
// 修改考试,参数和添加一样
|
||
const update = function(data) {
|
||
return ajax.postJson('/xboe/m/exam/test/update', data);
|
||
}
|
||
// 考试详情
|
||
// 参数 考试id
|
||
const detail = function(id) {
|
||
return ajax.get('/xboe/m/exam/test/detail?id=' + id);
|
||
}
|
||
// 删除
|
||
const del = function(id) {
|
||
return ajax.get('/xboe/m/exam/test/delete?id=' + id);
|
||
}
|
||
|
||
/**
|
||
* 发布考试
|
||
* @param {Object} id
|
||
* @param {Object} publish 如果不传就是true
|
||
*/
|
||
const pulish = function(id, publish) {
|
||
let flag = true;
|
||
if (!publish) {
|
||
flag = publish;
|
||
}
|
||
|
||
return ajax.post('/xboe/m/exam/test/publish?id=' + id + '&publish=' + flag);
|
||
}
|
||
|
||
export default {
|
||
detail,
|
||
update,
|
||
del,
|
||
save,
|
||
querylist,
|
||
pulish
|
||
}
|