diff --git a/src/api/contest.js b/src/api/contest.js
index 910e8399a..f78d09814 100644
--- a/src/api/contest.js
+++ b/src/api/contest.js
@@ -2,14 +2,14 @@ import request from '@/utils/request';
/**
* 获取竞赛试卷分页列表
- * @param {Object} data
- * @param {String} data.name 试卷名称
+ * @param {Object} params
+ * @param {String} params.name 试卷名称
*/
-export function getPaperList(data) {
+export function getPaperList(params) {
return request({
- url: '/api/exercise/race/pager/page',
+ url: '/api/exercise/race/paper/page',
method: 'GET',
- data
+ params
});
}
@@ -19,6 +19,7 @@ export function getPaperList(data) {
* @param {String} data.name 试卷名称
* @param {String} data.desc 基础描述
* @param {Number} data.seasonId 所属赛季id
+ * @param {Boolean} data.supportCopy 是否支持拷贝
*/
export function createPaper(data) {
return request({
@@ -50,81 +51,42 @@ export function deletePaper(id) {
});
}
-/**
- * 获取竞赛模块分页列表
+/** 模块修改任务设置
* @param {Object} data
- * @param {String} data.paperName 试卷名称
- * @param {Number} data.paperId 试卷id
- * @param {String} data.code 模块名称
+ * @param {Array} data.modules 所有模块
+ * @param {Number} data.modules[i].module_name 模块名字
+ * @param {Number} data.modules[i].duration 考试总时间
+ * @param {Number} data.modules[i].group 任务分组
+ * @param {Number} data.modules[i].group.taskIds 此分组中的任务id
+ * @param {Number} data.modules[i].group.name 此组的名字
+ * @param {Number} data.modules[i].group.group 此分组的子分组
*/
-export function getModuleList(data) {
+export function paperModuleTaskSetting(paperId, data) {
return request({
- url: '/api/exercise/race/module/page',
- method: 'GET',
- data
- });
-}
-
-/**
- * 创建模块
- * @param {Object} data
- * @param {String} data.code 模块名称
- * @param {String} data.desc 基础描述
- * @param {Number} data.paperId 试卷id
- */
-export function createModule(data) {
- return request({
- url: '/api/exercise/race/module',
+ url: `/api/exercise/race/paper/${paperId}/config`,
method: 'POST',
data
});
}
-/** 修改模块
- * @param {Object} data 同创建试卷
+/** 查看试卷明细
* @param {Number} id 模块id
*/
-export function editModule(id, data) {
+export function getPaperDetail(id) {
return request({
- url: `/api/exercise/race/module/${id}`,
- method: 'POST',
- data
- });
-}
-
-/** 删除指定模块
- * @param {Number} id 模块id
- */
-export function deleteModule(id) {
- return request({
- url: `/api/exercise/race/module/${id}`,
- method: 'DELETE'
- });
-}
-
-/** 查看模块明细
- * @param {Number} id 模块id
- */
-export function getModuleDetail(id) {
- return request({
- url: `/api/exercise/race/module/${id}`,
+ url: `/api/exercise/race/paper/${id}`,
method: 'GET'
});
}
-/** 模块修改任务设置
- * @param {Object} data
- * @param {Number} data.taskIds 模块里所有任务id(一级任务的id)
- * @param {Number} data.group 任务分组
- * @param {Number} data.group.taskIds 次分组中的任务id
- * @param {Number} data.group.name 分组的名字
- * @param {Number} data.group.group 次分组的子分组
+/** 试卷拷贝
+ * @param {Number} id 模块id
*/
-export function moduleTaskSetting(moudleId, data) {
+export function copyPaper(id) {
+ console.log(id);
return request({
- url: `/api/exercise/race/module/setting/${moudleId}/task`,
- method: 'POST',
- data
+ url: `/api/exercise/race/paper/${id}/copy`,
+ method: 'PUT'
});
}
diff --git a/src/i18n/langs/en/newRouter.js b/src/i18n/langs/en/newRouter.js
index 45ee4a18c..98c457412 100644
--- a/src/i18n/langs/en/newRouter.js
+++ b/src/i18n/langs/en/newRouter.js
@@ -40,7 +40,6 @@ export default {
userRulesManage: 'User Rights Statistics',
contestDataManage:'Contest data management',
contestSubjectManage:'contest subject management',
- contestModuleManage:'contest module management',
contestTaskManage:'contest task management',
contestSceneManage:'contest scene management',
contestTaskScoreManage:'contest task score management',
diff --git a/src/i18n/langs/zh/newRouter.js b/src/i18n/langs/zh/newRouter.js
index 41580e8ac..392714626 100644
--- a/src/i18n/langs/zh/newRouter.js
+++ b/src/i18n/langs/zh/newRouter.js
@@ -40,7 +40,6 @@ export default {
userRulesManage: '用户权限管理',
contestDataManage:'竞赛数据管理',
contestSubjectManage:'竞赛题目管理',
- contestModuleManage:'竞赛模块管理',
contestTaskManage:'竞赛任务管理',
contestSceneManage:'竞赛场景管理',
contestTaskScoreManage:'竞赛任务评分管理',
diff --git a/src/router/index.js b/src/router/index.js
index e1ea739b9..ae89ca33e 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -223,7 +223,6 @@ const ThirdJumpSim = () => import('@/views/newMap/display/thirdJump');
const TmsPage = () => import('@/views/jlmap3d/drive/sceneview/tmsPage');
const ContestSubjectManage = () => import('@/views/contestDataManage/contestSubjectManage/ContestSubjectManage');
-const ContestModuleManage = () => import('@/views/contestDataManage/contestModuleManage/ContestModuleManage');
const ContestTaskManage = () => import('@/views/contestDataManage/contestTaskManage/ContestTaskManage');
const ContestSceneManage = () => import('@/views/contestDataManage/contestSceneManage/ContestSceneManage');
const ContestTaskScoreManage = () => import('@/views/contestDataManage/contestTaskScoreManage/ContestTaskScoreManage');
@@ -2040,14 +2039,6 @@ export const asyncRouter = [
i18n: 'newRouter.contestSubjectManage'
}
},
- {
- // 竞赛模块管理
- path: 'contestModuleManage',
- component: ContestModuleManage,
- meta: {
- i18n: 'newRouter.contestModuleManage'
- }
- },
{
// 竞赛任务管理
path: 'contestTaskManage',
diff --git a/src/views/contestDataManage/contestModuleManage/AddEditModule.vue b/src/views/contestDataManage/contestModuleManage/AddEditModule.vue
deleted file mode 100644
index 8c5f02472..000000000
--- a/src/views/contestDataManage/contestModuleManage/AddEditModule.vue
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue b/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue
deleted file mode 100644
index 18ce2e1f2..000000000
--- a/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/contestDataManage/contestModuleManage/DetailModule.vue b/src/views/contestDataManage/contestModuleManage/DetailModule.vue
deleted file mode 100644
index 909a4849a..000000000
--- a/src/views/contestDataManage/contestModuleManage/DetailModule.vue
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/contestDataManage/contestSubjectManage/AddEditPaper.vue b/src/views/contestDataManage/contestSubjectManage/AddEditPaper.vue
index 8e5c0a90f..4b4fb83ae 100644
--- a/src/views/contestDataManage/contestSubjectManage/AddEditPaper.vue
+++ b/src/views/contestDataManage/contestSubjectManage/AddEditPaper.vue
@@ -17,6 +17,9 @@
/>
+
+
+