模块绑定评分表
This commit is contained in:
parent
dd4a338a4c
commit
103a63494e
@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<div style="height: 50px;text-align: center;line-height: 50px;font-size: 26px;font-weight: bolder;">{{ paperName }}</div>
|
||||
<el-tabs v-model="activeModuleName" class="tabs-box" type="border-card">
|
||||
<el-tabs v-model="activeModuleName" class="tabs-box" type="border-card" @tab-click="handleTabClick">
|
||||
<template v-for="(mod, modIndex) in moduleList">
|
||||
<el-tab-pane :key="modIndex" :label="mod.moduleName" :name="mod.customModuleId+''">
|
||||
<el-card>
|
||||
@ -46,6 +46,7 @@ export default {
|
||||
paperId:'',
|
||||
activeModuleName:'',
|
||||
moduleList:[],
|
||||
moduleTreeDatas:[],
|
||||
taskTreeDatas:[]
|
||||
};
|
||||
},
|
||||
@ -65,10 +66,9 @@ export default {
|
||||
this.paperName = paper.name;
|
||||
this.paperId = paper.id;
|
||||
getPaperDetail(paper.id).then((res) => {
|
||||
console.log(res);
|
||||
this.moduleList = res.data.moduleVo.modules;
|
||||
this.activeModuleName = this.moduleList[0].customModuleId + '';
|
||||
const data = this.moduleList.map(moduleItem=>{
|
||||
this.moduleTreeDatas = this.moduleList.map(moduleItem=>{
|
||||
let children = [];
|
||||
if (moduleItem.group.length) {
|
||||
children = moduleItem.group.map(taskCatalog=> this.transformTree(taskCatalog));
|
||||
@ -78,15 +78,19 @@ export default {
|
||||
label:moduleItem.moduleName,
|
||||
duration:moduleItem.duration,
|
||||
moduleScoreRuleId:moduleItem.moduleScoreRuleId,
|
||||
customModuleId:moduleItem.customModuleId,
|
||||
type:'module',
|
||||
children
|
||||
};
|
||||
});
|
||||
this.taskTreeDatas = data[0].children;
|
||||
this.taskTreeDatas = this.moduleTreeDatas[0].children;
|
||||
}).catch(error => {
|
||||
this.$message.error(error.message);
|
||||
});
|
||||
},
|
||||
handleTabClick(tab) {
|
||||
this.taskTreeDatas = this.moduleTreeDatas.find((item)=>item.customModuleId == tab.name).children;
|
||||
},
|
||||
beginExercise(moduleId) {
|
||||
this.$router.push({path: '/contest/detail', query:{paperId:this.paperId, moduleId }});
|
||||
},
|
||||
|
@ -218,6 +218,7 @@ export default {
|
||||
const targetData = this.findLabel(this.taskTreeDatas, data.id);
|
||||
targetData.label = data.label;
|
||||
targetData.duration = data.duration;
|
||||
targetData.moduleScoreRuleId = data.moduleScoreRuleId;
|
||||
}
|
||||
|
||||
} else if (type == 'taskCatalog') {
|
||||
|
Loading…
Reference in New Issue
Block a user