客户端调整
This commit is contained in:
parent
0f15e2d41f
commit
a4525be99e
@ -192,6 +192,7 @@ const training = {
|
|||||||
state.prdType = prdType;
|
state.prdType = prdType;
|
||||||
},
|
},
|
||||||
setRoles: (state, roles) => {
|
setRoles: (state, roles) => {
|
||||||
|
console.log(roles, '***********');
|
||||||
state.roles = roles;
|
state.roles = roles;
|
||||||
},
|
},
|
||||||
setCenterStationCode:(state, centerStationCode) => {
|
setCenterStationCode:(state, centerStationCode) => {
|
||||||
|
@ -31,7 +31,7 @@ export function handlerUrl() {
|
|||||||
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
|
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
|
||||||
BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||||
|
@ -98,7 +98,7 @@ export default {
|
|||||||
this.hasVoice = val.hasVoice;
|
this.hasVoice = val.hasVoice;
|
||||||
this.hasTraining = val.hasTraining;
|
this.hasTraining = val.hasTraining;
|
||||||
this.trainingDesign = val.trainingDesign;
|
this.trainingDesign = val.trainingDesign;
|
||||||
this.$refs.simulationMenu.handleMenuShow();
|
// this.$refs.simulationMenu.handleMenuShow();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
@ -63,19 +63,13 @@ export default {
|
|||||||
{ label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; }, isShow: () => { return (this.$store.state.training.domConfig.hasDeviceManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) || (this.$route.query.client === 'interlockWork' && this.$route.query.projectDevice === 'ILW'); } },
|
{ label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; }, isShow: () => { return (this.$store.state.training.domConfig.hasDeviceManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) || (this.$route.query.client === 'interlockWork' && this.$route.query.projectDevice === 'ILW'); } },
|
||||||
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isDisabled: () => { return false; }, isShow: () => { return true; } },
|
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isDisabled: () => { return false; }, isShow: () => { return true; } },
|
||||||
{ label: '生成仿真号', name: 'generateQrCode', click: this.generateQrCode, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.joint && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
{ label: '生成仿真号', name: 'generateQrCode', click: this.generateQrCode, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.joint && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
||||||
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasLpf && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: this.isShowLpf},
|
||||||
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
||||||
{ label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
{ label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
||||||
{ label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
|
{ label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
|
||||||
isShow: () => {
|
isShow: () => this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$store.state.map.picture !== 'diagramEdit' },
|
||||||
return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER &&
|
|
||||||
(this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan'));
|
|
||||||
} },
|
|
||||||
{ label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
|
{ label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
|
||||||
isShow: () => {
|
isShow: () => this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$store.state.map.picture !== 'diagramEdit' },
|
||||||
return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER &&
|
|
||||||
(this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan'));
|
|
||||||
} },
|
|
||||||
{ label: '退出', name: 'quit', click: this.exitSim, isDisabled: () => { return false; }, isShow: () => { return true; } }
|
{ label: '退出', name: 'quit', click: this.exitSim, isDisabled: () => { return false; }, isShow: () => { return true; } }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -95,17 +89,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.ibp.moreScreen': function (val) {
|
|
||||||
this.handleMenuShow();
|
|
||||||
},
|
|
||||||
'$store.state.training.simulationUserType': function (val) {
|
|
||||||
this.handleMenuShow();
|
|
||||||
},
|
|
||||||
'$store.state.map.picture': function (val) {
|
|
||||||
if (val == 'testRunplan') {
|
|
||||||
this.handleMenuShow();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'$store.state.socket.simulationOver':function(val) {
|
'$store.state.socket.simulationOver':function(val) {
|
||||||
this.back();
|
this.back();
|
||||||
},
|
},
|
||||||
@ -124,6 +107,21 @@ export default {
|
|||||||
window.removeEventListener('click', this.hideMenuList);
|
window.removeEventListener('click', this.hideMenuList);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
isShowLpf() {
|
||||||
|
let flag = this.$store.state.training.simulationUserType === SimulationUserType.TEACHER;
|
||||||
|
if (flag) {
|
||||||
|
const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList || [] : [];
|
||||||
|
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
|
||||||
|
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
|
||||||
|
flag = false;
|
||||||
|
mapClientList.forEach(client => {
|
||||||
|
if (client.type === 'largePassengerView' && clientIdList.includes(client.id)) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
},
|
||||||
switchOffset() {
|
switchOffset() {
|
||||||
EventBus.$emit('switchOffset');
|
EventBus.$emit('switchOffset');
|
||||||
},
|
},
|
||||||
@ -141,6 +139,7 @@ export default {
|
|||||||
},
|
},
|
||||||
showMenuList(event) {
|
showMenuList(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
this.handleMenuShow();
|
||||||
this.isShowMenuList = !this.isShowMenuList;
|
this.isShowMenuList = !this.isShowMenuList;
|
||||||
this.active = -1;
|
this.active = -1;
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" style="height: 100%">
|
<div v-loading="loading" style="height: 100%">
|
||||||
<dispatcher-work v-if="picture === 'dispatchWork'" ref="dispatcherWork" />
|
<dispatcher-work v-if="picture === 'dispatchWork'" ref="dispatcherWork" />
|
||||||
<local-work v-else-if="picture === 'localWork'" ref="localWork" :centralized-station-map="centralizedStationMap" />
|
<local-work v-else-if="picture === 'localWork'" ref="localWork" :now-terminal="nowTerminal" :centralized-station-map="centralizedStationMap" />
|
||||||
<ncc-work v-else-if="picture === 'nccWork'" ref="nccWork" />
|
<ncc-work v-else-if="picture === 'nccWork'" ref="nccWork" />
|
||||||
<jl3d-drive v-else-if="picture === 'drivingPlan'" ref="jl3dDrive" />
|
<jl3d-drive v-else-if="picture === 'drivingPlan'" ref="jl3dDrive" />
|
||||||
<jl3d-device v-else-if="picture === 'jl3dModle'" ref="jl3dModle" />
|
<jl3d-device v-else-if="picture === 'jl3dModle'" ref="jl3dModle" />
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<terminal-menu
|
<terminal-menu
|
||||||
v-if="menuShow"
|
v-if="menuShow"
|
||||||
ref="terminalMenu"
|
ref="terminalMenu"
|
||||||
:picture="picture"
|
:now-terminal="nowTerminal"
|
||||||
@pictureChange="pictureChange"
|
@pictureChange="pictureChange"
|
||||||
@loadingChange="loadingChange"
|
@loadingChange="loadingChange"
|
||||||
/>
|
/>
|
||||||
@ -138,7 +138,8 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
isFirst: true,
|
isFirst: true,
|
||||||
group: '',
|
group: '',
|
||||||
showStationCode: ''
|
showStationCode: '',
|
||||||
|
nowTerminal: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -155,7 +156,7 @@ export default {
|
|||||||
return this.$store.state.training.roleDeviceCode;
|
return this.$store.state.training.roleDeviceCode;
|
||||||
},
|
},
|
||||||
menuShow() {
|
menuShow() {
|
||||||
return !this.$route.query.singleClient || !this.$store.state.training.roles;
|
return !this.$route.query.singleClient && !this.$route.query.projectDevice;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -175,11 +176,6 @@ export default {
|
|||||||
if (map) {
|
if (map) {
|
||||||
this.initMemberUserInfo();
|
this.initMemberUserInfo();
|
||||||
this.setCentralizedStationList(map); // 获取集中站列表
|
this.setCentralizedStationList(map); // 获取集中站列表
|
||||||
if (this.$route.query.client) {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.pictureChange(this.$route.query.client);
|
|
||||||
}, 200);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('[ERROR] ', error);
|
console.log('[ERROR] ', error);
|
||||||
@ -190,7 +186,8 @@ export default {
|
|||||||
const device = this.$store.state.menuOperation.selected;
|
const device = this.$store.state.menuOperation.selected;
|
||||||
if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') {
|
if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') {
|
||||||
this.showStationCode = device.code;
|
this.showStationCode = device.code;
|
||||||
this.pictureChange('troDetailWork');
|
const terminal = this.findTerminalFromMap('troDetailWork');
|
||||||
|
this.pictureChange(terminal);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.simulationReset': function (val) { // 仿真结束标识
|
'$store.state.socket.simulationReset': function (val) { // 仿真结束标识
|
||||||
@ -219,9 +216,22 @@ export default {
|
|||||||
this.$store.dispatch('socket/clearSimulationRoleList');
|
this.$store.dispatch('socket/clearSimulationRoleList');
|
||||||
this.$store.dispatch('trainingNew/clearTrainingData');
|
this.$store.dispatch('trainingNew/clearTrainingData');
|
||||||
this.$store.dispatch('map/resetActiveTrainList');
|
this.$store.dispatch('map/resetActiveTrainList');
|
||||||
|
this.$store.dispatch('map/setPicture', '');
|
||||||
this.$store.dispatch('runPlan/setPlanData', []);
|
this.$store.dispatch('runPlan/setPlanData', []);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
findTerminalFromMap(type) {
|
||||||
|
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
|
||||||
|
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
|
||||||
|
return mapClientList.find(item => item.type === type && (!item.deviceCode || item.deviceCode === this.roleDeviceCode));
|
||||||
|
},
|
||||||
|
initTerminalIfNoDefault() {
|
||||||
|
if (!this.$store.state.training.roles && !this.$route.query.client) {
|
||||||
|
let client = this.findTerminalFromMap('dispatchWork');
|
||||||
|
if (!client) { client = this.findTerminalFromMap('troDetailWork'); }
|
||||||
|
this.pictureChange(client);
|
||||||
|
}
|
||||||
|
},
|
||||||
async initMemberUserInfo() {
|
async initMemberUserInfo() {
|
||||||
try {
|
try {
|
||||||
let memberResp = '';
|
let memberResp = '';
|
||||||
@ -230,6 +240,7 @@ export default {
|
|||||||
userResp = await getAllSimulationUser(this.group);
|
userResp = await getAllSimulationUser(this.group);
|
||||||
this.$store.dispatch('training/setMemberList', {memberList: memberResp.data, userId: this.userId});
|
this.$store.dispatch('training/setMemberList', {memberList: memberResp.data, userId: this.userId});
|
||||||
this.$store.dispatch('training/setSimulationUserList', userResp.data);
|
this.$store.dispatch('training/setSimulationUserList', userResp.data);
|
||||||
|
this.initTerminalIfNoDefault();
|
||||||
} catch {
|
} catch {
|
||||||
this.$messageBox('获取仿真成员或用户列表失败!');
|
this.$messageBox('获取仿真成员或用户列表失败!');
|
||||||
}
|
}
|
||||||
@ -259,36 +270,39 @@ export default {
|
|||||||
this.pictureChange(data.name);
|
this.pictureChange(data.name);
|
||||||
this.loadPlanId = data.planId;
|
this.loadPlanId = data.planId;
|
||||||
},
|
},
|
||||||
pictureChange(val) {
|
pictureChange(terminal) {
|
||||||
this.picture = val;
|
this.picture = terminal.type;
|
||||||
|
this.nowTerminal = terminal;
|
||||||
|
console.log(terminal, this.picture);
|
||||||
this.$store.dispatch('map/setPicture', this.picture);
|
this.$store.dispatch('map/setPicture', this.picture);
|
||||||
if (val === 'ibp') {
|
if (this.picture === 'ibp') {
|
||||||
this.$nextTick(() => { this.$refs.ibpPlate.show(this.roleDeviceCode, ''); });
|
const deviceCode = this.nowTerminal.deviceCode || this.roleDeviceCode;
|
||||||
} else if (val === 'drivingPlan') {
|
this.$nextTick(() => { this.$refs.ibpPlate.show(deviceCode, ''); });
|
||||||
|
} else if (this.picture === 'drivingPlan') {
|
||||||
this.$nextTick(() => { this.$refs.jl3dDrive.show(this.mapId, this.group); this.mapViewLoaded(true); });
|
this.$nextTick(() => { this.$refs.jl3dDrive.show(this.mapId, this.group); this.mapViewLoaded(true); });
|
||||||
} else if (val === 'trafficTerminal') {
|
} else if (this.picture === 'trafficTerminal') {
|
||||||
this.$nextTick(() => { this.subscribe('CTC'); });
|
this.$nextTick(() => { this.subscribe('CTC'); });
|
||||||
} else if (val === 'largePassengerView') {
|
} else if (this.picture === 'largePassengerView') {
|
||||||
this.$nextTick(() => { this.subscribe('LPF'); });
|
this.$nextTick(() => { this.subscribe('LPF'); });
|
||||||
} else if (val === 'emergency') {
|
} else if (this.picture === 'emergency') {
|
||||||
this.$nextTick(() => { this.subscribe('YJDDZH'); });
|
this.$nextTick(() => { this.subscribe('YJDDZH'); });
|
||||||
} else if (val === 'diagramPreview') {
|
} else if (this.picture === 'diagramPreview') {
|
||||||
this.$nextTick(() => { this.subscribe('RUNFACT'); });
|
this.$nextTick(() => { this.subscribe('RUNFACT'); });
|
||||||
} else if (val === 'digitalStand') {
|
} else if (this.picture === 'digitalStand') {
|
||||||
this.$nextTick(() => { this.subscribe('JL3D'); });
|
this.$nextTick(() => { this.subscribe('JL3D'); });
|
||||||
} else if (val === 'cctvView') {
|
} else if (this.picture === 'cctvView') {
|
||||||
const RealCctvList = ['richorjoint', 'richorhhcj'];
|
const RealCctvList = ['richorjoint', 'richorhhcj'];
|
||||||
const project = this.$route.query.project || 'login';
|
const project = this.$route.query.project || 'login';
|
||||||
if (!RealCctvList.includes(project)) {
|
if (!RealCctvList.includes(project)) {
|
||||||
this.$nextTick(() => { this.subscribe('JL3D'); });
|
this.$nextTick(() => { this.subscribe('JL3D'); });
|
||||||
}
|
}
|
||||||
} else if (val === 'scheduleWork') {
|
} else if (this.picture === 'scheduleWork') {
|
||||||
this.mapViewLoaded(true);
|
this.mapViewLoaded(true);
|
||||||
} else if (val === 'dispatcherManage') {
|
} else if (this.picture === 'dispatcherManage') {
|
||||||
this.mapViewLoaded(true);
|
this.mapViewLoaded(true);
|
||||||
} else if (val === 'dispatchingCommand') {
|
} else if (this.picture === 'dispatchingCommand') {
|
||||||
this.$nextTick(() => { this.subscribe('CTC'); });
|
this.$nextTick(() => { this.subscribe('CTC'); });
|
||||||
} else if (val === 'nccWork') {
|
} else if (this.picture === 'nccWork') {
|
||||||
this.$nextTick(() => { this.subscribe('NCC'); });
|
this.$nextTick(() => { this.subscribe('NCC'); });
|
||||||
}
|
}
|
||||||
this.$nextTick(() => { this.loading = false; });
|
this.$nextTick(() => { this.loading = false; });
|
||||||
|
@ -20,6 +20,12 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
nowTerminal: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -63,12 +69,13 @@ export default {
|
|||||||
'$store.state.map.initJlmapLoadedCount': function (val) {
|
'$store.state.map.initJlmapLoadedCount': function (val) {
|
||||||
this.handleLocalWorkData();
|
this.handleLocalWorkData();
|
||||||
},
|
},
|
||||||
'$store.state.training.roleDeviceCode': function (val) {
|
nowTerminal() {
|
||||||
const type = this.datie ? 'chainStation' : 'localWork';
|
const type = this.datie ? 'chainStation' : 'localWork';
|
||||||
if (this.mapData && this.mapData.pictureList) {
|
if (this.mapData && this.mapData.pictureList) {
|
||||||
const picture = this.mapData.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === type);
|
const deviceCode = this.nowTerminal.deviceCode || this.roleDeviceCode;
|
||||||
|
const picture = this.mapData.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(deviceCode) && picture.type === type);
|
||||||
if (picture) {
|
if (picture) {
|
||||||
this.handlerPictureShow(picture);
|
this.handlerPictureShow(picture, deviceCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,24 +91,25 @@ export default {
|
|||||||
const logicData = {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData};
|
const logicData = {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData};
|
||||||
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
|
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
|
||||||
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
|
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
|
||||||
|
const deviceCode = this.nowTerminal.deviceCode || this.roleDeviceCode;
|
||||||
if (this.mapData && this.mapData.pictureList) {
|
if (this.mapData && this.mapData.pictureList) {
|
||||||
let type = this.datie ? 'chainStation' : 'localWork';
|
let type = this.datie ? 'chainStation' : 'localWork';
|
||||||
const station = this.mapDevice[this.roleDeviceCode];
|
const station = this.mapDevice[deviceCode];
|
||||||
if (station && station.depot) {
|
if (station && station.depot) {
|
||||||
type = 'chainStation';
|
type = 'chainStation';
|
||||||
}
|
}
|
||||||
const picture = this.mapData.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === type);
|
const picture = this.mapData.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(deviceCode) && picture.type === type);
|
||||||
if (picture) {
|
if (picture) {
|
||||||
this.handlerPictureShow(picture);
|
this.handlerPictureShow(picture, deviceCode);
|
||||||
} else {
|
} else {
|
||||||
this.handlerSwitchStationMode();
|
this.handlerSwitchStationMode(deviceCode);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.handlerSwitchStationMode();
|
this.handlerSwitchStationMode(deviceCode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 新的画面显示逻辑
|
// 新的画面显示逻辑
|
||||||
handlerPictureShow(picture) {
|
handlerPictureShow(picture, deviceCode) {
|
||||||
const list = [];
|
const list = [];
|
||||||
const deviceList = [];
|
const deviceList = [];
|
||||||
for (const key in this.mapDevice) {
|
for (const key in this.mapDevice) {
|
||||||
@ -119,14 +127,14 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
this.$jlmap.updateTransform(picture.scaling, picture.origin);
|
||||||
}
|
}
|
||||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[this.roleDeviceCode]);
|
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[deviceCode]);
|
||||||
}, 10);
|
}, 10);
|
||||||
},
|
},
|
||||||
// 旧的分集中站显示逻辑
|
// 旧的分集中站显示逻辑
|
||||||
handlerSwitchStationMode() {
|
handlerSwitchStationMode(deviceCode) {
|
||||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||||
this.showStation = this.centralizedStationMap[this.roleDeviceCode];
|
this.showStation = this.centralizedStationMap[deviceCode];
|
||||||
const showStation = this.centralizedStationMap[this.roleDeviceCode];
|
const showStation = this.centralizedStationMap[deviceCode];
|
||||||
const list = [];
|
const list = [];
|
||||||
for (const key in this.mapDevice) {
|
for (const key in this.mapDevice) {
|
||||||
list.push(this.mapDevice[key]);
|
list.push(this.mapDevice[key]);
|
||||||
|
@ -1,247 +1,49 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="isShow && terminalList.length" v-verticalDrag class="terminalList">
|
<div v-verticalDrag class="terminalList">
|
||||||
<div class="drag-line verticalDrag__header" />
|
<div class="drag-line verticalDrag__header" />
|
||||||
<div v-for="(eachTerminal,index) in terminalList" :key="index" :class="picture==eachTerminal.code?'eachTerminal active':'eachTerminal'" @click="eachTerminal.click(eachTerminal.code)">{{ eachTerminal.name }}</div>
|
<div class="client-button" @click="showClientList">客户端</div>
|
||||||
|
<!-- <div v-for="(eachTerminal,index) in terminalList" :key="index" :class="picture==eachTerminal.code?'eachTerminal active':'eachTerminal'" @click="eachTerminal.click(eachTerminal.code)">{{ eachTerminal.name }}</div>-->
|
||||||
<div class="drag-line verticalDrag__footer" />
|
<div class="drag-line verticalDrag__footer" />
|
||||||
</div>
|
</div>
|
||||||
|
<el-drawer
|
||||||
|
title=""
|
||||||
|
:visible.sync="drawer"
|
||||||
|
:with-header="false"
|
||||||
|
size="300px"
|
||||||
|
direction="rtl"
|
||||||
|
:before-close="handleClose"
|
||||||
|
>
|
||||||
|
<div class="my-drawer-body">
|
||||||
|
<div class="my-drawer-title">客户端列表</div>
|
||||||
|
<template v-for="terminal in terminalList">
|
||||||
|
<div :key="terminal.id" class="terminal-button">
|
||||||
|
<div class="terminal-button-name" :class="{ active: terminal.id === nowTerminal.id }" @click="changePictureShow(terminal)">{{ terminal.name }}</div>
|
||||||
|
<div class="terminal-button-text" @click="openNewWindow(terminal)">新窗口打开</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name:'TerminalList',
|
name:'TerminalList',
|
||||||
props: {
|
props: {
|
||||||
picture: {
|
nowTerminal: {
|
||||||
type: String,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return '';
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isFirst: true,
|
|
||||||
terminalList:[],
|
terminalList:[],
|
||||||
centralizedStationList: [],
|
drawer: false
|
||||||
centralizedStationMap: {},
|
|
||||||
commonTerminal: [
|
|
||||||
{
|
|
||||||
name: this.$route.query.simType === 'RAILWAY' ? '联锁操作终端' : '现地工作站',
|
|
||||||
code: 'localWork',
|
|
||||||
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER',
|
|
||||||
'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING'],
|
|
||||||
isShow: () => true,
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '行调工作站',
|
|
||||||
code: 'dispatchWork',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.lineCode !== '14',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '线网监控',
|
|
||||||
code: 'nccWork',
|
|
||||||
roleList: ['NCC_DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '线路监控',
|
|
||||||
code: 'lineMonitor',
|
|
||||||
roleList: ['NCC_DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '行调台',
|
|
||||||
code: 'dispatcherManage',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'RAILWAY',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '车务终端',
|
|
||||||
code: 'trafficTerminal',
|
|
||||||
roleList: ['STATION_SUPERVISOR'],
|
|
||||||
isShow: () => this.$route.query.simType === 'RAILWAY',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '车务管理终端',
|
|
||||||
code: 'trafficManageTerminal',
|
|
||||||
roleList: ['STATION_SUPERVISOR'],
|
|
||||||
isShow: () => this.$route.query.simType === 'RAILWAY',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '调度计划',
|
|
||||||
code: 'schedulingPlan',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'RAILWAY',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '调度命令',
|
|
||||||
code: 'dispatchingCommand',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'RAILWAY',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '路票',
|
|
||||||
code: 'trainTicket',
|
|
||||||
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'DRIVER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'RAILWAY',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '簿册',
|
|
||||||
code: 'registerBook',
|
|
||||||
roleList: ['STATION_SUPERVISOR', 'STATION_MASTER', 'STATION_WORKER', 'ELECTRIC_DISPATCHER', 'STATION_ELECTRIC_WORKER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'RAILWAY',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '运行图加载',
|
|
||||||
code: 'diagramLoad',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '司机ATS工作站',
|
|
||||||
code: 'driverAtsWork',
|
|
||||||
roleList: ['DRIVER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '运行图预览',
|
|
||||||
code: 'diagramPreview',
|
|
||||||
roleList: ['DISPATCHER', 'STATION_SUPERVISOR', 'DRIVER', 'NCC_DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '运行图编制',
|
|
||||||
code: 'diagramEdit',
|
|
||||||
roleList: [],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '派班工作站',
|
|
||||||
code: 'scheduleWork',
|
|
||||||
roleList: ['DEPOT_DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'cctv视图',
|
|
||||||
code: 'cctvView',
|
|
||||||
roleList: ['DISPATCHER', 'STATION_SUPERVISOR'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ISCS',
|
|
||||||
code: 'iscsView',
|
|
||||||
roleList: ['DISPATCHER', 'STATION_SUPERVISOR'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '大屏',
|
|
||||||
code: 'bigScreen',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '司机视角',
|
|
||||||
code: 'drivingPlan',
|
|
||||||
roleList: ['DRIVER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO' || this.$route.query.simType === 'RAILWAY',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'IBP盘',
|
|
||||||
code: 'ibp',
|
|
||||||
roleList: ['STATION_SUPERVISOR'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '数字沙盘',
|
|
||||||
code: 'digitalStand',
|
|
||||||
roleList: ['STATION_SUPERVISOR', 'DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '大客流策略',
|
|
||||||
code: 'largePassengerStrategy',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.itemMap && this.itemMap.LPF,
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '大客流视图',
|
|
||||||
code: 'largePassengerView',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.itemMap && this.itemMap.LPF,
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'PSL',
|
|
||||||
code: 'psl',
|
|
||||||
roleList: ['STATION_SUPERVISOR'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'BaSiDi',
|
|
||||||
code: 'baSiDi',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.lineCode === '14' && this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '轨道总览',
|
|
||||||
code: 'troWork',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.lineCode === '14' && this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '轨道详览',
|
|
||||||
code: 'troDetailWork',
|
|
||||||
roleList: ['DISPATCHER'],
|
|
||||||
isShow: () => this.$route.query.lineCode === '14' && this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '通号端',
|
|
||||||
code: 'maintainerSelect',
|
|
||||||
roleList: ['MAINTAINER'],
|
|
||||||
isShow: () => this.$route.query.simType === 'METRO',
|
|
||||||
click: this.changePictureShow
|
|
||||||
}
|
|
||||||
],
|
|
||||||
itemMap: {}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
// 设备数据不显示
|
|
||||||
isShow() {
|
|
||||||
return !this.$route.query.projectDevice;
|
|
||||||
},
|
|
||||||
// 线路类型
|
|
||||||
lineCode() {
|
|
||||||
return this.$route.query.lineCode;
|
|
||||||
},
|
|
||||||
simType() {
|
simType() {
|
||||||
return this.$route.query.simType;
|
return this.$route.query.simType;
|
||||||
},
|
},
|
||||||
@ -251,40 +53,89 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.training.roles': function (val) {
|
'$store.state.training.roles': function (val) {
|
||||||
|
const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList : [];
|
||||||
|
if (!clientIdList || !clientIdList.length) {
|
||||||
this.initTerminalList();
|
this.initTerminalList();
|
||||||
const trainingDetail = this.$store.state.trainingNew.trainingDetail;
|
if (!this.$store.state.trainingNew.trainingDetail) {
|
||||||
if (this.isFirst && this.$route.query.client) {
|
|
||||||
this.isFirst = false;
|
|
||||||
} else {
|
|
||||||
if (trainingDetail && trainingDetail.client) {
|
|
||||||
this.changePictureShow(trainingDetail.client);
|
|
||||||
} else {
|
|
||||||
this.initPictureShow();
|
this.initPictureShow();
|
||||||
this.isFirst = false;
|
|
||||||
}
|
}
|
||||||
}
|
} else if (!this.terminalList.length) {
|
||||||
},
|
|
||||||
'$store.state.training.memberList': function (val) {
|
|
||||||
if (!this.$store.state.training.roles && !this.$route.query.singleClient) {
|
|
||||||
this.changePictureShow('dispatchWork');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'$store.state.socket.simulationWorkParam': function (val) {
|
|
||||||
if (val) {
|
|
||||||
this.itemMap = val.itemMap || {};
|
|
||||||
this.initTerminalList();
|
this.initTerminalList();
|
||||||
|
if (this.$route.query.client) {
|
||||||
|
const terminal = this.findTerminalFromMapById(this.$route.query.client);
|
||||||
|
this.changePictureShow(terminal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
'$store.state.trainingNew.trainingDetail': function(val) {
|
||||||
this.initTerminalList();
|
if (val.client) {
|
||||||
|
const client = this.findTerminalFromMap(val.client);
|
||||||
|
this.changePictureShow(client);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
handleTerminalDefaultShow(client) {
|
||||||
|
const map = {
|
||||||
|
localWork: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER',
|
||||||
|
'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING'],
|
||||||
|
dispatchWork: ['DISPATCHER'],
|
||||||
|
nccWork: ['NCC_DISPATCHER'],
|
||||||
|
lineMonitor: ['NCC_DISPATCHER'],
|
||||||
|
dispatcherManage: ['DISPATCHER'],
|
||||||
|
trafficTerminal: ['STATION_SUPERVISOR'],
|
||||||
|
trafficManageTerminal: ['STATION_SUPERVISOR'],
|
||||||
|
schedulingPlan: ['DISPATCHER'],
|
||||||
|
dispatchingCommand: ['DISPATCHER'],
|
||||||
|
trainTicket: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'DRIVER'],
|
||||||
|
registerBook: ['STATION_SUPERVISOR', 'STATION_MASTER', 'STATION_WORKER', 'ELECTRIC_DISPATCHER', 'STATION_ELECTRIC_WORKER'],
|
||||||
|
diagramLoad: ['DISPATCHER'],
|
||||||
|
driverAtsWork: ['DRIVER'],
|
||||||
|
diagramPreview: ['DISPATCHER', 'STATION_SUPERVISOR', 'DRIVER', 'NCC_DISPATCHER'],
|
||||||
|
diagramEdit: [],
|
||||||
|
scheduleWork: ['DEPOT_DISPATCHER'],
|
||||||
|
cctvView: ['DISPATCHER', 'STATION_SUPERVISOR'],
|
||||||
|
iscsView: ['DISPATCHER', 'STATION_SUPERVISOR'],
|
||||||
|
bigScreen: ['DISPATCHER'],
|
||||||
|
drivingPlan: ['DRIVER'],
|
||||||
|
ibp: ['STATION_SUPERVISOR'],
|
||||||
|
digitalStand: ['STATION_SUPERVISOR', 'DISPATCHER'],
|
||||||
|
largePassengerStrategy: ['DISPATCHER'],
|
||||||
|
largePassengerView: ['DISPATCHER'],
|
||||||
|
psl: ['STATION_SUPERVISOR'],
|
||||||
|
baSiDi: ['DISPATCHER'],
|
||||||
|
troWork:['DISPATCHER'],
|
||||||
|
troDetailWork: ['DISPATCHER'],
|
||||||
|
maintainerSelect: ['MAINTAINER']
|
||||||
|
};
|
||||||
|
if (client && client.type) {
|
||||||
|
const role = this.$store.state.training.roles;
|
||||||
|
const roleDevice = this.$store.state.training.roleDeviceCode;
|
||||||
|
if (client.deviceCode) {
|
||||||
|
return map[client.type].includes(role) && roleDevice === client.deviceCode;
|
||||||
|
} else {
|
||||||
|
return map[client.type].includes(role);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
// 初始化客户端数据
|
||||||
initTerminalList() {
|
initTerminalList() {
|
||||||
this.terminalList = [];
|
this.terminalList = [];
|
||||||
this.commonTerminal.forEach(item => {
|
const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList : [];
|
||||||
if (item.roleList.includes(this.roles) && item.isShow() && this.checkClientSet(item)) {
|
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
|
||||||
this.terminalList.push(item);
|
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
|
||||||
|
if (!mapClientList.length) {
|
||||||
|
this.$store.dispatch('app/animationsClose');
|
||||||
|
this.$messageBox('为获取到客户端数据,请查验地图数据!');
|
||||||
|
}
|
||||||
|
mapClientList.forEach(client => {
|
||||||
|
if (clientIdList && clientIdList.length) {
|
||||||
|
if (clientIdList.includes(client.id)) {
|
||||||
|
this.terminalList.push(client);
|
||||||
|
}
|
||||||
|
} else if (this.handleTerminalDefaultShow(client)) {
|
||||||
|
this.terminalList.push(client);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -296,43 +147,81 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
noEvent(code) {
|
findTerminalFromMapById(id) {
|
||||||
this.$emit('pictureChange', code);
|
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
|
||||||
|
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
|
||||||
|
return mapClientList.find(item => item.id === id);
|
||||||
|
},
|
||||||
|
findTerminalFromMap(type) {
|
||||||
|
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
|
||||||
|
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
|
||||||
|
const roleDeviceCode = this.$store.state.training.roleDeviceCode;
|
||||||
|
return mapClientList.find(item => item.type === type && (!item.deviceCode || item.deviceCode === roleDeviceCode));
|
||||||
},
|
},
|
||||||
initPictureShow() {
|
initPictureShow() {
|
||||||
const localWorkRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
|
const localWorkRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
|
||||||
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER', 'DEPOT_DISPATCHER'];
|
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER', 'DEPOT_DISPATCHER'];
|
||||||
if (localWorkRoleList.includes(this.roles)) {
|
if (localWorkRoleList.includes(this.roles)) {
|
||||||
this.changePictureShow('localWork');
|
const terminal = this.findTerminalFromMap('localWork');
|
||||||
|
this.changePictureShow(terminal);
|
||||||
} else if (this.roles === 'DISPATCHER') {
|
} else if (this.roles === 'DISPATCHER') {
|
||||||
if (this.$route.query.lineCode === '14') {
|
if (this.$route.query.lineCode === '14') {
|
||||||
this.changePictureShow('baSiDi');
|
const terminal = this.findTerminalFromMap('baSiDi');
|
||||||
|
this.changePictureShow(terminal);
|
||||||
this.$store.dispatch('app/animationsClose');
|
this.$store.dispatch('app/animationsClose');
|
||||||
} else if (this.$route.query.simType === 'RAILWAY') {
|
} else if (this.$route.query.simType === 'RAILWAY') {
|
||||||
this.changePictureShow('dispatcherManage');
|
const terminal = this.findTerminalFromMap('dispatcherManage');
|
||||||
|
this.changePictureShow(terminal);
|
||||||
} else {
|
} else {
|
||||||
this.changePictureShow('dispatchWork');
|
const terminal = this.findTerminalFromMap('dispatchWork');
|
||||||
|
this.changePictureShow(terminal);
|
||||||
}
|
}
|
||||||
} else if (this.roles === 'MAINTAINER') {
|
} else if (this.roles === 'MAINTAINER') {
|
||||||
// 通号
|
// 通号
|
||||||
this.changePictureShow('maintainerSelect');
|
const terminal = this.findTerminalFromMap('maintainerSelect');
|
||||||
|
this.changePictureShow(terminal);
|
||||||
} else if (this.roles === 'DRIVER') {
|
} else if (this.roles === 'DRIVER') {
|
||||||
// 司机模拟
|
// 司机模拟
|
||||||
const trainingDesign = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingDesign : false;
|
const trainingDesign = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingDesign : false;
|
||||||
this.changePictureShow(trainingDesign ? 'driverAtsWork' : 'drivingPlan');
|
const terminal = this.findTerminalFromMap(trainingDesign ? 'driverAtsWork' : 'drivingPlan');
|
||||||
|
this.changePictureShow(terminal);
|
||||||
} else if (this.roles === 'NCC_DISPATCHER') {
|
} else if (this.roles === 'NCC_DISPATCHER') {
|
||||||
this.changePictureShow('nccWork');
|
const terminal = this.findTerminalFromMap('nccWork');
|
||||||
|
this.changePictureShow(terminal);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changePictureShow(code) {
|
changePictureShow(terminal) {
|
||||||
if (!this.$store.state.map.map.clientSet || this.$store.state.map.map.clientSet.includes(code)) {
|
if (!terminal) {
|
||||||
|
this.$messageBox('切换客户端失败:未找到对应客户端!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (terminal.id === this.nowTerminal.id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$emit('loadingChange');
|
this.$emit('loadingChange');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$emit('pictureChange', code);
|
this.$emit('pictureChange', terminal);
|
||||||
}, 100);
|
}, 100);
|
||||||
} else if (this.terminalList[0]) {
|
},
|
||||||
this.$emit('pictureChange', this.terminalList[0].code);
|
handleClose() {
|
||||||
|
this.drawer = false;
|
||||||
|
},
|
||||||
|
showClientList() {
|
||||||
|
this.drawer = true;
|
||||||
|
},
|
||||||
|
openNewWindow(terminal) {
|
||||||
|
const routeData = this.$router.resolve({
|
||||||
|
path:'/display/demon',
|
||||||
|
query:{
|
||||||
|
lineCode:this.$route.query.lineCode,
|
||||||
|
group:this.$route.query.group,
|
||||||
|
mapId:this.$route.query.mapId,
|
||||||
|
simType: this.$route.query.simType,
|
||||||
|
project: this.$route.query.project,
|
||||||
|
client: terminal.id
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
window.open(routeData.href, '_blank');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -342,7 +231,7 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 45%;
|
top: 45%;
|
||||||
width: 111px;
|
width: 25px;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 5px 0 0 5px;
|
border-radius: 5px 0 0 5px;
|
||||||
@ -364,4 +253,70 @@ export default {
|
|||||||
color:#409eff;
|
color:#409eff;
|
||||||
background: #ffff;
|
background: #ffff;
|
||||||
}
|
}
|
||||||
|
.client-button{
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:none;
|
||||||
|
-ms-user-select:none;
|
||||||
|
user-select:none;
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.my-drawer-body{
|
||||||
|
background: linear-gradient(to bottom, #01468B, #00172E);
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.my-drawer-title{
|
||||||
|
background: linear-gradient(to bottom, #01468B, #00172E);
|
||||||
|
text-align: center;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #fff;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
.terminal-button{
|
||||||
|
margin: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
.terminal-button-name{
|
||||||
|
font-size: 15px;
|
||||||
|
color: #fbfbfb;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:none;
|
||||||
|
-ms-user-select:none;
|
||||||
|
user-select:none;
|
||||||
|
}
|
||||||
|
.active{
|
||||||
|
color: #00aaff;
|
||||||
|
background: #00172E;
|
||||||
|
border: 1px solid #00aaff;
|
||||||
|
}
|
||||||
|
.terminal-button-name:hover{
|
||||||
|
color: #00aaff;
|
||||||
|
background: #00172E;
|
||||||
|
border: 1px solid #00aaff;
|
||||||
|
}
|
||||||
|
.terminal-button-text{
|
||||||
|
font-size: 12px;
|
||||||
|
text-decoration: underline;
|
||||||
|
color: #00aaff;
|
||||||
|
margin-top: 5px;
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:none;
|
||||||
|
-ms-user-select:none;
|
||||||
|
user-select:none;
|
||||||
|
}
|
||||||
|
.terminal-button-text:hover{
|
||||||
|
color: #d371ce;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -168,7 +168,6 @@ export default {
|
|||||||
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
||||||
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
||||||
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
||||||
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
|
|
||||||
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
||||||
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
||||||
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
||||||
@ -418,7 +417,6 @@ export default {
|
|||||||
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
||||||
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
||||||
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
||||||
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
|
|
||||||
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
||||||
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
||||||
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
||||||
|
@ -197,7 +197,6 @@ export default {
|
|||||||
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
||||||
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
||||||
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
||||||
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
|
|
||||||
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
||||||
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
||||||
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
||||||
@ -296,7 +295,6 @@ export default {
|
|||||||
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
||||||
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
||||||
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
||||||
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
|
|
||||||
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
||||||
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
||||||
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
||||||
|
Loading…
Reference in New Issue
Block a user