Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
76a329d9af
@ -106,3 +106,11 @@ export function getCompetitionPractical(competitionId) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询竞赛报名人员详情 */
|
||||
export function getRaceUserById(raceId, userId) {
|
||||
return request({
|
||||
url: `/api/race/${raceId}/raceUser/${userId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -158,8 +158,10 @@ export default {
|
||||
// this.disabled = true;
|
||||
getCompetitionPractical(this.$route.query.raceId).then(()=>{
|
||||
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '02'}).then(resp => {
|
||||
const query = { lineCode: '11', mapId: '41', group: resp.data, prdType: '03', raceId: this.$route.query.raceId};
|
||||
this.$router.replace({ path: `/displayNew/demon`, query: query});
|
||||
// const query = { lineCode: '11', mapId: '41', group: resp.data, prdType: '03', raceId: this.$route.query.raceId};
|
||||
// this.$router.replace({ path: `/displayNew/demon`, query: query});
|
||||
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
|
||||
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
<script>
|
||||
import { refereeEnterSimulation } from '@/api/competition';
|
||||
import {getPermissionJointNew} from '@/api/jointTraining';
|
||||
import { getRaceUserList } from '@/api/competition';
|
||||
// import QuestionList from './questionList';
|
||||
|
||||
@ -150,13 +149,12 @@ export default {
|
||||
},
|
||||
handleClick(row) {
|
||||
const group = row.room.group;
|
||||
getPermissionJointNew(group).then(resp=>{
|
||||
refereeEnterSimulation(group).then(response=>{
|
||||
const query = { lineCode: '11', mapId: '41', group: row.room.group, prdType: '03' };
|
||||
this.$router.push({ path: `/displayNew/demon`, query: query});
|
||||
});
|
||||
refereeEnterSimulation(group).then(response=>{
|
||||
// const query = { lineCode: '11', mapId: '41', group: row.room.group, prdType: '03' };
|
||||
// this.$router.push({ path: `/displayNew/demon`, query: query});
|
||||
const query = { lineCode: '11', mapId: '41', group: group, raceId: this.$route.query.raceId};
|
||||
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
||||
});
|
||||
// });
|
||||
},
|
||||
playBack() {
|
||||
|
||||
|
@ -8,27 +8,20 @@
|
||||
</div>
|
||||
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group>
|
||||
<template v-if="project =='jsxt' || project =='refereeJsxt'">
|
||||
<el-button v-if="project =='jsxt'" :disabled="!jsStart" type="success" @click="startCompetition">开始考试</el-button>
|
||||
<el-button v-if="project =='jsxt'" type="danger" @click="endCompetition">提交</el-button>
|
||||
<el-button v-if="project =='refereeJsxt'" type="success" @click="refeeEndCompetition">返回</el-button>
|
||||
<el-button v-if="isShowScheduling && !dataError" type="primary" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
|
||||
<el-button v-if="!isShowScheduling && !dataError" type="jl3dpassflow" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
||||
<!-- <el-button v-if="!isShowScheduling && !dataError" type="jl3dstation" @click="jumpjl3dstation">{{ jl3dstation }}</el-button> -->
|
||||
<el-button v-if="!isShowScheduling && !dataError" type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<el-button v-if="isShow3dmodel && !isShowScheduling && !dataError" type="jumpjlmap3dmodel" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||
<template v-if="isShowQuest">
|
||||
<!-- && !isDesignPlatform -->
|
||||
<el-button v-if="!isDesignPlatform && !dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button v-if="isShowScheduling && !dataError" type="primary" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
|
||||
<el-button v-if="!isShowScheduling && !dataError" type="jl3dpassflow" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
||||
<!-- <el-button v-if="!isShowScheduling && !dataError" type="jl3dstation" @click="jumpjl3dstation">{{ jl3dstation }}</el-button> -->
|
||||
<el-button v-if="!isShowScheduling && !dataError" type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<el-button v-if="isShow3dmodel && !isShowScheduling && !dataError" type="jumpjlmap3dmodel" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||
<template v-if="isShowQuest">
|
||||
<!-- && !isDesignPlatform -->
|
||||
<el-button v-if="!isDesignPlatform && !dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable || dataError" @click="end">{{ $t('display.demon.exitPlan') }}</el-button>
|
||||
</template>
|
||||
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable || dataError" @click="end">{{ $t('display.demon.exitPlan') }}</el-button>
|
||||
</template>
|
||||
<el-button v-if="project !='jsxt' && project !='refereeJsxt'" type="primary" @click="back">{{ $t('display.demon.back') }}</el-button>
|
||||
<el-button type="primary" @click="back">{{ $t('display.demon.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
@ -47,8 +40,6 @@ import { ranAsPlan, exitRunPlan, clearSimulation, getSimulationInfoNew } from '@
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { getCountTime } from '@/utils/index';
|
||||
import { quitScriptNew, scriptRePreview } from '@/api/simulation';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { participantCompleteCompetition, refereeExitSimulation } from '@/api/competition';
|
||||
|
||||
export default {
|
||||
name: 'MenuDemon',
|
||||
@ -107,8 +98,7 @@ export default {
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
jl3dstation: this.$t('display.demon.threeDimensionalStation'),
|
||||
jl3dmodel: this.$t('display.demon.deviceView'),
|
||||
isShow3dmodel :false,
|
||||
jsStart: true
|
||||
isShow3dmodel :false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -123,9 +113,6 @@ export default {
|
||||
},
|
||||
isHebLine() {
|
||||
return this.$route.query.lineCode === '07';
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -308,39 +295,6 @@ export default {
|
||||
this.jl3dname = this.$t('display.demon.threeDimensionalView');
|
||||
this.isShow3dmodel = true;
|
||||
}
|
||||
},
|
||||
startCompetition() {
|
||||
const date = new Date(this.$store.state.training.initTime || null);
|
||||
const model = {
|
||||
initTime: this.formatTime(date)
|
||||
};
|
||||
this.start(model);
|
||||
},
|
||||
refeeEndCompetition() { // 裁判返回
|
||||
refereeExitSimulation(this.group).then(resp => {
|
||||
this.$router.go(-1);
|
||||
}).catch(()=> {
|
||||
this.$message.success('退出系统失败');
|
||||
});
|
||||
},
|
||||
endCompetition() { // 参赛人员提交实操
|
||||
this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
participantCompleteCompetition(1, this.group).then(resp => {
|
||||
this.submit();
|
||||
}).catch(()=> {
|
||||
this.$message.success('提交试卷失败!');
|
||||
});
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
// this.$store.dispatch('exam/over').then(() => {
|
||||
// this.$store.dispatch('trainingList/clearTrainingList');
|
||||
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate' } });
|
||||
// });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -48,6 +48,8 @@ import { checkLoginLine } from '@/api/login';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
import { getUserRolesNew, deljointTrainRoomNew} from '@/api/jointTraining';
|
||||
import { clearSimulation, getSimulationInfoNew } from '@/api/simulation';
|
||||
import {getRaceUserById} from '@/api/competition';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
import Jl3dMaintainer from '@/views/jlmap3d/maintainer/jl3dmaintainer';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
@ -127,6 +129,9 @@ export default {
|
||||
},
|
||||
prdType() {
|
||||
return this.$store.state.training.prdType;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -358,7 +363,15 @@ export default {
|
||||
|
||||
if (this.lineCode) {
|
||||
// 01 现地 02 行调 '' 观众
|
||||
const resp = await this.getUserRole();
|
||||
let resp;
|
||||
if (this.project == 'jsxt' ) {
|
||||
resp = await getRaceUserById(this.$route.query.raceId, this.userId);
|
||||
resp.data.userRole = resp.data.role;
|
||||
} else if (this.project == 'refereeJsxt') {
|
||||
resp.data.userRole = 'ADMIN';
|
||||
} else {
|
||||
resp = await this.getUserRole();
|
||||
}
|
||||
console.log('/////////////' + resp.data.userRole);
|
||||
if (resp && resp.code == 200) {
|
||||
// Admin 管理员 Instructor 教员 Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号 IBP:IBP盘
|
||||
|
@ -11,6 +11,12 @@
|
||||
</template>
|
||||
<el-button type="primary" :loading="backLoading" @click="back">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
<template v-if="project==='jsxt'">
|
||||
<el-button :disabled="!jsStart" type="success" @click="startCompetition">开始</el-button>
|
||||
<el-button type="danger" @click="endCompetition">提交</el-button>
|
||||
</template>
|
||||
<el-button v-if="project==='refereeJsxt'" type="success" @click="refeeEndCompetition">返回</el-button>
|
||||
<el-button v-if="project!=='jsxt'&&project!=='refereeJsxt'" type="primary" :loading="backLoading" @click="back">{{ $t('global.back') }}</el-button>
|
||||
</div>
|
||||
<qr-code ref="qrCode" />
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
@ -28,6 +34,7 @@ import { putJointTrainingSimulationUserNew} from '@/api/jointTraining';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import RealDevice from './menuDraft/realDevice';
|
||||
import { participantCompleteCompetition, refereeExitSimulation } from '@/api/competition';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
@ -70,7 +77,8 @@ export default {
|
||||
offset: 10,
|
||||
userId: '',
|
||||
stationList: [],
|
||||
stationLists: []
|
||||
stationLists: [],
|
||||
jsStart: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -88,6 +96,9 @@ export default {
|
||||
},
|
||||
isProject() {
|
||||
return getSessionStorage('project').endsWith('gzb') && this.userRole === 'CI';
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -116,6 +127,11 @@ export default {
|
||||
'$store.state.map.runPlanStatus': function (val) {
|
||||
this.isDisable = val;
|
||||
},
|
||||
'$store.state.socket.competitionStart':function(val) {
|
||||
if (val) {
|
||||
this.startCompetition();
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
if (val && this.project === 'refereeJsxt') {
|
||||
this.$router.go(-1);
|
||||
@ -289,6 +305,40 @@ export default {
|
||||
const mm = prefixIntrger(initTime.getMinutes(), 2);
|
||||
const ss = prefixIntrger(initTime.getSeconds(), 2);
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
},
|
||||
startCompetition() {
|
||||
const date = new Date(this.$store.state.training.initTime || null);
|
||||
const model = {
|
||||
initTime: this.formatTime(date)
|
||||
};
|
||||
this.start(model);
|
||||
},
|
||||
endCompetition() {
|
||||
this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
participantCompleteCompetition(1, this.group).then(resp => {
|
||||
// this.$router.go(-1);
|
||||
this.submit();
|
||||
}).catch(()=> {
|
||||
this.$message.success('提交试卷失败!');
|
||||
});
|
||||
});
|
||||
},
|
||||
refeeEndCompetition() {
|
||||
refereeExitSimulation(this.group).then(resp => {
|
||||
this.$router.go(-1);
|
||||
}).catch(()=> {
|
||||
this.$message.success('退出系统失败');
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
// this.$store.dispatch('exam/over').then(() => {
|
||||
// this.$store.dispatch('trainingList/clearTrainingList');
|
||||
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate' } });
|
||||
// });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user