diff --git a/src/api/contest.js b/src/api/contest.js index 28c1cb141..910e8399a 100644 --- a/src/api/contest.js +++ b/src/api/contest.js @@ -175,6 +175,16 @@ export function deleteTask(id) { }); } +/** 查看任务详情 + * @param {Number} id 任务id + */ +export function getTaskDetail(id) { + return request({ + url: `/api/exercise/race/task/${id}`, + method: 'GET' + }); +} + /** 查看指定子任务 * @param {Number} id 任务id */ @@ -186,14 +196,15 @@ export function getchildrenTaskDatas(id) { } /** 任务绑定 - * @param {Object} data - * @param {Number} data.taskId 任务id - * @param {Number} data.bindId 绑定id,根据bindtype来区分对应的id - * @param {String} data.bindType rule =评分规则;scene=场景 + * @param {Array} data + * @param {Number} taskId 任务id + * @param {Number} data[i].bindId 绑定id,根据bindtype来区分对应的id + * @param {String} data[i].bindType rule =0评分规则;scene=1场景 + * @param {Number} data[i].status 0=绑定 ;1=解绑 */ -export function bindTask(data) { +export function bindTask(taskId, data) { return request({ - url: '/api/exercise/race/task/bind', + url: `/api/exercise/race/task/${taskId}/bind`, method: 'POST', data }); diff --git a/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue b/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue index 5dc4bd713..06bb777f8 100644 --- a/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue +++ b/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue @@ -141,7 +141,7 @@ export default { this.$refs.addEditModule.doShow(); }, handleDelete(data) { - this.$confirm('确定删除该试卷吗?', this.$t('global.tips'), { + this.$confirm('确定删除该模块吗?', this.$t('global.tips'), { confirmButtonText: this.$t('global.confirm'), cancelButtonText: this.$t('global.cancel'), type: 'warning' diff --git a/src/views/contestDataManage/contestTaskManage/AddEditTask.vue b/src/views/contestDataManage/contestTaskManage/AddEditTask.vue new file mode 100644 index 000000000..47897f6d4 --- /dev/null +++ b/src/views/contestDataManage/contestTaskManage/AddEditTask.vue @@ -0,0 +1,142 @@ + + + diff --git a/src/views/contestDataManage/contestTaskManage/BindTask.vue b/src/views/contestDataManage/contestTaskManage/BindTask.vue new file mode 100644 index 000000000..f36b8ca5d --- /dev/null +++ b/src/views/contestDataManage/contestTaskManage/BindTask.vue @@ -0,0 +1,97 @@ + + + diff --git a/src/views/contestDataManage/contestTaskManage/ContestTaskManage.vue b/src/views/contestDataManage/contestTaskManage/ContestTaskManage.vue index 0c78e8bc3..a0ebccab4 100644 --- a/src/views/contestDataManage/contestTaskManage/ContestTaskManage.vue +++ b/src/views/contestDataManage/contestTaskManage/ContestTaskManage.vue @@ -1,3 +1,181 @@ + + + +