diff --git a/src/api/contest.js b/src/api/contest.js
index 482df6a2e..8cf7fa16e 100644
--- a/src/api/contest.js
+++ b/src/api/contest.js
@@ -51,6 +51,19 @@ export function deletePaper(id) {
});
}
+/**
+ * 获取竞赛试卷菜单
+ * @param {Object} params
+ * @param {String} params.group 分组ZZ=中职;GZ=高职
+ */
+export function getPaperMenu(params) {
+ return request({
+ url: '/api/exercise/race/paper/menu',
+ method: 'GET',
+ params
+ });
+}
+
/** 模块修改任务设置
* @param {Object} data
* @param {Array} data.modules 所有模块
diff --git a/src/views/contest/contestList.vue b/src/views/contest/contestList.vue
index 6e466634b..c35f5a690 100644
--- a/src/views/contest/contestList.vue
+++ b/src/views/contest/contestList.vue
@@ -8,7 +8,8 @@
{{ paperName }}
-
+
+
{{ mod.moduleName }}
@@ -58,7 +59,7 @@ export default {
data() {
return {
widthLeft: 380,
- paperName:'试卷',
+ paperName:'赛季',
paperId:'',
activeModuleName:'detail',
moduleList:[],
@@ -67,7 +68,9 @@ export default {
defaultProps: {
disabled: true
},
- allTaskDatas:{}
+ allTaskDatas:{},
+ showSeasonInfo:false,
+ detailHtmlContent:'赛季信息'
};
},
computed: {
@@ -90,30 +93,38 @@ export default {
drapWidth(width) {
this.widthLeft = Number(width);
},
- changeModuleData(paper) {
- this.paperName = paper.name;
- this.paperId = paper.id;
- getPaperDetail(paper.id).then((res) => {
- this.moduleList = res.data.moduleVo.modules;
- this.moduleTreeDatas = this.moduleList.map(moduleItem=>{
- let children = [];
- if (moduleItem.group.length) {
- children = moduleItem.group.map(taskCatalog=> this.transformTree(taskCatalog));
- }
- return {
- id:id++,
- label:moduleItem.moduleName,
- duration:moduleItem.duration,
- moduleScoreRuleId:moduleItem.moduleScoreRuleId,
- customModuleId:moduleItem.customModuleId,
- type:'module',
- children
- };
+ changeModuleData(paper, season) {
+ if (paper) {
+ this.paperName = paper.name;
+ this.paperId = paper.id;
+ this.showSeasonInfo = false;
+ getPaperDetail(paper.id).then((res) => {
+ this.moduleList = res.data.moduleVo.modules;
+ this.moduleTreeDatas = this.moduleList.map(moduleItem=>{
+ let children = [];
+ if (moduleItem.group.length) {
+ children = moduleItem.group.map(taskCatalog=> this.transformTree(taskCatalog));
+ }
+ return {
+ id:id++,
+ label:moduleItem.moduleName,
+ duration:moduleItem.duration,
+ moduleScoreRuleId:moduleItem.moduleScoreRuleId,
+ customModuleId:moduleItem.customModuleId,
+ type:'module',
+ children
+ };
+ });
+ this.taskTreeDatas = this.moduleTreeDatas[0].children;
+ }).catch(error => {
+ this.$message.error(error.message);
});
- this.taskTreeDatas = this.moduleTreeDatas[0].children;
- }).catch(error => {
- this.$message.error(error.message);
- });
+ } else {
+ this.showSeasonInfo = true;
+ this.paperName = season.seasonCode + '—' + season.seasonName;
+ this.detailHtmlContent = season.detailHtmlContent;
+ }
+
},
showScoreRule(moduleScoreRuleId) {
this.$refs.scoreRule.doShow(moduleScoreRuleId);
@@ -179,7 +190,11 @@ export default {
}
&::-webkit-scrollbar-track{
background: #06284a;
- }
+ }
+ .tabs-season{
+ padding:10px;
+ color: #fff;
+ }
.tabs-module{
display: flex;
justify-content: space-between;
diff --git a/src/views/contest/paperList.vue b/src/views/contest/paperList.vue
index 83f320370..c4b4dd09b 100644
--- a/src/views/contest/paperList.vue
+++ b/src/views/contest/paperList.vue
@@ -9,19 +9,20 @@