2020-01-06 18:39:44 +08:00
|
|
|
|
<template>
|
|
|
|
|
<div>
|
2020-05-27 19:02:39 +08:00
|
|
|
|
<chat-box :group="group" :user-role="userRole" />
|
2020-07-31 18:49:35 +08:00
|
|
|
|
<div class="display_top_draft" :style="{top: offset+'px'}">
|
|
|
|
|
<div class="btn_hover" @click="menuClick">菜单</div>
|
|
|
|
|
<el-button-group ref="button_group_box" class="button_group_box" :style="`transform: translateX(-${btnWidth}px)`">
|
|
|
|
|
<template v-if="!dataError"> <!-- 地图错误判断 -->
|
|
|
|
|
<!-- 设备视图 -->
|
|
|
|
|
<el-button v-if="isShow3dmodel && isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>
|
|
|
|
|
<!-- 三维视图 / 司机视角 -->
|
|
|
|
|
<el-button v-if="isShowScheduling || isDriver" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
|
|
|
|
<!-- cctv视图 -->
|
|
|
|
|
<el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button>
|
|
|
|
|
<el-button v-if="isAdmin && !noQrcodeList.includes(project)" type="primary" size="small" @click="generateQrCode">生成二维码</el-button>
|
|
|
|
|
<el-button v-if="isAdmin" size="small" @click="memberManage">成员管理</el-button>
|
|
|
|
|
<el-button v-if="isAdmin && isProject" size="small" @click="handleEquipment">设备管理</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
2020-07-30 17:49:20 +08:00
|
|
|
|
<div class="display-draft" :class="{'display-type-hb': lineCode == '07' && $store.state.training.prdType=='01', 'haerbin_btn_box': lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
2020-07-29 13:52:34 +08:00
|
|
|
|
<el-button-group class="button-group-box">
|
2020-07-30 15:10:10 +08:00
|
|
|
|
<el-button v-if="project==='refereeJsxt'" type="success" size="small" @click="refeeEndCompetition">退出</el-button> <!-- 竞赛退出 -->
|
|
|
|
|
<el-button v-if="project!=='jsxt' && project!=='refereeJsxt'" type="primary" :loading="backLoading" size="small" @click="back">退出</el-button>
|
|
|
|
|
<template v-if="!dataError"> <!-- 地图错误判断 -->
|
|
|
|
|
<template v-if="isAdmin && project != 'refereeJsxt'">
|
|
|
|
|
<el-button type="danger" size="small" @click="end">{{ $t('joinTraining.initialize') }}</el-button>
|
2020-07-30 17:49:20 +08:00
|
|
|
|
<!-- 按计划行车 -->
|
|
|
|
|
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
|
2020-07-30 15:10:10 +08:00
|
|
|
|
</template>
|
|
|
|
|
<template v-if="project == 'jsxt'">
|
|
|
|
|
<div style="background: #FFF;display: inline-block;height: 40px;line-height: 40px;padding: 0 5px;border: 2px solid #F00;border-radius: 6px;margin-right: 8px;">{{ '剩余时间:' + countdownTime }}</div>
|
|
|
|
|
<el-button :disabled="!jsStart" type="success" size="small" @click="startCompetition">开始</el-button>
|
|
|
|
|
<el-button :disabled="jsStart" type="danger" size="small" @click="endCompetition">提交</el-button>
|
|
|
|
|
</template>
|
2020-01-06 18:39:44 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
|
|
|
|
<qr-code ref="qrCode" />
|
|
|
|
|
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
2020-07-14 13:27:00 +08:00
|
|
|
|
<equipment ref="equipment" />
|
2020-01-06 18:39:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import QrCode from '@/components/QrCode';
|
2020-07-16 19:11:20 +08:00
|
|
|
|
import ChatBox from './chatView/chatBox';
|
2020-07-14 13:27:00 +08:00
|
|
|
|
import Equipment from '@/views/newMap/displayNew/demon/equipment';
|
2020-03-17 14:54:03 +08:00
|
|
|
|
import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
2020-06-30 14:27:32 +08:00
|
|
|
|
import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation';
|
2020-01-06 18:39:44 +08:00
|
|
|
|
import { exitFullscreen } from '@/utils/screen';
|
2020-06-30 14:27:32 +08:00
|
|
|
|
import { getSimulationQrcode } from '@/api/jointSimulation';
|
2020-01-06 18:39:44 +08:00
|
|
|
|
import { getSessionStorage } from '@/utils/auth';
|
2020-06-05 09:38:14 +08:00
|
|
|
|
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
2020-07-22 13:30:56 +08:00
|
|
|
|
import { NoQrcodeList } from '@/scripts/ProjectConfig';
|
2020-06-05 09:38:14 +08:00
|
|
|
|
import localStore from 'storejs';
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'MenuDemonJoint',
|
|
|
|
|
components: {
|
2020-04-23 17:13:11 +08:00
|
|
|
|
ChatBox,
|
2020-01-06 18:39:44 +08:00
|
|
|
|
QrCode,
|
|
|
|
|
SetTime,
|
2020-07-14 13:27:00 +08:00
|
|
|
|
Equipment
|
2020-01-06 18:39:44 +08:00
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
group: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
userRole: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
2020-06-05 09:38:14 +08:00
|
|
|
|
countdownTime: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
2020-01-06 18:39:44 +08:00
|
|
|
|
deviceCode: {
|
|
|
|
|
type: String,
|
|
|
|
|
default() {
|
|
|
|
|
return '';
|
|
|
|
|
}
|
2020-05-09 20:24:59 +08:00
|
|
|
|
},
|
|
|
|
|
dataError: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2020-06-30 14:27:32 +08:00
|
|
|
|
},
|
|
|
|
|
isAdmin: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-07-31 18:49:35 +08:00
|
|
|
|
offset: {
|
|
|
|
|
type: Number,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
2020-07-14 14:30:37 +08:00
|
|
|
|
offsetBottom: {
|
2020-07-14 15:35:03 +08:00
|
|
|
|
type: [String, Number],
|
2020-07-14 14:30:37 +08:00
|
|
|
|
default: 15
|
2020-01-06 18:39:44 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isDisable: false,
|
2020-07-24 17:17:40 +08:00
|
|
|
|
backLoading: false,
|
2020-01-06 18:39:44 +08:00
|
|
|
|
chatShow: true,
|
2020-07-01 18:52:29 +08:00
|
|
|
|
jsStart: true,
|
2020-07-22 13:30:56 +08:00
|
|
|
|
isGoback: false,
|
2020-07-29 15:42:10 +08:00
|
|
|
|
noQrcodeList: NoQrcodeList,
|
|
|
|
|
isShow3dmodel :false,
|
|
|
|
|
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
2020-07-31 18:49:35 +08:00
|
|
|
|
hoverBtn: false,
|
|
|
|
|
btnWidth: 0
|
2020-01-06 18:39:44 +08:00
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
lineCode() {
|
|
|
|
|
return this.$route.query.lineCode;
|
2020-07-28 18:28:31 +08:00
|
|
|
|
},
|
|
|
|
|
isShowScheduling() {
|
|
|
|
|
// 行调与管理员 可显示
|
2020-07-29 15:42:10 +08:00
|
|
|
|
return (this.$store.state.training.prdType == '02' || this.isAdmin) && !this.$route.query.projectDevice;
|
2020-01-06 18:39:44 +08:00
|
|
|
|
},
|
|
|
|
|
isSpeaking() {
|
2020-03-17 14:54:03 +08:00
|
|
|
|
return this.userRole != 'DRIVER' && this.userRole != '';
|
2020-01-06 18:39:44 +08:00
|
|
|
|
},
|
2020-06-10 16:56:52 +08:00
|
|
|
|
isStationSupervisor() {
|
2020-07-28 18:28:31 +08:00
|
|
|
|
return this.userRole == 'STATION_SUPERVISOR' && !this.$route.query.projectDevice;
|
2020-06-08 18:22:12 +08:00
|
|
|
|
},
|
2020-01-06 18:39:44 +08:00
|
|
|
|
isDriver() {
|
2020-07-28 18:28:31 +08:00
|
|
|
|
return this.userRole == 'DRIVER' && !this.$route.query.projectDevice;
|
2020-01-06 18:39:44 +08:00
|
|
|
|
},
|
2020-05-25 13:48:43 +08:00
|
|
|
|
project() {
|
|
|
|
|
return getSessionStorage('project');
|
2020-07-28 16:28:55 +08:00
|
|
|
|
},
|
|
|
|
|
isProject() {
|
|
|
|
|
return getSessionStorage('project') != 'login' && getSessionStorage('project') != 'design';
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
},
|
|
|
|
|
watch: {
|
2020-07-28 14:44:37 +08:00
|
|
|
|
'$store.state.socket.roleList': function (roleList) { // 综合演练室用户消息
|
|
|
|
|
if (roleList && roleList.length) {
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$nextTick(() => {
|
2020-07-28 14:44:37 +08:00
|
|
|
|
this.addrolesList(roleList);
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$store.dispatch('config/updateMenuBar');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-07-31 15:24:44 +08:00
|
|
|
|
'$store.state.training.started': function (val) {
|
2020-01-06 18:39:44 +08:00
|
|
|
|
if (val) {
|
2020-07-31 15:24:44 +08:00
|
|
|
|
this.isDisable = true;
|
2020-01-06 18:39:44 +08:00
|
|
|
|
}
|
2020-05-19 17:05:23 +08:00
|
|
|
|
},
|
2020-05-22 09:32:48 +08:00
|
|
|
|
'$store.state.socket.simulationOver':function(val) {
|
2020-07-24 14:11:03 +08:00
|
|
|
|
if (val && this.project == 'refereeJsxt') {
|
2020-05-22 09:32:48 +08:00
|
|
|
|
this.$router.go(-1);
|
2020-07-01 18:52:29 +08:00
|
|
|
|
} else {
|
|
|
|
|
if (!this.isGoback) {
|
|
|
|
|
this.back();
|
|
|
|
|
}
|
2020-05-22 09:32:48 +08:00
|
|
|
|
}
|
2020-07-29 15:42:10 +08:00
|
|
|
|
},
|
|
|
|
|
'$store.state.training.prdType': function(prdType) {
|
|
|
|
|
this.change3dname();
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
},
|
|
|
|
|
async mounted() {
|
2020-07-28 18:28:31 +08:00
|
|
|
|
this.change3dname();
|
2020-07-31 18:49:35 +08:00
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.menuClick();
|
|
|
|
|
});
|
2020-01-06 18:39:44 +08:00
|
|
|
|
},
|
|
|
|
|
beforeDestroy() {
|
|
|
|
|
this.$store.dispatch('training/setGroup', '');
|
2020-05-28 15:28:18 +08:00
|
|
|
|
if (this.project === 'jsxt') {
|
|
|
|
|
quitCurrentRace(this.$route.query.raceId, {group:this.group}).then(res=>{
|
|
|
|
|
});
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2020-03-17 18:44:49 +08:00
|
|
|
|
// 设置用户角色 Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 MAINTAINER 通号
|
2020-01-06 18:39:44 +08:00
|
|
|
|
addrolesList(list) {
|
|
|
|
|
list.forEach(item => {
|
2020-07-24 17:17:40 +08:00
|
|
|
|
if (this.$store.state.user.id == item.id) {
|
2020-01-06 18:39:44 +08:00
|
|
|
|
switch (item.userRole) {
|
2020-03-17 14:54:03 +08:00
|
|
|
|
case 'INSTRUCTOR':
|
|
|
|
|
this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'INSTRUCTOR');
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$emit('getUserRole');
|
|
|
|
|
break;
|
2020-03-17 14:54:03 +08:00
|
|
|
|
case 'DISPATCHER':
|
|
|
|
|
this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$emit('getUserRole');
|
|
|
|
|
break;
|
2020-03-17 14:54:03 +08:00
|
|
|
|
case 'STATION_SUPERVISOR':
|
2020-01-06 18:39:44 +08:00
|
|
|
|
if (!item['deviceCode']) {
|
2020-03-17 14:54:03 +08:00
|
|
|
|
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
2020-01-06 18:39:44 +08:00
|
|
|
|
break;
|
|
|
|
|
}
|
2020-03-17 14:54:03 +08:00
|
|
|
|
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$emit('getUserRole');
|
|
|
|
|
break;
|
2020-04-16 15:52:56 +08:00
|
|
|
|
case 'CI':
|
|
|
|
|
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'CI');
|
|
|
|
|
this.$emit('getUserRole');
|
|
|
|
|
break;
|
2020-03-17 14:54:03 +08:00
|
|
|
|
case 'DRIVER':
|
2020-07-28 16:41:21 +08:00
|
|
|
|
this.$store.dispatch('training/setPrdType', '04'); this.$store.dispatch('training/setRoles', 'DRIVER');
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$emit('getUserRole');
|
|
|
|
|
break;
|
2020-03-17 18:44:49 +08:00
|
|
|
|
case 'MAINTAINER':
|
|
|
|
|
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$emit('getUserRole');
|
|
|
|
|
break;
|
|
|
|
|
case 'IBP':
|
|
|
|
|
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'IBP');
|
|
|
|
|
this.$emit('getUserRole');
|
|
|
|
|
break;
|
2020-03-17 14:54:03 +08:00
|
|
|
|
case 'BIGSCREEN':
|
|
|
|
|
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BIGSCREEN');
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$emit('getUserRole');
|
|
|
|
|
break;
|
|
|
|
|
default:
|
2020-03-17 14:54:03 +08:00
|
|
|
|
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$emit('getUserRole');
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (this.$refs.chatView) {
|
|
|
|
|
this.$refs.chatView.getUserRole();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
selectBeginTime() {
|
|
|
|
|
this.$refs.setTime.doShow();
|
2020-07-28 16:28:55 +08:00
|
|
|
|
},
|
|
|
|
|
// 开始仿真
|
2020-01-06 18:39:44 +08:00
|
|
|
|
start(model) {
|
2020-07-31 18:49:35 +08:00
|
|
|
|
this.isDisable = true;
|
2020-01-17 11:31:53 +08:00
|
|
|
|
const data = {
|
2020-03-17 14:54:03 +08:00
|
|
|
|
time: model.initTime
|
2020-01-17 11:31:53 +08:00
|
|
|
|
};
|
|
|
|
|
ranAsPlan(data, this.group).then(res => {
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$store.dispatch('training/simulationStart').then(() => {
|
2020-05-25 15:43:36 +08:00
|
|
|
|
if (this.project == 'jsxt') {
|
|
|
|
|
this.jsStart = false;
|
|
|
|
|
}
|
2020-07-30 18:42:41 +08:00
|
|
|
|
this.$store.dispatch('map/setRunPlanStatus', true);
|
2020-05-25 10:32:14 +08:00
|
|
|
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
2020-01-06 18:39:44 +08:00
|
|
|
|
});
|
2020-01-17 11:31:53 +08:00
|
|
|
|
}).catch((error) => {
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.isDisable = false;
|
2020-01-17 13:17:12 +08:00
|
|
|
|
if (error.code == '5001') {
|
|
|
|
|
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
|
|
|
|
|
} else if (error.code == '5002') {
|
|
|
|
|
this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed'));
|
|
|
|
|
} else if (error.code == '5003') {
|
|
|
|
|
this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed'));
|
2020-02-28 11:25:36 +08:00
|
|
|
|
} else if (error.code == '5004') {
|
|
|
|
|
this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed'));
|
|
|
|
|
} else if (error.code == '5000') {
|
|
|
|
|
this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed'));
|
|
|
|
|
} else if (error.code == '4000') {
|
|
|
|
|
this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed'));
|
|
|
|
|
} else if (error.code == '4001') {
|
|
|
|
|
this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed'));
|
|
|
|
|
} else if (error.code == '4002') {
|
|
|
|
|
this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed'));
|
|
|
|
|
} else if (error.code == '4003') {
|
|
|
|
|
this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed'));
|
|
|
|
|
} else if (error.code == '4004') {
|
|
|
|
|
this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed'));
|
2020-01-17 13:17:12 +08:00
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
end() {
|
|
|
|
|
this.isDisable = false;
|
2020-05-19 14:47:47 +08:00
|
|
|
|
exitRunPlan(this.group).then(()=>{
|
2020-07-30 18:42:41 +08:00
|
|
|
|
this.$store.dispatch('map/setRunPlanStatus', false);
|
2020-07-28 16:28:55 +08:00
|
|
|
|
this.$store.dispatch('map/setTrainWindowShow', false);
|
2020-07-21 15:54:35 +08:00
|
|
|
|
this.$store.dispatch('map/resetActiveTrainList');
|
2020-05-19 14:47:47 +08:00
|
|
|
|
}).catch(() => {
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$store.dispatch('training/over').then(() => {
|
|
|
|
|
this.isDisable = true;
|
2020-06-22 14:29:55 +08:00
|
|
|
|
this.$store.dispatch('map/resetActiveTrainList');
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$messageBox(this.$t('error.endSimulationFailed'));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
2020-07-14 13:27:00 +08:00
|
|
|
|
handleEquipment() {
|
|
|
|
|
this.$refs.equipment.doShow();
|
|
|
|
|
},
|
2020-06-30 14:27:32 +08:00
|
|
|
|
async back() {
|
2020-07-01 18:52:29 +08:00
|
|
|
|
this.isGoback = true;
|
2020-06-30 18:35:57 +08:00
|
|
|
|
if (this.isAdmin) {
|
|
|
|
|
await clearSimulation(this.group);
|
|
|
|
|
}
|
2020-07-10 18:30:37 +08:00
|
|
|
|
this.$store.dispatch('training/setMemberList', {memberList:[], userId: this.$store.state.user.id});
|
|
|
|
|
this.$store.dispatch('training/setSimulationUserList', []);
|
2020-07-31 16:03:32 +08:00
|
|
|
|
this.$store.dispatch('map/setRunPlanStatus', false);
|
2020-01-06 18:39:44 +08:00
|
|
|
|
this.$store.dispatch('training/over').then(() => {
|
2020-04-21 17:28:13 +08:00
|
|
|
|
this.backLoading = true;
|
2020-07-09 13:05:50 +08:00
|
|
|
|
this.$store.dispatch('map/resetActiveTrainList');
|
2020-06-30 14:27:32 +08:00
|
|
|
|
if (this.$route.query.projectDevice) {
|
2020-07-01 18:52:29 +08:00
|
|
|
|
this.$store.dispatch('LogOut').then(() => {
|
2020-06-30 14:27:32 +08:00
|
|
|
|
location.reload();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
history.go(-1);
|
2020-05-20 14:46:26 +08:00
|
|
|
|
exitFullscreen();
|
2020-06-30 14:27:32 +08:00
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
jumpjlmap3d() {
|
|
|
|
|
this.$emit('hidepanel');
|
|
|
|
|
},
|
2020-06-10 16:56:52 +08:00
|
|
|
|
jlmap3dcctv() {
|
2020-06-08 18:22:12 +08:00
|
|
|
|
this.$emit('hidejl3dcctv');
|
2020-07-28 18:28:31 +08:00
|
|
|
|
},
|
|
|
|
|
jumpjl3dpassflow() {
|
2020-07-28 14:44:37 +08:00
|
|
|
|
this.$emit('passflow');
|
2020-07-28 18:28:31 +08:00
|
|
|
|
},
|
|
|
|
|
jumpjlmap3dmodel() {
|
2020-07-28 14:44:37 +08:00
|
|
|
|
this.$emit('devicemodel');
|
2020-06-08 18:22:12 +08:00
|
|
|
|
},
|
2020-05-25 13:48:43 +08:00
|
|
|
|
startCompetition() {
|
2020-06-03 18:17:52 +08:00
|
|
|
|
startPracticalCompetition(this.group, this.$route.query.raceId).then(resp => {
|
2020-06-05 09:38:14 +08:00
|
|
|
|
this.$emit('startCounting');
|
2020-06-03 18:17:52 +08:00
|
|
|
|
this.jsStart = false;
|
|
|
|
|
}).catch(()=> {
|
|
|
|
|
this.$message.error('开始竞赛失败');
|
|
|
|
|
});
|
2020-05-25 13:48:43 +08:00
|
|
|
|
},
|
|
|
|
|
endCompetition() {
|
|
|
|
|
this.$confirm('此操作将结束并提交本次竞赛,是否继续', this.$t('global.tips'), {
|
|
|
|
|
confirmButtonText: this.$t('global.confirm'),
|
|
|
|
|
cancelButtonText: this.$t('global.cancel'),
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
2020-06-05 09:38:14 +08:00
|
|
|
|
this.submit();
|
2020-05-25 13:48:43 +08:00
|
|
|
|
});
|
2020-07-28 16:28:55 +08:00
|
|
|
|
},
|
|
|
|
|
// 竞赛退出
|
2020-05-25 13:48:43 +08:00
|
|
|
|
refeeEndCompetition() {
|
|
|
|
|
refereeExitSimulation(this.group).then(resp => {
|
2020-07-24 17:17:40 +08:00
|
|
|
|
this.$router.replace({ path: `/refereeJsxt/home`, query: { raceId: this.$route.query.raceId } });
|
2020-05-25 13:48:43 +08:00
|
|
|
|
}).catch(()=> {
|
|
|
|
|
this.$message.success('退出系统失败');
|
|
|
|
|
});
|
2020-07-28 16:28:55 +08:00
|
|
|
|
},
|
|
|
|
|
// 竞赛提交
|
2020-05-25 13:48:43 +08:00
|
|
|
|
submit() {
|
2020-06-05 09:38:14 +08:00
|
|
|
|
submitPracticalCompetition(this.group, this.$route.query.raceId).then(resp => {
|
|
|
|
|
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
|
|
|
|
|
localStore.remove(storeKey);
|
|
|
|
|
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } });
|
|
|
|
|
}).catch(()=> {
|
|
|
|
|
this.$message.error('提交试卷失败!');
|
|
|
|
|
});
|
2020-06-28 14:27:28 +08:00
|
|
|
|
},
|
2020-06-29 13:11:27 +08:00
|
|
|
|
memberManage() {
|
|
|
|
|
this.$emit('handlerMemberManage');
|
2020-06-30 14:27:32 +08:00
|
|
|
|
},
|
|
|
|
|
generateQrCode() {
|
|
|
|
|
getSimulationQrcode(this.$route.query.group).then(resp => {
|
|
|
|
|
const param = {
|
|
|
|
|
url: resp.data,
|
2020-07-24 17:17:40 +08:00
|
|
|
|
title: this.$t('综合演练二维码'),
|
|
|
|
|
group: this.$route.query.group
|
2020-06-30 14:27:32 +08:00
|
|
|
|
};
|
2020-07-24 17:17:40 +08:00
|
|
|
|
if (this.$refs) {
|
|
|
|
|
this.$refs.qrCode.doShow(param);
|
2020-06-30 14:27:32 +08:00
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$messageBox('仿真生成二维码失败!');
|
|
|
|
|
});
|
2020-07-29 15:42:10 +08:00
|
|
|
|
},
|
|
|
|
|
change3dname() {
|
2020-07-28 16:41:21 +08:00
|
|
|
|
if (this.$store.state.training.prdType == '04') {
|
2020-07-28 14:44:37 +08:00
|
|
|
|
this.jl3dname = this.$t('display.demon.driverPerspective'); // 司机视角
|
|
|
|
|
} else {
|
|
|
|
|
this.jl3dname = this.$t('display.demon.threeDimensionalView'); // 三维视图
|
|
|
|
|
this.isShow3dmodel = true;
|
|
|
|
|
}
|
2020-07-31 18:49:35 +08:00
|
|
|
|
},
|
|
|
|
|
menuClick() {
|
|
|
|
|
this.hoverBtn = !this.hoverBtn;
|
|
|
|
|
if (this.hoverBtn) {
|
|
|
|
|
// this.$refs.button_group_box.$el.clientWidth ||
|
|
|
|
|
this.btnWidth = 500;
|
|
|
|
|
} else {
|
|
|
|
|
this.btnWidth = 0;
|
|
|
|
|
}
|
2020-07-29 15:42:10 +08:00
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
2020-06-29 13:11:27 +08:00
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
|
.tabs-roles {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
border-bottom: 1px solid #e4e7ed;
|
|
|
|
|
height: 40px;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
-webkit-box-sizing: border-box;
|
|
|
|
|
box-sizing: border-box;
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
.roles {
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
height: 41px;
|
|
|
|
|
list-style: none;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #303133;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border-left: 1px solid #e4e7ed;
|
|
|
|
|
border-right: 1px solid #e4e7ed;
|
|
|
|
|
float: left;
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
.roles-first {
|
|
|
|
|
border-right: none;
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
.roles-active {
|
|
|
|
|
border-bottom-color: #fff;
|
|
|
|
|
color: #409EFF;
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
.tabs-content {
|
|
|
|
|
height: 300px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
.display-score {
|
|
|
|
|
background-color: black;
|
|
|
|
|
display: -moz-inline-box;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
text-align: left;
|
|
|
|
|
height: 32px;
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
padding-left: 2px;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
font-family: "Microsoft" !important;
|
|
|
|
|
font-size: 18px !important;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
.reminder-drag {
|
|
|
|
|
position: absolute;
|
|
|
|
|
float: left;
|
|
|
|
|
left: 10px;
|
|
|
|
|
bottom: 10px;
|
|
|
|
|
width: 500px;
|
|
|
|
|
height: 340px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
z-index: 2;
|
|
|
|
|
font-size: 18px;
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
/deep/ {
|
|
|
|
|
.el-tabs__header {
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
.title-bar {
|
|
|
|
|
height: 40px;
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
.content {
|
|
|
|
|
height: 300px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
2020-06-29 13:11:27 +08:00
|
|
|
|
.display-draft {
|
|
|
|
|
position: absolute;
|
2020-07-29 13:52:34 +08:00
|
|
|
|
right: 10px;
|
2020-06-29 13:11:27 +08:00
|
|
|
|
bottom: 28px;
|
2020-07-29 09:31:08 +08:00
|
|
|
|
// transform: translateX(calc(100% + 40px));
|
|
|
|
|
// transition: all 0.5s;
|
|
|
|
|
// &.active{
|
|
|
|
|
// transform: translateX(0);
|
|
|
|
|
// }
|
2020-07-29 13:23:25 +08:00
|
|
|
|
button {
|
2020-07-29 13:52:34 +08:00
|
|
|
|
float: right!important;
|
|
|
|
|
}
|
|
|
|
|
.button-group-box{
|
2020-07-29 13:23:25 +08:00
|
|
|
|
float: right;
|
|
|
|
|
}
|
2020-07-29 15:42:10 +08:00
|
|
|
|
/deep/ .el-button-group>.el-button:last-child {
|
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
|
border-top-left-radius: 4px;
|
|
|
|
|
border-bottom-left-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
/deep/ .el-button-group>.el-button:first-child{
|
|
|
|
|
border-top-right-radius: 4px;
|
|
|
|
|
border-bottom-right-radius: 4px;
|
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
|
border-bottom-left-radius: 0;
|
2020-07-29 17:41:19 +08:00
|
|
|
|
border-right-color: transparent;
|
2020-07-29 15:42:10 +08:00
|
|
|
|
}
|
2020-07-29 09:31:08 +08:00
|
|
|
|
}
|
2020-07-31 18:49:35 +08:00
|
|
|
|
.display_top_draft{
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 5px;
|
|
|
|
|
top: 15px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
padding-left: 44px;
|
|
|
|
|
.btn_hover{
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
z-index: 2;
|
|
|
|
|
color: #4e4d4d;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
display: table;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
float: left;
|
|
|
|
|
height: 32px;
|
|
|
|
|
}
|
|
|
|
|
.button_group_box{
|
|
|
|
|
float: left;
|
|
|
|
|
transition: all 0.5s;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
transform: translateX(0px);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-07-29 09:31:08 +08:00
|
|
|
|
.haerbin_btn_box{
|
2020-07-29 10:27:02 +08:00
|
|
|
|
width: 450px;
|
2020-07-29 09:31:08 +08:00
|
|
|
|
bottom: 15px!important;
|
2020-06-29 13:11:27 +08:00
|
|
|
|
}
|
|
|
|
|
.display-type-hb{
|
|
|
|
|
bottom: 105px;
|
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
|
</style>
|