Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
3e5996aee4
@ -13,7 +13,7 @@
|
||||
<span slot-scope="{ node, data }" class="custom-tree-node">
|
||||
<span>{{ node.label }}</span>
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<div style="width:80px;">得分:{{ data.score }}</div>
|
||||
<div v-if="data.sceneid" style="width:80px;">得分:{{ data.score }}</div>
|
||||
</div>
|
||||
</span>
|
||||
</el-tree>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<el-card :key="modIndex" class="tabs-module-card">
|
||||
<div style="margin-bottom:10px;font-size: 20px;height: 30px;text-align: center;line-height: 30px;">{{ mod.moduleName }}</div>
|
||||
<div style="margin-bottom:10px">考试时间:{{ mod.duration }}分钟</div>
|
||||
<div style="margin-bottom:50px"> 任务目录:
|
||||
<div class="tabs-module-card-tree"> 任务目录:
|
||||
<el-tree
|
||||
:data="moduleTreeDatas[modIndex].children"
|
||||
current-node-key
|
||||
@ -45,7 +45,7 @@
|
||||
import paperList from './paperList';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
import ScoreRule from './scoreRule';
|
||||
import { getPaperDetail, getContextScoreDetail, beginContestExercise} from '@/api/contest';
|
||||
import { getTaskTreeDatas, getPaperDetail, beginContestExercise} from '@/api/contest';
|
||||
let id = 1;
|
||||
|
||||
export default {
|
||||
@ -66,7 +66,8 @@ export default {
|
||||
taskTreeDatas:[],
|
||||
defaultProps: {
|
||||
disabled: true
|
||||
}
|
||||
},
|
||||
allTaskDatas:{}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -74,6 +75,17 @@ export default {
|
||||
return this.$store.state.app.width;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
getTaskTreeDatas().then((res) => {
|
||||
this.allTaskDatas = res.data.reduce((acc, obj) => {
|
||||
acc[obj.name] = obj.id;
|
||||
return acc;
|
||||
}, {});
|
||||
}).catch(error => {
|
||||
this.$message.error(error.message);
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
@ -115,6 +127,16 @@ export default {
|
||||
},
|
||||
transformTree(data) {
|
||||
const result = {label:data.name, children:[], id:id++, type:'taskCatalog' };
|
||||
data.taskIds.forEach(taskId => {
|
||||
let label = '';
|
||||
for (const key in this.allTaskDatas) {
|
||||
if (this.allTaskDatas[key] === taskId) {
|
||||
label = key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
result.children.push({label, id:id++, type:'tasks', parentId:result.id });
|
||||
});
|
||||
if (data.group.length) {
|
||||
const changeGroup = data.group.map(taskCatalog=>
|
||||
this.transformTree(taskCatalog)
|
||||
@ -169,6 +191,20 @@ export default {
|
||||
padding:10px;
|
||||
background: transparent;
|
||||
color: #fff;
|
||||
.tabs-module-card-tree{
|
||||
max-height:calc(100vh - 370px);
|
||||
overflow: auto;
|
||||
margin-bottom:50px;
|
||||
&::-webkit-scrollbar{
|
||||
background: #06284a;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb{
|
||||
background: #0c0909;
|
||||
}
|
||||
&::-webkit-scrollbar-track{
|
||||
background: #06284a;
|
||||
}
|
||||
}
|
||||
.tabs-module-card-button{
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
|
@ -15,7 +15,11 @@
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="描述" prop="name" />
|
||||
<el-table-column label="评分标准" prop="criteria" />
|
||||
<el-table-column label="分值" prop="score" width="50" />
|
||||
<el-table-column label="分值" prop="score" width="50">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.score === 0? '': scope.row.score }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -128,7 +128,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
if (this.isRace) {
|
||||
if (this.isRace && !this.$store.state.trainingNew.trainingDetail) {
|
||||
this.loadRaceScene(this.$route.query.sceneId);
|
||||
}
|
||||
},
|
||||
@ -147,6 +147,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('trainingNew/setTrainingDetail', null);
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('setTrainingList', (trainingList) => {
|
||||
this.trainingList = trainingList;
|
||||
|
Loading…
Reference in New Issue
Block a user