控制器拖动
This commit is contained in:
parent
3871440d0a
commit
f7d25d6d76
@ -3,7 +3,7 @@
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<terminals-picture ref="terminalsPicture" />
|
||||
</transition>
|
||||
<simulation-control ref="simulationControl" />
|
||||
<!-- <simulation-control ref="simulationControl" />-->
|
||||
<simulation-menu ref="simulationMenu" :mode="mode" />
|
||||
<training-tip ref="trainingTip" />
|
||||
<training-position-tip ref="trainingPositionTip" />
|
||||
@ -22,7 +22,7 @@ import { getSimulationInfoNew, destroySimulationByAdmin, exitSimulation } from '
|
||||
import { loadMapDataById, loadRunPlanData } from '@/utils/loaddata';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import SimulationControl from './simulationControl.vue';
|
||||
// import SimulationControl from './simulationControl.vue';
|
||||
import TrainingTip from './trainingList/trainingTip';
|
||||
import TrainingPositionTip from './trainingList/trainingPositionTip.vue';
|
||||
import TrainingMenu from './trainingList/trainingMenu';
|
||||
@ -34,7 +34,7 @@ export default {
|
||||
components: {
|
||||
TerminalsPicture,
|
||||
SimulationMenu,
|
||||
SimulationControl,
|
||||
// SimulationControl,
|
||||
TrainingTip,
|
||||
TrainingPositionTip,
|
||||
TrainingMenu,
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="simulationControlAll" style="z-index: 2009;">
|
||||
<div class="simulationControlAll">
|
||||
<div style="color: #fbfbfb;background: #0C161A;margin: 3px;padding: 3px;border-radius: 5px;">
|
||||
<span style="font-size: 16px;">{{ time }}</span>
|
||||
<span style="margin-left: 10px;font-size: 14px;">{{ dateString }}</span>
|
||||
@ -167,6 +167,7 @@ export default {
|
||||
position: absolute;
|
||||
bottom: 9px;
|
||||
right: 78px;
|
||||
width: 162px;
|
||||
padding: 2px 5px;
|
||||
border-radius: 5px;
|
||||
align-items: center;
|
||||
@ -201,7 +202,6 @@ export default {
|
||||
background: #ccc;
|
||||
border-radius: 5px 5px 0 0;
|
||||
font-size: 14px;
|
||||
z-index: 2000;
|
||||
padding: 5px;
|
||||
}
|
||||
.eachSimulationMenu {
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="allSimulationMenu">
|
||||
<div v-quick-menu-drag class="allSimulationMenu">
|
||||
<simulation-control ref="simulationControl" />
|
||||
<div class="simulationMenu" @click="showMenuList">菜单</div>
|
||||
<div v-show="isShowMenuList" class="simulationMenuList">
|
||||
<div v-for="(each, index) in allMenuList" :key="index">
|
||||
@ -35,7 +36,7 @@ import QrCode from '@/components/QrCode';
|
||||
import { SimulationUserType } from '@/scripts/ConstDic';
|
||||
import { destroySimulationByAdmin, ranAsPlan} from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
import SimulationControl from './simulationControl';
|
||||
export default {
|
||||
name: 'SimulationMenu',
|
||||
components: {
|
||||
@ -47,7 +48,8 @@ export default {
|
||||
Jl3dDevice,
|
||||
MemberManage,
|
||||
DeviceManage,
|
||||
QrCode
|
||||
QrCode,
|
||||
SimulationControl
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -251,8 +253,8 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.allSimulationMenu {
|
||||
position: absolute;
|
||||
// width: 200px;
|
||||
height: 200px;
|
||||
width: 230px;
|
||||
height: 35px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 2009;
|
||||
|
@ -1,353 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="isShow" class="terminalList">
|
||||
<div v-for="(eachTerminal,index) in terminalList" :key="index" :class="active==eachTerminal.code?'eachTerminal active':'eachTerminal'" @click="eachTerminal.click(eachTerminal.code)">{{ eachTerminal.name }}</div>
|
||||
</div>
|
||||
<DispatchCmd v-if="datie" ref="dispatchCmd" @close="close" />
|
||||
<DispatcherLoger v-if="datie" ref="dispatcherLoger" @close="close" />
|
||||
<message-board v-if="active === 'messageBoard'" ref="messageBoard" />
|
||||
<jl3d-drive v-if="active === 'drivingPlan'" ref="jl3dDrive" />
|
||||
<jl3d-device v-if="active === 'jl3dModle'" ref="jl3dModle" />
|
||||
<jl3d-passflow v-if="active === 'cctvView'" ref="cctvView" />
|
||||
<ibp-plate v-show="active === 'ibp'" ref="ibpPlate" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DispatchCmd from '@/views/dispatcherStationManage/dispatchCmd';
|
||||
import DispatcherLoger from '@/views/dispatcherLoger/index';
|
||||
import MessageBoard from './messageBoard';
|
||||
import {mapGetters} from 'vuex';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
||||
import Jl3dPassflow from '@/views/jlmap3d/passflow/jl3dpassflow';
|
||||
import IbpPlate from '@/views/ibp/ibpsystem/index';
|
||||
export default {
|
||||
name:'TerminalList',
|
||||
components: {
|
||||
DispatchCmd,
|
||||
DispatcherLoger,
|
||||
MessageBoard,
|
||||
Jl3dDevice,
|
||||
Jl3dDrive,
|
||||
Jl3dPassflow,
|
||||
IbpPlate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
terminalList:[],
|
||||
active:0,
|
||||
centralizedStationList: [],
|
||||
centralizedStationMap: {},
|
||||
commonTerminal: [
|
||||
{
|
||||
name: '现地工作站',
|
||||
code: 'localWork',
|
||||
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER',
|
||||
'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER'],
|
||||
click: this.localWorkShow
|
||||
},
|
||||
{
|
||||
name: '行调工作站',
|
||||
code: 'dispatchWork',
|
||||
roleList: ['DISPATCHER'],
|
||||
click: this.noEvent
|
||||
}
|
||||
],
|
||||
terminalMap:{
|
||||
'datie': [
|
||||
{
|
||||
name: '车务终端',
|
||||
code: 'trafficTerminal',
|
||||
roleList: ['STATION_SUPERVISOR'],
|
||||
click: this.noEvent
|
||||
},
|
||||
{
|
||||
name: '车务管理终端',
|
||||
code: 'trafficManageTerminal',
|
||||
roleList: ['STATION_SUPERVISOR'],
|
||||
click: this.noEvent
|
||||
},
|
||||
|
||||
{
|
||||
name: '调度计划',
|
||||
code: 'schedulingPlan',
|
||||
roleList: ['DISPATCHER'],
|
||||
click: this.schedulingPlan
|
||||
},
|
||||
{
|
||||
name: '调度命令',
|
||||
code: 'dispatchingCommand',
|
||||
roleList: ['DISPATCHER'],
|
||||
click: this.dispatchingCommand
|
||||
}
|
||||
],
|
||||
'subway': [
|
||||
{
|
||||
name: '现地工作站',
|
||||
code: 'localWork',
|
||||
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER',
|
||||
'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER'],
|
||||
click: this.localWorkShow
|
||||
},
|
||||
{
|
||||
name: '行调工作站',
|
||||
code: 'dispatchWork',
|
||||
roleList: ['DISPATCHER'],
|
||||
click: this.noEvent
|
||||
},
|
||||
{
|
||||
name: 'cctv视图',
|
||||
code: 'cctvView',
|
||||
roleList: ['STATION_SUPERVISOR'],
|
||||
click: this.noEvent
|
||||
},
|
||||
{
|
||||
name: '设备视图',
|
||||
code: 'jl3dModle',
|
||||
roleList: ['STATION_SUPERVISOR'],
|
||||
click: this.noEvent
|
||||
},
|
||||
{
|
||||
name: '故障设备',
|
||||
code: 'jlmap3dFault',
|
||||
roleList: ['STATION_SUPERVISOR'],
|
||||
click: this.noEvent
|
||||
},
|
||||
{
|
||||
name: '司机视角',
|
||||
code: 'drivingPlan',
|
||||
roleList: ['DRIVER'],
|
||||
click: this.driveShow
|
||||
},
|
||||
{
|
||||
name: 'IBP盘',
|
||||
code: 'ibp',
|
||||
roleList: ['STATION_SUPERVISOR'],
|
||||
click: this.ibpShow
|
||||
},
|
||||
{
|
||||
name: '数字沙盘',
|
||||
code: 'digitalStand',
|
||||
roleList: ['STATION_SUPERVISOR', 'DISPATCHER'],
|
||||
click: this.noEvent
|
||||
},
|
||||
{ // {label:'留言板', name:'messageBoard', click:this.messageBoard, isShow:false},
|
||||
name: '留言板',
|
||||
code: 'messageBoard',
|
||||
roleList: ['DISPATCHER', 'STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER',
|
||||
'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER'],
|
||||
click: this.messageBoardShow
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('map', [
|
||||
'sectionList',
|
||||
'signalList',
|
||||
'trainWindowList'
|
||||
|
||||
]),
|
||||
// 设备数据不显示
|
||||
isShow() {
|
||||
return !this.$route.query.projectDevice;
|
||||
},
|
||||
// 线路类型
|
||||
lineCode() {
|
||||
return this.$route.query.lineCode;
|
||||
},
|
||||
// 大铁线路
|
||||
datie() {
|
||||
return ['16', '19'].includes(this.$route.query.lineCode);
|
||||
},
|
||||
prdType() {
|
||||
return this.$route.query.prdType;
|
||||
},
|
||||
roles() {
|
||||
return this.$store.state.training.roles;
|
||||
},
|
||||
roleDeviceCode() {
|
||||
return this.$store.state.training.roleDeviceCode;
|
||||
},
|
||||
mapData() {
|
||||
return this.$store.state.map.map;
|
||||
},
|
||||
mapDevice() {
|
||||
return this.$store.state.map.mapDevice;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.roles': function (val) {
|
||||
this.initTerminalList();
|
||||
},
|
||||
'$store.state.map.map': function (map) {
|
||||
if (map) {
|
||||
this.setCentralizedStationList(map); // 获取集中站列表
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function () { // 地图视图加载完成标识
|
||||
this.initPictureShow();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTerminalList();
|
||||
},
|
||||
methods:{
|
||||
initTerminalList() {
|
||||
let currentType = '';
|
||||
if (this.datie) {
|
||||
currentType = 'datie';
|
||||
} else {
|
||||
currentType = 'subway';
|
||||
}
|
||||
this.terminalMap[currentType].forEach(item => {
|
||||
if (item.roleList.includes(this.roles)) {
|
||||
this.terminalList.push(item);
|
||||
}
|
||||
});
|
||||
},
|
||||
noEvent(code) {
|
||||
this.active = code;
|
||||
},
|
||||
schedulingPlan(code) {
|
||||
this.active = code;
|
||||
this.$refs.dispatcherLoger.doShow();
|
||||
},
|
||||
dispatchingCommand(code) {
|
||||
this.active = code;
|
||||
this.$refs.dispatchCmd.doShow();
|
||||
},
|
||||
messageBoardShow(code) {
|
||||
this.active = code;
|
||||
},
|
||||
driveShow(code) {
|
||||
debugger;
|
||||
this.active = code;
|
||||
// drivingPlan
|
||||
// this.$refs.jl3dDrive.show(this.roleDeviceCode, '');
|
||||
},
|
||||
// jl3dDrive
|
||||
ibpShow(code) {
|
||||
console.log(this.roleDeviceCode, '************');
|
||||
this.active = code;
|
||||
this.$refs.ibpPlate.show(this.roleDeviceCode, '');
|
||||
},
|
||||
close() {
|
||||
this.active = 0;
|
||||
},
|
||||
setCentralizedStationList(map) {
|
||||
this.centralizedStationList = [];
|
||||
(map.stationList || []).forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.centralizedStationList.push({value: item.code, name: item.name});
|
||||
this.centralizedStationMap[item.code] = item.code;
|
||||
item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => {
|
||||
this.centralizedStationMap[ele] = item.code;
|
||||
});
|
||||
}
|
||||
});
|
||||
if (this.centralizedStationList.length && !this.showStation) {
|
||||
this.showStation = this.centralizedStationList[0].value;
|
||||
}
|
||||
},
|
||||
setShow() {
|
||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||
this.setShowStation('');
|
||||
},
|
||||
initPictureShow() {
|
||||
const localWorkRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
|
||||
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER'];
|
||||
if (localWorkRoleList.includes(this.roles)) {
|
||||
this.localWorkShow();
|
||||
} else if (this.roles === 'DISPATCHER') {
|
||||
this.dispatchWorkShow();
|
||||
} else if (this.roles === 'MAINTAINER') {
|
||||
// 通号
|
||||
}
|
||||
|
||||
},
|
||||
switchStationMode(stationCode) {
|
||||
this.showStation = this.centralizedStationMap[stationCode];
|
||||
this.setShowStation(this.showStation);
|
||||
},
|
||||
setShowStation(stationCode) {
|
||||
const showStation = this.centralizedStationMap[stationCode];
|
||||
const list = [];
|
||||
for (const key in this.mapDevice) {
|
||||
list.push(this.mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, showStation);
|
||||
this.$jlmap.setCenter(showStation);
|
||||
},
|
||||
dispatchWorkShow() {
|
||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||
const list = [];
|
||||
for (const key in this.mapDevice) {
|
||||
list.push(this.mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list);
|
||||
},
|
||||
localWorkShow(code) {
|
||||
this.active = code;
|
||||
if (this.lineCode === '14') {
|
||||
const list = [];
|
||||
this.$jlmap.setMap(this.mapData, this.mapDevice, {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData});
|
||||
for (const key in this.mapDevice) {
|
||||
list.push(this.mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowMode(list, '02');
|
||||
}
|
||||
if (this.mapData && this.mapData.pictureList) {
|
||||
const picture = this.mapData.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'chainStation');
|
||||
if (picture) {
|
||||
const list = [];
|
||||
const deviceList = [];
|
||||
for (const key in this.mapDevice) {
|
||||
list.push(this.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[this.roleDeviceCode]);
|
||||
} else {
|
||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||
this.switchStationMode(this.roleDeviceCode);
|
||||
}
|
||||
} else {
|
||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||
this.switchStationMode(this.roleDeviceCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.terminalList{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 45%;
|
||||
width: 111px;
|
||||
padding-left: 1px;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
padding-right: 1px;
|
||||
background: #fff;
|
||||
border-radius: 5px 0px 0px 5px;
|
||||
z-index: 2000;
|
||||
}
|
||||
.eachTerminal{
|
||||
padding: 8px 0px;
|
||||
text-align: center;
|
||||
border-bottom: 1px #dedede solid;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
.eachTerminal.active{
|
||||
color:#409eff;
|
||||
background: #ffff;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user