调整实操竞赛&星期显示

This commit is contained in:
fan 2020-06-03 16:18:40 +08:00
parent 6ac7b9b932
commit 046a09f8b5
3 changed files with 34 additions and 17 deletions

View File

@ -163,3 +163,17 @@ export function getTestPaperDatail(competitionId) {
method: 'get'
});
}
/** 提交实操结果 */
export function submitPracticalCompetition(group, competitionId, data) {
return request({
url: `/api/v1/competitionPractical/${group}/${competitionId}/finish`,
method: 'put',
data
});
}
/** 开始实操竞赛 */
export function startPracticalCompetition(group, competitionId, data) {
return request({
url: `/api/v1/competitionPractical/${group}/${competitionId}/start`
});
}

View File

@ -19,6 +19,7 @@ import ConstConfig from '@/scripts/ConstConfig';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {getRaceUserById} from '@/api/competition';
import { participantCreatTrainingRoom, getPracticalQuestion, getTheoryQuestion } from '@/api/competition';
import {getRaceById } from '@/api/competition';
// import applyImg from '@/assets/apply.png';
export default {
@ -181,17 +182,19 @@ export default {
this.$messageBox('试卷还没被加载');
});
} else {
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
if (responese.data) {
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '03'}).then(resp => {
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
this.$router.replace({ path: `/jointTrainingNew`, query: query});
});
} else {
getRaceById(this.$route.query.raceId).then(resp => {
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
if (responese.data) {
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: resp.data.mapId, prdType: '03'}).then(resp => {
const query = { lineCode: '11', mapId: resp.data.mapId, group: resp.data, raceId: this.$route.query.raceId};
this.$router.replace({ path: `/jointTrainingNew`, query: query});
});
} else {
this.$messageBox('试卷还没被加载');
}
}).catch(()=>{
this.$messageBox('试卷还没被加载');
}
}).catch(()=>{
this.$messageBox('试卷还没被加载');
});
});
}
}

View File

@ -89,25 +89,25 @@ export default {
const day = date.getDay();
switch (day) {
case 0:
this.dayString = '星 期 ';
this.dayString = '星 期 ';
break;
case 1:
this.dayString = '星 期 ';
this.dayString = '星 期 ';
break;
case 2:
this.dayString = '星 期 ';
this.dayString = '星 期 ';
break;
case 3:
this.dayString = '星 期 ';
this.dayString = '星 期 ';
break;
case 4:
this.dayString = '星 期 ';
this.dayString = '星 期 ';
break;
case 5:
this.dayString = '星 期 ';
this.dayString = '星 期 ';
break;
case 6:
this.dayString = '星 期 ';
this.dayString = '星 期 ';
}
}
}