2020-01-06 18:39:44 +08:00
|
|
|
<template>
|
2020-07-23 18:04:13 +08:00
|
|
|
<div class="main" :style="{width: canvasWidth+'px'}">
|
2020-01-06 18:39:44 +08:00
|
|
|
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
2020-08-13 15:55:25 +08:00
|
|
|
<Jl3d-MaintainerSelect v-if="jl3dmaintainershow" :is-admin="isAdmin" @back="back" @handlerMemberManage="handlerMemberManage" />
|
2020-01-06 18:39:44 +08:00
|
|
|
<ibp-plate v-show="ibpShow" ref="ibpPlate" @hideIbp="hideIbp" />
|
2020-07-14 15:35:03 +08:00
|
|
|
<template v-show="panelShow" :panelShow="panelShow">
|
2020-01-06 18:39:44 +08:00
|
|
|
<transition name="el-zoom-in-bottom">
|
2021-10-27 13:06:07 +08:00
|
|
|
<map-system-draft v-show="!specialDispatch" ref="mapCanvas" @back="back" />
|
2020-01-06 18:39:44 +08:00
|
|
|
</transition>
|
2021-10-27 13:06:07 +08:00
|
|
|
<div v-if="lineCode === '14'" v-show="prdType=='02'">
|
|
|
|
<ba-si-di ref="baSiDi" @handleDialogShow="handleDialogShow" />
|
|
|
|
<rps-dialog ref="rpsDialog" :is-run-plan="isRunPlan" :train-list="trainList" />
|
|
|
|
<tro-dialog ref="troDialog" :is-run-plan="isRunPlan" :train-list="trainList" :station-list="stationList" />
|
|
|
|
<car-pack ref="carPack" />
|
|
|
|
<tro-detail ref="troDetail" :is-run-plan="isRunPlan" :train-list="trainList" :station-list="stationList" @goTroDialog="troClick" />
|
|
|
|
<tra-dialog ref="traDialog" @openTrainTrunkDetail="openTrainTrunkDetail" />
|
|
|
|
<ttl-dialog ref="ttlDialog" />
|
|
|
|
<tmt-dialog ref="tmtDialog" />
|
|
|
|
<atr-dialog ref="atrDialog" />
|
|
|
|
<train-trunk-detail ref="trainTrunkDetail" @openTra="openTra" />
|
|
|
|
</div>
|
2022-06-28 15:04:00 +08:00
|
|
|
<div v-if="lineCode === '16'" v-show="prdType === '02'&& !showMap">
|
|
|
|
<dispatcher-station ref="dispatcherStation" @changeShowMap="changeShowMap" />
|
|
|
|
</div>
|
2020-06-05 09:38:14 +08:00
|
|
|
<menu-demon-joint
|
|
|
|
ref="demonMenu"
|
|
|
|
:group="group"
|
2020-07-31 18:49:35 +08:00
|
|
|
:offset="offset"
|
2020-07-14 14:30:37 +08:00
|
|
|
:offset-bottom="offsetBottom"
|
2020-06-05 09:38:14 +08:00
|
|
|
:data-error="dataError"
|
|
|
|
:user-role="userRole"
|
2020-06-30 14:27:32 +08:00
|
|
|
:is-admin="isAdmin"
|
2020-06-05 09:38:14 +08:00
|
|
|
:device-code="deviceCode"
|
2020-11-23 17:05:16 +08:00
|
|
|
|
2020-07-29 16:59:57 +08:00
|
|
|
@passflow="passflow"
|
2020-08-21 16:38:22 +08:00
|
|
|
@faultdevice="faultdevice"
|
2020-06-05 09:38:14 +08:00
|
|
|
@getUserRole="getUserRole"
|
|
|
|
@hidepanel="hidepanel"
|
2020-07-29 16:59:57 +08:00
|
|
|
@devicemodel="devicemodel"
|
2020-11-23 17:05:16 +08:00
|
|
|
|
2020-06-08 18:26:30 +08:00
|
|
|
@hidejl3dcctv="hidejl3dcctv"
|
2020-11-09 10:47:08 +08:00
|
|
|
@runPlanLoadShow="runPlanLoadShow"
|
2020-06-29 13:11:27 +08:00
|
|
|
@handlerMemberManage="handlerMemberManage"
|
2020-06-05 09:38:14 +08:00
|
|
|
/>
|
2020-01-06 18:39:44 +08:00
|
|
|
<menu-demon-schema
|
|
|
|
ref="menuSchema"
|
|
|
|
:group="group"
|
|
|
|
:offset="offset"
|
|
|
|
:user-role="userRole"
|
2020-06-30 14:27:32 +08:00
|
|
|
:is-admin="isAdmin"
|
2020-03-25 15:22:52 +08:00
|
|
|
:show-station="showStation"
|
2021-05-18 10:04:03 +08:00
|
|
|
:station-list="centralizedstationList"
|
2020-09-21 10:17:37 +08:00
|
|
|
:device-code="deviceCode"
|
2020-03-25 15:22:52 +08:00
|
|
|
:show-select-station="showSelectStation"
|
2020-05-09 20:24:59 +08:00
|
|
|
:data-error="dataError"
|
2020-01-06 18:39:44 +08:00
|
|
|
@runPlanLoadShow="runPlanLoadShow"
|
|
|
|
@faultChooseShow="faultChooseShow"
|
2020-03-25 15:22:52 +08:00
|
|
|
@switchStationMode="switchStationMode"
|
2022-06-28 15:04:00 +08:00
|
|
|
@changeShowMap="changeShowMap"
|
2020-01-06 18:39:44 +08:00
|
|
|
/>
|
2020-07-02 10:10:16 +08:00
|
|
|
<join-fault-choose ref="faultChoose" :group="group" :offset="offset" />
|
2020-01-06 18:39:44 +08:00
|
|
|
<join-run-plan-Load ref="runPlanLoad" :group="group" />
|
2021-10-27 13:06:07 +08:00
|
|
|
<menu-system-time v-show="!specialDispatch" ref="menuSystemTime" :offset="offset" :group="group" />
|
2020-05-19 14:47:47 +08:00
|
|
|
<menu-train-list v-if="prdType=='02'" @setCenter="setCenter" />
|
2020-07-14 14:30:37 +08:00
|
|
|
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <!-- 成员管理 -->
|
2021-05-18 10:04:03 +08:00
|
|
|
<add-member ref="addMember" :station-list="stationList" />
|
2022-07-06 11:19:22 +08:00
|
|
|
<ticket-info v-if="lineCode === '16'" ref="ticketInfo" />
|
2020-07-08 13:11:22 +08:00
|
|
|
<Jl3d-Device
|
2020-12-07 17:14:06 +08:00
|
|
|
v-if="deviceif"
|
|
|
|
v-show="deviceShow"
|
2020-07-08 13:11:22 +08:00
|
|
|
ref="Jl3dDevice"
|
|
|
|
:panel-show="deviceShow"
|
|
|
|
@closedevice3dview="devicemodel"
|
|
|
|
/>
|
2020-07-14 15:35:03 +08:00
|
|
|
</template>
|
2020-01-06 18:39:44 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-03-17 14:54:03 +08:00
|
|
|
import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
|
2020-01-06 18:39:44 +08:00
|
|
|
import MenuDemonJoint from './menuDemon';
|
|
|
|
import MenuDemonSchema from './menuSchema';
|
2020-03-17 14:54:03 +08:00
|
|
|
import JoinFaultChoose from '@/views/newMap/displayNew/demon/faultChoose';
|
|
|
|
import JoinRunPlanLoad from '@/views/newMap/displayNew/demon/runPlanLoad';
|
|
|
|
import menuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
2020-03-16 14:47:59 +08:00
|
|
|
import IbpPlate from '@/views/ibp/ibpsystem/index';
|
2020-05-19 14:47:47 +08:00
|
|
|
import MenuTrainList from './menuTrainList';
|
2020-01-06 18:39:44 +08:00
|
|
|
import { mapGetters } from 'vuex';
|
2020-08-07 09:44:03 +08:00
|
|
|
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
2020-11-27 17:37:13 +08:00
|
|
|
import { loadMapDataById } from '@/utils/loaddata';
|
2020-09-11 09:26:51 +08:00
|
|
|
import { clearSimulation, getSimulationInfoNew, getSimulationUserInfo } from '@/api/simulation';
|
2020-07-08 13:11:22 +08:00
|
|
|
import { getSessionStorage } from '@/utils/auth';
|
2020-01-06 18:39:44 +08:00
|
|
|
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
2020-07-08 13:11:22 +08:00
|
|
|
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
2020-08-13 15:55:25 +08:00
|
|
|
import Jl3dMaintainerSelect from '@/views/jlmap3d/maintainer/jl3dmaintainerselect';
|
2020-01-06 18:39:44 +08:00
|
|
|
import { EventBus } from '@/scripts/event-bus';
|
2020-03-17 14:54:03 +08:00
|
|
|
import { timeFormat } from '@/utils/date';
|
2020-01-06 18:39:44 +08:00
|
|
|
import { Message } from 'element-ui';
|
2020-07-28 16:41:21 +08:00
|
|
|
import { getToken } from '@/utils/auth';
|
2020-07-02 17:57:48 +08:00
|
|
|
import MembersManage from './memberManage/membersManage';
|
|
|
|
import AddMember from './memberManage/addMember';
|
2021-10-27 13:06:07 +08:00
|
|
|
import BaSiDi from '@/views/newMap/displayBaSiDi/baSiDiNew';
|
|
|
|
import RpsDialog from '@/views/newMap/displayBaSiDi/rps';
|
|
|
|
import TroDialog from '@/views/newMap/displayBaSiDi/tro';
|
|
|
|
import CarPack from '@/views/newMap/displayBaSiDi/carPack';
|
|
|
|
import TroDetail from '@/views/newMap/displayBaSiDi/troDetail';
|
|
|
|
import TraDialog from '@/views/newMap/displayBaSiDi/tra';
|
|
|
|
import TtlDialog from '@/views/newMap/displayBaSiDi/ttl';
|
|
|
|
import TmtDialog from '@/views/newMap/displayBaSiDi/tmt';
|
|
|
|
import AtrDialog from '@/views/newMap/displayBaSiDi/atr';
|
|
|
|
import TrainTrunkDetail from '@/views/newMap/displayBaSiDi/trainTrunkDetail';
|
2022-06-28 15:04:00 +08:00
|
|
|
import DispatcherStation from './dispatcherStation';
|
2022-07-06 11:19:22 +08:00
|
|
|
import TicketInfo from '../trainTicket/ticketInfo';
|
2021-10-27 13:06:07 +08:00
|
|
|
import Vue from 'vue';
|
2020-01-06 18:39:44 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'JointTrainingDraft',
|
|
|
|
components: {
|
|
|
|
MapSystemDraft,
|
|
|
|
MenuDemonJoint,
|
|
|
|
MenuDemonSchema,
|
|
|
|
JoinFaultChoose,
|
|
|
|
JoinRunPlanLoad,
|
2020-05-19 14:47:47 +08:00
|
|
|
MenuTrainList,
|
2020-01-06 18:39:44 +08:00
|
|
|
menuSystemTime,
|
|
|
|
Jl3dDrive,
|
2020-08-13 15:55:25 +08:00
|
|
|
Jl3dMaintainerSelect,
|
2020-06-05 09:38:14 +08:00
|
|
|
IbpPlate,
|
2020-06-29 13:11:27 +08:00
|
|
|
MembersManage,
|
2020-07-08 13:11:22 +08:00
|
|
|
AddMember,
|
2021-10-27 13:06:07 +08:00
|
|
|
Jl3dDevice,
|
|
|
|
BaSiDi,
|
|
|
|
RpsDialog,
|
|
|
|
TroDialog,
|
|
|
|
CarPack,
|
|
|
|
TroDetail,
|
|
|
|
TraDialog,
|
|
|
|
TtlDialog,
|
|
|
|
TmtDialog,
|
|
|
|
AtrDialog,
|
2022-06-28 15:04:00 +08:00
|
|
|
TrainTrunkDetail,
|
2022-07-06 11:19:22 +08:00
|
|
|
DispatcherStation,
|
|
|
|
TicketInfo
|
2020-01-06 18:39:44 +08:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2020-11-23 17:05:16 +08:00
|
|
|
// trainingObj: {},
|
|
|
|
// timeDemonNum: 0,
|
2020-01-06 18:39:44 +08:00
|
|
|
offset: 10,
|
2020-07-14 14:30:37 +08:00
|
|
|
offsetBottom: 15,
|
2020-01-06 18:39:44 +08:00
|
|
|
userRole: '',
|
|
|
|
deviceCode: '',
|
|
|
|
group: '',
|
|
|
|
mapId: '',
|
|
|
|
lineCode: '',
|
|
|
|
simulationShow: false,
|
|
|
|
drivingShow: false,
|
2020-05-19 16:49:56 +08:00
|
|
|
jl3dmaintainershow:false,
|
2020-01-06 18:39:44 +08:00
|
|
|
ibpShow: false,
|
|
|
|
panelShow: true,
|
2020-03-25 15:22:52 +08:00
|
|
|
ibpPart: '',
|
|
|
|
showStation: '',
|
2021-05-18 10:04:03 +08:00
|
|
|
centralizedstationList: [],
|
2020-07-24 18:38:19 +08:00
|
|
|
showSelectStation: false, // 宁波线集中站 显示
|
2020-05-09 20:24:59 +08:00
|
|
|
mapViewLoadedOver: false,
|
2020-06-05 09:38:14 +08:00
|
|
|
dataError: false,
|
2020-06-30 14:27:32 +08:00
|
|
|
isAdmin: false,
|
2020-12-07 17:14:06 +08:00
|
|
|
deviceif:false,
|
|
|
|
deviceShow: true,
|
2021-10-27 13:06:07 +08:00
|
|
|
centralizedStationMap: {},
|
2022-06-28 15:04:00 +08:00
|
|
|
selfJmap: null,
|
|
|
|
showMap: false
|
2020-01-06 18:39:44 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapGetters([
|
2020-07-27 18:04:47 +08:00
|
|
|
'canvasWidth'
|
2020-01-06 18:39:44 +08:00
|
|
|
]),
|
|
|
|
...mapGetters('map', [
|
2020-06-10 16:56:52 +08:00
|
|
|
'map',
|
2021-05-18 10:04:03 +08:00
|
|
|
'bigScreenConfig',
|
2021-09-28 09:42:00 +08:00
|
|
|
'stationList',
|
|
|
|
'sectionList',
|
2021-10-27 13:06:07 +08:00
|
|
|
'signalList',
|
2021-12-09 13:48:15 +08:00
|
|
|
'trainList',
|
|
|
|
'trainWindowList'
|
2020-01-06 18:39:44 +08:00
|
|
|
]),
|
|
|
|
width() {
|
|
|
|
return this.$store.state.app.width;
|
|
|
|
},
|
|
|
|
height() {
|
|
|
|
return this.$store.state.app.height;
|
|
|
|
},
|
|
|
|
userId() {
|
|
|
|
return this.$store.state.user ? this.$store.state.user.id : '';
|
2020-05-19 14:47:47 +08:00
|
|
|
},
|
|
|
|
prdType() {
|
|
|
|
return this.$store.state.training.prdType;
|
2020-05-25 13:40:25 +08:00
|
|
|
},
|
|
|
|
project() {
|
|
|
|
return getSessionStorage('project');
|
2021-10-27 13:06:07 +08:00
|
|
|
},
|
|
|
|
specialDispatch() {
|
2022-06-28 15:04:00 +08:00
|
|
|
return (this.lineCode === '14' && this.$store.state.training.prdType === '02') || (this.lineCode === '16' && this.$store.state.training.prdType === '02' && !this.showMap);
|
2021-10-27 13:06:07 +08:00
|
|
|
},
|
|
|
|
isRunPlan() {
|
|
|
|
return this.$store.state.training.started;
|
2020-01-06 18:39:44 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
2020-07-31 15:24:44 +08:00
|
|
|
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
2020-01-06 18:39:44 +08:00
|
|
|
this.setPosition();
|
|
|
|
},
|
2021-10-27 13:06:07 +08:00
|
|
|
'$store.state.menuOperation.selectedCount':function(em) {
|
|
|
|
const device = this.$store.state.menuOperation.selected;
|
|
|
|
if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') {
|
|
|
|
this.$refs.troDialog.doClose();
|
|
|
|
this.$refs.troDetail.doShow(device.code);
|
|
|
|
}
|
|
|
|
},
|
2020-07-24 18:38:19 +08:00
|
|
|
'$store.state.training.prdType': function (prdType) {
|
2020-07-27 14:11:43 +08:00
|
|
|
this.setPosition();
|
2020-12-16 13:25:55 +08:00
|
|
|
if (prdType == '01') {
|
2020-03-25 15:22:52 +08:00
|
|
|
this.showSelectStation = true;
|
2020-06-10 16:56:52 +08:00
|
|
|
this.cancelBigScreenMode();
|
2020-12-16 13:25:55 +08:00
|
|
|
} else if (prdType == '02') {
|
2020-03-25 15:22:52 +08:00
|
|
|
this.showSelectStation = false;
|
2020-06-10 16:56:52 +08:00
|
|
|
this.cancelBigScreenMode();
|
2020-07-24 18:38:19 +08:00
|
|
|
} else if (prdType == '07') { // 大屏
|
2020-06-10 16:56:52 +08:00
|
|
|
this.setBigScreenMode();
|
|
|
|
} else {
|
|
|
|
this.cancelBigScreenMode();
|
2020-03-25 15:22:52 +08:00
|
|
|
}
|
2020-03-20 17:56:20 +08:00
|
|
|
},
|
2022-08-11 11:17:14 +08:00
|
|
|
'$store.state.map.mapDataLoadedCount':function(val) {
|
|
|
|
const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT'];
|
|
|
|
if (roleList.includes(this.$store.state.training.roles)) {
|
|
|
|
this.stationRoleShow(this.showStation);
|
|
|
|
}
|
|
|
|
},
|
2020-07-24 18:38:19 +08:00
|
|
|
'$store.state.map.mapViewLoadedCount': function () { // 地图视图加载完成标识
|
2020-07-27 14:11:43 +08:00
|
|
|
this.mapViewLoadedOver = true;
|
2020-05-19 13:41:48 +08:00
|
|
|
this.showSelectStation && this.setShowStation(this.showStation);
|
2020-09-11 09:26:51 +08:00
|
|
|
// this.initMemberUserInfo();
|
2020-07-08 13:11:22 +08:00
|
|
|
if (this.$route.query.type === 'VR_PSD') {
|
2020-12-07 17:14:06 +08:00
|
|
|
this.deviceif = true;
|
2020-12-11 19:49:48 +08:00
|
|
|
this.deviceShow = true;
|
2020-07-08 13:11:22 +08:00
|
|
|
}
|
2020-07-08 15:49:16 +08:00
|
|
|
if (this.$route.query.type === 'DRIVE') {
|
2020-07-30 15:58:28 +08:00
|
|
|
this.$store.dispatch('training/setPrdType', '04');
|
|
|
|
this.$store.dispatch('training/setRoles', 'DRIVER');
|
2020-07-08 15:49:16 +08:00
|
|
|
this.hidepanel();
|
|
|
|
}
|
2020-07-03 18:42:29 +08:00
|
|
|
},
|
2020-09-11 09:26:51 +08:00
|
|
|
// '$store.state.socket.memberChangeCount': function () { // 仿真成员变更
|
|
|
|
// this.initMemberUserInfo();
|
|
|
|
// },
|
2020-01-06 18:39:44 +08:00
|
|
|
'$store.state.socket.permissionOver': function () {
|
|
|
|
this.$alert(this.$t('tip.userRightsHaveBeenReclaimed'), this.$t('tip.hint'), {
|
|
|
|
confirmButtonText: this.$t('global.confirm'),
|
|
|
|
showClose: false,
|
|
|
|
callback: async (action) => {
|
|
|
|
await this.$store.dispatch('training/over');
|
2020-03-17 14:54:03 +08:00
|
|
|
await clearSimulation(this.group);
|
2020-01-06 18:39:44 +08:00
|
|
|
this.$router.go(-1);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
2020-07-28 11:29:39 +08:00
|
|
|
'$store.state.app.windowSizeCount': function() { // 窗口变化
|
2020-07-29 16:59:57 +08:00
|
|
|
this.setWindowSize();
|
|
|
|
this.setPosition();
|
2020-01-06 18:39:44 +08:00
|
|
|
},
|
|
|
|
$route() {
|
2020-07-27 13:15:01 +08:00
|
|
|
this.initLoadData();
|
2020-03-25 15:22:52 +08:00
|
|
|
},
|
2020-07-24 18:38:19 +08:00
|
|
|
'$store.state.map.map': function (map) {
|
|
|
|
if (map) {
|
2021-05-18 10:04:03 +08:00
|
|
|
this.setCentralizedstationList(map); // 获取集中站列表
|
2020-07-08 14:40:04 +08:00
|
|
|
}
|
2020-06-30 18:35:57 +08:00
|
|
|
},
|
2020-07-27 18:04:47 +08:00
|
|
|
'$store.state.socket.simulationRoleList':function(list) {
|
|
|
|
if (list && list.length) { // 人员变化监控
|
|
|
|
this.checkRoleChange(list);
|
2020-06-30 18:35:57 +08:00
|
|
|
}
|
2022-07-06 11:19:22 +08:00
|
|
|
},
|
|
|
|
'$store.state.socket.ticketInfo': function(val) {
|
|
|
|
if (val) {
|
|
|
|
this.$refs.ticketInfo.doShow(val);
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
async created() {
|
|
|
|
this.group = this.$route.query.group;
|
|
|
|
this.mapId = this.$route.query.mapId;
|
|
|
|
this.lineCode = this.$route.query.lineCode;
|
|
|
|
Message.closeAll();
|
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
await this.setWindowSize();
|
|
|
|
await this.initLoadData();
|
2021-10-27 13:06:07 +08:00
|
|
|
this.selfJmap = Vue.prototype.$jlmap;
|
2020-01-06 18:39:44 +08:00
|
|
|
},
|
|
|
|
async beforeDestroy() {
|
|
|
|
await this.$store.dispatch('training/end', null);
|
|
|
|
await this.$store.dispatch('training/reset');
|
|
|
|
await this.$store.dispatch('map/mapClear');
|
2021-01-28 10:29:38 +08:00
|
|
|
await this.$store.dispatch('menuOperation/resetRequestList');
|
2022-08-03 14:37:59 +08:00
|
|
|
this.$store.dispatch('training/setUserRole', '');
|
2020-01-06 18:39:44 +08:00
|
|
|
Message.closeAll();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
// 设置菜单和工具栏位置
|
|
|
|
setPosition() {
|
|
|
|
this.$nextTick(() => {
|
2020-07-28 14:11:17 +08:00
|
|
|
this.offset = 10;
|
|
|
|
this.offsetBottom = 15;
|
2020-01-06 18:39:44 +08:00
|
|
|
const menuBar = document.getElementById('menuBar');
|
|
|
|
const menuTool = document.getElementById('menuTool');
|
2020-07-14 14:30:37 +08:00
|
|
|
const menuBottom = document.getElementById('menuButton');
|
2020-01-06 18:39:44 +08:00
|
|
|
if (menuBar) {
|
2020-07-28 11:29:39 +08:00
|
|
|
this.offset = (menuBar.offsetHeight || 0) + 15;
|
2020-01-06 18:39:44 +08:00
|
|
|
}
|
|
|
|
if (menuTool) {
|
2020-07-28 11:29:39 +08:00
|
|
|
this.offset = (menuTool.offsetHeight || 0) + 15;
|
2020-07-21 15:38:47 +08:00
|
|
|
}
|
|
|
|
const buttonWidth = this.width - 1200;
|
2020-07-28 17:55:07 +08:00
|
|
|
if (menuBottom && buttonWidth < 780) {
|
2020-07-28 11:29:39 +08:00
|
|
|
this.offsetBottom = (menuBottom.offsetHeight || 0) + 15;
|
2020-07-14 14:30:37 +08:00
|
|
|
}
|
2022-06-28 15:04:00 +08:00
|
|
|
if (this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02') {
|
|
|
|
this.offset = 35;
|
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
});
|
|
|
|
},
|
|
|
|
// 结束加载状态
|
|
|
|
endViewLoading(isSuccess) {
|
|
|
|
if (!isSuccess) {
|
|
|
|
this.$store.dispatch('map/mapClear');
|
|
|
|
}
|
|
|
|
this.$nextTick(() => {
|
|
|
|
EventBus.$emit('viewLoading', false);
|
|
|
|
});
|
|
|
|
},
|
2020-05-19 14:47:47 +08:00
|
|
|
setCenter(code) {
|
2020-07-24 15:28:45 +08:00
|
|
|
this.$jlmap.setCenter(code);
|
2020-05-19 14:47:47 +08:00
|
|
|
},
|
2020-01-06 18:39:44 +08:00
|
|
|
// 加载地图数据
|
|
|
|
initLoadData() {
|
|
|
|
const width = document.documentElement.clientWidth;
|
|
|
|
const height = document.documentElement.clientHeight + 200;
|
|
|
|
this.$store.dispatch('config/resize', { width, height });
|
|
|
|
|
|
|
|
try {
|
|
|
|
this.loadSimulationInfo();
|
|
|
|
this.initLoadDemonData();
|
|
|
|
} catch (error) {
|
|
|
|
this.$messageBox( this.$t('error.initializationFailed') + error.message);
|
|
|
|
this.endViewLoading();
|
|
|
|
}
|
|
|
|
},
|
2020-09-11 09:26:51 +08:00
|
|
|
// initMemberUserInfo() {
|
|
|
|
// // 获取仿真成员列表
|
|
|
|
// getSimulationMemberList(this.$route.query.group).then(resp => {
|
|
|
|
// this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.$store.state.user.id });
|
|
|
|
// }).catch(() => {
|
|
|
|
// this.$messageBox('获取仿真成员列表失败!');
|
|
|
|
// });
|
|
|
|
// getAllSimulationUser(this.$route.query.group).then(resp => {
|
|
|
|
// this.$store.dispatch('training/setSimulationUserList', resp.data);
|
|
|
|
// }).catch(() => {
|
|
|
|
// this.$messageBox('获取所有仿真用户失败!');
|
|
|
|
// });
|
|
|
|
// },
|
2020-07-08 13:11:22 +08:00
|
|
|
devicemodel() {
|
2020-12-08 11:09:02 +08:00
|
|
|
if (this.deviceif == false) {
|
|
|
|
this.deviceif = true;
|
2020-07-08 13:11:22 +08:00
|
|
|
} else {
|
2020-12-08 11:09:02 +08:00
|
|
|
if (this.deviceShow == false) {
|
|
|
|
this.deviceShow = true;
|
|
|
|
} else {
|
|
|
|
this.deviceShow = false;
|
|
|
|
}
|
2020-07-08 13:11:22 +08:00
|
|
|
}
|
2020-12-07 17:14:06 +08:00
|
|
|
|
2020-07-08 13:11:22 +08:00
|
|
|
},
|
2020-07-30 15:10:10 +08:00
|
|
|
/* 地图根据仿真group获取仿真基础信息 */
|
2020-01-06 18:39:44 +08:00
|
|
|
async loadSimulationInfo() {
|
2020-07-27 14:11:43 +08:00
|
|
|
const resp = await getSimulationInfoNew(this.group);
|
2020-05-09 19:35:56 +08:00
|
|
|
if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
|
2020-08-05 15:12:40 +08:00
|
|
|
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);// 设置剧本暂停装填
|
|
|
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));// 设置仿真时间
|
2021-05-19 15:45:49 +08:00
|
|
|
// this.$store.dispatch('training/countTime');// 前端仿真时间开始跑秒
|
2020-12-15 18:15:48 +08:00
|
|
|
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
|
2020-03-17 14:54:03 +08:00
|
|
|
if (resp.data.planRunning) {
|
2020-08-05 15:12:40 +08:00
|
|
|
this.$store.dispatch('training/start');// 仿真开始按计划行车
|
2020-03-17 14:54:03 +08:00
|
|
|
} else {
|
2020-08-05 15:12:40 +08:00
|
|
|
this.$store.dispatch('training/over');// 仿真按计划行车结束
|
2020-03-17 14:54:03 +08:00
|
|
|
}
|
2020-08-07 18:28:40 +08:00
|
|
|
this.$store.dispatch('training/changeMode', {mode:TrainingMode.NORMAL}); // 设置教学模式以便操作顺利执行
|
2020-08-07 10:15:39 +08:00
|
|
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
2020-05-09 19:35:56 +08:00
|
|
|
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
|
|
|
|
this.dataError = true;
|
2020-05-09 20:24:59 +08:00
|
|
|
this.$messageBox('此地图数据正在维护中,无法运行!');
|
2020-01-06 18:39:44 +08:00
|
|
|
}
|
|
|
|
},
|
2020-07-23 16:07:27 +08:00
|
|
|
/* 获取个人仿真信息*/
|
2020-01-06 18:39:44 +08:00
|
|
|
async getUserRole() {
|
2020-06-30 14:27:32 +08:00
|
|
|
const res = await getSimulationUserInfo(this.group);
|
2020-01-06 18:39:44 +08:00
|
|
|
const data = res.data || {};
|
2020-07-08 13:49:14 +08:00
|
|
|
this.userRole = data.type || 'AUDIENCE';
|
2020-01-06 18:39:44 +08:00
|
|
|
this.deviceCode = data.deviceCode;
|
2020-08-06 19:34:13 +08:00
|
|
|
this.$store.dispatch('training/setRoleDeviceCode', data.deviceCode);
|
2020-06-30 14:27:32 +08:00
|
|
|
this.isAdmin = data.admin;
|
2020-07-01 18:52:29 +08:00
|
|
|
|
2020-08-26 17:09:55 +08:00
|
|
|
const deviceVO = JSON.parse(getSessionStorage('projectDevice'));
|
2020-07-10 18:30:37 +08:00
|
|
|
if (deviceVO && deviceVO.type === 'VR_IBP') {
|
2020-07-01 18:52:29 +08:00
|
|
|
const config = JSON.parse(deviceVO.config);
|
|
|
|
this.ibpPart = config.part.toLowerCase();
|
2020-08-26 17:43:34 +08:00
|
|
|
this.showIbp(this.deviceCode);
|
2020-01-06 18:39:44 +08:00
|
|
|
} else {
|
|
|
|
this.hideIbp();
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
},
|
|
|
|
// 仿真系统
|
|
|
|
async initLoadDemonData() {
|
|
|
|
if (this.lineCode) {
|
2020-05-25 16:38:03 +08:00
|
|
|
let resp = {data: {}};
|
2020-11-23 17:05:16 +08:00
|
|
|
resp = await this.getUserRole();
|
2020-01-06 18:39:44 +08:00
|
|
|
if (resp && resp.code == 200) {
|
2021-01-12 23:13:05 +08:00
|
|
|
this.setSimulationPrdType(resp.data.deviceCode);
|
2020-01-06 18:39:44 +08:00
|
|
|
}
|
2020-12-24 15:33:06 +08:00
|
|
|
loadMapDataById(this.mapId, 'simulation');
|
2020-01-06 18:39:44 +08:00
|
|
|
} else {
|
|
|
|
this.endViewLoading();
|
|
|
|
}
|
|
|
|
},
|
2021-10-27 13:06:07 +08:00
|
|
|
handleDialogShow(type) {
|
|
|
|
this.$refs[type].doShow();
|
|
|
|
},
|
2022-08-11 11:17:14 +08:00
|
|
|
stationRoleShow(deviceCode) {
|
|
|
|
const pictureLineCodeList = ['16'];
|
|
|
|
if (this.lineCode === '14') {
|
|
|
|
const list = [];
|
|
|
|
const mapDevice = this.$store.state.map.mapDevice;
|
|
|
|
this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData});
|
|
|
|
for (const key in mapDevice) {
|
|
|
|
list.push(mapDevice[key]);
|
|
|
|
}
|
|
|
|
this.$jlmap.updateShowMode(list, '02');
|
|
|
|
}
|
|
|
|
if (pictureLineCodeList.includes(this.lineCode) && this.$store.state.map.map && this.$store.state.map.map.pictureList) {
|
|
|
|
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === deviceCode && picture.type === 'chainStation');
|
|
|
|
if (picture) {
|
|
|
|
const mapDevice = this.$store.state.map.mapDevice;
|
|
|
|
const list = [];
|
|
|
|
const deviceList = [];
|
|
|
|
for (const key in mapDevice) {
|
|
|
|
list.push(mapDevice[key]);
|
|
|
|
deviceList.push(key);
|
|
|
|
}
|
|
|
|
this.$jlmap.updateShowStation(list, '');
|
|
|
|
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
|
|
|
|
this.$jlmap.updatePicture(deviceList);
|
|
|
|
this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
|
|
|
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[deviceCode]);
|
|
|
|
} else {
|
|
|
|
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
|
|
|
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
|
|
|
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
|
|
|
}
|
|
|
|
},
|
2020-06-30 14:27:32 +08:00
|
|
|
// 设置prdType和role
|
2020-07-24 15:28:45 +08:00
|
|
|
setSimulationPrdType(deviceCode) {
|
2020-08-11 15:46:15 +08:00
|
|
|
// Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号
|
2021-01-12 23:13:05 +08:00
|
|
|
this.showStation = '';
|
2021-10-27 13:06:07 +08:00
|
|
|
let tempData;
|
|
|
|
let dataZoom;
|
2020-06-30 14:27:32 +08:00
|
|
|
switch (this.userRole) {
|
2020-07-13 14:30:01 +08:00
|
|
|
case 'DISPATCHER':
|
|
|
|
this.$store.dispatch('training/setPrdType', '02');
|
|
|
|
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
|
|
|
this.hideIbp();
|
|
|
|
this.drivingShow = false;
|
2021-03-08 16:20:29 +08:00
|
|
|
// this.changePrdType('02');
|
2021-12-09 13:48:15 +08:00
|
|
|
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
2020-12-16 13:25:55 +08:00
|
|
|
this.mapViewLoadedOver && this.setShowStation('');
|
2020-07-28 14:11:17 +08:00
|
|
|
this.jl3dmaintainershow = false;
|
2020-07-13 14:30:01 +08:00
|
|
|
break;
|
|
|
|
case 'STATION_SUPERVISOR':
|
2021-10-27 13:06:07 +08:00
|
|
|
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
2020-07-13 14:30:01 +08:00
|
|
|
this.$store.dispatch('training/setPrdType', '01');
|
|
|
|
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
2020-12-16 13:25:55 +08:00
|
|
|
this.$refs.menuSchema.chiShowStation = deviceCode;
|
2021-01-12 23:13:05 +08:00
|
|
|
this.showStation = deviceCode;
|
2021-03-08 16:20:29 +08:00
|
|
|
// this.changePrdType('01');
|
2022-08-11 11:17:14 +08:00
|
|
|
this.stationRoleShow(deviceCode);
|
2022-07-05 10:59:58 +08:00
|
|
|
this.jl3dmaintainershow = false;
|
|
|
|
this.drivingShow = false;
|
|
|
|
break;
|
|
|
|
case 'STATION_ASSISTANT':
|
|
|
|
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
|
|
|
this.$store.dispatch('training/setPrdType', '01');
|
|
|
|
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
|
|
|
|
this.$refs.menuSchema.chiShowStation = deviceCode;
|
|
|
|
this.showStation = deviceCode;
|
2022-08-11 11:17:14 +08:00
|
|
|
this.stationRoleShow(deviceCode);
|
2020-07-28 14:11:17 +08:00
|
|
|
this.jl3dmaintainershow = false;
|
2020-07-13 14:30:01 +08:00
|
|
|
this.drivingShow = false;
|
|
|
|
break;
|
2021-09-28 09:42:00 +08:00
|
|
|
case 'DEPOT_DISPATCHER':
|
|
|
|
this.$store.dispatch('training/setPrdType', '09');
|
|
|
|
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
|
|
|
|
this.$refs.menuSchema.chiShowStation = deviceCode;
|
|
|
|
this.showStation = deviceCode;
|
2021-12-09 13:48:15 +08:00
|
|
|
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
2021-10-11 16:41:56 +08:00
|
|
|
if (this.mapViewLoadedOver) {
|
|
|
|
const showStation = this.centralizedStationMap[deviceCode];
|
|
|
|
const list = [];
|
|
|
|
const mapDevice = this.$store.state.map.mapDevice;
|
|
|
|
for (const key in mapDevice) {
|
|
|
|
list.push(mapDevice[key]);
|
|
|
|
}
|
|
|
|
this.$jlmap.updateShowStation(list, showStation);
|
|
|
|
}
|
2021-10-27 13:06:07 +08:00
|
|
|
tempData = this.$store.state.map.map.displayList.find(item => { return item.stationCodeList.includes(deviceCode); });
|
|
|
|
dataZoom = { offsetX: tempData.offsetX, offsetY: tempData.offsetY, scaleRate: tempData.scaleRate };
|
2021-10-11 16:41:56 +08:00
|
|
|
this.$store.commit('map/setDataZoom', dataZoom);
|
|
|
|
this.$jlmap.setDepot(dataZoom);
|
2021-09-28 09:42:00 +08:00
|
|
|
this.jl3dmaintainershow = false;
|
|
|
|
this.drivingShow = false;
|
|
|
|
break;
|
2020-07-13 14:30:01 +08:00
|
|
|
case 'DRIVER':
|
2020-07-28 16:41:21 +08:00
|
|
|
this.$store.dispatch('training/setPrdType', '04');
|
2020-07-13 14:30:01 +08:00
|
|
|
this.$store.dispatch('training/setRoles', 'DRIVER');
|
2020-07-28 14:11:17 +08:00
|
|
|
this.jl3dmaintainershow = false;
|
2020-12-10 11:29:12 +08:00
|
|
|
this.hidepanel();
|
2021-10-14 14:13:55 +08:00
|
|
|
this.mapViewLoadedOver && this.setShowStation('');
|
2020-07-13 14:30:01 +08:00
|
|
|
break;
|
|
|
|
case 'MAINTAINER':
|
|
|
|
this.$store.dispatch('training/setPrdType', '');
|
|
|
|
this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
|
|
|
this.hideIbp();
|
|
|
|
this.jl3dmaintainershow = true;
|
2021-10-14 14:13:55 +08:00
|
|
|
this.mapViewLoadedOver && this.setShowStation('');
|
2020-07-28 14:11:17 +08:00
|
|
|
this.drivingShow = false;
|
2020-07-13 14:30:01 +08:00
|
|
|
break;
|
2022-06-28 15:04:00 +08:00
|
|
|
case 'RAIL_CTC':
|
|
|
|
this.$store.dispatch('training/setPrdType', '10');
|
|
|
|
this.$store.dispatch('training/setRoles', 'RAIL_CTC');
|
|
|
|
this.$refs.menuSchema.chiShowStation = deviceCode;
|
|
|
|
this.showStation = deviceCode;
|
|
|
|
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
|
|
|
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
|
|
|
this.jl3dmaintainershow = false;
|
|
|
|
this.drivingShow = false;
|
|
|
|
break;
|
2021-10-14 14:13:55 +08:00
|
|
|
default:
|
|
|
|
this.$store.dispatch('training/setPrdType', '');
|
|
|
|
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
|
|
|
this.jl3dmaintainershow = false;
|
|
|
|
this.drivingShow = false;
|
|
|
|
this.hideIbp();
|
|
|
|
this.mapViewLoadedOver && this.setShowStation('');
|
2020-06-30 14:27:32 +08:00
|
|
|
}
|
2020-10-20 16:48:28 +08:00
|
|
|
if (this.$route.query.type === 'ILW') {
|
|
|
|
this.$store.dispatch('training/setPrdType', '');
|
|
|
|
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
|
|
|
this.jl3dmaintainershow = false;
|
|
|
|
this.drivingShow = false;
|
|
|
|
this.hideIbp();
|
|
|
|
}
|
2020-06-30 14:27:32 +08:00
|
|
|
},
|
2020-01-06 18:39:44 +08:00
|
|
|
async getTrainDetail() {
|
|
|
|
try {
|
2020-11-27 17:37:13 +08:00
|
|
|
// await loadNewMapDataByGroup(this.group);
|
|
|
|
await loadMapDataById(this.mapId, 'Group');
|
2020-01-06 18:39:44 +08:00
|
|
|
await this.$store.dispatch('training/setMapDefaultState');
|
2020-12-29 09:59:43 +08:00
|
|
|
// if (this.userRole == 'MAINTAINER') {
|
|
|
|
// this.jl3dmaintainershow = true;
|
|
|
|
// }
|
2020-01-06 18:39:44 +08:00
|
|
|
} catch (error) {
|
|
|
|
this.$messageBox(this.$t('error.getMapDataFailed'));
|
|
|
|
this.endViewLoading();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
back() {
|
|
|
|
this.$refs.demonMenu.back();
|
|
|
|
},
|
2020-07-08 14:40:04 +08:00
|
|
|
runPlanLoadShow() { // 运行图加载
|
2020-01-06 18:39:44 +08:00
|
|
|
this.$refs.runPlanLoad.doShow();
|
|
|
|
},
|
2020-07-08 14:40:04 +08:00
|
|
|
faultChooseShow() { // 故障列表加载
|
2020-01-06 18:39:44 +08:00
|
|
|
this.$refs.faultChoose.doShow();
|
2020-07-29 16:59:57 +08:00
|
|
|
},
|
|
|
|
passflow() {
|
2020-07-28 14:44:37 +08:00
|
|
|
const routeData = this.$router.resolve({
|
|
|
|
path:'/jlmap3d/passengerflow',
|
|
|
|
query:{
|
|
|
|
mapid:this.mapId,
|
|
|
|
group:this.group,
|
|
|
|
project: this.project,
|
2020-09-17 15:19:00 +08:00
|
|
|
lineCode:this.lineCode,
|
2020-07-28 14:44:37 +08:00
|
|
|
noPreLogout: true
|
|
|
|
}
|
|
|
|
});
|
2021-03-13 00:20:59 +08:00
|
|
|
window.open(routeData.href, '_blank');
|
2020-01-06 18:39:44 +08:00
|
|
|
},
|
2020-08-13 15:55:25 +08:00
|
|
|
faultdevice() {
|
2020-08-21 16:38:22 +08:00
|
|
|
const routeData = this.$router.resolve({
|
|
|
|
path:'/jlmap3d/maintainer',
|
|
|
|
query:{
|
|
|
|
mapid:this.mapId,
|
|
|
|
group:this.group,
|
|
|
|
project: this.project,
|
|
|
|
noPreLogout: true
|
|
|
|
}
|
|
|
|
});
|
2021-03-13 00:20:59 +08:00
|
|
|
window.open(routeData.href, '_blank');
|
2020-08-13 15:55:25 +08:00
|
|
|
},
|
2020-01-06 18:39:44 +08:00
|
|
|
showdriving() {
|
|
|
|
this.panelShow = true;
|
|
|
|
this.drivingShow = false;
|
|
|
|
this.ibpShow = false;
|
|
|
|
},
|
|
|
|
showIbp(deviceCode) {
|
2020-07-01 18:52:29 +08:00
|
|
|
this.drivingShow = false;
|
|
|
|
this.panelShow = false;
|
|
|
|
this.ibpShow = true;
|
|
|
|
this.$refs.ibpPlate.show(deviceCode, this.ibpPart);
|
2020-01-06 18:39:44 +08:00
|
|
|
},
|
2020-06-10 16:56:52 +08:00
|
|
|
hidejl3dcctv() {
|
|
|
|
const routeData = this.$router.resolve({
|
|
|
|
path:'/jlmap3d/passengerflow',
|
|
|
|
query:{
|
|
|
|
mapid:this.mapId,
|
|
|
|
group:this.group,
|
2020-07-22 14:19:58 +08:00
|
|
|
project: this.project,
|
|
|
|
noPreLogout: true
|
2020-06-10 16:56:52 +08:00
|
|
|
}
|
|
|
|
});
|
2021-03-13 00:20:59 +08:00
|
|
|
window.open(routeData.href, '_blank');
|
2020-06-08 18:22:12 +08:00
|
|
|
},
|
2020-07-08 15:49:16 +08:00
|
|
|
hidepanel() { // 司机视角
|
2020-07-29 16:59:57 +08:00
|
|
|
if (this.$store.state.training.prdType == '04') {
|
2020-07-28 16:41:21 +08:00
|
|
|
this.panelShow = false;
|
|
|
|
this.drivingShow = true;
|
2022-07-05 09:08:12 +08:00
|
|
|
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34, 'isTraining', this.deviceCode);
|
2020-07-28 16:41:21 +08:00
|
|
|
} else {
|
|
|
|
const routeData = this.$router.resolve({
|
|
|
|
path:'/jlmap3d/sandbox',
|
|
|
|
query:{
|
|
|
|
mapid: this.mapId,
|
|
|
|
group: this.group,
|
|
|
|
token: getToken(),
|
|
|
|
project: this.project,
|
|
|
|
noPreLogout: true
|
|
|
|
}
|
|
|
|
});
|
2021-03-13 00:20:59 +08:00
|
|
|
window.open(routeData.href, '_blank');
|
2020-07-28 16:41:21 +08:00
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
},
|
2020-06-08 18:22:12 +08:00
|
|
|
|
2020-01-06 18:39:44 +08:00
|
|
|
hideIbp() {
|
|
|
|
Message.closeAll();
|
2020-07-10 10:27:49 +08:00
|
|
|
this.jl3dmaintainershow = false;
|
2020-01-06 18:39:44 +08:00
|
|
|
this.panelShow = true;
|
|
|
|
this.ibpShow = false;
|
|
|
|
if (this.$refs && this.$refs.ibpPlate) {
|
|
|
|
this.$refs.ibpPlate.ibpDestroy();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
messageInfo(message, type) {
|
|
|
|
this.$message({
|
|
|
|
showClose: true,
|
|
|
|
message: message,
|
|
|
|
type: type
|
|
|
|
});
|
|
|
|
},
|
|
|
|
setWindowSize() {
|
2020-07-28 14:11:17 +08:00
|
|
|
this.$store.dispatch('config/resize', { width: this.width, height: this.height });
|
|
|
|
if (this.prdType == '07') {
|
|
|
|
this.setBigScreenMode();
|
|
|
|
}
|
2020-03-25 15:22:52 +08:00
|
|
|
},
|
2020-07-24 18:38:19 +08:00
|
|
|
switchStationMode(stationCode) {
|
2021-01-12 23:46:07 +08:00
|
|
|
this.showStation = this.centralizedStationMap[stationCode];
|
2020-05-19 13:41:48 +08:00
|
|
|
this.setShowStation(this.showStation);
|
|
|
|
},
|
2021-03-08 16:20:29 +08:00
|
|
|
// changePrdType(val) {
|
|
|
|
// const nameList = Object.keys(this.$store.state.map.map || {});
|
|
|
|
// let list = []; let showMode = '';
|
|
|
|
// nameList.forEach(item => {
|
|
|
|
// if (item !== 'skinVO') {
|
|
|
|
// const data = this.$store.state.map.map[item];
|
|
|
|
// if (data && data.constructor === Array) {
|
|
|
|
// list = [...list, ...data];
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
// if (val === '01') {
|
|
|
|
// showMode = '03';
|
|
|
|
// } else if (val === '02') {
|
|
|
|
// showMode = '02';
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// this.$jlmap.updatePrdType(list, showMode, val);
|
|
|
|
// },
|
2020-07-24 18:38:19 +08:00
|
|
|
setShowStation(stationCode) {
|
2021-01-28 10:29:38 +08:00
|
|
|
const showStation = this.centralizedStationMap[stationCode];
|
2021-07-15 10:50:29 +08:00
|
|
|
const list = [];
|
|
|
|
const mapDevice = this.$store.state.map.mapDevice;
|
|
|
|
for (const key in mapDevice) {
|
|
|
|
list.push(mapDevice[key]);
|
2021-02-20 10:42:25 +08:00
|
|
|
}
|
2021-07-15 10:50:29 +08:00
|
|
|
this.$jlmap.updateShowStation(list, showStation);
|
|
|
|
this.$jlmap.setCenter(showStation);
|
2020-03-25 15:22:52 +08:00
|
|
|
},
|
2021-05-18 10:04:03 +08:00
|
|
|
setCentralizedstationList(map) {
|
|
|
|
this.centralizedstationList = [];
|
2020-07-24 18:38:19 +08:00
|
|
|
(map.stationList || []).forEach(item => {
|
2020-03-25 15:22:52 +08:00
|
|
|
if (item.centralized) {
|
2021-05-18 10:04:03 +08:00
|
|
|
this.centralizedstationList.push({value: item.code, name: item.name});
|
2020-07-24 15:28:45 +08:00
|
|
|
this.centralizedStationMap[item.code] = item.code;
|
|
|
|
item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => {
|
|
|
|
this.centralizedStationMap[ele] = item.code;
|
|
|
|
});
|
2020-03-25 15:22:52 +08:00
|
|
|
}
|
2020-07-28 14:11:17 +08:00
|
|
|
});
|
2021-05-18 10:04:03 +08:00
|
|
|
if (this.centralizedstationList.length && !this.showStation) {
|
|
|
|
this.showStation = this.centralizedstationList[0].value;
|
2020-03-25 15:22:52 +08:00
|
|
|
}
|
2020-06-10 16:56:52 +08:00
|
|
|
},
|
|
|
|
setBigScreenMode() {
|
2020-07-08 14:40:04 +08:00
|
|
|
if (this.bigScreenConfig.bigScreenSplitConfig.length) {
|
|
|
|
const offsetList = this.bigScreenConfig.offsetList;
|
|
|
|
const width = this.bigScreenConfig.width;
|
|
|
|
const height = this.bigScreenConfig.height;
|
2020-06-10 16:56:52 +08:00
|
|
|
const size = {
|
2020-07-08 14:40:04 +08:00
|
|
|
width: this.$store.state.app.width * width,
|
|
|
|
height: (this.$store.state.app.height - 60) * height,
|
2020-06-10 16:56:52 +08:00
|
|
|
offsetY: 60,
|
2020-07-08 14:40:04 +08:00
|
|
|
list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
|
|
|
|
offsetList: offsetList
|
2020-06-10 16:56:52 +08:00
|
|
|
};
|
2020-07-24 18:38:19 +08:00
|
|
|
this.$jlmap.off('zoom'); // 禁止缩放
|
2020-06-10 16:56:52 +08:00
|
|
|
this.$jlmap.setUpdateScreen(size);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
cancelBigScreenMode() {
|
2020-07-24 18:38:19 +08:00
|
|
|
this.$jlmap.on('zoom'); // 激活缩放
|
|
|
|
this.$jlmap.setRevoverBigScreen(); // 设置默认缩放 位移
|
2020-06-28 14:27:28 +08:00
|
|
|
},
|
2020-06-29 13:11:27 +08:00
|
|
|
handlerMemberManage() {
|
|
|
|
this.$refs.membersManage.doShow();
|
|
|
|
},
|
|
|
|
addSimulationMember() {
|
|
|
|
this.$refs.addMember.doShow();
|
2020-06-30 14:27:32 +08:00
|
|
|
},
|
2021-10-27 13:06:07 +08:00
|
|
|
troClick() {
|
|
|
|
this.$refs.troDialog.doShow();
|
|
|
|
},
|
|
|
|
openTrainTrunkDetail(index) {
|
|
|
|
this.$refs.trainTrunkDetail.doShow(index);
|
|
|
|
},
|
2022-06-28 15:04:00 +08:00
|
|
|
changeShowMap(flag) {
|
|
|
|
this.showMap = flag;
|
|
|
|
},
|
2021-10-27 13:06:07 +08:00
|
|
|
openTra() {
|
|
|
|
this.$refs.traDialog.doShow();
|
|
|
|
},
|
2020-07-01 18:52:29 +08:00
|
|
|
checkRoleChange(data) {
|
2020-06-30 18:35:57 +08:00
|
|
|
data.forEach(item => {
|
2020-07-01 18:52:29 +08:00
|
|
|
if (item.messageType === 'KICK_OUT' && item.userId == this.userId) {
|
2020-06-30 18:35:57 +08:00
|
|
|
this.$messageBox('您已经被请离房间!');
|
|
|
|
this.$refs.demonMenu.back();
|
2020-07-01 18:52:29 +08:00
|
|
|
} else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) {
|
2020-07-27 14:11:43 +08:00
|
|
|
this.userRole = item.type || 'AUDIENCE';
|
2020-08-06 19:34:13 +08:00
|
|
|
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
2022-08-03 14:37:59 +08:00
|
|
|
this.$store.dispatch('training/setUserRole', this.userRole);
|
2020-09-21 10:17:37 +08:00
|
|
|
this.deviceCode = item.deviceCode;
|
2022-07-05 09:08:12 +08:00
|
|
|
this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
|
2020-06-30 18:35:57 +08:00
|
|
|
}
|
|
|
|
});
|
2020-01-06 18:39:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
2020-07-14 18:14:39 +08:00
|
|
|
<style scoped lang="scss" rel="stylesheep/scss">
|
2020-06-29 13:11:27 +08:00
|
|
|
.main {
|
|
|
|
display: block;
|
2021-10-27 13:06:07 +08:00
|
|
|
width: 100% !important;
|
2020-06-29 13:11:27 +08:00
|
|
|
height: 100%;
|
|
|
|
overflow: hidden;
|
2020-07-14 15:35:03 +08:00
|
|
|
position: relative;
|
2021-10-27 13:06:07 +08:00
|
|
|
background: #000000;
|
2020-06-29 13:11:27 +08:00
|
|
|
}
|
2020-01-06 18:39:44 +08:00
|
|
|
</style>
|