大赛训练产品调整

This commit is contained in:
fan 2024-02-28 15:33:41 +08:00
parent fc554ce855
commit 9e1d58f972
2 changed files with 222 additions and 3 deletions

View File

@ -318,3 +318,14 @@ export function publishContextSence(data) {
data data
}); });
} }
/**
* @param {String} paperId 试卷id
* @param {String} moduleId 模块id
*/
export function getTaskTree(paperId, moduleId) {
return request({
url: `/api/exercise/race/paper/page/${paperId}/module/${moduleId}/task`,
method: 'get'
});
}

View File

@ -1,13 +1,221 @@
<template> <template>
<div>任务详情</div> <el-row class="container">
<el-col :span="5" class="container-left">
<el-tree
:data="taskData"
node-key="name"
current-node-key
:props="defaultProps"
default-expand-all
:highlight-current="false"
style="background-color: transparent;max-height: calc(100% - 54px);overflow-y: scroll;"
:expand-on-click-node="false"
>
<div slot-scope="{ node, data }" class="custom-tree-node">
<div :style="{ color: nowData.name === data.name? '#8f079d': '#fff' }">{{ data.groupName||data.name }}</div>
</div>
</el-tree>
<div class="button-group">
<el-button-group>
<el-button size="small" type="primary">提交</el-button>
<el-button size="small" type="danger">返回</el-button>
</el-button-group>
</div>
</el-col>
<el-col :span="19" class="container-right">
<el-card class="box-card" style="color: #fff;background-color: transparent;height: 100%">
<div slot="header" style="text-align: center">
<span style="font-size: 28px;">{{ nowData.name }}</span>
</div>
<div style="padding: 20px;">
<el-row style="margin-top: 10px;white-space: pre-wrap;">
<el-col :span="3" style="text-align: right;">基础描述</el-col>
<el-col :span="20">{{ nowData.desc }}</el-col>
</el-row>
<el-row style="margin-top: 10px;white-space: pre-wrap;">
<el-col :span="3" style="text-align: right;">考核内容</el-col>
<el-col :span="20">{{ nowData.content }}</el-col>
</el-row>
<el-row style="margin-top: 10px;white-space: pre-wrap;">
<el-col :span="3" style="text-align: right;">评价标准</el-col>
<el-col :span="20">{{ nowData.standards }}</el-col>
</el-row>
</div>
<div style="text-align: center;margin-top: 15px;">
<el-button v-show="nowData.ruleId" type="primary">评分表</el-button>
<el-button v-show="nowData.sceneId" type="primary">开始任务</el-button>
<el-button type="primary" :disabled="nowKey === taskList.length-1" @click="nextTask">下一任务</el-button>
</div>
</el-card>
</el-col>
</el-row>
</template> </template>
<script> <script>
import { getTaskTree } from '@/api/contest';
export default { export default {
name: "contestDetail" name: 'ContestDetail',
} data() {
return {
nowKey: 0,
taskList: [],
taskData: [],
nowData: {},
defaultProps: {
children: 'children',
label: 'name',
disabled: true
},
resp: {
customModuleId: 2,
child: [
{
id: 0,
name: '车站行车作业',
desc: '',
content: '',
standards: '',
sceneId: 0,
ruleId: 0,
parentId: 0,
children: [
{
id: 45,
name: '正常行车组织工作',
desc: '利用智慧城轨运营模拟训练平台ATS系统加载既定的列车运行图选取某时刻900开始模拟列车运行。',
content: '1组织管辖车站范围内图定列车按计划运行\n2控制权交接',
standards: '。。',
sceneId: 0,
ruleId: 0,
parentId: 0,
children: [
{
id: 46,
name: '组织管辖车站范围内图定列车按计划运行',
desc: '核对运行计划。',
content: '行调与车站值班员确认本站站台及相邻区间列车状态。',
standards: '车站值班员手指口呼确认本站站台及相邻区间列车占用状态并与行调核对车次及位置正确、用语标准。',
sceneId: 0,
ruleId: 0,
parentId: 45,
isTask: true
},
{
id: 47,
name: '控制权交接',
desc: '控制权交接操作。',
content: '行调与车站值班员确认ATS站中控状态并进行控制权转换操作。',
standards: '车站值班员手指口呼确认本站ATS站中控状态并进行控制权转换操作正常完成控制权转换。按标准用语汇报。',
sceneId: 0,
ruleId: 0,
parentId: 45,
isTask: true
}
],
isTask: true
},
{
id: 35,
name: '运营工作准备',
desc: '利用智慧城轨运营模拟训练平台ATS系统加载既定的列车运行图选取运营开始前30分钟开始运营前检查工作。',
content: '1人员准备\n2检查ATS设备\n3检查IBP\n4站台门检查',
standards: '。。',
sceneId: 0,
ruleId: 0,
parentId: 0,
children: [
{
id: 41,
name: '人员准备',
desc: '检查人员工作状态',
content: '检查运营前人员形象礼仪及精神状态。',
standards: '运营前人员形象礼仪及精神状态符合企业服务标准要求。',
sceneId: 0,
ruleId: 0,
parentId: 35,
isTask: true
},
{
id: 42,
name: '检查本地ATS设备',
desc: '检查车站ATS状态。',
content: '检查车站ATS工作站中的所有道岔、信号机、计轴区段状态。',
standards: '手指口呼确认道岔、信号机、计轴状态等设备状态是否全部正常。',
sceneId: 0,
ruleId: 0,
parentId: 35,
isTask: true
}
],
isTask: true
}
],
isTask: false
}
]
}
};
},
mounted() {
// this.taskData = JSON.parse(this.resp);
this.taskData = this.resp.child;
this.taskList = [];
this.eachTask(this.taskList, this.taskData);
this.nowKey = 0;
this.nowData = this.taskList[this.nowKey];
},
methods: {
handleChange(data, node) {
node.isCurrent = false;
this.$set(node, 'isCurrent', false);
this.nowData = data;
},
eachTask(list, data) {
data.forEach(ele => {
if (ele.isTask) {
list.push(ele);
}
if (ele.children) {
this.eachTask(list, ele.children);
}
});
},
nextTask() {
this.nowKey++;
this.nowData = this.taskList[this.nowKey];
}
}
};
</script> </script>
<style scoped> <style scoped>
.container {
background: linear-gradient(to bottom, #01468B, #00172E);
height: 100%;
}
.container-left{
height: 100%;
padding-top: 10px;
}
.container-right{
background: #00172E;
border: solid 1px #01468B;
height: 100%;
padding: 10px;
}
.custom-tree-node{
color: #fff;
}
.button-group {
width: 20.9%;
text-align: right;
padding: 10px;
border-top: 2px solid #01468B;
position: absolute;
bottom: 0;
}
/deep/.el-tree-node__content{
background-color: transparent !important;
}
</style> </style>