大赛训练产品调整暂提
This commit is contained in:
parent
a69657c8e6
commit
77713154d0
@ -12,7 +12,7 @@
|
||||
:expand-on-click-node="false"
|
||||
>
|
||||
<div slot-scope="{ node, data }" class="custom-tree-node">
|
||||
<div :style="{ color: nowData.name === data.name? '#8f079d': '#fff' }">{{ data.name }}</div>
|
||||
<div :style="{ color: nowData.name === data.name && nowData.id === data.id? '#8f079d': '#fff' }">{{ data.name }}</div>
|
||||
</div>
|
||||
</el-tree>
|
||||
<div class="button-group">
|
||||
@ -42,8 +42,8 @@
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="text-align: center;margin-top: 15px;">
|
||||
<el-button v-show="!nowData.ruleId" type="primary" @click="showScoreRule">评分表</el-button>
|
||||
<el-button v-show="nowData.sceneId" type="primary" @click="startTask">开始任务</el-button>
|
||||
<el-button v-show="nowData.ruleId" type="primary" @click="showScoreRule">评分表</el-button>
|
||||
<el-button v-show="nowData.sceneId" v-loading="loading" type="primary" @click="startTask">开始任务</el-button>
|
||||
<el-button type="primary" :disabled="nowKey === taskList.length-1" @click="nextTask">下一任务</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
@ -55,6 +55,7 @@
|
||||
<script>
|
||||
import { getTaskTree, getContextSenceDetail} from '@/api/contest';
|
||||
import { createSimulationNoFunction } from '@/api/simulation';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import ScoreRule from './scoreRule';
|
||||
export default {
|
||||
name: 'ContestDetail',
|
||||
@ -63,6 +64,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
nowKey: 0,
|
||||
taskList: [],
|
||||
taskData: [],
|
||||
@ -135,12 +137,33 @@ export default {
|
||||
this.nowData = this.taskList[this.nowKey];
|
||||
},
|
||||
startTask() {
|
||||
getContextSenceDetail(this.nowData.sceneId).then(resp => {
|
||||
|
||||
}).catch(() => this.$message.error('获取任务场景详情失败!'));
|
||||
this.loading = true;
|
||||
try {
|
||||
getContextSenceDetail(this.nowData.sceneId).then(resp => {
|
||||
getPublishMapInfo(resp.data.mapid).then(resp1 => {
|
||||
createSimulationNoFunction(resp.data.mapid, this.funcitonData).then(resp2 => {
|
||||
const query = {
|
||||
lineCode: resp1.data.lineCode,
|
||||
mapId: resp.data.mapid,
|
||||
group: resp2.data,
|
||||
simType: 'METRO',
|
||||
project: 'dsxl',
|
||||
paperId: this.$route.query.paperId,
|
||||
moduleId: this.$route.query.moduleId,
|
||||
nowKey: this.nowKey
|
||||
};
|
||||
this.$router.push({ path: '/display/demon', query: query });
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
this.$message.error('创建仿真失败!');
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
showScoreRule() {
|
||||
this.$refs.scoreRule.doShow();
|
||||
this.$refs.scoreRule.doShow(this.nowData.ruleId);
|
||||
},
|
||||
goBack() {
|
||||
this.$router.push('/contest/list');
|
||||
|
@ -32,10 +32,10 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
doShow(id) {
|
||||
this.dialogVisible = true;
|
||||
this.loading = true;
|
||||
getContextScoreDetail(this.$route.query.id).then(resp => {
|
||||
getContextScoreDetail(id).then(resp => {
|
||||
this.tableData = resp.data.rule ? resp.data.rule.units : [];
|
||||
this.loading = false;
|
||||
}).catch(() => { this.$message.error('初始化数据失败!'); this.loading = false; });
|
||||
|
Loading…
Reference in New Issue
Block a user