Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly1
This commit is contained in:
commit
e056455e5e
@ -109,12 +109,12 @@ class Theme {
|
||||
}
|
||||
// 加载行调菜单组件
|
||||
loadDispatchWorkMenuComponent(code) {
|
||||
if (code == '02' || code == '16') {
|
||||
if (['02', '10', '11', '16'].includes(code)) {
|
||||
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default);
|
||||
}
|
||||
}
|
||||
loadLocalWorkMenuComponent(code) {
|
||||
if (code == '02' || code == '16') {
|
||||
if (['02', '10', '11', '16'].includes(code)) {
|
||||
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" />
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="'dispatchWork'" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="xian-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
@ -24,7 +24,7 @@ import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuBar from './dispatchWorkMenuBar';
|
||||
import MenuStationTurnBack from './menuStationTurnBack';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
@ -32,7 +32,7 @@ import PassiveTimeout from './passiveDialog/timeout';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
name: 'DispatchWorkMenu',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuSignal,
|
||||
@ -64,15 +64,9 @@ export default {
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
]),
|
||||
isShowBar() {
|
||||
return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
|
||||
}
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
isShowBar(val) {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
// && this.$store.state.training.prdType == '02'
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
418
src/jmapNew/theme/xian_01/menus/dispatchWorkMenuBar.vue
Normal file
418
src/jmapNew/theme/xian_01/menus/dispatchWorkMenuBar.vue
Normal file
@ -0,0 +1,418 @@
|
||||
<template>
|
||||
<div id="menuBarXian01">
|
||||
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
|
||||
<!--<div class="deviceStatus">-->
|
||||
<!--<div class="holdTrainStatus">H</div>-->
|
||||
<!--<div class="jumpStopStatus">S</div>-->
|
||||
<!--</div>-->
|
||||
<station-control-convert ref="stationControlConvert" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<view-device ref="viewDevice" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<warning-info ref="warningInfo" />
|
||||
<!-- <delete-runplan-line ref="deleteRunplanLine" /> -->
|
||||
<!-- <add-runplan-line ref="addRunplanLine" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import WarningInfo from './menuDialog/warningInfo';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
// import AddRunplanLine from './menuDialog/addRunplanLine';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewTrainId from './menuDialog/viewTrainId';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ViewDevice from './menuDialog/viewDevice';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
// import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'DispatchWorkMenuBarXian01',
|
||||
components: {
|
||||
MenuBar,
|
||||
StationControlConvert,
|
||||
PasswordBox,
|
||||
ViewTrainId,
|
||||
ViewName,
|
||||
ViewDevice,
|
||||
TrainAdd,
|
||||
// AddRunplanLine,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout,
|
||||
WarningInfo
|
||||
// DeleteRunplanLine
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuNormal: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.system'),
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.view'),
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.refresh'),
|
||||
operate: OperationEvent.Command.mBar.fresh,
|
||||
click: this.refresh,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.stationMapSwitch'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.planCarOperation'),
|
||||
operate: OperationEvent.Command.mBar.planTrain,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.addPlanCar'),
|
||||
click: this.addPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.addPlanTrain
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.panPlanCar'),
|
||||
click: this.translatPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.translatPlanTrain
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.deletePlanCar'),
|
||||
click: this.delPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.delPlanTrain
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.trainNumberMaintenance'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.controlModeSwitch'),
|
||||
operate: OperationEvent.Command.mBar.remoteControl,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar,
|
||||
force: true
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
click: this.mandatoryStationControl,
|
||||
operate: OperationEvent.StationControl.forcedStationControl.password,
|
||||
force: true
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.toCentralControl'),
|
||||
click: this.conterStationControl,
|
||||
operate: OperationEvent.StationControl.requestCentralControl.mbar
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.requestOperationArea'),
|
||||
operate: OperationEvent.Command.mBar.requestZone,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.schedulingLog'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.systemAnalysis'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
operate: OperationEvent.Command.mBar.userManage,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
click: this.userManage,
|
||||
operate: OperationEvent.Command.manage.userManage
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.historyQuery'),
|
||||
operate: OperationEvent.Command.mBar.historyQuery,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.help'),
|
||||
operate: OperationEvent.Command.mBar.help,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.about'),
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 转为站控
|
||||
turnToStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制转为站控
|
||||
mandatoryStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 请求中控
|
||||
conterStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置列车识别号显示
|
||||
setTrainIdDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewTrainId.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置设备显示
|
||||
setNameDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewName.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置名称显示
|
||||
setDeviceDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewDevice.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加计划车
|
||||
addPlanTrain(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (this.$route.query.lineCode == '10') {
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
} else {
|
||||
// this.$refs.addRunplanLine.doShow(operate);
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 平移计划车
|
||||
translatPlanTrain(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainTranstalet.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除计划车
|
||||
delPlanTrain(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDelete.doShow(operate);
|
||||
// this.$refs.deleteRunplanLine.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 用户管理
|
||||
userManage(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.manageUser.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关于
|
||||
about(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 刷新
|
||||
refresh() {
|
||||
|
||||
EventBus.$emit('refresh');
|
||||
},
|
||||
getLoginResult(operate) {
|
||||
/** 密码校验*/
|
||||
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
|
||||
if (operate.success) {
|
||||
/** 校验成功*/
|
||||
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
|
||||
}
|
||||
}
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
},
|
||||
warningInfoDoShow(info) {
|
||||
this.$refs.warningInfo.doShow(info);
|
||||
},
|
||||
undeveloped() {
|
||||
this.$refs.menuBar.doClose();
|
||||
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
.deviceStatus{
|
||||
display: inline-block;
|
||||
font-size: 0;
|
||||
height: 40px;
|
||||
background: #f0f0f0;
|
||||
width: 300px;
|
||||
}
|
||||
.holdTrainStatus,.jumpStopStatus{
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
background: #ccc;
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
#menuBarXian01{
|
||||
line-height:30px;
|
||||
}
|
||||
#menuBarXian01 #menuBar .menu-li-block .label{
|
||||
padding: 0px 30px 0px 5px !important;
|
||||
}
|
||||
</style>
|
493
src/jmapNew/theme/xian_01/menus/localWorkMenu.vue
Normal file
493
src/jmapNew/theme/xian_01/menus/localWorkMenu.vue
Normal file
@ -0,0 +1,493 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" :work="'localWork'" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" :work="'localWork'" />
|
||||
<menu-section ref="menuSection" :selected="selected" :work="'localWork'" />
|
||||
<menu-train ref="menuTrain" :selected="selected" :work="'localWork'" />
|
||||
<menu-station ref="menuStation" :selected="selected" :work="'localWork'" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="'localWork'" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="xian-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-class="preview_new_pop" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './localWorkMenuBar';
|
||||
import MenuStationTurnBack from './menuStationTurnBack';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
|
||||
export default {
|
||||
name: 'LocalWorkMenu',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationStand,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
PassiveAlarm,
|
||||
MenuStationTurnBack,
|
||||
PassiveContorl,
|
||||
PassiveTimeout,
|
||||
PopMenu
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
// && this.$store.state.training.prdType == '02'
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.popDoShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.popDoClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
const _that = this;
|
||||
window.onclick = function (e) {
|
||||
if (!_that.$store.state.training.trainingStart) {
|
||||
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
|
||||
}
|
||||
_that.$refs.menuStationStand.doClose();
|
||||
_that.$refs.menuSwitch.doClose();
|
||||
_that.$refs.menuSignal.doClose();
|
||||
_that.$refs.menuSection.doClose();
|
||||
_that.$refs.menuTrain.doClose();
|
||||
_that.$refs.menuStation.doClose();
|
||||
_that.$refs.menuStationTurnBack.doClose();
|
||||
};
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.onclick = function (e) {};
|
||||
},
|
||||
methods:{
|
||||
popClickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.popDoClose();
|
||||
};
|
||||
},
|
||||
popDoShow(point) {
|
||||
this.popClickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
this.$store.state.map.map.stationList.forEach(station => {
|
||||
if (station.relStationCodeList && station.relStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
const relStationCodeList = [...station.relStationCodeList];
|
||||
relStationCodeList.push(station.code);
|
||||
relStationCodeList.sort((a, b) => {
|
||||
const stationA = this.$store.getters['map/getDeviceByCode'](a);
|
||||
const stationB = this.$store.getters['map/getDeviceByCode'](b);
|
||||
return stationA.kmRange - stationB.kmRange;
|
||||
});
|
||||
relStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
} else if (this.$store.state.training.prdType == '01') {
|
||||
const roleDeviceCode = this.$store.state.training.roleDeviceCode;
|
||||
const displayList = this.$store.state.map.map.displayList;
|
||||
const display = displayList.find(each=>{
|
||||
return each.stationCodeList.includes(roleDeviceCode);
|
||||
});
|
||||
if (display) {
|
||||
const codeList = [...display.switchStationCodeList];
|
||||
let relStationCodeList = [];
|
||||
let ciStaionCode = '';
|
||||
codeList.sort((a, b) => {
|
||||
const stationA = this.$store.getters['map/getDeviceByCode'](a);
|
||||
const stationB = this.$store.getters['map/getDeviceByCode'](b);
|
||||
if (stationA.relStationCodeList && stationA.relStationCodeList.length > 0 && relStationCodeList.length <= 0) {
|
||||
relStationCodeList = [...stationA.relStationCodeList];
|
||||
ciStaionCode = stationA.code;
|
||||
relStationCodeList.push(stationA.code);
|
||||
}
|
||||
return stationA.kmRange - stationB.kmRange;
|
||||
});
|
||||
const ciStaion = this.$store.getters['map/getDeviceByCode'](ciStaionCode);
|
||||
const currentNode = {label: ciStaion.name, children: []};
|
||||
codeList.forEach(code=>{
|
||||
let node;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (station.depot) {
|
||||
return;
|
||||
}
|
||||
if (relStationCodeList.includes(code)) {
|
||||
currentNode.children.push({label: station.name, code: station.code, handler: this.mapLocation});
|
||||
if (currentNode.children.length == relStationCodeList.length) {
|
||||
this.menuNormal.push(currentNode);
|
||||
}
|
||||
} else {
|
||||
node = {label: station.name, code: station.code, handler: this.mapLocation};
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
popDoClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.popDoClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.menus {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
.menus .pop-menu {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.menus .pop-menu span {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.menus .pop-menu .is-disabled span {
|
||||
color: #B4B3B8;
|
||||
}
|
||||
|
||||
.xian-01__systerm {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm.pop-menu{
|
||||
padding: 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.xian-01__systerm.pop-menu .container{
|
||||
border-left: 1px solid #ccc;
|
||||
}
|
||||
.xian-01__systerm.pop-menu .dsp-block {
|
||||
display: block;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
border-radius: unset;
|
||||
border: 1px solid transparent;
|
||||
color: #000;
|
||||
padding: 6px 6px;
|
||||
border-left: 1px solid #bdbcbc;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog {
|
||||
background: rgba(100, 100, 100, 0.3);
|
||||
border: 2px solid rgb(144, 144, 144, 0.8);
|
||||
border-radius: 6px;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-dialog__header {
|
||||
padding: 5px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-dialog__footer {
|
||||
background: #F0F0F0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
margin: 0px 5px 5px;
|
||||
border: 2px solid rgba(120, 121, 123, 0.5);
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
background: #F0F0F0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-dialog__title {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
color: #000;
|
||||
border-radius: 4px;
|
||||
padding: 0px 2px;
|
||||
height: 20px;
|
||||
line-height: 20px
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-dialog__title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
-webkit-filter: blur(10px);
|
||||
filter: blur(10px);
|
||||
height: 20px;
|
||||
width: -webkit-fill-available;
|
||||
background: rgba(128, 128, 128, 0.8);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
top: 4px;
|
||||
right: 5px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-button {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 2px outset #E2E2E2;
|
||||
border-radius: 0px !important;
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-button:focus span {
|
||||
border: 1px dashed gray;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-button:active {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-button:disabled {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-input .el-input__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-textarea {
|
||||
border: 2px inset #E9E9E9;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-table {
|
||||
border: 2px inset #E9E9E9;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-table .cell {
|
||||
line-height: unset !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-table th.is-leaf {
|
||||
background: #F0F0F0 !important;
|
||||
border-right: 1px solid #BDBDBD !important;
|
||||
border-bottom: 1px solid #BDBDBD !important;
|
||||
color: #000 !important;
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-table tr td {
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
top: 15px !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .current-row>td {
|
||||
background: #3399FF !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-checkbox__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-checkbox__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
position: absolute;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
content: "";
|
||||
border: 1px solid #000;
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
height: 7px;
|
||||
left: 4px;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-radio__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-radio__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 100%;
|
||||
background-color: #000 !important;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgb(240 240 240);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-form-item label {
|
||||
font-weight: normal !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .context {
|
||||
height: 100px;
|
||||
border: 2px inset #E2E2E2;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .notice {
|
||||
margin-left: 62px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .button-group {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
375
src/jmapNew/theme/xian_01/menus/localWorkMenuBar.vue
Normal file
375
src/jmapNew/theme/xian_01/menus/localWorkMenuBar.vue
Normal file
@ -0,0 +1,375 @@
|
||||
<template>
|
||||
<div id="menuBarXian01">
|
||||
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
|
||||
<!--<div class="deviceStatus">-->
|
||||
<!--<div class="holdTrainStatus">H</div>-->
|
||||
<!--<div class="jumpStopStatus">S</div>-->
|
||||
<!--</div>-->
|
||||
<station-control-convert ref="stationControlConvert" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<view-device ref="viewDevice" />
|
||||
<!-- <train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" /> -->
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<warning-info ref="warningInfo" />
|
||||
<!-- <delete-runplan-line ref="deleteRunplanLine" /> -->
|
||||
<!-- <add-runplan-line ref="addRunplanLine" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import WarningInfo from './menuDialog/warningInfo';
|
||||
// import TrainAdd from './menuDialog/trainAdd';
|
||||
// import AddRunplanLine from './menuDialog/addRunplanLine';
|
||||
// import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
// import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewTrainId from './menuDialog/viewTrainId';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ViewDevice from './menuDialog/viewDevice';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
// import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'LocalWorkMenuBarXian01',
|
||||
components: {
|
||||
MenuBar,
|
||||
StationControlConvert,
|
||||
PasswordBox,
|
||||
ViewTrainId,
|
||||
ViewName,
|
||||
ViewDevice,
|
||||
// TrainAdd,
|
||||
// AddRunplanLine,
|
||||
// TrainTranstalet,
|
||||
// TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout,
|
||||
WarningInfo
|
||||
// DeleteRunplanLine
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuNormal: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.system'),
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.view'),
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.refresh'),
|
||||
operate: OperationEvent.Command.mBar.fresh,
|
||||
click: this.refresh,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.stationMapSwitch'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.controlModeSwitch'),
|
||||
operate: OperationEvent.Command.mBar.remoteControl,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
click: this.mandatoryStationControl,
|
||||
operate: OperationEvent.StationControl.forcedStationControl.password
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.toCentralControl'),
|
||||
click: this.conterStationControl,
|
||||
operate: OperationEvent.StationControl.requestCentralControl.mbar,
|
||||
force: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.requestOperationArea'),
|
||||
operate: OperationEvent.Command.mBar.requestZone,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.historyQuery'),
|
||||
operate: OperationEvent.Command.mBar.historyQuery,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
operate: OperationEvent.Command.mBar.userManage,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
click: this.userManage,
|
||||
operate: OperationEvent.Command.manage.userManage
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.help'),
|
||||
operate: OperationEvent.Command.mBar.help,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.about'),
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 转为站控
|
||||
turnToStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制转为站控
|
||||
mandatoryStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 请求中控
|
||||
conterStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置列车识别号显示
|
||||
setTrainIdDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewTrainId.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置设备显示
|
||||
setNameDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewName.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置名称显示
|
||||
setDeviceDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewDevice.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加计划车
|
||||
// addPlanTrain(order) {
|
||||
// const operate = {
|
||||
// operation: order.operation
|
||||
// };
|
||||
// this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// if (this.$route.query.lineCode == '10') {
|
||||
// this.$refs.trainAdd.doShow(operate);
|
||||
// } else {
|
||||
// // this.$refs.addRunplanLine.doShow(operate);
|
||||
// this.$refs.trainAdd.doShow(operate);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 平移计划车
|
||||
// translatPlanTrain(order) {
|
||||
// const operate = {
|
||||
// operation: order.operation
|
||||
// };
|
||||
// this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainTranstalet.doShow(operate);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 删除计划车
|
||||
// delPlanTrain(order) {
|
||||
// const operate = {
|
||||
// operation: order.operation
|
||||
// };
|
||||
// this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainDelete.doShow(operate);
|
||||
// // this.$refs.deleteRunplanLine.doShow(operate);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 用户管理
|
||||
userManage(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.manageUser.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关于
|
||||
about(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 刷新
|
||||
refresh() {
|
||||
|
||||
EventBus.$emit('refresh');
|
||||
},
|
||||
getLoginResult(operate) {
|
||||
/** 密码校验*/
|
||||
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
|
||||
if (operate.success) {
|
||||
/** 校验成功*/
|
||||
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
|
||||
}
|
||||
}
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
},
|
||||
warningInfoDoShow(info) {
|
||||
this.$refs.warningInfo.doShow(info);
|
||||
},
|
||||
undeveloped() {
|
||||
this.$refs.menuBar.doClose();
|
||||
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
.deviceStatus{
|
||||
display: inline-block;
|
||||
font-size: 0;
|
||||
height: 40px;
|
||||
background: #f0f0f0;
|
||||
width: 300px;
|
||||
}
|
||||
.holdTrainStatus,.jumpStopStatus{
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
background: #ccc;
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
#menuBarXian01{
|
||||
line-height:30px;
|
||||
}
|
||||
#menuBarXian01 #menuBar .menu-li-block .label{
|
||||
padding: 0px 30px 0px 5px !important;
|
||||
}
|
||||
</style>
|
@ -1,529 +0,0 @@
|
||||
<template>
|
||||
<div id="menuBarXian01">
|
||||
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
|
||||
<!--<div class="deviceStatus">-->
|
||||
<!--<div class="holdTrainStatus">H</div>-->
|
||||
<!--<div class="jumpStopStatus">S</div>-->
|
||||
<!--</div>-->
|
||||
<station-control-convert ref="stationControlConvert" @warningInfoDoShow="warningInfoDoShow" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<view-device ref="viewDevice" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<warning-info ref="warningInfo" />
|
||||
<!-- <delete-runplan-line ref="deleteRunplanLine" /> -->
|
||||
<!-- <add-runplan-line ref="addRunplanLine" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import WarningInfo from './menuDialog/warningInfo';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
// import AddRunplanLine from './menuDialog/addRunplanLine';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewTrainId from './menuDialog/viewTrainId';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ViewDevice from './menuDialog/viewDevice';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
// import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'MenuBarXian01',
|
||||
components: {
|
||||
MenuBar,
|
||||
StationControlConvert,
|
||||
PasswordBox,
|
||||
ViewTrainId,
|
||||
ViewName,
|
||||
ViewDevice,
|
||||
TrainAdd,
|
||||
// AddRunplanLine,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout,
|
||||
WarningInfo
|
||||
// DeleteRunplanLine
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.system'),
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.view'),
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.refresh'),
|
||||
operate: OperationEvent.Command.mBar.fresh,
|
||||
click: this.refresh,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.stationMapSwitch'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.controlModeSwitch'),
|
||||
operate: OperationEvent.Command.mBar.remoteControl,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
click: this.mandatoryStationControl,
|
||||
operate: OperationEvent.StationControl.forcedStationControl.password
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.toCentralControl'),
|
||||
click: this.conterStationControl,
|
||||
operate: OperationEvent.StationControl.requestCentralControl.mbar,
|
||||
force: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.requestOperationArea'),
|
||||
operate: OperationEvent.Command.mBar.requestZone,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.historyQuery'),
|
||||
operate: OperationEvent.Command.mBar.historyQuery,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
operate: OperationEvent.Command.mBar.userManage,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
click: this.userManage,
|
||||
operate: OperationEvent.Command.manage.userManage
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.help'),
|
||||
operate: OperationEvent.Command.mBar.help,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.about'),
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.system'),
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.view'),
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.refresh'),
|
||||
operate: OperationEvent.Command.mBar.fresh,
|
||||
click: this.refresh,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.stationMapSwitch'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.planCarOperation'),
|
||||
operate: OperationEvent.Command.mBar.planTrain,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.addPlanCar'),
|
||||
click: this.addPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.addPlanTrain
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.panPlanCar'),
|
||||
click: this.translatPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.translatPlanTrain
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.deletePlanCar'),
|
||||
click: this.delPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.delPlanTrain
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.trainNumberMaintenance'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.controlModeSwitch'),
|
||||
operate: OperationEvent.Command.mBar.remoteControl,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar,
|
||||
force: true
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
click: this.mandatoryStationControl,
|
||||
operate: OperationEvent.StationControl.forcedStationControl.password,
|
||||
force: true
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.toCentralControl'),
|
||||
click: this.conterStationControl,
|
||||
operate: OperationEvent.StationControl.requestCentralControl.mbar
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.requestOperationArea'),
|
||||
operate: OperationEvent.Command.mBar.requestZone,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.schedulingLog'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.systemAnalysis'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
operate: OperationEvent.Command.mBar.userManage,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
click: this.userManage,
|
||||
operate: OperationEvent.Command.manage.userManage
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.historyQuery'),
|
||||
operate: OperationEvent.Command.mBar.historyQuery,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.help'),
|
||||
operate: OperationEvent.Command.mBar.help,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.about'),
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 转为站控
|
||||
turnToStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制转为站控
|
||||
mandatoryStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 请求中控
|
||||
conterStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置列车识别号显示
|
||||
setTrainIdDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewTrainId.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置设备显示
|
||||
setNameDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewName.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置名称显示
|
||||
setDeviceDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewDevice.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加计划车
|
||||
addPlanTrain(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (this.$route.query.lineCode == '10') {
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
} else {
|
||||
// this.$refs.addRunplanLine.doShow(operate);
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 平移计划车
|
||||
translatPlanTrain(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainTranstalet.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除计划车
|
||||
delPlanTrain(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDelete.doShow(operate);
|
||||
// this.$refs.deleteRunplanLine.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 用户管理
|
||||
userManage(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.manageUser.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关于
|
||||
about(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 刷新
|
||||
refresh() {
|
||||
|
||||
EventBus.$emit('refresh');
|
||||
},
|
||||
getLoginResult(operate) {
|
||||
/** 密码校验*/
|
||||
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
|
||||
if (operate.success) {
|
||||
/** 校验成功*/
|
||||
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
|
||||
}
|
||||
}
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
},
|
||||
warningInfoDoShow(info) {
|
||||
this.$refs.warningInfo.doShow(info);
|
||||
},
|
||||
undeveloped() {
|
||||
this.$refs.menuBar.doClose();
|
||||
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
.deviceStatus{
|
||||
display: inline-block;
|
||||
font-size: 0;
|
||||
height: 40px;
|
||||
background: #f0f0f0;
|
||||
width: 300px;
|
||||
}
|
||||
.holdTrainStatus,.jumpStopStatus{
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
background: #ccc;
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
#menuBarXian01{
|
||||
line-height:30px;
|
||||
}
|
||||
#menuBarXian01 #menuBar .menu-li-block .label{
|
||||
padding: 0px 30px 0px 5px !important;
|
||||
}
|
||||
</style>
|
@ -44,77 +44,89 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
menuNormal: [
|
||||
{
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK,
|
||||
isDisabled: (section, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade === 1;
|
||||
} else {
|
||||
return section.blockade === 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK,
|
||||
isDisabled: (section, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade !== 1;
|
||||
} else {
|
||||
return section.blockade !== 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
},
|
||||
{
|
||||
label: '故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
|
||||
isShow: (section, work) => section.type === '02'
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
|
||||
isShow: (section, work) => section.type === '02'
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF,
|
||||
isDisabled: (section, work) => {
|
||||
if (work === 'localWork') {
|
||||
return false;
|
||||
} else {
|
||||
return section.cutOff === 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE,
|
||||
isDisabled: (section, work) => {
|
||||
if (work === 'localWork') {
|
||||
return false;
|
||||
} else {
|
||||
return section.cutOff !== 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
},
|
||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
@ -160,7 +172,7 @@ export default {
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push({
|
||||
this.menuNormal.push({
|
||||
label: '新建计划车',
|
||||
handler: this.addPlanTrain,
|
||||
cmdType: CMD.Section.CMD_Train_Init_Plan
|
||||
@ -172,6 +184,12 @@ export default {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
this.menu.push(menuItem);
|
||||
});
|
||||
} else {
|
||||
this.menu = [];
|
||||
}
|
||||
|
@ -50,157 +50,131 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '进路选排',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '进路取消',
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '引导进路办理',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动进路',
|
||||
handler: this.setAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动进路',
|
||||
handler: this.cancelAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路交ATS自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '查询进路状态',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
menuNormal: [
|
||||
{
|
||||
label: '进路选排',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '进路取消',
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
|
||||
isDisabled: (signal, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade === 1;
|
||||
} else {
|
||||
return signal.blockade === 1;
|
||||
}
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '进路选排',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '进路取消',
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动进路',
|
||||
handler: this.setAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动进路',
|
||||
handler: this.cancelAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '进路引导',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路交ATS自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '查询进路状态',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
|
||||
isDisabled: (signal, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade !== 1;
|
||||
} else {
|
||||
return signal.blockade !== 1;
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: this.work === 'localWork' ? '引导进路办理' : '进路引导',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动进路',
|
||||
handler: this.setAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
|
||||
isDisabled: (signal, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 0;
|
||||
} else {
|
||||
return signal.fleetMode !== 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动进路',
|
||||
handler: this.cancelAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
|
||||
isDisabled: (signal, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 1;
|
||||
} else {
|
||||
return signal.fleetMode !== 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
|
||||
isDisabled: (signal, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl === 1 || !signal.canSetCi;
|
||||
} else {
|
||||
return signal.ciControl === 1 || !signal.canSetCi;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
|
||||
isDisabled: (signal, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl !== 1;
|
||||
} else {
|
||||
return signal.ciControl !== 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路交ATS自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '查询进路状态',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
@ -262,6 +236,12 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
this.menu.push(menuItem);
|
||||
});
|
||||
// 故障模式菜单列表
|
||||
const ciAutoMenuItem = this.menu.find( item => item.cmdType === CMD.Signal.CMD_SIGNAL_SET_CI_AUTO);
|
||||
const ciAutoTriggerMenuItem = this.menu.find( item => item.cmdType === CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER);
|
||||
|
@ -39,62 +39,71 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '上电解锁',
|
||||
handler: this.powerUnLock,
|
||||
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '全站设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '全站取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '所有进路交ATS自动控',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '所有进路交人工控',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||
}
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '所有进路交人工控',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '所有进路交ATS自动控',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||
}
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuNormal: [
|
||||
{
|
||||
label: '上电解锁',
|
||||
handler: this.powerUnLock,
|
||||
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '全站设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '全站取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '所有进路交ATS自动控',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
{
|
||||
label: '所有进路交人工控',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||
isShow: (station, work) => work === 'localWork'
|
||||
},
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
|
||||
// }
|
||||
{
|
||||
label: '所有进路交人工控',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||
isShow: (station, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '所有进路交ATS自动控',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||
isShow: (station, work) => work === 'dispatchWork'
|
||||
}
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
|
||||
// }
|
||||
],
|
||||
menuForce: [
|
||||
// {
|
||||
// label: '设置ZC故障',
|
||||
@ -141,6 +150,12 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||
this.menu.push(menuItem);
|
||||
});
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -50,92 +50,123 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '强制取消扣车',
|
||||
handler: this.cancelDetainTrainForce,
|
||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '查询站台状态',
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
menuNormal: [
|
||||
{
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 0;
|
||||
} else {
|
||||
return stand.centerHoldTrain !== 0;
|
||||
}
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '全线取消扣车',
|
||||
handler: this.cancelDetainTrainAll,
|
||||
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '强制取消扣车',
|
||||
handler: this.cancelDetainTrainForce,
|
||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: '设置停站时间',
|
||||
handler: this.setStopTime,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
label: '设置运行等级',
|
||||
handler: this.setRunLevel,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
{
|
||||
label: '设置提前发车',
|
||||
handler: this.earlyDeparture,
|
||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
},
|
||||
{
|
||||
label: '查询站台状态',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1;
|
||||
} else {
|
||||
return stand.centerHoldTrain !== 1;
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '强制取消扣车',
|
||||
handler: this.cancelDetainTrainForce,
|
||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN,
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '查询站台状态',
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS,
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '全线取消扣车',
|
||||
handler: this.cancelDetainTrainAll,
|
||||
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
||||
} else {
|
||||
return stand.allSkip !== 0;
|
||||
}
|
||||
},
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||
isDisabled: (stand, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
||||
} else {
|
||||
return stand.allSkip !== 1 || stand.assignSkip !== 1;
|
||||
}
|
||||
},
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '设置停站时间',
|
||||
handler: this.setStopTime,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '设置运行等级',
|
||||
handler: this.setRunLevel,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '设置提前发车',
|
||||
handler: this.earlyDeparture,
|
||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART,
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||
isShow: (stand, work) => work === 'dispatchWork'
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
@ -175,6 +206,12 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
this.menu.push(menuItem);
|
||||
});
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
@ -27,27 +27,24 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
}
|
||||
]
|
||||
},
|
||||
menuNormal: [
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
]
|
||||
};
|
||||
@ -74,6 +71,12 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
this.menu.push(menuItem);
|
||||
});
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
|
@ -40,122 +40,102 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔转动',
|
||||
handler: this.switchTurnout,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||
},
|
||||
{
|
||||
label: '道岔故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '计轴预复位',
|
||||
handler: this.axlePreReset,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '道岔设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '道岔取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
menuNormal: [
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock === 1;
|
||||
} else {
|
||||
return switchDevice.singleLock === 1;
|
||||
}
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔转动',
|
||||
handler: this.switchTurnout,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||
},
|
||||
{
|
||||
label: '道岔故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '道岔设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '道岔取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock !== 1;
|
||||
} else {
|
||||
return switchDevice.singleLock !== 1;
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade === 1;
|
||||
} else {
|
||||
return switchDevice.blockade === 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK,
|
||||
isDisabled: (switchDevice, work) => {
|
||||
if (work === 'localWork') {
|
||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade !== 1;
|
||||
} else {
|
||||
return switchDevice.blockade !== 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '道岔转动',
|
||||
handler: this.switchTurnout,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||
},
|
||||
{
|
||||
label: '道岔故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '计轴预复位',
|
||||
handler: this.axlePreReset,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '道岔设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '道岔取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
@ -201,6 +181,12 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
this.menu.push(menuItem);
|
||||
});
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
@ -57,61 +57,73 @@ export default {
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
work: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: '添加列车识别号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: '删除列车识别号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: '修改列车识别号',
|
||||
handler: this.editTrainId,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: '修改车组号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: '移动列车识别号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: '交换列车识别号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: '标记ATP切除',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_CUT
|
||||
},
|
||||
{
|
||||
label: '标记ATP激活',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_RECOVER
|
||||
},
|
||||
{
|
||||
label: '查看列车详细运行信息',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_INFO
|
||||
}
|
||||
]
|
||||
},
|
||||
menuNormal: [
|
||||
{
|
||||
label: '添加列车识别号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE,
|
||||
isShow: (train, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '删除列车识别号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE,
|
||||
isShow: (train, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '修改列车识别号',
|
||||
handler: this.editTrainId,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE,
|
||||
isShow: (train, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '修改车组号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE,
|
||||
isShow: (train, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '移动列车识别号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE,
|
||||
isShow: (train, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '交换列车识别号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE,
|
||||
isShow: (train, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '标记ATP切除',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_CUT,
|
||||
isShow: (train, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '标记ATP激活',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_RECOVER,
|
||||
isShow: (train, work) => work === 'dispatchWork'
|
||||
},
|
||||
{
|
||||
label: '查看列车详细运行信息',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_INFO,
|
||||
isShow: (train, work) => work === 'dispatchWork'
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
@ -233,6 +245,12 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = [];
|
||||
this.menuNormal.forEach(menuItem => {
|
||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
|
||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||
this.menu.push(menuItem);
|
||||
});
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
} else {
|
||||
|
@ -339,6 +339,7 @@ export default {
|
||||
{ label: 'ISCS', value: 'iscsView' },
|
||||
{ label: 'IBP', value: 'ibp' },
|
||||
{ label: 'PSL', value: 'psl' },
|
||||
{ label: 'PIS', value: 'pis' },
|
||||
{ label: '列车驾驶', value: 'drivingPlan' },
|
||||
{ label: 'CCTV', value: 'cctvView' },
|
||||
{ label: '设备视图', value: 'jl3dModle' },
|
||||
|
@ -169,7 +169,7 @@ export default {
|
||||
ILW:{text:'检测教员机登录中', Img:bgLswImg},
|
||||
PIS_TRAIN:{text:'检测教员机登录中'},
|
||||
PIS_STAND:{text:'检测教员机登录中'},
|
||||
SANDBOX:{Img:bgLswImg}
|
||||
SANDBOX:{Img:bgLswImg, text:'检测教员机登录中'}
|
||||
};
|
||||
this.loadingText = deviceMap[this.type].text;
|
||||
this.deviceImg = deviceMap[this.type].Img;
|
||||
@ -289,12 +289,23 @@ export default {
|
||||
group: group,
|
||||
mapId: mapId,
|
||||
projectDevice:this.$route.query.projectDevice,
|
||||
type:this.$route.query.type,
|
||||
simType:paramVO.type,
|
||||
project: this.project,
|
||||
singleClient:true
|
||||
};
|
||||
if (config) {
|
||||
if (config.client) { query.client = config.client; }
|
||||
if (config.psdCode) { query.psdCode = config.psdCode; }
|
||||
// IBP
|
||||
if (config.part) { query.part = config.part; }
|
||||
if (config.deviceCode) { query.deviceCode = config.deviceCode; }
|
||||
// iscs
|
||||
if (config.picture) { query.deviceCode = config.picture; }
|
||||
// pis
|
||||
if (config.standCode) { query.standCode = config.standCode; }
|
||||
if (config.groupNumber) { query.groupNumber = config.groupNumber; }
|
||||
//
|
||||
// if (config.client) { query.client = config.client; }
|
||||
}
|
||||
this.$router.push({ path: `/display/demon`, query: query });
|
||||
|
@ -270,7 +270,7 @@ export default {
|
||||
getLoginInfo(getToken()).then(resp => {
|
||||
const deviceVO = resp.data.deviceVO;
|
||||
if (deviceVO) {
|
||||
const config = JSON.parse(deviceVO.config);
|
||||
const config = JSON.parse(deviceVO.config || {});
|
||||
if (config && config.roleCode) {
|
||||
const params = [{userId: res.id, memberId:config.roleCode}];
|
||||
assignUsersPlayRoles(params, group).then(() => {
|
||||
@ -311,6 +311,9 @@ export default {
|
||||
model.password = md5(model.password);
|
||||
model.type = 'class';
|
||||
model.project = this.project;
|
||||
if (this.$route.query.projectDevice) {
|
||||
model.deviceCode = this.$route.query.projectDevice;
|
||||
}
|
||||
this.loading = true;
|
||||
if (this.isAutoLogin) {
|
||||
Cookies.set(this.cookiesName, model.username, { expires: 2 });
|
||||
|
@ -61,7 +61,7 @@ export default {
|
||||
{ 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.isJoint && 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: '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.$route.query.type == 'IM' || (!this.$route.query.type && !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: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
||||
{ label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, isShow: () => { return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
||||
|
@ -25,6 +25,7 @@
|
||||
<diagram-load v-else-if="picture === 'diagramLoad'" ref="diagramLoad" :group="group" />
|
||||
<diagram-preview v-else-if="picture === 'diagramPreview'" ref="diagramPreview" />
|
||||
<diagram-edit v-else-if="picture === 'diagramEdit'" ref="diagramEdit" />
|
||||
<pis-terminal v-else-if="picture === 'pis'" ref="pisTerminal" />
|
||||
<terminal-menu
|
||||
v-if="menuShow"
|
||||
ref="terminalMenu"
|
||||
@ -54,6 +55,7 @@ import TrafficTerminalWork from './trafficTerminalWork';
|
||||
import BigTrainRunplanManage from '@/views/bigTrainRunplanManage/index';
|
||||
import IscsSystem from '@/views/iscs/iscsSystemNew/index';
|
||||
import PslTerminal from './psl';
|
||||
import PisTerminal from './pis/index';
|
||||
import DispatcherManage from './dispatcherManage';
|
||||
import LargePassengerStrategy from './largePassengerStrategy';
|
||||
import LargePassengerView from './largePassengerView';
|
||||
@ -85,6 +87,7 @@ export default {
|
||||
LargePassengerStrategy,
|
||||
LargePassengerView,
|
||||
PslTerminal,
|
||||
PisTerminal,
|
||||
DispatcherManage,
|
||||
BigScreen,
|
||||
ScheduleWork,
|
||||
|
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="slidecontent" :class="{ animation: animation }" :style="`transform: translateX(-${currentIndex}00%)`">
|
||||
<template v-for="(path, idx) in _paths">
|
||||
<img class="img" :src="idx - currentIndex < 3 ? `${prefix}${path}` : ''" :key="`${path}${idx}`" />
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let timer
|
||||
export default {
|
||||
name: 'SlideShow',
|
||||
props: {
|
||||
paths: {
|
||||
type: Array,
|
||||
validator: val => Array.isArray(val) && val.every(item => typeof item === 'string'),
|
||||
},
|
||||
prefix: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentIndex: 0,
|
||||
animation: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
len() {
|
||||
return this._paths.length
|
||||
},
|
||||
_paths() {
|
||||
return [...this.paths, this.paths[0]]
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.initAnimation()
|
||||
window.addEventListener('visibilitychange', this.visibilityChangeHandler)
|
||||
},
|
||||
methods: {
|
||||
initAnimation() {
|
||||
timer = setInterval(() => {
|
||||
this.animation = true
|
||||
this.currentIndex = this.nextIndex(this.currentIndex)
|
||||
setTimeout(() => {
|
||||
if (this.currentIndex === this.len - 1) {
|
||||
this.animation = false
|
||||
this.currentIndex = this.nextIndex(this.currentIndex)
|
||||
}
|
||||
}, 1000)
|
||||
}, 4000)
|
||||
},
|
||||
pauseAnimation() {
|
||||
clearInterval(timer)
|
||||
},
|
||||
visibilityChangeHandler() {
|
||||
if (document.hidden) this.pauseAnimation()
|
||||
else this.initAnimation()
|
||||
},
|
||||
nextIndex(idx) {
|
||||
return idx < this.len - 1 ? idx + 1 : 0
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
timer = null
|
||||
window.removeEventListener('visibilitychange', this.visibilityChangeHandler)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.slidecontent {
|
||||
height: 100%;
|
||||
white-space: nowrap;
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.animation {
|
||||
transition: 1s linear all;
|
||||
}
|
||||
</style>
|
441
src/views/newMap/display/terminals/pis/index.vue
Normal file
441
src/views/newMap/display/terminals/pis/index.vue
Normal file
@ -0,0 +1,441 @@
|
||||
<template>
|
||||
<div class="screen">
|
||||
<div v-if="view === 'stand'" class="station">
|
||||
<div class="datetime">
|
||||
<div class="logo">
|
||||
<img :src="logo" alt="">
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ date }}</span>
|
||||
<span class="time">{{ time }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="traininfo">
|
||||
<div class="currentStation">
|
||||
<div>本站 This Station</div>
|
||||
<div class="text-center bigger">{{ standPisState.stationName }}</div>
|
||||
<div class="text-center">{{ standPisState.stationNameEn }}</div>
|
||||
</div>
|
||||
<div class="devide" />
|
||||
<div class="nextTrain">
|
||||
<div>第一班列车 1st</div>
|
||||
<div v-if="standPisState.secondTrainRemain !== null">
|
||||
<div v-if="standPisState.firstTrainRemain > 0" class="text-center yellow">
|
||||
<span class="bigger">{{ standPisState.firstTrainRemain }} 分钟</span> <span>min</span>
|
||||
</div>
|
||||
<div v-else-if="standPisState.firstTrainRemain > -1" class="text-center yellow">
|
||||
<span class="bigger">即将进站</span>
|
||||
</div>
|
||||
<div v-else class="text-center yellow">
|
||||
<span class="bigger">列车到达</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>开往 {{ standPisState.firstEndStationName }}</div>
|
||||
<div v-if="standPisState.firstEndStationNameEn">TO {{ standPisState.firstEndStationNameEn }}</div>
|
||||
</div>
|
||||
<div class="devide" />
|
||||
<div class="secondTrain">
|
||||
<div>第二班列车 2nd</div>
|
||||
<div v-if="standPisState.secondTrainRemain !== null">
|
||||
<div v-if="standPisState.secondTrainRemain > 0" class="text-center bigger">
|
||||
{{ standPisState.secondTrainRemain }} 分钟 <span>min</span>
|
||||
</div>
|
||||
<div v-else-if="standPisState.secondTrainRemain > -1" class="text-center bigger">即将进站</div>
|
||||
<div v-else class="text-center bigger">列车到达</div>
|
||||
</div>
|
||||
<div>开往 {{ standPisState.secondEndStationName }}</div>
|
||||
<div v-if="standPisState.secondEndStationNameEn">TO {{ standPisState.secondEndStationNameEn }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="media">
|
||||
<div class="mediacontent">
|
||||
<SlideShow
|
||||
:prefix="prefix"
|
||||
:paths="
|
||||
Array(27)
|
||||
.fill()
|
||||
.map((e, i) => `img${i + 1}.jpg`)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="banner">
|
||||
<div class="text">{{ standPisState.text }}</div>
|
||||
<div class="text">{{ standPisState.text }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tempratrue">
|
||||
<div class="directionIdentifer">《《</div>
|
||||
<div class="trainpic">
|
||||
<div class="pic" />
|
||||
<div class="textarea">
|
||||
<div v-for="i in 6" :key="i">舒适 Vacant</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="view === 'train'" class="train">
|
||||
<div class="train-pis-content">
|
||||
<div class="left">
|
||||
<div class="logo">
|
||||
<img :src="logo" alt="">
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="time block">
|
||||
<div>时间 TIME</div>
|
||||
<div>{{ time }}</div>
|
||||
</div>
|
||||
<div class="date block">
|
||||
<div>日期 DATE</div>
|
||||
<div>{{ date }}</div>
|
||||
</div>
|
||||
<div class="next block">
|
||||
<div class="up">
|
||||
<div>{{ !!onboardPisState.parking ? '当前站' : '下一站' }}</div>
|
||||
<div>{{ !!onboardPisState.parking ? 'Current Station' : 'Next Station' }}</div>
|
||||
</div>
|
||||
<div class="down">
|
||||
<div>{{ onboardPisState.stationName }}</div>
|
||||
<div>{{ onboardPisState.stationNameEN }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="dest">
|
||||
<div>
|
||||
开往: {{ onboardPisState.endStationName
|
||||
}}{{ onboardPisState.endStationNameEn ? ' / TO: ' + currentTrain.endStationNameEn : '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="media">
|
||||
<SlideShow
|
||||
:prefix="prefix"
|
||||
:paths="
|
||||
Array(27)
|
||||
.fill()
|
||||
.map((e, i) => `img${i + 1}.jpg`)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="banner">
|
||||
<div class="text">{{ onboardPisState.text }}</div>
|
||||
<div class="text">{{ onboardPisState.text }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { creatSubscribe, clearSubscribe, getTopic, displayTopic } from '@/utils/stomp';
|
||||
import { timestampFormat } from '@/utils/date';
|
||||
import logo from '@/assets/icon/favicon_hhzy.png';
|
||||
import SlideShow from './components/slideshow';
|
||||
export default {
|
||||
name: 'PIS',
|
||||
components: { SlideShow },
|
||||
data() {
|
||||
return {
|
||||
view: '',
|
||||
date: '',
|
||||
time: '',
|
||||
logo,
|
||||
standPisState: {
|
||||
standCode: '',
|
||||
stationName: '',
|
||||
firstTrainRemain: undefined,
|
||||
firstEndStationName: '',
|
||||
secondTrainRemain: undefined,
|
||||
secondEndStationName: '',
|
||||
text:
|
||||
'党的十八大提出,倡导富强、民主、文明、和谐,倡导自由、平等、公正、法治,倡导爱国、敬业、诚信、友善,积极培育和践行社会主义核心价值观。富强、民主、文明、和谐是国家层面的价值目标,自由、平等、公正、法治是社会层面的价值取向,爱国、敬业、诚信、友善是公民个人层面的价值准则,这24个字是社会主义核心价值观的基本内容。'
|
||||
},
|
||||
onboardPisState: {
|
||||
groupNumber: '',
|
||||
stationName: '',
|
||||
endStationName: '',
|
||||
parking: 0,
|
||||
text: '今日天气:晴,最低气温15℃,最高气温22℃,风向风力:东北风3级,空气质量:良好'
|
||||
},
|
||||
standPisImgUrl: `${this.$store.state.user.resourcesUrl}/PICTURE/2022-08-01/standPis.png`,
|
||||
onboardPisImgUrl: `${this.$store.state.user.resourcesUrl}/PICTURE/2022-08-01/onboardPis.png`,
|
||||
prefix: `${this.$store.state.user.resourcesUrl}/PICTURE/pis/`
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.simulationTimeSync': function(val) {
|
||||
this.time = timestampFormat('HH:mm', val);
|
||||
this.date = timestampFormat('YYYY年MM月DD日', val);
|
||||
},
|
||||
'$store.state.socket.standPisState': function(val) {
|
||||
this.standPisState.stationName = val.stationName;
|
||||
this.standPisState.firstTrainRemain = val.firstTrainRemain;
|
||||
this.standPisState.firstEndStationName = val.firstEndStationName;
|
||||
this.standPisState.secondTrainRemain = val.secondTrainRemain;
|
||||
this.standPisState.secondEndStationName = val.secondEndStationName;
|
||||
if (val.text) this.standPisState.text = val.text;
|
||||
},
|
||||
'$store.state.socket.onboardPisState': function(val) {
|
||||
this.onboardPisState.stationName = val.stationName;
|
||||
this.onboardPisState.endStationName = val.endStationName;
|
||||
this.onboardPisState.parking = val.parking;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initPage(this.$route.query);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearPage();
|
||||
},
|
||||
|
||||
methods: {
|
||||
initPage(query) {
|
||||
const { type, group, standCode, groupNumber } = query;
|
||||
this.query = query;
|
||||
if (type === 'PIS_STAND') {
|
||||
this.view = 'stand';
|
||||
creatSubscribe(getTopic(type, group, { standCode }));
|
||||
} else if (type === 'PIS_TRAIN') {
|
||||
this.view = 'train';
|
||||
creatSubscribe(getTopic(type, group, { groupNumber }));
|
||||
}
|
||||
creatSubscribe(`${displayTopic}\/${group}`);
|
||||
},
|
||||
clearPage() {
|
||||
clearSubscribe(
|
||||
getTopic(
|
||||
this.query.type,
|
||||
this.query.group,
|
||||
this.view === 'stand' ? { standCode: this.query.standCode } : { groupNumber: this.query.groupNumber }
|
||||
)
|
||||
);
|
||||
clearSubscribe(`${displayTopic}\/${this.query.group}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.screen {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
font-size: 28px;
|
||||
color: #fff;
|
||||
user-select: none;
|
||||
}
|
||||
.station {
|
||||
height: 100%;
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
padding: 10px;
|
||||
background: linear-gradient(#009eb5, #00b7d7);
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-template-rows: repeat(5, 1fr);
|
||||
& > div {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: visible;
|
||||
}
|
||||
.datetime,
|
||||
.traininfo {
|
||||
border: 1px solid rgb(143, 192, 184);
|
||||
border-radius: 5px;
|
||||
background: #009ab8;
|
||||
box-shadow: 2px 2px 3px 1px #69898f, 0px 0px 5px 0px inset lightgrey;
|
||||
}
|
||||
.datetime {
|
||||
grid-area: 1/1/2/2;
|
||||
flex-direction: column;
|
||||
justify-content: space-evenly;
|
||||
.time {
|
||||
font-size: 1.2em;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
.logo {
|
||||
& > img {
|
||||
height: 110px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.traininfo {
|
||||
grid-area: 2/1/5/2;
|
||||
flex-direction: column;
|
||||
justify-content: space-evenly;
|
||||
font-size: 24px;
|
||||
& > div {
|
||||
width: 100%;
|
||||
padding: 0 30px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
.devide {
|
||||
width: 80%;
|
||||
height: 2px;
|
||||
background: rgba($color: #fff, $alpha: 0.7);
|
||||
border-radius: 100%;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.bigger {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.yellow {
|
||||
color: #cff055;
|
||||
}
|
||||
.nextTrain {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
}
|
||||
.media {
|
||||
grid-area: 1/2/5/5;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.mediacontent {
|
||||
width: 100%;
|
||||
height: calc(85% - 10px);
|
||||
background: linear-gradient(#cff055, #009eb5);
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
.banner {
|
||||
width: 100%;
|
||||
height: 15%;
|
||||
border: 1px solid rgb(143, 192, 184);
|
||||
border-radius: 5px;
|
||||
background: #009ab8;
|
||||
box-shadow: 2px 2px 3px 1px #69898f, 0px 0px 5px 0px inset lightgrey;
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
.text {
|
||||
white-space: nowrap;
|
||||
font-size: 60px;
|
||||
animation: 40s linear infinite scroll;
|
||||
color: #cff055;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tempratrue {
|
||||
grid-area: 5/1/6/5;
|
||||
justify-content: space-evenly;
|
||||
.directionIdentifer {
|
||||
font-size: 72px;
|
||||
}
|
||||
.trainpic {
|
||||
width: 80%;
|
||||
.pic {
|
||||
height: 120px;
|
||||
background-image: url('~@/assets/pis/train.png');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
.textarea {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.train {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, #44537b, #445567, #44537b);
|
||||
.train-pis-content {
|
||||
height: 88%;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
.left,
|
||||
.right {
|
||||
height: 100%;
|
||||
}
|
||||
.left {
|
||||
width: 30%;
|
||||
background: linear-gradient(90deg, #3e4e69, #586baa, #3e4e69);
|
||||
padding: 20px;
|
||||
.logo {
|
||||
height: 12%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
& > img {
|
||||
height: 100%;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
}
|
||||
.info {
|
||||
height: 88%;
|
||||
background-color: #7076b0;
|
||||
border-radius: 15px;
|
||||
padding: 8px;
|
||||
overflow: visible;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
.time {
|
||||
height: 25%;
|
||||
}
|
||||
.date {
|
||||
height: 25%;
|
||||
margin: 8px 0;
|
||||
}
|
||||
.next {
|
||||
height: 50%;
|
||||
}
|
||||
.block {
|
||||
background: linear-gradient(90deg, #445397, #7b7cc2, #445397);
|
||||
border-radius: 7px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
.up,
|
||||
.down {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: 70%;
|
||||
.dest {
|
||||
height: 15%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
font-size: 40px;
|
||||
}
|
||||
.media {
|
||||
height: 85%;
|
||||
background: linear-gradient(#7b7cc2, #cff055);
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
.banner {
|
||||
height: 12%;
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
.text {
|
||||
white-space: nowrap;
|
||||
font-size: 60px;
|
||||
animation: 40s linear infinite scroll;
|
||||
color: #cff055;
|
||||
}
|
||||
}
|
||||
}
|
||||
@keyframes scroll {
|
||||
from {
|
||||
transform: translateX(0);
|
||||
}
|
||||
to {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -19,7 +19,7 @@ export default {
|
||||
formModel: {
|
||||
code: '',
|
||||
type: '',
|
||||
projectCode: ''
|
||||
project: ''
|
||||
},
|
||||
LessonList: [],
|
||||
UserList: [],
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
items: [
|
||||
{ prop: 'code', label: this.$t('system.deviceCode'), type: 'text', required: true, placeholder: this.$t('rules.enterDeviceCode') },
|
||||
{ prop: 'type', label: this.$t('system.deviceType1'), type: 'select', required: true, options: this.deviceTypeList, placeholder: this.$t('rules.selectDeviceType') },
|
||||
{prop: 'projectCode', label:'所属项目', type: 'select', required: true, options:ConstConfig.ConstSelect.projectList }
|
||||
{prop: 'project', label:'所属项目', type: 'select', required: true, options:ConstConfig.ConstSelect.projectList }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -48,7 +48,7 @@ export default {
|
||||
type: [
|
||||
{ required: true, message: this.$t('rules.selectDeviceType'), trigger: 'change' }
|
||||
],
|
||||
projectCode: [
|
||||
project: [
|
||||
{ required: true, message: '请选择所属项目', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
@ -70,7 +70,7 @@ export default {
|
||||
const params = {
|
||||
code: this.formModel.code,
|
||||
type: this.formModel.type,
|
||||
projectCode: this.formModel.projectCode
|
||||
project: this.formModel.project
|
||||
};
|
||||
deviceIsExist(params.code).then(response => {
|
||||
if (!response.data) {
|
||||
@ -92,7 +92,7 @@ export default {
|
||||
this.formModel = {
|
||||
code: '',
|
||||
type: '',
|
||||
projectCode: ''
|
||||
project: ''
|
||||
};
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogVisible = false;
|
||||
|
@ -21,10 +21,40 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form v-show="['IM','CW'].includes(data.type)" ref="formIm" :model="formIm" label-width="100px" :rules="rulesIm">
|
||||
<el-form-item label="关联地图:" prop="mapId">
|
||||
<el-select v-model="formIm.mapId" placeholder="请选择" size="small" @change="mapIdChange">
|
||||
<el-select v-model="formIbp.mapId" placeholder="请选择" size="small" @change="mapIdChange">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联角色:" prop="roleCode">
|
||||
<el-select v-model="formIbp.roleCode" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in roleList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联客户端:" prop="client">
|
||||
<el-select v-model="formIbp.client" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in clientList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form v-show="['IM','CW','DRIVE','DEPOT'].includes(data.type)" ref="formIm" :model="formIm" label-width="100px" :rules="rulesIm">
|
||||
<el-form-item label="关联地图:" prop="mapId">
|
||||
<el-select v-model="formIm.mapId" placeholder="请选择" size="small" filter @change="mapIdChange">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.id"
|
||||
@ -117,12 +147,42 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联地图:" prop="mapId">
|
||||
<el-select v-model="formIscs.mapId" placeholder="请选择" size="small" @change="mapIdChange">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车站" prop="stationCode">
|
||||
<el-select v-model="formIscs.stationCode" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.value"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联角色:" prop="roleCode">
|
||||
<el-select v-model="formIscs.roleCode" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in roleList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联客户端:" prop="client">
|
||||
<el-select v-model="formIscs.client" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in clientList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
@ -137,7 +197,7 @@
|
||||
|
||||
<script>
|
||||
import { getDeviceDetail, getDevicesByType, setDeviceConfig } from '@/api/project';
|
||||
import { getAllMapOnline, querySimulationMemberByMapId, querySimulationStationsByMapId } from '@/api/jmap/map';
|
||||
import { getAllMapOnline, getPublishMapListOnline, querySimulationMemberByMapId, querySimulationStationsByMapId } from '@/api/jmap/map';
|
||||
import { getBackProjectConfigByCode } from '@/api/projectConfig';
|
||||
import { getMapFunctioById } from '@/api/trainingPlatform';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
@ -157,7 +217,10 @@ export default {
|
||||
},
|
||||
formIbp: {
|
||||
part: '',
|
||||
deviceCode: ''
|
||||
deviceCode: '',
|
||||
mapId: '',
|
||||
roleCode:'',
|
||||
client:''
|
||||
},
|
||||
formLw: {
|
||||
mapId: '',
|
||||
@ -168,7 +231,10 @@ export default {
|
||||
formIscs: {
|
||||
deviceCode: '',
|
||||
picture: '',
|
||||
stationCode: ''
|
||||
mapId: '',
|
||||
stationCode: '',
|
||||
roleCode:'',
|
||||
client:''
|
||||
},
|
||||
clientList: ConstConfig.ConstSelect.clientList,
|
||||
pictureList: [
|
||||
@ -189,6 +255,12 @@ export default {
|
||||
],
|
||||
deviceCode: [
|
||||
{ required: true, message: '请选择归属车站', trigger: 'change'}
|
||||
],
|
||||
roleCode: [
|
||||
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
||||
],
|
||||
client: [
|
||||
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||
]
|
||||
},
|
||||
rulesLw: {
|
||||
@ -205,6 +277,12 @@ export default {
|
||||
rulesIscs: {
|
||||
deviceCode: [
|
||||
{ required: true, message: '请选择关联设备', trigger: 'change'}
|
||||
],
|
||||
roleCode: [
|
||||
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
||||
],
|
||||
client: [
|
||||
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||
]
|
||||
},
|
||||
partList: [{label: '左', value: 'LEFT'}, {label: '右', value: 'RIGHT'}, {label: '全部', value: 'WHOLE'}],
|
||||
@ -220,15 +298,17 @@ export default {
|
||||
initData(row) {
|
||||
getDeviceDetail(row.id).then(resp => {
|
||||
if (resp.data.config && resp.data.type === 'VR_IBP') {
|
||||
this.formIbp = JSON.parse(resp.data.config);
|
||||
const form = JSON.parse(resp.data.config);
|
||||
this.formIbp = Object.assign(this.formIbp, form);
|
||||
} else if (resp.data.config && resp.data.type === 'LW') {
|
||||
const form = JSON.parse(resp.data.config);
|
||||
this.formLw = Object.assign(this.formLw, form);
|
||||
} else if (resp.data.config && ['IM', 'CW'].includes(resp.data.type)) {
|
||||
} else if (resp.data.config && ['IM', 'CW', 'DRIVE', 'DEPOT'].includes(resp.data.type)) {
|
||||
const form = JSON.parse(resp.data.config);
|
||||
this.formIm = Object.assign(this.formIm, form);
|
||||
} else if (resp.data.config && (resp.data.type === 'ISCS_LW' || resp.data.type === 'ISCS_CW')) {
|
||||
this.formIscs = JSON.parse(resp.data.config);
|
||||
const form = JSON.parse(resp.data.config);
|
||||
this.formIscs = Object.assign(this.formIscs, form);
|
||||
}
|
||||
}).catch(()=> {
|
||||
this.$message.error('获取项目设备详情失败!');
|
||||
@ -257,11 +337,14 @@ export default {
|
||||
this.$message.error('获取设备列表失败!');
|
||||
});
|
||||
}
|
||||
getAllMapOnline().then(res => {
|
||||
getPublishMapListOnline().then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
this.mapList = res.data;
|
||||
this.formLw.mapId = this.mapList[0].id;
|
||||
this.mapIdChange(this.mapList[0].id);
|
||||
// this.formLw.mapId = this.mapList[0].id;
|
||||
// this.mapIdChange(this.mapList[0].id);
|
||||
if (this.formIm.mapId) { this.mapIdChange(this.formIm.mapId); }
|
||||
if (this.formLw.mapId) { this.mapIdChange(this.formLw.mapId); }
|
||||
if (this.formIbp.mapId) { this.mapIdChange(this.formLw.mapId); }
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取地图列表失败!');
|
||||
@ -291,14 +374,18 @@ export default {
|
||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||
});
|
||||
});
|
||||
} else if (['IM', 'CW'].includes(this.data.type)) {
|
||||
} else if (['IM', 'CW', 'DRIVE', 'DEPOT'].includes(this.data.type)) {
|
||||
this.$refs.formIm.validate(() => {
|
||||
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formIm) };
|
||||
setDeviceConfig(data).then(response => {
|
||||
if (self.data.type == 'IM') {
|
||||
self.$message.success('设置教员机配置成功');
|
||||
} else {
|
||||
} else if (self.data.type == 'CW') {
|
||||
self.$message.success('设置行调工作站配置成功');
|
||||
} else if (self.data.type == 'DEPOT') {
|
||||
self.$message.success('设置车辆段终端配置成功');
|
||||
} else {
|
||||
self.$message.success('设置列车驾驶终端配置成功');
|
||||
}
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
|
@ -43,6 +43,39 @@
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-form>-->
|
||||
<el-input v-model="jsonConfig" autosize type="textarea" />
|
||||
<el-form v-show="['PIS_STAND','PIS_TRAIN'].includes(data.type)" ref="formPis" :model="formPis" label-width="100px" :rules="rulesPis" style="margin-top:10px">
|
||||
<!-- -->
|
||||
<el-form-item label="关联地图:" prop="mapId">
|
||||
<el-select v-model="formPis.mapId" placeholder="请选择" size="small" @change="mapIdChange">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联角色:" prop="roleCode">
|
||||
<el-select v-model="formPis.roleCode" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in roleList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联客户端:" prop="client">
|
||||
<el-select v-model="formPis.client" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in clientList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
@ -52,7 +85,11 @@
|
||||
|
||||
<script>
|
||||
import { setDeviceConfig, getDeviceDetail } from '@/api/project';
|
||||
import { getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode } from '@/api/jmap/map';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
// getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode
|
||||
import {getPublishMapListOnline, querySimulationMemberByMapId, querySimulationStationsByMapId } from '@/api/jmap/map';
|
||||
import { getBackProjectConfigByCode } from '@/api/projectConfig';
|
||||
import { getMapFunctioById } from '@/api/trainingPlatform';
|
||||
|
||||
export default {
|
||||
name: 'EditConfigGateway',
|
||||
@ -60,13 +97,19 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
inline: true,
|
||||
formModel: {},
|
||||
formLeft: {},
|
||||
formRight: {},
|
||||
leftRules: {},
|
||||
rightRules: {},
|
||||
setDeviceConfigFunction: null,
|
||||
// formModel: {},
|
||||
// formLeft: {},
|
||||
// formRight: {},
|
||||
// leftRules: {},
|
||||
// rightRules: {},
|
||||
// setDeviceConfigFunction: null,
|
||||
clientList: ConstConfig.ConstSelect.clientList,
|
||||
data: {},
|
||||
formPis:{
|
||||
mapId: '',
|
||||
roleCode:'',
|
||||
client:''
|
||||
},
|
||||
titleMap: {
|
||||
SWITCH: '道岔',
|
||||
PSD:'屏蔽门',
|
||||
@ -78,15 +121,25 @@ export default {
|
||||
UDP_CLIENT: 'UDP客户端',
|
||||
PIS_STAND: '站台PIS',
|
||||
PIS_TRAIN: '列车PIS',
|
||||
UDP_LOW:'UDP下位机'
|
||||
},
|
||||
mapId: '',
|
||||
mapList: [],
|
||||
stationCode: '',
|
||||
roleList:[],
|
||||
// stationCode: '',
|
||||
stationList: [],
|
||||
standList: [],
|
||||
standCode: '',
|
||||
psdList: [],
|
||||
jsonConfig: ''
|
||||
// standList: [],
|
||||
// standCode: '',
|
||||
// psdList: [],
|
||||
jsonConfig: '',
|
||||
rulesPis: {
|
||||
roleCode: [
|
||||
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
||||
],
|
||||
client: [
|
||||
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -106,36 +159,55 @@ export default {
|
||||
this.jsonConfig = '{}';
|
||||
getDeviceDetail(row.id).then(resp => {
|
||||
if (resp.data.config) {
|
||||
this.formModel = JSON.parse(resp.data.config);
|
||||
this.jsonConfig = JSON.stringify(JSON.parse(resp.data.config), null, 4);
|
||||
// this.formModel = JSON.parse(resp.data.config);
|
||||
const config = JSON.parse(resp.data.config);
|
||||
const jsonConfig = Object.assign({}, config);
|
||||
delete jsonConfig.mapId;
|
||||
delete jsonConfig.roleCode;
|
||||
delete jsonConfig.client;
|
||||
this.jsonConfig = JSON.stringify(jsonConfig, null, 4);
|
||||
if (['PIS_STAND', 'PIS_TRAIN'].includes(row.type)) {
|
||||
getPublishMapListOnline().then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
this.mapList = res.data;
|
||||
if (config.mapId) { this.mapIdChange(config.mapId); this.formPis.mapId = config.mapId; }
|
||||
if (config.roleCode) { this.formPis.roleCode = config.roleCode; }
|
||||
if (config.client) { this.formPis.client = config.client; }
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取地图列表失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
}).catch((e)=> {
|
||||
this.$message.error('获取项目设备详情失败!');
|
||||
});
|
||||
if (row.type === 'PSL' || row.type === 'PSC') {
|
||||
getAllMapOnline().then(resp => {
|
||||
if (resp.data && resp.data.length) {
|
||||
this.mapList = resp.data;
|
||||
this.mapId = this.mapList[0].id;
|
||||
this.mapIdChange(this.mapList[0].id);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取地图列表失败');
|
||||
});
|
||||
}
|
||||
// if (row.type === 'PSL' || row.type === 'PSC') {
|
||||
// getAllMapOnline().then(resp => {
|
||||
// if (resp.data && resp.data.length) {
|
||||
// this.mapList = resp.data;
|
||||
// this.mapId = this.mapList[0].id;
|
||||
// this.mapIdChange(this.mapList[0].id);
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$message.error('获取地图列表失败');
|
||||
// });
|
||||
// }
|
||||
},
|
||||
doShow(row) {
|
||||
this.initData(row);
|
||||
// this.initForm(row);
|
||||
this.dialogVisible = true;
|
||||
this.data = row;
|
||||
// this.initForm(row);
|
||||
this.stationList = [];
|
||||
this.initData(row);
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doSave() {
|
||||
const self = this;
|
||||
let flag = true;
|
||||
if (this.$refs.form) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (this.$refs.formPis) {
|
||||
this.$refs.formPis.validate((valid) => {
|
||||
flag = valid;
|
||||
this.jsonConfig = JSON.stringify(Object.assign(JSON.parse(this.jsonConfig), this.formPis));
|
||||
});
|
||||
}
|
||||
// const form = JSON.parse(this.jsonConfig);
|
||||
@ -160,53 +232,155 @@ export default {
|
||||
// }
|
||||
},
|
||||
handleClose() {
|
||||
this.formModel = {};
|
||||
// this.formModel = {};
|
||||
this.data = {};
|
||||
this.mapList = [];
|
||||
this.stationList = [];
|
||||
this.standList = [];
|
||||
this.psdList = [];
|
||||
// this.standList = [];
|
||||
// this.psdList = [];
|
||||
this.mapId = '';
|
||||
this.stationCode = '';
|
||||
this.standCode = '';
|
||||
// this.stationCode = '';
|
||||
// this.standCode = '';
|
||||
this.dialogVisible = false;
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
},
|
||||
mapIdChange(mapId) {
|
||||
this.stationList = [];
|
||||
if (mapId) {
|
||||
getStationListNeedAttendant(mapId).then(resp => {
|
||||
querySimulationStationsByMapId(mapId).then(resp => {
|
||||
if (resp.data && resp.data.length) {
|
||||
this.stationList = resp.data;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取车站列表失败');
|
||||
});
|
||||
}
|
||||
},
|
||||
stationCodeChange(stationCode) {
|
||||
this.standList = [];
|
||||
if (stationCode) {
|
||||
getStandListByStationCode(this.mapId, stationCode).then(resp => {
|
||||
if (resp.data && resp.data.length) {
|
||||
this.standList = resp.data;
|
||||
querySimulationMemberByMapId(mapId).then(resp => {
|
||||
if (resp.data) {
|
||||
getBackProjectConfigByCode(this.data.project).then(res=>{
|
||||
if (res.data) {
|
||||
const functionId = res.data.functionId;
|
||||
if (functionId) {
|
||||
getMapFunctioById(functionId).then(response=>{
|
||||
if (resp.data) {
|
||||
const roleList = resp.data[response.data.simType];
|
||||
const covertRoleList = [];
|
||||
roleList.forEach(member => {
|
||||
const data = this.handleMember(member, this.stationList);
|
||||
covertRoleList.push(data);
|
||||
});
|
||||
this.roleList = covertRoleList;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请先配置项目信息');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取站台列表失败');
|
||||
this.$message.error('获取角色列表失败');
|
||||
});
|
||||
}
|
||||
// this.stationList = [];
|
||||
// if (mapId) {
|
||||
// getStationListNeedAttendant(mapId).then(resp => {
|
||||
// if (resp.data && resp.data.length) {
|
||||
// this.stationList = resp.data;
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$message.error('获取车站列表失败');
|
||||
// });
|
||||
// }
|
||||
},
|
||||
standCodeChange(standCode) {
|
||||
this.psdList = [];
|
||||
if (standCode) {
|
||||
getPsdListByStandCode(this.mapId, standCode).then(resp => {
|
||||
if (resp.data && resp.data.length) {
|
||||
this.psdList = resp.data;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取屏蔽门列表失败');
|
||||
});
|
||||
// stationCodeChange(stationCode) {
|
||||
// this.standList = [];
|
||||
// if (stationCode) {
|
||||
// getStandListByStationCode(this.mapId, stationCode).then(resp => {
|
||||
// if (resp.data && resp.data.length) {
|
||||
// this.standList = resp.data;
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$message.error('获取站台列表失败');
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// standCodeChange(standCode) {
|
||||
// this.psdList = [];
|
||||
// if (standCode) {
|
||||
// getPsdListByStandCode(this.mapId, standCode).then(resp => {
|
||||
// if (resp.data && resp.data.length) {
|
||||
// this.psdList = resp.data;
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$message.error('获取屏蔽门列表失败');
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
handleMember(member, stationList) {
|
||||
const data = { value: member.id, label: '', memberType: member.type };
|
||||
const device = stationList.find(station => station.code === member.deviceCode) || {};
|
||||
switch (member.type) {
|
||||
case 'DISPATCHER':
|
||||
data.label = '行调' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
data.label = '行值-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DRIVER':
|
||||
data.label = '司机-' + member.deviceCode;
|
||||
break;
|
||||
case 'MAINTAINER':
|
||||
data.label = '通号' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
data.label = '调度-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SIGNAL_BUILDING':
|
||||
data.label = '信号楼-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
data.label = '助理-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_MASTER':
|
||||
data.label = '站长-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SIGNALER':
|
||||
data.label = '信号员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_PASSENGER':
|
||||
data.label = '客运员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SWITCH_MAN':
|
||||
data.label = '扳道员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_FACILITATOR':
|
||||
data.label = '引导员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_WORKER':
|
||||
data.label = '工务工-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DEVICE_MANAGER':
|
||||
data.label = '设备管理员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'TRAIN_MASTER':
|
||||
data.label = '车务段段长' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
data.label = '工电调度' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'PARENT_DEPARTMENT':
|
||||
data.label = '上级部分' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SCHEDULING':
|
||||
data.label = '派班员' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SHIFT_MANAGER':
|
||||
data.label = '值班主任' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'ENVIRONMENT_DISPATCHER':
|
||||
data.label = '环控调度' + (member.name ? `-${member.name}` : '');
|
||||
break;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -11,7 +11,7 @@
|
||||
<script>
|
||||
import { getDevicesByType, getDeviceDetail, setDeviceConfig } from '@/api/project';
|
||||
// getStationListNeedAttendant
|
||||
import { getAllMapOnline, querySimulationStationsByMapId, getPsdListByStandCode, getStandListByStationCode, querySimulationMemberByMapId} from '@/api/jmap/map';
|
||||
import { getAllMapOnline, getPublishMapListOnline, querySimulationStationsByMapId, getPsdListByStandCode, getStandListByStationCode, querySimulationMemberByMapId} from '@/api/jmap/map';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { getBackProjectConfigByCode } from '@/api/projectConfig';
|
||||
import { getMapFunctioById } from '@/api/trainingPlatform';
|
||||
@ -137,7 +137,10 @@ export default {
|
||||
form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'}
|
||||
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'},
|
||||
{ prop: 'mapId', label: '关联地图:', type: 'select', options: this.mapList, optionLabel: 'name', optionValue: 'id', deviceChange: this.mapIdChange},
|
||||
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
||||
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
|
||||
]
|
||||
};
|
||||
}
|
||||
@ -168,8 +171,8 @@ export default {
|
||||
addr: data.addr,
|
||||
quantity: data.quantity
|
||||
};
|
||||
if (['VR_PSD', 'LSW', 'CCTV'].includes(row.type)) {
|
||||
getAllMapOnline().then(resp => {
|
||||
if (['VR_PSD', 'LSW', 'CCTV', 'SANDBOX'].includes(row.type)) {
|
||||
getPublishMapListOnline().then(resp => {
|
||||
if (resp.data && resp.data.length) {
|
||||
this.mapList = resp.data;
|
||||
if (this.formData.mapId) { this.mapIdChange(this.formData.mapId); }
|
||||
|
@ -29,7 +29,7 @@ export default {
|
||||
EditConfigIbp
|
||||
},
|
||||
data() {
|
||||
const noShowPathType = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'IBP', 'SECTION', 'TRAIN', 'UDP_CLIENT'];
|
||||
const noShowPathType = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'IBP', 'SECTION', 'TRAIN', 'UDP_CLIENT', 'PLC_GATEWAY', 'UDP_LOW', 'PSC'];
|
||||
return {
|
||||
examResultList: [],
|
||||
url: '',
|
||||
@ -179,7 +179,7 @@ export default {
|
||||
},
|
||||
editConfig(index, row) {
|
||||
const configGatewayList = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'PSC', 'UDP_LOW', 'SECTION', 'TRAIN', 'UDP_CLIENT', 'PIS_STAND', 'PIS_TRAIN'];
|
||||
if (['LW', 'VR_IBP', 'ISCS_LW', 'ISCS_CW', 'IM', 'CW'].includes(row.type)) {
|
||||
if (['LW', 'VR_IBP', 'ISCS_LW', 'ISCS_CW', 'IM', 'CW', 'DRIVE', 'DEPOT'].includes(row.type)) {
|
||||
this.$refs.editConfig.doShow(row);
|
||||
} else if (configGatewayList.includes(row.type)) {
|
||||
this.$refs.editConfigGateway.doShow(row);
|
||||
|
@ -28,7 +28,7 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {queryMapListByUser} from '@/api/jmap/map';
|
||||
import {queryMapListByUser, getMapListByProjectCode} from '@/api/jmap/map';
|
||||
import { saveBackProjectConfig, updateBackProjectConfig, checkBackProjectExist} from '@/api/projectConfig';
|
||||
import { queryMapFunctionList } from '@/api/trainingPlatform';
|
||||
export default {
|
||||
@ -87,16 +87,33 @@ export default {
|
||||
methods:{
|
||||
doShow(row) {
|
||||
this.dialogVisible = true;
|
||||
this.functionList = [];
|
||||
if (row) {
|
||||
this.formModel.id = row.id;
|
||||
this.formModel.code = row.code;
|
||||
this.formModel.name = row.name;
|
||||
this.formModel.description = row.description;
|
||||
if (row.code) {
|
||||
getMapListByProjectCode(row.code).then(resp => {
|
||||
this.mapList = resp.data;
|
||||
}).catch(e => {
|
||||
this.loading = false;
|
||||
this.$message.error('获取地图列表失败!');
|
||||
});
|
||||
}
|
||||
const mapId = row.mapId;
|
||||
this.formModel.mapId = mapId.toString();
|
||||
if (this.formModel.mapId) { this.getRelatedFunctionList(mapId); }
|
||||
this.formModel.functionId = row.functionId;
|
||||
} else {
|
||||
this.formModel = {
|
||||
id: '',
|
||||
code: '', // 项目编码
|
||||
name: '', // 项目名称
|
||||
description: '', // 描述
|
||||
mapId:'', // 实训室关联地图
|
||||
functionId:'' // 实训室关联功能
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.resetFields();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user