国赛线路调整

This commit is contained in:
fan 2022-12-29 14:25:53 +08:00
parent e508b60cc2
commit deaba53417
20 changed files with 2993 additions and 2558 deletions

View File

@ -109,15 +109,11 @@ class Theme {
}
// 加载行调菜单组件
loadDispatchWorkMenuComponent(code) {
if (['01', '02', '03', '04', '06', '07', '08', '09', '10', '11', '12', '14', '16'].includes(code)) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default);
}
}
loadLocalWorkMenuComponent(code) {
if (['01', '02', '03', '04', '06', '07', '08', '09', '10', '11', '12', '14', '16'].includes(code)) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
}
}
loadCtcWorkMenuComponent(code) {
if (code == '16') {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/ctcWorkMenu`).default);

View File

@ -0,0 +1,363 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'dispatchWork'" />
<menu-station-turn-back ref="menuStationTurnBack" :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-power ref="menuPower" :selected="selected" :work="'dispatchWork'" />
<passive-contorl ref="passiveControl" pop-class="race-01__systerm" />
</div>
</template>
<script>
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 './dispatchWorkMenuBar';
import MenuStationTurnBack from './menuStationTurnBack';
import MenuPower from './menuPower';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
export default {
name: 'DispatchWorkMenu',
components: {
MenuBar,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
MenuStationTurnBack,
MenuPower,
PassiveContorl
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
])
},
watch: {
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
}
};
</script>
<style>
.menus{
height:0px;
}
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.race-01__systerm {
overflow: hidden !important;
}
.race-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.race-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.race-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.race-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.race-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.race-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
filter: blur(7px);
height: 20px;
width: -webkit-fill-available;
background: rgba(190, 190, 190, 0.8);
z-index: -1;
}
.race-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 5px;
right: 5px;
line-height: 18px;
}
.race-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.race-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.race-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;
}
.race-01__systerm .el-dialog .expand {
width: 120px;
}
.race-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.race-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.race-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.race-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.race-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.race-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.race-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.race-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.race-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.race-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.race-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.race-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.race-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.race-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;
}
.race-01__systerm.stand-detain-train .el-dialog .el-table th.is-leaf {
background: #fff !important;
border-right: 1px solid #fff !important;
border-bottom: 1px solid #EBEEF5 !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.race-01__systerm.stand-detain-train .el-dialog .el-table th.el-table-column--selection{
border-right: 1px solid #e2e2e2 !important;
}
.race-01__systerm.stand-detain-train .el-dialog .el-table .el-table__body-wrapper .el-table__row .el-table-column--selection {
border-right: 1px solid #e2e2e2 !important;
}
.race-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.race-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.race-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.race-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.race-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.race-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.race-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.race-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.race-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;
}
.race-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.race-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.race-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.race-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%;
}
.race-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.race-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.race-01__systerm .el-dialog .base-label {
background: #F0F0F0;
padding: 0 5px;
position: relative;
left: -15px;
top: -18px;
}
.race-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.race-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.race-01__systerm .el-dialog .table {
margin-top: 10px;
}
.race-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.race-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,847 @@
<template>
<div id="menuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li :id="getDomId(item)" :key="i" class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li
v-if="handleShow(item)"
:id="getDomId(item)"
:key="i"
class="nav-li"
@click.stop="selectedClassA(item, i)"
>
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template v-if="child.children && child.children.length > 0">
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" :key="k" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="grandchild.show"
:id="getDomId(grandchild)"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="child.show"
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="hookClick(child)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
<station-control ref="stationControl" />
<detain-train-contorl ref="detainTrainContorl" />
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
<notice-info ref="noticeInfo" pop-class="race-01__systerm" />
<train-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import StationControl from './menuDialog/stationControl';
import DetainTrainContorl from './menuDialog/detainTrainContorl';
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuBar',
components: {
NoticeInfo,
StationControl,
DetainTrainContorl,
DetainTrainContorlUpDown,
TrainAdd,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
valid: true,
menu: [
{
title: '系统',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
click: this.undeveloped,
show: true
},
{
title: '注销',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '站遥控',
operate: OperationEvent.MixinCommand.remoteControl.mbar,
click: this.stationRemoteControl,
show: true
},
{
title: '区域选择',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '连接主用中心',
click: this.undeveloped,
show: true
},
{
title: '连接备用中心',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '退出',
click: this.undeveloped,
show: true
}
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
children: [
{
title: '运行图',
click: this.undeveloped,
show: true
},
{
title: '报告分析',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '视图',
click: this.undeveloped,
operate: '',
children: [{
title: '报警',
click: this.undeveloped,
show: true
},
{
title: '列车运行信息',
click: this.undeveloped,
show: true
},
{
title: '设备状态',
click: this.undeveloped,
show: true
},
{
title: '列车详细信息',
click: this.undeveloped,
show: true
},
{
title: '站台详细信息',
click: this.undeveloped,
show: true
}]
},
{
title: '终端站发车列表',
click: this.undeveloped,
show: true
},
{
title: '详细设备状态',
click: this.undeveloped,
show: true
},
{
title: '查找列车',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '显示目的地号',
click: this.undeveloped,
show: true
},
{
title: '显示轨道名',
click: this.undeveloped,
show: true
},
{
title: '显示道岔名',
click: this.undeveloped,
show: true
},
{
title: '显示信号机名',
click: this.undeveloped,
show: true
},
{
title: '显示车次窗位置',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '显示车次号',
click: this.undeveloped,
show: true
},
{
title: '显示车组号',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '全屏',
click: this.undeveloped,
show: true
},
{
title: '放大',
click: this.undeveloped,
show: true
},
{
title: '缩小',
click: this.undeveloped,
show: true
},
{
title: '恢复',
click: this.undeveloped,
show: true
}
]
},
{
title: '车站定位',
operate: '',
children: [
]
},
{
title: 'ATS终端操作',
operate: '',
children: [
{
title: '当天运行车计划',
click: this.undeveloped,
show: true
},
{
title: '出入库预告',
click: this.undeveloped,
show: true
}
]
},
{
title: '计划车操作',
operate: '',
children: [
{
title: '添加计划车',
click: this.undeveloped,
show: true
},
{
title: '平移计划车',
click: this.undeveloped,
show: true
},
{
title: '删除计划车',
click: this.undeveloped,
show: true
}
]
},
{
title: '批处理命令',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '全线扣车',
operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.undeveloped,
show: true
},
{
title: '取消全线扣车',
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.undeveloped,
show: true
},
{
title: '取消上行全线扣车',
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.undeveloped,
show: true
},
{
title: '取消下行全线扣车',
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.undeveloped,
show: true
}
]
},
{
title: '信息管理',
operate: '',
children: [
{
title: '调度日志',
click: this.undeveloped,
show: true
},
{
title: '调度留言提醒',
click: this.undeveloped,
show: true
},
{
title: '报警设置',
click: this.undeveloped,
show: true
}
]
},
{
title: '帮助',
children: [
{
title: '关于ITS GPC 工作站',
click: this.about,
operate: OperationEvent.Command.help.about,
show: true
}
]
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'started',
'steps',
'order',
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
},
'$store.state.training.started': function (val) {
this.closeMenu(true);
}
},
mounted() {
this.initMenu();
},
methods: {
handleShow(item) {
if (item.hide) {
return false;
}
return true;
},
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
title: station.name,
operate: station.code,
show: true,
click: this.mapLocation,
code: station.code
};
list.push(node);
}
});
return list;
},
initMenu() {
if (this.menu[2]) {
this.menu[2].children = this.initStationList();
}
this.clickEvent();
this.closeMenu(true);
},
clickEvent() {
const self = this;
window.onclick = function (e) {
if (document.getElementById('menuBar')) {
self.closeMenu(false);
}
};
},
getDomId(item) {
if (item && item.operate) {
return item.operate.domId;
}
return '';
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
closeMenu(flag) {
if (flag || (this.mode !== TrainingMode.EDIT && this.mode !== TrainingMode.TEACH)) {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
}
},
hookClick(item, event) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
if (item && typeof item.click == 'function') {
item.click(item.operate);
}
},
selectedClassA(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuA(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuA(item, index);
}
},
//
popupMenuA(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
this.clickEvent();
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassA = index;
this.tempClassB = -1;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
selectedClassB(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuB(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuB(item, index);
}
},
popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassB = index;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
//
mapLocation(code) {
if (code) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
this.closeMenu(true);
}
},
//
stationRemoteControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControl.doShow(operate);
}
});
},
// 线
setDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
// 线
cancelDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
//
cancelUpDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
cancelDownDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
about(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.helpAbout.doShow(operate);
}
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 30px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 180px;
$menuItemPadding: 5px;
#menuBar {
z-index: 36;
position: absolute;
width: inherit;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
background: linear-gradient(#FDFDFE, #DEE3F3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray !important;
line-height: $menuItemHeight;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
max-height: 550px;
overflow-y: scroll;
&::-webkit-scrollbar {
width: 4px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #c3c3c3;
}
&::-webkit-scrollbar-track {
border-radius: 0;
background: #f0f0f0;
}
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
display: flex;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
}
.menu-li-text .label {
display: inline-block;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #CACACA;
margin-left: 5px;
height: 2px;
width: $menuItemWidth - $width - 30px;
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -1,387 +0,0 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-station-control ref="menuStationControl" />
<menu-station-turn-back ref="menuStationTurnBack" :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-limit ref="menuLimit" :selected="selected" />
<menu-power ref="menuPower" :selected="selected" />
<!--<passive-alarm ref="passiveAlarm" />-->
<passive-contorl ref="passiveControl" pop-class="race-01__systerm" />
<!--<passive-Timeout ref="passiveTimeout" />-->
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuSignal from './menuSignal';
import MenuAxleReset from './menuAxleReset';
import MenuAutoTrunRoute from './menuAutoTrunRoute';
import MenuStationStand from './menuStationStand';
import MenuStationControl from './menuStationControl';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './menuBar';
import MenuLimit from './menuLimit';
import MenuStationTurnBack from './menuStationTurnBack';
import MenuPower from './menuPower';
// import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
// import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'Menus',
components: {
MenuBar,
MenuAxleReset,
MenuAutoTrunRoute,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStationControl,
MenuStation,
MenuTrain,
MenuStationTurnBack,
MenuLimit,
MenuPower,
// PassiveAlarm,
PassiveContorl
// PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
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');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
}
};
</script>
<style>
.menus{
height:0px;
}
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.race-01__systerm {
overflow: hidden !important;
}
.race-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.race-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.race-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.race-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.race-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.race-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
filter: blur(7px);
height: 20px;
width: -webkit-fill-available;
background: rgba(190, 190, 190, 0.8);
z-index: -1;
}
.race-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 5px;
right: 5px;
line-height: 18px;
}
.race-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.race-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.race-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;
}
.race-01__systerm .el-dialog .expand {
width: 120px;
}
.race-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.race-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.race-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.race-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.race-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.race-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.race-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.race-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.race-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.race-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.race-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.race-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.race-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.race-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;
}
.race-01__systerm.stand-detain-train .el-dialog .el-table th.is-leaf {
background: #fff !important;
border-right: 1px solid #fff !important;
border-bottom: 1px solid #EBEEF5 !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.race-01__systerm.stand-detain-train .el-dialog .el-table th.el-table-column--selection{
border-right: 1px solid #e2e2e2 !important;
}
.race-01__systerm.stand-detain-train .el-dialog .el-table .el-table__body-wrapper .el-table__row .el-table-column--selection {
border-right: 1px solid #e2e2e2 !important;
}
.race-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.race-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.race-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.race-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.race-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.race-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.race-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.race-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.race-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;
}
.race-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.race-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.race-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.race-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%;
}
.race-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.race-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.race-01__systerm .el-dialog .base-label {
background: #F0F0F0;
padding: 0 5px;
position: relative;
left: -15px;
top: -18px;
}
.race-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.race-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.race-01__systerm .el-dialog .table {
margin-top: 10px;
}
.race-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.race-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,363 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" />
<menu-station-turn-back ref="menuStationTurnBack" :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-power ref="menuPower" :selected="selected" :work="'localWork'" />
<passive-contorl ref="passiveControl" pop-class="race-01__systerm" />
</div>
</template>
<script>
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 MenuPower from './menuPower';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
export default {
name: 'LocalWorkMenu',
components: {
MenuBar,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
MenuStationTurnBack,
MenuPower,
PassiveContorl
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
])
},
watch: {
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
}
};
</script>
<style>
.menus{
height:0px;
}
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.race-01__systerm {
overflow: hidden !important;
}
.race-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.race-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.race-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.race-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.race-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.race-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
filter: blur(7px);
height: 20px;
width: -webkit-fill-available;
background: rgba(190, 190, 190, 0.8);
z-index: -1;
}
.race-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 5px;
right: 5px;
line-height: 18px;
}
.race-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.race-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.race-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;
}
.race-01__systerm .el-dialog .expand {
width: 120px;
}
.race-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.race-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.race-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.race-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.race-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.race-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.race-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.race-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.race-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.race-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.race-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.race-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.race-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.race-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;
}
.race-01__systerm.stand-detain-train .el-dialog .el-table th.is-leaf {
background: #fff !important;
border-right: 1px solid #fff !important;
border-bottom: 1px solid #EBEEF5 !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.race-01__systerm.stand-detain-train .el-dialog .el-table th.el-table-column--selection{
border-right: 1px solid #e2e2e2 !important;
}
.race-01__systerm.stand-detain-train .el-dialog .el-table .el-table__body-wrapper .el-table__row .el-table-column--selection {
border-right: 1px solid #e2e2e2 !important;
}
.race-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.race-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.race-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.race-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.race-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.race-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.race-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.race-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.race-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;
}
.race-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.race-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.race-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.race-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%;
}
.race-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.race-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.race-01__systerm .el-dialog .base-label {
background: #F0F0F0;
padding: 0 5px;
position: relative;
left: -15px;
top: -18px;
}
.race-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.race-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.race-01__systerm .el-dialog .table {
margin-top: 10px;
}
.race-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.race-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,851 @@
<template>
<div id="menuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li :id="getDomId(item)" :key="i" class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li
v-if="handleShow(item)"
:id="getDomId(item)"
:key="i"
class="nav-li"
@click.stop="selectedClassA(item, i)"
>
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template v-if="child.children && child.children.length > 0">
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" :key="k" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="grandchild.show"
:id="getDomId(grandchild)"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="child.show"
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="hookClick(child)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
<station-control ref="stationControl" />
<detain-train-contorl ref="detainTrainContorl" />
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
<notice-info ref="noticeInfo" pop-class="race-01__systerm" />
<train-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import StationControl from './menuDialog/stationControl';
import DetainTrainContorl from './menuDialog/detainTrainContorl';
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuBar',
components: {
NoticeInfo,
StationControl,
DetainTrainContorl,
DetainTrainContorlUpDown,
TrainAdd,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
valid: true,
menu: [
{
title: '系统',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
click: this.undeveloped,
show: true
},
{
title: '注销',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '站遥控',
operate: OperationEvent.MixinCommand.remoteControl.mbar,
click: this.stationRemoteControl,
show: true
},
{
title: '区域选择',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '连接主用中心',
click: this.undeveloped,
show: true
},
{
title: '连接备用中心',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '退出',
click: this.undeveloped,
show: true
}
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
children: [
{
title: '运行图',
click: this.undeveloped,
show: true
},
{
title: '报告分析',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '视图',
click: this.undeveloped,
operate: '',
children: [{
title: '报警',
click: this.undeveloped,
show: true
},
{
title: '列车运行信息',
click: this.undeveloped,
show: true
},
{
title: '设备状态',
click: this.undeveloped,
show: true
},
{
title: '列车详细信息',
click: this.undeveloped,
show: true
},
{
title: '站台详细信息',
click: this.undeveloped,
show: true
}]
},
{
title: '终端站发车列表',
click: this.undeveloped,
show: true
},
{
title: '详细设备状态',
click: this.undeveloped,
show: true
},
{
title: '查找列车',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '显示目的地号',
click: this.undeveloped,
show: true
},
{
title: '显示轨道名',
click: this.undeveloped,
show: true
},
{
title: '显示道岔名',
click: this.undeveloped,
show: true
},
{
title: '显示信号机名',
click: this.undeveloped,
show: true
},
{
title: '显示车次窗位置',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '显示车次号',
click: this.undeveloped,
show: true
},
{
title: '显示车组号',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '全屏',
click: this.undeveloped,
show: true
},
{
title: '放大',
click: this.undeveloped,
show: true
},
{
title: '缩小',
click: this.undeveloped,
show: true
},
{
title: '恢复',
click: this.undeveloped,
show: true
}
]
},
{
title: '车站定位',
operate: '',
children: [
]
},
{
title: 'ATS终端操作',
operate: '',
children: [
{
title: '当天运行车计划',
click: this.undeveloped,
show: true
},
{
title: '出入库预告',
click: this.undeveloped,
show: true
}
]
},
{
title: '计划车操作',
operate: '',
children: [
{
title: '添加计划车',
click: this.undeveloped,
show: true
},
{
title: '平移计划车',
click: this.undeveloped,
show: true
},
{
title: '删除计划车',
click: this.undeveloped,
show: true
}
]
},
{
title: '批处理命令',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '全线扣车',
operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.setDetainTrainAll,
show: true
},
{
title: '取消全线扣车',
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.cancelDetainTrainAll,
show: true
},
{
title: '取消上行全线扣车',
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.cancelUpDetainTrainAll,
show: true
},
{
title: '取消下行全线扣车',
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.cancelDownDetainTrainAll,
show: true
}
]
},
{
title: '信息管理',
operate: '',
children: [
{
title: '调度日志',
click: this.undeveloped,
show: true
},
{
title: '调度留言提醒',
click: this.undeveloped,
show: true
},
{
title: '报警设置',
click: this.undeveloped,
show: true
}
]
},
{
title: '帮助',
operate: '',
children: [
{
title: '关于ITS GPC 工作站',
click: this.about,
operate: OperationEvent.Command.help.about,
show: true
}
]
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'started',
'steps',
'order',
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
},
'$store.state.training.operatemode': function (mode) {
this.initMenu();
},
'$store.state.training.started': function (val) {
this.closeMenu(true);
}
},
mounted() {
this.initMenu();
},
methods: {
handleShow(item) {
if (item.hide) {
return false;
}
return true;
},
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
title: station.name,
operate: station.code,
show: true,
click: this.mapLocation,
code: station.code
};
list.push(node);
}
});
return list;
},
initMenu() {
if (this.menu[2]) {
this.menu[2].children = this.initStationList();
}
this.clickEvent();
this.closeMenu(true);
},
clickEvent() {
const self = this;
window.onclick = function (e) {
if (document.getElementById('menuBar')) {
self.closeMenu(false);
}
};
},
getDomId(item) {
if (item && item.operate) {
return item.operate.domId;
}
return '';
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
closeMenu(flag) {
if (flag || (this.mode !== TrainingMode.EDIT && this.mode !== TrainingMode.TEACH)) {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
}
},
hookClick(item, event) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
if (item && typeof item.click == 'function') {
item.click(item.operate);
}
},
selectedClassA(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuA(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuA(item, index);
}
},
//
popupMenuA(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
this.clickEvent();
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassA = index;
this.tempClassB = -1;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
selectedClassB(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuB(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuB(item, index);
}
},
popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassB = index;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
//
mapLocation(code) {
if (code) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
this.closeMenu(true);
}
},
//
stationRemoteControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControl.doShow(operate);
}
});
},
// 线
setDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
// 线
cancelDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
//
cancelUpDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
cancelDownDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
about(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.helpAbout.doShow(operate);
}
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 30px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 180px;
$menuItemPadding: 5px;
#menuBar {
z-index: 36;
position: absolute;
width: inherit;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
background: linear-gradient(#FDFDFE, #DEE3F3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray !important;
line-height: $menuItemHeight;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
max-height: 550px;
overflow-y: scroll;
&::-webkit-scrollbar {
width: 4px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #c3c3c3;
}
&::-webkit-scrollbar-track {
border-radius: 0;
background: #f0f0f0;
}
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
display: flex;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
}
.menu-li-text .label {
display: inline-block;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #CACACA;
margin-left: 5px;
height: 2px;
width: $menuItemWidth - $width - 30px;
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -1,125 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<turn-back-control ref="turnBackControl" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import TurnBackControl from './dialog/turnBackControl';
import { mapGetters } from 'vuex';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'MenuLimit',
components: {
PopMenu,
TurnBackControl
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '设置自动折返',
handler: this.handlerTurnBack,
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
},
{
label: '取消自动折返',
handler: this.cancelTurnBack,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
}
],
Center: [
{
label: '设置自动折返',
handler: this.handlerTurnBack,
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
},
{
label: '取消自动折返',
handler: this.cancelTurnBack,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
}
]
}
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.AutoTurnBack) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
handlerTurnBack() {
commitOperate(menuOperate.Signal.setAutoTurnBack, {cycleCode:this.selected.cycleCode}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.turnBackControl.doShow(operate, this.selected);
}
});
},
//
cancelTurnBack() {
commitOperate(menuOperate.Signal.cancelAutoTurnBack, {cycleCode:this.selected.cycleCode, cancelRoute:false}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.turnBackControl.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -1,102 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<section-alxe-reset ref="sectionAlxeReset" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SectionAlxeReset from './dialog/sectionAlxeReset';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
export default {
name: 'MenuLimit',
components: {
PopMenu,
SectionAlxeReset
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '计轴复位',
handler: this.handleAxleReset,
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
}
],
Center: [
]
}
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.AxleReset) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
handleAxleReset() {
commitOperate(menuOperate.AxleReset.SetAxleReset, {}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.sectionAlxeReset.doShow(operate);
}
});
}
}
};
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,104 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<cancel-all-limit ref="cancelAllLimit" :system-name="systemName" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import CancelAllLimit from '@/jmapNew/theme/components/menus/dialog/cancelAllLimit';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuLimit',
components: {
PopMenu,
CancelAllLimit
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
systemName:'race-01__systerm',
menuNormal: {
Local: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
}
],
Center: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
}
]
}
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
cancelSpeed() {
commitOperate(menuOperate.LimitControl.cancelSpeed, {}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.cancelAllLimit.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -73,7 +73,6 @@ export default {
};
},
initMenu() {
// this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;

View File

@ -24,7 +24,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
@ -47,67 +47,75 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
menuNormal: [
{
label: '区段故障解锁',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
isDisabled: (section, work) => false,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'localWork'
},
{
label: '区段跟踪激活',
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
cmdType: CMD.Section.CMD_SECTION_ACTIVE,
isDisabled: (section, work) => false,
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: '区段跟踪切除',
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
cmdType: CMD.Section.CMD_SECTION_CUT_OFF,
isDisabled: (section, work) => false,
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: '区段封锁',
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK
cmdType: CMD.Section.CMD_SECTION_BLOCK,
isDisabled: (section, work) => section.blockade === 1,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'localWork'
},
{
label: '区段解封',
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
}
],
Center: [
{
label: '区段跟踪激活',
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
},
{
label: '区段跟踪切除',
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
cmdType: CMD.Section.CMD_SECTION_UNBLOCK,
isDisabled: (section, work) => section.blockade !== 1,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'localWork'
},
{
label: '确认计轴有效',
handler: this.alxeEffective,
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE,
isDisabled: (section, work) => false,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'dispatchWork'
},
{
label: '设置临时限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit !== -1,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'dispatchWork'
},
{
label: '取消临时限速',
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit === -1,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'dispatchWork'
}
]
},
],
menuForce: [
{
label: this.$t('menu.menuSection.setFault'),
@ -165,10 +173,12 @@ 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
cmdType: CMD.Section.CMD_Train_Init_Plan,
isDisabled: (section, work) => false,
isShow: (section, work) => true
});
}
},
@ -182,7 +192,12 @@ export default {
initMenu() {
//
if (this.selected.type != '04') {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = !judgeStationControl(this.selected.belongStation, this.selected.stationCode, this.work) || menuItem.isDisabled(this.selected, this.work);
menuItem.show = menuItem.isShow(this.selected, this.work);
this.menu.push(menuItem);
});
} else {
this.menu = [];
}

View File

@ -24,9 +24,9 @@ import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'SignalMenu',
@ -47,122 +47,117 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
menuNormal: [
{
label: '排列进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
},
{
label: '信号机引导办理',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isDisabled: (signal, work) => false,
isShow: (signal, work) => work === 'localWork'
},
{
label: '人工解锁进路', //
handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
},
{
label: '信号封锁',
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
isDisabled: (signal, work) => signal.blockade === 1,
isShow: (signal, work) => work === 'localWork'
},
{
label: '信号解封',
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
isDisabled: (signal, work) => signal.blockade !== 1,
isShow: (signal, work) => work === 'localWork'
},
{
label: 'Fleet进路办理',
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
isDisabled: (signal, work) => signal.fleetMode === 1,
isShow: (signal, work) => work === 'localWork'
},
{
label: 'Fleet进路取消',
handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
isDisabled: (signal, work) => signal.fleetMode === 0,
isShow: (signal, work) => work === 'localWork'
},
{
label: '进路自排关',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
},
{
label: '进路自排开',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '查询进路控制状态',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
],
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.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '进路自排关',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
{
label: '进路自排开',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
},
{
label: '设置通过模式',
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
isDisabled: (signal, work) => signal.fleetMode === 1,
isShow: (signal, work) => work === 'dispatchWork'
},
{
label: '取消通过模式',
handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
isDisabled: (signal, work) => signal.fleetMode === 0,
isShow: (signal, work) => work === 'dispatchWork'
},
{
label: '查询进路控制状态',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL,
isDisabled: (signal, work) => false,
isShow: (signal, work) => true
}
]
},
],
menuForce: [
{
label: '设置故障',
@ -214,7 +209,12 @@ export default {
};
},
initMenu() {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = !judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work) || menuItem.isDisabled(this.selected, this.work);
menuItem.show = menuItem.isShow(this.selected, this.work);
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;

View File

@ -19,9 +19,10 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { DeviceMenu } from '@/scripts/ConstDic';
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'StationMenu',
components: {
@ -38,52 +39,61 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
menuNormal: [
{
label: '全站设置联锁自动触发',
handler: this.setAutoTrigger,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
isDisabled: (station, work) => false,
isShow: (station, work) => work === 'localWork'
},
{
label: '全站取消联锁自动触发',
handler: this.cancelAutoTrigger,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
isDisabled: (station, work) => false,
isShow: (station, work) => work === 'localWork'
},
{
label: '上电解锁',
handler: this.powerUnLock,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
isDisabled: (station, work) => false,
isShow: (station, work) => work === 'localWork'
},
{
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
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
isDisabled: (station, work) => false,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: '所有进路自排开',
handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
isDisabled: (station, work) => false,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: '执行关键操作测试',
handler: this.execKeyOperationTest,
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
isDisabled: (station, work) => false,
isShow: (station, work) => true
}
]
},
],
menuForce: [
{
label: '设置ZC故障',
@ -135,13 +145,17 @@ export default {
},
initMenu() {
if (this.selected.centralized) {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.show = menuItem.isShow(this.selected, this.work);
menuItem.disabled = !judgeStationControl(this.selected.code, this.selected.stationCode, this.work) || menuItem.isDisabled(this.selected, this.work);
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
}
},
doShow(point) {
this.clickEvent();

View File

@ -1,130 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<station-control ref="stationControl" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StationControl from './dialog/stationControl';
import { mapGetters } from 'vuex';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationControlMenu',
components: {
PopMenu,
StationControl
},
// props: {
// selected: {
// type: Object,
// default() {
// return null;
// }
// }
// },
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '请求站控',
handler: this.setStationControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
},
{
label: '请求遥控',
handler: this.setCenterControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
}
],
Center: [
{
label: '请求站控',
handler: this.setStationControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
},
{
label: '请求遥控',
handler: this.setCenterControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
}
]
},
menuForce: [
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.getCurrentStateObject();
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
getCurrentStateObject() {
this.selected = this.$store.getters['menuOperation/selected'];
},
setCenterControl() {
//
commitOperate(menuOperate.StationControl.requestCentralControl, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.stationControl.doShow(operate, this.selected);
}
});
},
setStationControl() {
//
commitOperate(menuOperate.StationControl.requestStationControl, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.stationControl.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -26,7 +26,7 @@ import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuO
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'StationStandMenu',
@ -47,97 +47,117 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
menuNormal: [
{
label: '扣车',
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: (stand, work) => stand.stationHoldTrain === 1,
isShow: (stand, work) => work === 'localWork'
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => stand.stationHoldTrain === 1,
isShow: (stand, work) => work === 'localWork'
},
{
label: '提前发车',
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: '查看站台信息',
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
],
Center: [
{
label: '扣车',
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: (stand, work) => stand.centerHoldTrain === 1,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => stand.centerHoldTrain === 1,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '批量扣车',
handler: this.setBulkBuckleTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL,
isDisabled: (stand, work) => false,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '批量取消扣车',
handler: this.cancelBulkBuckleTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL,
isDisabled: (stand, work) => false,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '提前发车',
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART,
isDisabled: (stand, work) => stand.trainParking !== 1,
isShow: (stand, work) => false
},
{
label: '设置跳停',
handler: this.setJumpStop,
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP,
isDisabled: (stand, work) => stand.allSkip !== 0,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
isDisabled: (stand, work) => stand.allSkip !== 1,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '设置停站时间',
handler: this.setStopTime,
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME,
isDisabled: (stand, work) => false,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '设置运行等级',
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME,
isDisabled: (stand, work) => false,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '区间列车数量限制',
handler: this.setDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO,
isDisabled: (stand, work) => false,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '取消区间列车数量限制',
handler: this.cancelDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO,
isDisabled: (stand, work) => false,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '查看站台信息',
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS,
isDisabled: (stand, work) => false,
isShow: (stand, work) => true
}
]
},
],
menuForce: [
{
label: '设置故障',
@ -189,8 +209,12 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = !judgeStationControl(this.selected.stationCode, this.selected.deviceStationCode, this.work) || menuItem.isDisabled(this.selected, this.work);
menuItem.show = menuItem.isShow(this.selected, this.work);
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;

View File

@ -26,27 +26,24 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
menuNormal: [
{
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
}
]
},
menuForce: [
]
};
@ -78,8 +75,7 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal;
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;

View File

@ -21,7 +21,7 @@ import AlxeEffective from './dialog/alxeEffective';
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
@ -44,100 +44,102 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
menuNormal: [
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION,
isDisabled: (switchDevice, work) => switchDevice.normalPosition === 1,
isShow: (switchDevice, work) => true
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION,
isDisabled: (switchDevice, work) => switchDevice.reversePosition === 1,
isShow: (switchDevice, work) => true
},
{
label: '道岔单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
isDisabled: (switchDevice, work) => switchDevice.singleLock === 1,
isShow: (switchDevice, work) => work === 'localWork'
},
{
label: '道岔单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
isDisabled: (switchDevice, work) => switchDevice.singleLock !== 1,
isShow: (switchDevice, work) => work === 'localWork'
},
{
label: '道岔封锁',
handler: this.block,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
cmdType: CMD.Switch.CMD_SWITCH_BLOCK,
isDisabled: (switchDevice, work) => switchDevice.blockade === 1,
isShow: (switchDevice, work) => work === 'localWork'
},
{
label: '道岔解封',
handler: this.unblock,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK,
isDisabled: (switchDevice, work) => switchDevice.blockade !== 1,
isShow: (switchDevice, work) => work === 'localWork'
},
{
label: '设置临时限速',
handler: this.setSpeed,
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
{
label: '取消临时限速',
handler: this.cancelSpeed,
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
}
],
Center: [
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
// {
// label: '',
// handler: this.lock,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
// },
{
type: 'separator'
type: 'separator',
isShow: (switchDevice, work) => work === 'dispatchWork'
},
{
label: '区段激活',
handler: this.active,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE,
isDisabled: (switchDevice, work) => false,
isShow: (switchDevice, work) => work === 'dispatchWork'
},
{
label: '区段切除',
handler: this.split,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF,
isDisabled: (switchDevice, work) => false,
isShow: (switchDevice, work) => work === 'dispatchWork'
},
{
type: 'separator'
type: 'separator',
isShow: (switchDevice, work) => work === 'dispatchWork'
},
{
label: '确认计轴有效',
handler: this.alxeEffective,
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE,
isDisabled: (switchDevice, work) => false,
isShow: (switchDevice, work) => work === 'dispatchWork'
},
{
label: '设置临时限速',
handler: this.setSpeed,
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED,
isDisabled: (switchDevice, work) => false,
isShow: (switchDevice, work) => work === 'dispatchWork'
},
{
label: '取消临时限速',
handler: this.cancelSpeed,
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED,
isDisabled: (switchDevice, work) => false,
isShow: (switchDevice, work) => work === 'dispatchWork'
},
{
type: 'separator'
@ -145,10 +147,11 @@ export default {
{
label: '查看公里标',
handler: this.undeveloped,
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED,
isDisabled: (switchDevice, work) => false,
isShow: (switchDevice, work) => true
}
]
},
],
menuForce: [
{
label: '设置故障',
@ -201,7 +204,12 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = !judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work) || menuItem.isDisabled(this.selected, this.work);
menuItem.show = menuItem.isShow(this.selected, this.work);
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {
// if (!this.$store.state.scriptRecord.bgSet) {

View File

@ -32,7 +32,6 @@ import SetTrainOperation from '@/jmapNew/theme/components/menus/dialog/setTrainO
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
@ -63,93 +62,24 @@ export default {
data() {
return {
menu: [],
menuNormal: {
Local: [
// {
// label: '',
// handler: this.addTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.delTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.moveTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.addPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.setPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setHeadTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setWorkTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: 'ATP',
// handler: this.setTrainATPdel,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: 'ATP',
// handler: this.setTrainATPRec,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// }
],
Center: [
menuNormal: [
{
label: '设置车组号',
handler: this.addTrainId,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: '删除车组号',
handler: this.delTrainId,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: '移动车组号',
handler: this.moveTrainId,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
isShow: (train, work) => work === 'dispatchWork'
},
{
type: 'separator'
@ -157,22 +87,26 @@ export default {
{
label: '设置计划车',
handler: this.setPlanTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: '设置头码车',
handler: this.setHeadTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: '设置人工车',
handler: this.setWorkTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: '设乘务组号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
isShow: (train, work) => work === 'dispatchWork'
},
{
type: 'separator'
@ -180,12 +114,14 @@ export default {
{
label: '标记ATP切除',
handler: this.setTrainATPdel,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: '标记ATP恢复',
handler: this.setTrainATPRec,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
isShow: (train, work) => work === 'dispatchWork'
},
{
type: 'separator'
@ -193,15 +129,16 @@ export default {
{
label: '旅行冲突列车',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: '列车信息',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
isShow: (train, work) => work === 'dispatchWork'
}
]
},
],
menuForce: [
{
label: '设置故障',
@ -319,7 +256,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.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {

View File

@ -2,7 +2,7 @@
<el-dialog
v-dialogDrag
class="race-01__systerm alarm-detail"
:title="level+'级警详细信息'"
:title="level+'级警详细信息'"
:visible.sync="show"
width="760px"
:before-close="doClose"