diff --git a/src/api/management/exam.js b/src/api/management/exam.js index 8d16594e2..a0a6b7e99 100644 --- a/src/api/management/exam.js +++ b/src/api/management/exam.js @@ -148,10 +148,18 @@ export function getPapaerListOfOrg({ orgId, ...data }) { * @param {Number} data.validDuration 考试时长 * @param {String} data.passScore 及格分 * @param {String} data.fullScore 满分 + * @param {Object} data.ruleList 规则列表 + * @param {Object} data.ruleList.id 规则id + * @param {Object} data.ruleList.pcId 试卷蓝图ID + * @param {Object} data.ruleList.type 试题类型 + * @param {Object} data.ruleList.subtype 规则类型 + * @param {Object} data.ruleList.tags 标签 + * @param {Object} data.ruleList.amount 数量 + * @param {Object} data.ruleList.score 每题分值 */ export function createPaper(data) { return request({ - url: `/api/v2/paper/composition/`, + url: `/api/v2/paper/composition/${data.orgId}`, method: 'POST', data, }) @@ -167,10 +175,18 @@ export function createPaper(data) { * @param {Number} data.validDuration 考试时长 * @param {String} data.passScore 及格分 * @param {String} data.fullScore 满分 + * @param {Object} data.ruleList 规则列表 + * @param {Object} data.ruleList.id 规则id + * @param {Object} data.ruleList.pcId 试卷蓝图ID + * @param {Object} data.ruleList.type 试题类型 + * @param {Object} data.ruleList.subtype 规则类型 + * @param {Object} data.ruleList.tags 标签 + * @param {Object} data.ruleList.amount 数量 + * @param {Object} data.ruleList.score 每题分值 */ -export function editPaperBasic(data) { +export function editPaper(data) { return request({ - url: `/api/v2/paper/composition/basic`, + url: `/api/v2/paper/composition`, method: 'PUT', data, }) @@ -186,48 +202,15 @@ export function getPaperDetail(pcId) { }) } -/** 查询题库中各类型题的数量 - * @param {Number} params.orgId - * @param {Number} params.subtype - * @param {Array} params.tags +/** 查询组织下各类型题的数量 + * @param {Number} data.orgId + * @param {Number} data.subtype + * @param {Array} data.tags */ -export function getQuestionAmount(params) { +export function getQuestionAmount(data) { return request({ - url: ``, - method: 'GET', - params, - }) -} - -/** - * 试卷蓝图添加规则 - * @param {Number} pcId 试卷蓝图ID - * @param {Number} type 试题类型:(1-理论题,2-实训题) - * @param {Number} subtype 规则类型 (理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训)) - * @param {Number} score 每题分值 - * @param {Number} amount 题目数量 - */ -export function addPaperRule(data) { - return request({ - url: `/api/v2/paper/composition/rule`, + url: `/api/v2/paper/${data.orgId}/question/count`, method: 'POST', data, }) } - -/** - * 更新(保存)试卷蓝图的规则 - * @param {Number} id 规则ID - * @param {Number} pcId 试卷蓝图ID - * @param {Number} type 试题类型:(1-理论题,2-实训题) - * @param {Number} subtype 规则类型 (理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训)) - * @param {Number} score 每题分值 - * @param {Number} amount 题目数量 - */ -export function editPaperRule(data) { - return request({ - url: `/api/v2/paper/composition/rule`, - method: 'PUT', - data, - }) -} diff --git a/src/views/publish/examRule/draft/editRule.vue b/src/views/publish/examRule/draft/editRule.vue index 76d0f05e0..1afb0aca4 100644 --- a/src/views/publish/examRule/draft/editRule.vue +++ b/src/views/publish/examRule/draft/editRule.vue @@ -8,7 +8,12 @@ > - + - + - + + + - {{ $t('publish.allNumberTipOne') }} {{ topicNum }} {{ $t('publish.allNumberTipTwo') }} @@ -53,6 +64,7 @@