This commit is contained in:
zyy 2020-05-25 15:06:47 +08:00
commit fb6ba36680
11 changed files with 52 additions and 62 deletions

View File

@ -106,3 +106,11 @@ export function getCompetitionPractical(competitionId) {
});
}
/** 查询竞赛报名人员详情 */
export function getRaceUserById(raceId, userId) {
return request({
url: `/api/race/${raceId}/raceUser/${userId}`,
method: 'get'
});
}

View File

@ -33,6 +33,7 @@ class ESigPost extends Group {
this.hor = new Polyline({
zlevel: model.zlevel,
z: model.z,
_val: '3',
shape: {
points: [
[model.x, model.y],

View File

@ -67,6 +67,7 @@ class Signal extends Group {
this.ciConfirm = new Text({
zlevel: this.zlevel,
z: this.z,
_val: '3',
silent: false,
_subType: 'enabled',
style: {
@ -110,6 +111,7 @@ class Signal extends Group {
this.tText = new Text({
zlevel: this.zlevel,
z: this.z,
_val: '3',
style: {
x: endPoint.x,
y: endPoint.y,

View File

@ -50,21 +50,6 @@
v-model="formModel.destinationCode"
/>
</el-form-item>
<!--<el-form-item v-if="formModel.type == '03'" :label="this.$t('menu.category')+this.$t('global.colon')" prop="category">-->
<!--<el-select-->
<!--:id="domIdTrainNumber"-->
<!--v-model="formModel.category"-->
<!--filterable-->
<!--:disabled="true"-->
<!--&gt;-->
<!--<el-option-->
<!--v-for="item in categoryList"-->
<!--:key="item.value"-->
<!--:label="item.name"-->
<!--:value="item.value"-->
<!--/>-->
<!--</el-select>-->
<!--</el-form-item>-->
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
@ -424,28 +409,6 @@ export default {
editTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
// const operate = {
// send: true,
//
// operation: OperationEvent.Train.editTrainId.menu.operation,
// cmdType: CMD.Train.CMD_EDIT_TRAIN_ID,
// messages: [this.$t('tip.editTrainIdTip')],
// val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
// };
//
// this.loading = true;
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
// this.loading = false;
// if (valid) {
// this.doClose();
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.confirmTrain.doShow(operate);
// }
// }).catch(() => {
// this.loading = false;
// this.doClose();
// this.$refs.noticeInfo.doShow();
// });
const params = {
groupNumber: this.formModel.groupNumber,
type: this.formModel.type,

View File

@ -68,7 +68,6 @@ export default {
this.$store.state.map.holdStandList.forEach(item => {
const stand = this.$store.getters['map/getDeviceByCode'](item);
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
console.log(station);
const dir = stand.right ? '上行站台' : '下行站台';
if (stand) {
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在扣车命令';

View File

@ -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});
});
});
}

View File

@ -6,9 +6,7 @@
</template>
<script>
import { refereeEnterSimulation } from '@/api/competition';
import {getPermissionJointNew} from '@/api/jointTraining';
import { getRaceUserList } from '@/api/competition';
import { refereeEnterSimulation, loadQuestionList, getRaceUserList } from '@/api/competition';
// import QuestionList from './questionList';
export default {
@ -125,7 +123,7 @@ export default {
// this.getData();
},
covertStatus(status) {
const statusDict = {'0':'尚未参赛', '1':'进入赛场', '2':'理论赛场', '3':'实操赛场', '4':'完成比赛'};
const statusDict = {'0':'尚未参赛', '1':'进入赛场', '2':'理论赛场', '3':'实操赛场', '4':'完成比赛', '5':'完成理论', '6':'完成实操'};
return statusDict[status];
},
// getData() {
@ -139,7 +137,12 @@ export default {
// });
// },
handleAdd() {
loadQuestionList(this.$route.query.raceId, []).then((response)=>{
this.$message('开始考试成功!');
this.doClose();
}).catch(()=>{
this.$message('开始考试失败');
});
},
//
queryFunction(params) {
@ -150,13 +153,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});
// 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() {

View File

@ -345,7 +345,7 @@ export default {
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
}
}).catch(() => {
this.$messageBox('您未报名该竞赛,所以无法进入竞赛系统');
this.$messageBox('登陆竞赛系统失败,请稍后重试');
});
} else {
setSessionStorage('raceId', this.$route.query.raceId);

View File

@ -1,7 +1,7 @@
<template>
<!-- v-quickMenuDrag -->
<div class="chatBox">
<div v-show="!minimize" class="chat-box">
<div v-if="!minimize" class="chat-box">
<chat-member-list ref="chatMemberList" :group="group" @addCoversition="addCoversition" />
<div class="chat-box-main">
<chat-coversition-list ref="chatCoversitionList" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" />
@ -272,7 +272,7 @@ export default {
<style lang="scss" scoped>
.chatBox{
width: 503px;
height: 400px;
// height: 400px;
position: absolute;
padding-left:5px;
left: 0;
@ -281,7 +281,7 @@ export default {
}
.chat-box{
width: 100%;
height: 100%;
height: 400px;
}
.chat-box-header{
width: 100%;

View File

@ -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

View File

@ -9,10 +9,10 @@
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
<el-button type="danger" :disabled="!isDisable" @click="end">{{ $t('joinTraining.exitPlan') }}</el-button>
</template>
<el-button type="primary" :loading="backLoading" @click="back">{{ $t('global.back') }}</el-button>
<!-- <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 :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>
@ -77,8 +77,8 @@ export default {
offset: 10,
userId: '',
stationList: [],
stationLists: [],
jsStart: true
stationLists: []
// jsStart: true
};
},
computed: {
@ -319,7 +319,7 @@ export default {
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
participantCompleteCompetition(1, this.group).then(resp => {
participantCompleteCompetition(this.$route.query.raceId, this.group).then(resp => {
// this.$router.go(-1);
this.submit();
}).catch(()=> {
@ -337,7 +337,7 @@ export default {
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' } });
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } });
// });
}
}