仿真显示调整

This commit is contained in:
fan 2022-10-11 17:24:40 +08:00
parent 8a29cb6288
commit a5ca2501da
9 changed files with 1347 additions and 631 deletions

View File

@ -105,10 +105,10 @@ export default {
},
hookClick(item, event) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
if (item && typeof item.click == 'function') {
if (item ) {
if (item.children && item.children.length > 0) {
this.selectedClass(item, this.id);
} else {
} else if (typeof item.click == 'function') {
item.click(item.operate);
this.doClose(-1);
this.$store.dispatch('menuOperation/changeMenuBar', '');

View File

@ -107,7 +107,17 @@ class Theme {
loadMenuComponent(code) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/index`).default);
}
// 加载行调菜单组件
loadDispatchWorkMenuComponent(code) {
if (code == '02') {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default);
}
}
loadLocalWorkMenuComponent(code) {
if (code == '02') {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
}
}
// 新版本
loadPlanParser(code) {
return PlanParser.load(require(`./${this._runplan[code || this._code]}/planConfig`).default);

View File

@ -1,370 +1,355 @@
<template>
<div id="menuBarFuzhou">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
<station-control-convert ref="stationControlConvert" pop-class="fuzhou-01__systerm" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
<view-device ref="viewDevice" />
<train-transtalet ref="trainTranstalet" />
<add-runplan-line ref="addRunplanLine" />
<delete-runplan-line ref="deleteRunplanLine" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-deplot-button ref="menuDeplotButton" />
<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" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
<passive-Timeout ref="passiveTimeout" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainTranstalet from './menuDialog/trainTranstalet';
import AddRunplanLine from './menuDialog/addRunplanLine';
import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
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 { EventBus } from '@/scripts/event-bus';
import { mapGetters } from 'vuex';
import MenuDeplotButton from './menuDeplotButton';
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 './dispatchWorkMenuBar';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'DispatchWorkMenu',
components: {
MenuBar,
StationControlConvert,
PasswordBox,
ViewTrainId,
ViewName,
ViewDevice,
TrainTranstalet,
AddRunplanLine,
DeleteRunplanLine,
ManageUser,
HelpAbout
MenuDeplotButton,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
},
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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.trainAdd.doShow(operate);
this.$refs.addRunplanLine.doShow(operate);
}
});
},
//
translatPlanTrain(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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 });
}
props: {
selected: {
type: Object,
default() {
return null;
}
},
undeveloped() {
this.$refs.menuBar.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
}
},
computed: {
...mapGetters('config', [
'width'
])
},
watch: {},
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();
};
});
},
beforeDestroy() {
window.onclick = function (e) {};
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
#menuBarFuzhou{
line-height:30px;
<style>
.menus .pop-menu {
background: #F0F0F0;
}
#menuBarChengdu3 #menuBar .menu-li-block .label{
padding: 0px 30px 0px 5px !important;
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.fuzhou-01__systerm {
overflow: hidden !important;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-dialog__header {
padding: 5px;
height: 26px;
}
.fuzhou-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 4px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.fuzhou-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;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.fuzhou-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.fuzhou-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.fuzhou-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.fuzhou-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.fuzhou-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.fuzhou-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.fuzhou-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.fuzhou-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.fuzhou-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.fuzhou-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.fuzhou-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.fuzhou-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.fuzhou-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%;
}
.fuzhou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.fuzhou-01__systerm .el-dialog .base-label {
background: rgb(240 240 240);
position: relative;
}
.fuzhou-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.fuzhou-01__systerm .el-dialog .table {
margin-top: 10px;
}
.fuzhou-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.fuzhou-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,374 @@
<template>
<div id="menuBarFuzhou">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
<station-control-convert ref="stationControlConvert" pop-class="fuzhou-01__systerm" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
<view-device ref="viewDevice" />
<train-transtalet ref="trainTranstalet" />
<add-runplan-line ref="addRunplanLine" />
<delete-runplan-line ref="deleteRunplanLine" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainTranstalet from './menuDialog/trainTranstalet';
import AddRunplanLine from './menuDialog/addRunplanLine';
import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
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 { EventBus } from '@/scripts/event-bus';
export default {
name: 'DispatchWorkMenuBar',
components: {
MenuBar,
StationControlConvert,
PasswordBox,
ViewTrainId,
ViewName,
ViewDevice,
TrainTranstalet,
AddRunplanLine,
DeleteRunplanLine,
ManageUser,
HelpAbout
},
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,
click: this.undeveloped,
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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.trainAdd.doShow(operate);
this.$refs.addRunplanLine.doShow(operate);
}
});
},
//
translatPlanTrain(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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 });
}
}
},
undeveloped() {
this.$refs.menuBar.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
},
blankClickClose() {
this.$refs.menuBar.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
#menuBarFuzhou{
line-height:30px;
}
#menuBarChengdu3 #menuBar .menu-li-block .label{
padding: 0px 30px 0px 5px !important;
}
</style>

View File

@ -1,283 +1,355 @@
<template>
<div id="menuBarFuzhou">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
<station-control-convert ref="stationControlConvert" pop-class="fuzhou-01__systerm" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
<view-device ref="viewDevice" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-deplot-button ref="menuDeplotButton" />
<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" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
<passive-Timeout ref="passiveTimeout" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
import StationControlConvert from './menuDialog/stationControlConvert';
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 { EventBus } from '@/scripts/event-bus';
import { mapGetters } from 'vuex';
import MenuDeplotButton from './menuDeplotButton';
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 PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'LocalWorkMenu',
name: 'DispatchWorkMenu',
components: {
MenuBar,
StationControlConvert,
PasswordBox,
ViewTrainId,
ViewName,
ViewDevice,
ManageUser,
HelpAbout
MenuDeplotButton,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
},
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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewDevice.doShow(operate);
}
});
},
//
userManage(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/nextNew', 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('training/nextNew', 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 });
}
props: {
selected: {
type: Object,
default() {
return null;
}
},
undeveloped() {
this.$refs.menuBar.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
},
blankClickClose() {
this.$refs.menuBar.doClose();
}
},
computed: {
...mapGetters('config', [
'width'
])
},
watch: {},
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();
};
});
},
beforeDestroy() {
window.onclick = function (e) {};
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
#menuBarFuzhou{
line-height:30px;
<style>
.menus .pop-menu {
background: #F0F0F0;
}
#menuBarChengdu3 #menuBar .menu-li-block .label{
padding: 0px 30px 0px 5px !important;
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.fuzhou-01__systerm {
overflow: hidden !important;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-dialog__header {
padding: 5px;
height: 26px;
}
.fuzhou-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 4px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.fuzhou-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;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.fuzhou-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.fuzhou-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.fuzhou-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.fuzhou-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.fuzhou-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.fuzhou-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.fuzhou-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.fuzhou-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.fuzhou-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.fuzhou-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.fuzhou-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.fuzhou-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.fuzhou-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.fuzhou-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.fuzhou-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;
}
.fuzhou-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.fuzhou-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%;
}
.fuzhou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.fuzhou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.fuzhou-01__systerm .el-dialog .base-label {
background: rgb(240 240 240);
position: relative;
}
.fuzhou-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.fuzhou-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.fuzhou-01__systerm .el-dialog .table {
margin-top: 10px;
}
.fuzhou-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.fuzhou-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,285 @@
<template>
<div id="menuBarFuzhou">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
<station-control-convert ref="stationControlConvert" pop-class="fuzhou-01__systerm" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
<view-device ref="viewDevice" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
import StationControlConvert from './menuDialog/stationControlConvert';
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 { EventBus } from '@/scripts/event-bus';
export default {
name: 'LocalWorkMenu',
components: {
MenuBar,
StationControlConvert,
PasswordBox,
ViewTrainId,
ViewName,
ViewDevice,
ManageUser,
HelpAbout
},
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,
click: this.undeveloped,
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,
click: this.undeveloped,
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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', 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('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewDevice.doShow(operate);
}
});
},
//
userManage(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/nextNew', 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('training/nextNew', 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 });
}
}
},
undeveloped() {
this.$refs.menuBar.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
},
blankClickClose() {
this.$refs.menuBar.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
#menuBarFuzhou{
line-height:30px;
}
#menuBarChengdu3 #menuBar .menu-li-block .label{
padding: 0px 30px 0px 5px !important;
}
</style>

View File

@ -37,7 +37,7 @@ export default {
'$store.state.map.mapDataLoadedCount': function () {
const lineCode = this.$jlmap.lineCode;
if (lineCode) {
this.menus = this.$theme.loadMenuComponent(lineCode);
this.menus = this.$theme.loadDispatchWorkMenuComponent(lineCode);
}
},
'$store.state.map.initJlmapLoadedCount': function (val) {

View File

@ -49,7 +49,7 @@ export default {
'$store.state.map.mapDataLoadedCount': function () {
const lineCode = this.$jlmap.lineCode;
if (lineCode) {
this.menus = this.$theme.loadMenuComponent(lineCode);
this.menus = this.$theme.loadDispatchWorkMenuComponent(lineCode);
}
},
'$store.state.map.initJlmapLoadedCount': function (val) {

View File

@ -42,16 +42,6 @@ export default {
goRoutePath(data) {
const againEnter = getSessionStorage('againEnter') || null;
if (!againEnter && !this.$route.query.thirdJump) {
// const project = getSessionStorage('project');
// const userId = this.$store.state.user.id;
// const path = localStore.get('trainingPlatformRoute' + userId + project);
// if (path && path.startsWith('/trainingPlatform')) {
// localStore.set('orignalTrainingPlatformRoute' + userId + project, `/trainingPlatform/permission/${data[0].id}?lineCode=${data[0].lineCode}`);
// console.log('****************');
// this.$router.push(path);
// } else if (data && data[0]) {
//
// }
this.$router.push(`/trainingPlatform/permission/${data[0].id}?lineCode=${data[0].lineCode}`);
setSessionStorage('againEnter', true);
}