调整参赛人员路由判断
This commit is contained in:
parent
ef9dc7c25e
commit
dc33306c96
@ -75,7 +75,7 @@ export function getIsSignUp(raceId, params = {}) {
|
|||||||
/** 分页查询竞赛报名人员 */
|
/** 分页查询竞赛报名人员 */
|
||||||
export function getRaceUserList(params) {
|
export function getRaceUserList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/race/${params.raceId}/raceUser`,
|
url: `/api/race/${params.raceId}/raceUser/page`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
@ -108,9 +108,9 @@ export function getCompetitionPractical(competitionId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 查询竞赛报名人员详情 */
|
/** 查询竞赛报名人员详情 */
|
||||||
export function getRaceUserById(raceId, userId) {
|
export function getRaceUserById(raceId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/race/${raceId}/raceUser/${userId}`,
|
url: `/api/race/${raceId}/raceUser`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="joylink-card">
|
<div class="joylink-card">
|
||||||
<b class="title-name">{{ examType }}</b>
|
<b class="title-name">{{ examType }}</b>
|
||||||
<img class="img_box" :src="applyImg" alt="">
|
<!-- <img class="img_box" :src="applyImg" alt=""> -->
|
||||||
<div class="btn-start">
|
<div class="btn-start">
|
||||||
<el-button :disabled="disabled" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
|
<el-button :disabled="disabled" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -15,15 +15,16 @@ import LangStorage from '@/utils/lang';
|
|||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { participantCreatTrainingRoom, getCompetitionPractical, getPracticalQuestion, getTheoryQuestion } from '@/api/competition';
|
import {getRaceUserById} from '@/api/competition';
|
||||||
import applyImg from '@/assets/apply.png';
|
import { participantCreatTrainingRoom, getPracticalQuestion, getTheoryQuestion } from '@/api/competition';
|
||||||
|
// import applyImg from '@/assets/apply.png';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExamDetailView',
|
name: 'ExamDetailView',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
applyImg: applyImg,
|
// applyImg: applyImg,
|
||||||
examDetails: {
|
examDetails: {
|
||||||
lessonId: '',
|
lessonId: '',
|
||||||
name: '',
|
name: '',
|
||||||
@ -150,29 +151,38 @@ export default {
|
|||||||
},
|
},
|
||||||
async exmaStart() {
|
async exmaStart() {
|
||||||
if (this.$route.query.type == 'theory') {
|
if (this.$route.query.type == 'theory') {
|
||||||
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
|
const res = await getRaceUserById(this.$route.query.raceId);
|
||||||
if (resp.data) {
|
if (res.data.status != 4 || res.data.status != 5) {
|
||||||
this.$router.push(`/jsxt/theory/detail/${this.$route.query.mapId}?raceId=${this.$route.query.raceId}`);
|
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
|
||||||
} else {
|
if (resp.data) {
|
||||||
this.$messageBox('试卷还没被加载');
|
this.$router.push(`/jsxt/theory/detail/${this.$route.query.mapId}?raceId=${this.$route.query.raceId}`);
|
||||||
}
|
} else {
|
||||||
|
this.$messageBox('试卷还没被加载');
|
||||||
|
}
|
||||||
|
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$router.replace({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
|
const res = await getRaceUserById(this.$route.query.raceId);
|
||||||
if (responese.data) {
|
if (res.data.status != 4 || res.data.status != 6) {
|
||||||
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '02'}).then(resp => {
|
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
|
||||||
// const query = { lineCode: '11', mapId: '41', group: resp.data, prdType: '03', raceId: this.$route.query.raceId};
|
if (responese.data) {
|
||||||
// this.$router.replace({ path: `/displayNew/demon`, query: query});
|
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '02'}).then(resp => {
|
||||||
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
|
// const query = { lineCode: '11', mapId: '41', group: resp.data, prdType: '03', raceId: this.$route.query.raceId};
|
||||||
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
// this.$router.replace({ path: `/displayNew/demon`, query: query});
|
||||||
});
|
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
|
||||||
} else {
|
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
||||||
this.$messageBox('试卷还没被加载');
|
});
|
||||||
}
|
} else {
|
||||||
|
this.$messageBox('试卷还没被加载');
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -196,11 +206,15 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.title-name{
|
.title-name{
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
left: 50%;
|
// left: 50%;
|
||||||
top: 66px;
|
// top: 66px;
|
||||||
transform: translateX(-80px);
|
// transform: translateX(-80px);
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 50px;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.img_box{
|
.img_box{
|
||||||
|
@ -365,7 +365,7 @@ export default {
|
|||||||
// 01 现地 02 行调 '' 观众
|
// 01 现地 02 行调 '' 观众
|
||||||
let resp = {data: {}};
|
let resp = {data: {}};
|
||||||
if (this.project == 'jsxt' ) {
|
if (this.project == 'jsxt' ) {
|
||||||
resp = await getRaceUserById(this.$route.query.raceId, this.userId);
|
resp = await getRaceUserById(this.$route.query.raceId);
|
||||||
resp.data.userRole = resp.data.role;
|
resp.data.userRole = resp.data.role;
|
||||||
} else if (this.project == 'refereeJsxt') {
|
} else if (this.project == 'refereeJsxt') {
|
||||||
resp['code'] = 200;
|
resp['code'] = 200;
|
||||||
|
Loading…
Reference in New Issue
Block a user