大赛训练产品调整
This commit is contained in:
parent
77713154d0
commit
c1376ddf8f
@ -103,7 +103,11 @@ export default {
|
|||||||
this.taskData = data;
|
this.taskData = data;
|
||||||
this.taskList = [];
|
this.taskList = [];
|
||||||
this.eachTask(this.taskList, this.taskData);
|
this.eachTask(this.taskList, this.taskData);
|
||||||
this.nowKey = 0;
|
if (this.$route.query.nowKey && this.$route.query.nowKey >= this.taskList.length) {
|
||||||
|
this.nowKey = this.taskList.length - 1 || 0;
|
||||||
|
} else {
|
||||||
|
this.nowKey = this.$route.query.nowKey || 0;
|
||||||
|
}
|
||||||
this.nowData = this.taskList[this.nowKey];
|
this.nowData = this.taskList[this.nowKey];
|
||||||
// console.log(this.taskData, this.taskList, this.nowData, '===', data);
|
// console.log(this.taskData, this.taskList, this.nowData, '===', data);
|
||||||
}).catch(() => this.$message.error('加载数据失败!'));
|
}).catch(() => this.$message.error('加载数据失败!'));
|
||||||
|
@ -47,12 +47,6 @@ export default {
|
|||||||
const crules = {
|
const crules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入单元描述', trigger: 'blur' }
|
{ required: true, message: '请输入单元描述', trigger: 'blur' }
|
||||||
],
|
|
||||||
content: [
|
|
||||||
{ required: true, message: '请输入作业程序', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
criteria: [
|
|
||||||
{ required: true, message: '请输入评分标准', trigger: 'blur' }
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
|
@ -232,6 +232,9 @@ export default {
|
|||||||
}
|
}
|
||||||
} else if (this.projectDevice) {
|
} else if (this.projectDevice) {
|
||||||
this.logout();
|
this.logout();
|
||||||
|
} else if (this.$route.query.nowKey) {
|
||||||
|
const query = { paperId: this.$route.query.paperId, moduleId: this.$route.query.moduleId, nowKey: +this.$route.query.nowKey + 1 };
|
||||||
|
this.$router.replace({ path:'/contest/detail', query });
|
||||||
} else {
|
} else {
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user