Merge branch 'test_dispaly' of git.code.tencent.com:lian-cbtc/jl-client into test_dispaly

This commit is contained in:
Yuan 2022-12-09 15:12:02 +08:00
commit 9370621c62
16 changed files with 1466 additions and 380 deletions

View File

@ -315,7 +315,9 @@ export default {
});
},
confirm2() {
const operate = {};
const operate = {
send: true
};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/

View File

@ -0,0 +1,438 @@
<template>
<div class="chengdou-01__menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" :work="work" />
<menu-request ref="menuRequest" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="work" />
<menu-switch ref="menuSwitch" :selected="selected" :work="work" />
<menu-signal ref="menuSignal" :selected="selected" :work="work" />
<menu-section ref="menuSection" :selected="selected" :work="work" />
<menu-train ref="menuTrain" :selected="selected" :work="work" />
<menu-station ref="menuStation" :selected="selected" :work="work" />
<menu-station-platform ref="menuStationPlatform" :selected="selected" @popMenuStationStand="popMenuStationStand" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="chengdou-01__system" :work="work" />
<passive-Timeout ref="passiveTimeout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuRequest from './menuRequest';
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 './menuBar';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
import MenuStationPlatform from './menuStationPlatform';
export default {
name: 'DispatchWorkMenu',
components: {
MenuBar,
MenuRequest,
// MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
PassiveAlarm,
PassiveContorl,
PassiveTimeout,
MenuStationPlatform
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
work: 'dispatchWork'
};
},
computed: {
...mapGetters('config', [
'width'
])
},
watch: {
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
},
methods: {
popMenuStationStand(param) {
this.$refs.menuStationStand.doShow(param.position, param.type);
}
}
};
</script>
<style>
.chengdou-01__menus .pop-menu {
background: #5F9EA0;
}
.chengdou-01__menus .pop-menu .el-popover{
background: #5F9EA0;
}
.chengdou-01__menus .pop-menu span {
color: #000;
}
.chengdou-01__menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.chengdou-01__systerm {
overflow: hidden !important;
}
.chengdou-01__system .el-dialog {
background: #0055E8;
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 1px solid rgb(69, 134, 247);
border-radius: 6px;
font-size: 13px !important;
color: #000;
}
.chengdou-01__system .el-dialog span {
font-size: 13px !important;
line-height: 22px;
}
.chengdou-01__system .el-dialog .el-dialog__footer {
background: #5F9EA0;
opacity: 1;
}
.chengdou-01__system .el-dialog .el-dialog__body {
padding: 20px;
margin: 0px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #5F9EA0;
opacity: 1;
}
.chengdou-01__system .station-stand .el-dialog__body {
background: #000;
color: #E8E8E8;
}
.chengdou-01__system .el-dialog .el-dialog__title {
font-size: 16px;
color: #fff;
position: absolute;
top: 4px;
left:25px;
}
.chengdou-01__system .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 6px;
right: 3px;
line-height: 16px;
}
.chengdou-01__system .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.chengdou-01__system .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.chengdou-01__system .el-dialog .el-button {
height: 24px;
line-height: 22px;
padding: 0px;
width: 80px;
border: 2px outset #B7D4D5;
border-radius: 0 !important;
color: #000;
background: #5F9EA0;
}
.chengdou-01__system .el-dialog .expand {
width: 120px;
}
.chengdou-01__system .el-dialog .el-button:focus span {
border: 1px dashed #315253;
}
.chengdou-01__system .el-dialog .el-button:active {
border: 2px inset #B7D4D5;
}
.chengdou-01__system .el-dialog .el-button:disabled {
border: 2px inset #B7D4D5;
}
.chengdou-01__system .el-dialog .el-button:disabled span {
border: 0px;
}
.chengdou-01__select-option .el-select-dropdown__item{
background: #5F9EA0;
}
.chengdou-01__select-option .el-scrollbar__wrap {
background-color: #5F9EA0;
overflow: hidden;
overflow-y: scroll;
}
.chengdou-01__select-option{
border-style: solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
border-radius: 0;
background:#5F9EA0;
}
.chengdou-01__select-option .el-scrollbar{
border-style: solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0;
}
.chengdou-01__select-option .el-select-dropdown__item.selected{
color: #fff;
}
.chengdou-01__select-option .el-select-dropdown__item{
color: #000;
}
.chengdou-01__system .el-dialog .el-transfer-panel{
border-style: solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0;
background: #5F9EA0;
}
.chengdou-01__system .el-dialog .el-transfer .el-button{
width: 40px;
}
.chengdou-01__system .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label span {
color: #000;
}
.chengdou-01__system .el-dialog .el-transfer-panel .el-transfer-panel__header {
background: #5F9EA0;
border-bottom: 1px solid #467576;
}
.chengdou-01__system .el-dialog .el-transfer-panel .el-transfer-panel__empty {
color: #5F9EA0;
}
.chengdou-01__system .el-dialog .el-input {
border-style:solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
height: 22px !important;
line-height: 22px !important;
background: #5F9EA0;
}
.chengdou-01__system .el-dialog .el-input__inner {
color: #000;
background: #5F9EA0 !important;
border-style:solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0px !important;
box-sizing: border-box;
height: 22px !important;
line-height: 22px !important;
}
.chengdou-01__system .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.chengdou-01__system .el-dialog .el-textarea {
border-style:solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
border-radius: 0;
}
.chengdou-01__system .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #5F9EA0 !important;
border-style:solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0px !important;
box-sizing: border-box;
}
.chengdou-01__system .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.chengdou-01__system .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.chengdou-01__system .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.chengdou-01__system .el-dialog .el-table .cell {
height: 22px;
line-height: 22px;
}
.chengdou-01__system .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;
}
.chengdou-01__system .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.chengdou-01__system .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.chengdou-01__system .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.chengdou-01__system .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.chengdou-01__system .el-dialog .el-checkbox__label {
color: #000 !important;
}
.chengdou-01__system .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.chengdou-01__system .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.chengdou-01__system .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.chengdou-01__system .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;
}
.chengdou-01__system .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.chengdou-01__system .el-dialog .el-radio__label {
color: #000 !important;
}
.chengdou-01__system .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.chengdou-01__system .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%;
}
.chengdou-01__system .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.chengdou-01__system .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.chengdou-01__system .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.chengdou-01__system .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.chengdou-01__system .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.chengdou-01__system .el-dialog .table {
margin-top: 10px;
}
.chengdou-01__system .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.chengdou-01__system .el-dialog .button-group {
margin-top: 20px;
}
.chengdou-01__system.request_box .content-box .el-table__body-wrapper .el-table__row{
background: #000;
height: 30px;
color: #518E86;
}
.chengdou-01__system.request_box .content-box .el-table__body-wrapper .el-table__row.hover-row td{
background: #d5ecf7;
}
.chengdou-01__system.request_box .content-box .el-table__body-wrapper .el-table__row.current-row td{
background: #d5ecf7;
}
.chengdou-01__system .el-select .el-input__suffix {
top: 5px;
}
.chengdou-01__system .el-select .is-focus .el-input__suffix {
top: -5px;
}
.chengdou-01__select-option .el-scrollbar__thumb {
border-style:solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
background: #518E86;
}
</style>

View File

@ -0,0 +1,438 @@
<template>
<div class="chengdou-01__menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" :work="work" />
<menu-request ref="menuRequest" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="work" />
<menu-switch ref="menuSwitch" :selected="selected" :work="work" />
<menu-signal ref="menuSignal" :selected="selected" :work="work" />
<menu-section ref="menuSection" :selected="selected" :work="work" />
<menu-train ref="menuTrain" :selected="selected" :work="work" />
<menu-station ref="menuStation" :selected="selected" :work="work" />
<menu-station-platform ref="menuStationPlatform" :selected="selected" @popMenuStationStand="popMenuStationStand" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="chengdou-01__system" :work="work" />
<passive-Timeout ref="passiveTimeout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuRequest from './menuRequest';
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 './menuBar';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
import MenuStationPlatform from './menuStationPlatform';
export default {
name: 'Menus',
components: {
MenuBar,
MenuRequest,
// MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
PassiveAlarm,
PassiveContorl,
PassiveTimeout,
MenuStationPlatform
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
work: 'localWork'
};
},
computed: {
...mapGetters('config', [
'width'
])
},
watch: {
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
},
methods: {
popMenuStationStand(param) {
this.$refs.menuStationStand.doShow(param.position, param.type);
}
}
};
</script>
<style>
.chengdou-01__menus .pop-menu {
background: #5F9EA0;
}
.chengdou-01__menus .pop-menu .el-popover{
background: #5F9EA0;
}
.chengdou-01__menus .pop-menu span {
color: #000;
}
.chengdou-01__menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.chengdou-01__systerm {
overflow: hidden !important;
}
.chengdou-01__system .el-dialog {
background: #0055E8;
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 1px solid rgb(69, 134, 247);
border-radius: 6px;
font-size: 13px !important;
color: #000;
}
.chengdou-01__system .el-dialog span {
font-size: 13px !important;
line-height: 22px;
}
.chengdou-01__system .el-dialog .el-dialog__footer {
background: #5F9EA0;
opacity: 1;
}
.chengdou-01__system .el-dialog .el-dialog__body {
padding: 20px;
margin: 0px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #5F9EA0;
opacity: 1;
}
.chengdou-01__system .station-stand .el-dialog__body {
background: #000;
color: #E8E8E8;
}
.chengdou-01__system .el-dialog .el-dialog__title {
font-size: 16px;
color: #fff;
position: absolute;
top: 4px;
left:25px;
}
.chengdou-01__system .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 6px;
right: 3px;
line-height: 16px;
}
.chengdou-01__system .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.chengdou-01__system .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.chengdou-01__system .el-dialog .el-button {
height: 24px;
line-height: 22px;
padding: 0px;
width: 80px;
border: 2px outset #B7D4D5;
border-radius: 0 !important;
color: #000;
background: #5F9EA0;
}
.chengdou-01__system .el-dialog .expand {
width: 120px;
}
.chengdou-01__system .el-dialog .el-button:focus span {
border: 1px dashed #315253;
}
.chengdou-01__system .el-dialog .el-button:active {
border: 2px inset #B7D4D5;
}
.chengdou-01__system .el-dialog .el-button:disabled {
border: 2px inset #B7D4D5;
}
.chengdou-01__system .el-dialog .el-button:disabled span {
border: 0px;
}
.chengdou-01__select-option .el-select-dropdown__item{
background: #5F9EA0;
}
.chengdou-01__select-option .el-scrollbar__wrap {
background-color: #5F9EA0;
overflow: hidden;
overflow-y: scroll;
}
.chengdou-01__select-option{
border-style: solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
border-radius: 0;
background:#5F9EA0;
}
.chengdou-01__select-option .el-scrollbar{
border-style: solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0;
}
.chengdou-01__select-option .el-select-dropdown__item.selected{
color: #fff;
}
.chengdou-01__select-option .el-select-dropdown__item{
color: #000;
}
.chengdou-01__system .el-dialog .el-transfer-panel{
border-style: solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0;
background: #5F9EA0;
}
.chengdou-01__system .el-dialog .el-transfer .el-button{
width: 40px;
}
.chengdou-01__system .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label span {
color: #000;
}
.chengdou-01__system .el-dialog .el-transfer-panel .el-transfer-panel__header {
background: #5F9EA0;
border-bottom: 1px solid #467576;
}
.chengdou-01__system .el-dialog .el-transfer-panel .el-transfer-panel__empty {
color: #5F9EA0;
}
.chengdou-01__system .el-dialog .el-input {
border-style:solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
height: 22px !important;
line-height: 22px !important;
background: #5F9EA0;
}
.chengdou-01__system .el-dialog .el-input__inner {
color: #000;
background: #5F9EA0 !important;
border-style:solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0px !important;
box-sizing: border-box;
height: 22px !important;
line-height: 22px !important;
}
.chengdou-01__system .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.chengdou-01__system .el-dialog .el-textarea {
border-style:solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
border-radius: 0;
}
.chengdou-01__system .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #5F9EA0 !important;
border-style:solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0px !important;
box-sizing: border-box;
}
.chengdou-01__system .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.chengdou-01__system .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.chengdou-01__system .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.chengdou-01__system .el-dialog .el-table .cell {
height: 22px;
line-height: 22px;
}
.chengdou-01__system .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;
}
.chengdou-01__system .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.chengdou-01__system .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.chengdou-01__system .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.chengdou-01__system .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.chengdou-01__system .el-dialog .el-checkbox__label {
color: #000 !important;
}
.chengdou-01__system .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.chengdou-01__system .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.chengdou-01__system .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.chengdou-01__system .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;
}
.chengdou-01__system .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.chengdou-01__system .el-dialog .el-radio__label {
color: #000 !important;
}
.chengdou-01__system .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.chengdou-01__system .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%;
}
.chengdou-01__system .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.chengdou-01__system .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.chengdou-01__system .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.chengdou-01__system .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.chengdou-01__system .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.chengdou-01__system .el-dialog .table {
margin-top: 10px;
}
.chengdou-01__system .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.chengdou-01__system .el-dialog .button-group {
margin-top: 20px;
}
.chengdou-01__system.request_box .content-box .el-table__body-wrapper .el-table__row{
background: #000;
height: 30px;
color: #518E86;
}
.chengdou-01__system.request_box .content-box .el-table__body-wrapper .el-table__row.hover-row td{
background: #d5ecf7;
}
.chengdou-01__system.request_box .content-box .el-table__body-wrapper .el-table__row.current-row td{
background: #d5ecf7;
}
.chengdou-01__system .el-select .el-input__suffix {
top: 5px;
}
.chengdou-01__system .el-select .is-focus .el-input__suffix {
top: -5px;
}
.chengdou-01__select-option .el-scrollbar__thumb {
border-style:solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
background: #518E86;
}
</style>

View File

@ -91,6 +91,12 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
@ -101,104 +107,62 @@ export default {
tempClassB: -1,
valid: true,
menu: [],
menuNormal: {
Local: [
{
title: '访问控制',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
click: this.login
},
{
title: '注销',
click: this.undeveloped
},
{
title: '登录转移',
click: this.undeveloped
},
{
title: '区域分配',
click: this.undeveloped
},
{
title: '员工管理',
click: this.undeveloped
},
{
title: '职位功能划分',
click: this.undeveloped
},
{
title: '用户概况',
click: this.undeveloped
},
{
title: '登录概览',
click: this.undeveloped
}
]
},
{
title: '列车库存',
operate: OperationEvent.Command.mBar.check
},
{
title: '显示控制',
operate: OperationEvent.Command.mBar.view
}
],
Center: [
{
title: '访问控制',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
click: this.login
},
{
title: '注销',
click: this.logout
},
{
title: '登录转移',
click: this.undeveloped
},
{
title: '区域分配',
click: this.undeveloped
},
{
title: '员工管理',
click: this.undeveloped
},
{
title: '职位功能划分',
click: this.undeveloped
},
{
title: '用户概况',
click: this.undeveloped
},
{
title: '登录概览',
click: this.undeveloped
}
]
},
{
title: '列车库存',
operate: OperationEvent.Command.mBar.check
},
{
title: '显示控制',
operate: OperationEvent.Command.mBar.view
}
]
}
menuNormal: [
{
title: '访问控制',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
show: true,
click: this.login
},
{
title: '注销',
show: true,
click: this.work == 'localWork' ? this.undeveloped : this.logout
},
{
title: '登录转移',
show: true,
click: this.undeveloped
},
{
title: '区域分配',
show: true,
click: this.undeveloped
},
{
title: '员工管理',
show: true,
click: this.undeveloped
},
{
title: '职位功能划分',
show: true,
click: this.undeveloped
},
{
title: '用户概况',
show: true,
click: this.undeveloped
},
{
title: '登录概览',
show: true,
click: this.undeveloped
}
]
},
{
title: '列车库存',
operate: OperationEvent.Command.mBar.check
},
{
title: '显示控制',
operate: OperationEvent.Command.mBar.view
}
]
};
},
computed: {
@ -233,9 +197,6 @@ export default {
},
'$store.state.training.started': function (val) {
this.closeMenu(true);
},
'$store.state.training.prdType': function () {
this.initMenu();
}
},
mounted() {
@ -267,6 +228,13 @@ export default {
},
initMenu(menu) {
// this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[State2SimulationMap[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
console.log('🚀 ~ file: menuBar.vue:224 ~ initMenu ~ menu', this.menu);
if (this.menu.length) {
this.menu[2].children = this.initStationList();
this.clickEvent();

View File

@ -26,6 +26,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'SectionMenu',
@ -45,32 +46,36 @@ export default {
default: () => {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
],
Center: [
{
label: '轨道封锁',
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK
},
{
label: '轨道解封',
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
}
// {
// label: '',
// handler: this.setSpeed,
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
// }
]
},
menuNormal: [
{
label: '轨道封锁',
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
},
{
label: '轨道解封',
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
}
// {
// label: '',
// handler: this.setSpeed,
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
// }
],
menuForce: [
{
label: '设置故障',
@ -116,7 +121,7 @@ export default {
mounted() {
const isDev = process.env.NODE_ENV === 'development';
if (isDev) {
this.menuNormal.Center.push( {
this.menuNormal.push( {
label: '新建计划列车',
handler: this.createPlanTrain,
cmdType: CMD.Section.CMD_Train_Init_Plan
@ -134,6 +139,13 @@ export default {
//
if (this.selected.type != '04') {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
const status = judgeStationControl(this.selected.belongStation, this.selected.stationCode, this.work);
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
} else {
this.menu = [];
}

View File

@ -18,6 +18,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'SignalMenu',
@ -33,142 +34,171 @@ export default {
default: () => {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
popClass: 'chengdou-01__select-option',
menuNormal: {
Local: [
{
label: '始端/终端选择',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '开放自动进路',
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
{
label: '关闭自动进路',
handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
{
label: '终端信号封锁',
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
{
label: '终端信号解封',
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
},
{
label: '引导信号',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
label: '设备标签',
handler: '',
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
children: [
{
label: '创建设备标签',
handler: '',
cmdType: ''
}
]
},
{
label: '模拟',
handler: '',
cmdType: ''
},
{
label: '选择设备',
handler: '',
cmdType: ''
},
{
label: '帮助',
handler: '',
cmdType: ''
menuNormal: [
{
label: '始端/终端选择',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, work) => {
return false;
}
],
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.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
{
label: '关闭自动进路',
handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
{
label: '终端信号封锁',
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
{
label: '终端信号解封',
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
},
{
label: '引导信号',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
label: '设备标签',
handler: '',
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
children: [
{
label: '创建设备标签',
handler: this.createDeviceLabel,
cmdType: ''
}
]
},
{
label: '模拟',
handler: '',
cmdType: ''
},
{
label: '选择设备',
handler: '',
cmdType: ''
},
{
label: '帮助',
handler: '',
cmdType: ''
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
isDisabled: (signal, work) => {
return false;
}
]
},
},
{
label: '开放自动进路',
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
isDisabled: (signal, work) => {
return false;
}
},
{
label: '关闭自动进路',
handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
isDisabled: (signal, work) => {
return false;
}
},
{
label: '终端信号封锁',
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
isDisabled: (signal, work) => {
return signal.blockade !== 0;
}
},
{
label: '终端信号解封',
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
isDisabled: (signal, work) => {
return signal.blockade === 0;
}
},
{
label: '引导信号',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isDisabled: (signal, work) => {
return false;
}
},
{
label: '设备标签',
handler: '',
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
children: [
{
label: '创建设备标签',
handler: this.work == 'localWork' ? '' : this.createDeviceLabel,
cmdType: '',
show: false
}
]
},
{
label: '模拟',
handler: '',
cmdType: '',
isShow: (signal, work) => false
},
{
label: '选择设备',
handler: '',
cmdType: '',
isShow: (signal, work) => false
},
{
label: '帮助',
handler: '',
cmdType: '',
isShow: (signal, work) => false
}
],
// 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.singalPassModel,
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
// },
// {
// label: '',
// handler: this.singalCancelPassModel,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
// },
// {
// label: '',
// handler: this.lock,
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
// },
// {
// label: '',
// handler: this.unlock,
// cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
// },
// {
// label: '',
// handler: this.guide,
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
// },
// {
// label: '',
// handler: '',
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
// children: [
// {
// label: '',
// handler: this.createDeviceLabel,
// cmdType: ''
// }
// ]
// },
// {
// label: '',
// handler: '',
// cmdType: ''
// },
// {
// label: '',
// handler: '',
// cmdType: ''
// },
// {
// label: '',
// handler: '',
// cmdType: ''
// }
// ]
menuForce: [
{
label: '设置故障',
@ -222,6 +252,13 @@ export default {
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
const status = judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work);
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work, this.lineCode) : true;
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {

View File

@ -15,6 +15,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'StationMenu',
@ -32,17 +33,19 @@ export default {
default: () => {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
],
central: [
]
},
menuNormal: [
],
menuForce: [
{
label: '设置ZC故障',
@ -92,6 +95,13 @@ export default {
},
initMenu() {
if (this.selected.centralized) {
this.menu = [];
this.menuNormal.forEach(menuItem => {
const status = judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work);
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work, this.lineCode) : true;
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];

View File

@ -18,6 +18,7 @@ import { OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'StationStandMenu',
@ -33,51 +34,57 @@ export default {
default: () => {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
StoppingProfile: {
Local: [],
Center: [
{
label: '站台停站调整', //
handler: this.setStopTime,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
},
{
label: '站台停站',
handler: '',
cmdType: ''
},
{
label: '帮助',
handler: '',
cmdType: ''
}
]
},
know: {
Local: [],
Center: [
{
label: 'Skip Next Station',
handler: '',
cmdType: ''
},
{
label: 'Skip Next Station',
handler: '',
cmdType: ''
},
{
label: 'Help',
handler: '',
cmdType: ''
}
]
},
StoppingProfile: [
{
label: '站台停站调整', //
handler: this.setStopTime,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '站台停站',
handler: '',
cmdType: '',
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '帮助',
handler: '',
cmdType: '',
isShow: (stand, work) => work === 'dispatchWork'
}
],
know: [
{
label: 'Skip Next Station',
handler: '',
cmdType: '',
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: 'Skip Next Station',
handler: '',
cmdType: '',
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: 'Help',
handler: '',
cmdType: '',
isShow: (stand, work) => work === 'dispatchWork'
}
],
menuForce: [
{
label: '设置故障',
@ -113,14 +120,25 @@ export default {
self.doClose();
};
},
getMenu(type) {
this.menu = [];
this[type].forEach(menuItem => {
const status = judgeStationControl(this.selected.stationCode, this.selected.deviceStationCode, this.work);
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
},
initMenu(type) {
//
switch (type) {
case 'stoppingProfile':
// this.menu = MenuContextHandler.covert(this.StoppingProfile);
this.getMenu(type);
break;
case 'know':
// this.menu = MenuContextHandler.covert(this.StoppingProfile);
this.getMenu(type);
break;
}
// this.menu = MenuContextHandler.covert(this.menuNormal);

View File

@ -23,6 +23,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'SwitchMenu',
@ -43,84 +44,67 @@ export default {
default: () => {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
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
},
{
label: '道岔单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
menuNormal: [
{
label: '道岔定位',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return switchDevice.normalPosition === 1;
} else {
return switchDevice.normalPosition === 1;
}
}
],
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
},
{
label: '道岔单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '道岔反位',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return switchDevice.reversePosition === 1;
} else {
return switchDevice.reversePosition === 1;
}
}
// {
// label: '',
// handler: '',
// cmdType: '',
// children: [
// {
// label: '',
// handler: this.createDeviceLabel,
// cmdType: ''
// }
// ]
// },
// {
// label: '',
// handler: '',
// cmdType: ''
// },
// {
// label: '',
// handler: '',
// cmdType: ''
// },
// {
// label: '',
// handler: '',
// cmdType: ''
// }
]
},
},
{
label: '道岔单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return switchDevice.singleLock !== 0;
} else {
return switchDevice.singleLock !== 0;
}
}
},
{
label: '道岔单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
isDisabled: (switchDevice, work) => {
if (work === 'localWork') {
return switchDevice.singleLock !== 1;
} else {
return switchDevice.singleLock !== 1;
}
}
}
],
menuForce: [
{
label: '设置故障',
@ -166,7 +150,13 @@ export default {
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
const status = judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work);
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : 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

@ -37,6 +37,12 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {

View File

@ -5,6 +5,7 @@
<!--<div class="holdTrainStatus">H</div>-->
<!--<div class="jumpStopStatus">S</div>-->
<!--</div>-->
<menu-system-time ref="menuSystemTime" />
<station-control-convert ref="stationControlConvert" :work="work" @warningInfoDoShow="warningInfoDoShow" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
@ -37,6 +38,7 @@ import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
// import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
import { EventBus } from '@/scripts/event-bus';
import MenuSystemTime from './menuSystemTime';
export default {
name: 'DispatchWorkMenuBarXian01',
@ -53,7 +55,8 @@ export default {
TrainDelete,
ManageUser,
HelpAbout,
WarningInfo
WarningInfo,
MenuSystemTime
// DeleteRunplanLine
},
props: {

View File

@ -5,6 +5,7 @@
<!--<div class="holdTrainStatus">H</div>-->
<!--<div class="jumpStopStatus">S</div>-->
<!--</div>-->
<menu-system-time ref="menuSystemTime" />
<station-control-convert ref="stationControlConvert" :work="work" @warningInfoDoShow="warningInfoDoShow" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
@ -37,6 +38,7 @@ import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
// import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
import { EventBus } from '@/scripts/event-bus';
import MenuSystemTime from './menuSystemTime';
export default {
name: 'LocalWorkMenuBarXian01',
@ -53,7 +55,8 @@ export default {
// TrainDelete,
ManageUser,
HelpAbout,
WarningInfo
WarningInfo,
MenuSystemTime
// DeleteRunplanLine
},
props: {

View File

@ -68,7 +68,7 @@ export default {
return section.blockade === 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
isShow: (section, work) => ['01', '02'].includes(section.type)
},
{
label: '区段解封',
@ -81,7 +81,7 @@ export default {
return section.blockade !== 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
isShow: (section, work) => ['01', '02'].includes(section.type)
},
{
label: '故障解锁',
@ -121,6 +121,7 @@ export default {
return section.cutOff === 1;
}
},
roleDisabled: this.work === 'dispatchWork',
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
},
{
@ -134,6 +135,7 @@ export default {
return section.cutOff !== 1;
}
},
roleDisabled: this.work === 'dispatchWork',
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
}
],
@ -196,7 +198,10 @@ export default {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
const status = judgeStationControl(this.selected.belongStation, this.selected.stationCode, this.work);
let status = judgeStationControl(this.selected.belongStation, this.selected.stationCode, this.work);
if (menuItem.roleDisabled) {
status = true;
}
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);

View File

@ -68,8 +68,9 @@ export default {
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: (stand, work) => {
if (work === 'localWork') {
return stand.stationHoldTrain !== 0;
const centralStation = this.$store.getters['map/getDeviceByCode'](stand.deviceStationCode);
if (centralStation.controlMode === 'Center') {
return stand.centerHoldTrain !== 0;
} else {
return stand.stationHoldTrain !== 0;
}
@ -81,8 +82,9 @@ export default {
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => {
if (work === 'localWork') {
return stand.stationHoldTrain !== 1;
const centralStation = this.$store.getters['map/getDeviceByCode'](stand.deviceStationCode);
if (centralStation.controlMode === 'Center') {
return stand.centerHoldTrain !== 1;
} else {
return stand.stationHoldTrain !== 1;
}

View File

@ -126,12 +126,28 @@ export default {
label: '区段切除',
handler: this.split,
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF,
isDisabled: (section, work) => {
if (work === 'localWork') {
return false;
} else {
return section.cutOff === 1;
}
},
roleDisabled: this.work === 'dispatchWork',
isShow: (switchDevice, work) => work === 'dispatchWork'
},
{
label: '区段激活',
handler: this.active,
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE,
isDisabled: (section, work) => {
if (work === 'localWork') {
return false;
} else {
return section.cutOff !== 1;
}
},
roleDisabled: this.work === 'dispatchWork',
isShow: (switchDevice, work) => work === 'dispatchWork'
},
{
@ -198,7 +214,10 @@ export default {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
const status = judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work);
let status = judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work);
if (menuItem.roleDisabled) {
status = true;
}
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) || !status : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);

View File

@ -0,0 +1,135 @@
<template>
<div class="display-card" :style="{top: top+'px', right: newRight+'px'}">
<div class="statusIcon">
<status-icon ref="statusIcon" />
</div>
<template v-if="pause">
<span class="display-pause">{{ $t('display.systemTime.timePause') }}</span>
</template>
<template v-else>
<system-time
class="display-time"
:time="time"
/>
<div v-if="isShowDate" style="width: 80px;height: 58px;float: right;box-shadow: 0 0 5px #eee;">
<div class="display-date-box">{{ dateString }}</div>
<div class="display-date-box">{{ dayString }}</div>
</div>
</template>
</div>
</template>
<script>
import SystemTime from '@/views/components/systemTime/index';
import { timestampFormat } from '@/utils/date';
import StatusIcon from '@/views/components/StatusIcon/statusIcon';
//
export default {
name: 'MenuSystemTime',
components: {
SystemTime,
StatusIcon
},
props: {
},
data() {
return {
time: '00:0000',
dateString: '00/00/00',
dayString: ''
};
},
computed: {
pause() {
return this.$store.state.scriptRecord.simulationPause;
},
isDisplay() {
return this.$route.path.includes('display') || this.$route.path.includes('scriptDisplayNew');
},
isShowDate() { // 西 线
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.isDisplay;
},
top() {
return 35;
},
newRight() {
return this.isShowDate ? this.$store.state.config.width - 420 : this.$store.state.config.width / 2 - 55;
}
},
watch: {
'$store.state.training.initTime': function (timestamp) {
this.initDate(timestamp);
},
'$store.state.socket.simulationTimeSync': function (timestamp) { // 仿
this.initDate(timestamp);
}
},
mounted() {
const initTime = this.$store.state.training.initTime;
if (initTime > 0) {
this.initDate(initTime);
}
this.setTextStatusStyle();
},
methods: {
setTextStatusStyle() {
const textStatus = document.getElementById('textStatus');
if (textStatus) {
textStatus.style.top = '0px';
}
},
initDate(timestamp) {
this.time = timestampFormat('HH:mmss', timestamp);
this.dateString = timestampFormat('YYYY/MM/DD', timestamp);
this.dayString = timestampFormat('dddd', timestamp).split('').join(' ');
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.display-card {
z-index: 9;
display: inline;
position: absolute;
width: 420px;
}
.statusIcon {
width: 120px;
height: 58px;
position: absolute;
top: -2px;
left: 0px;
}
.display-pause {
font-size: 21px;
font-weight: bold;
color: yellow;
position: absolute;
right: 0px;
top: 0px;
}
.display-time{
margin-left: 120px;
height: 60px;
padding: 3px 5px;
border: 1px solid rgba(255,255,255,.2);
box-shadow: 0 2px 12px 0 rgba(255,255,255,.3);
border-radius: 3px;
}
.display-card .el-row {
line-height: 32px !important;
}
.display-date-box{
height: 29px;
line-height: 29px;
background: #404040;
color: #1DEA1E;
text-align: center;
font-size: 16px;
}
</style>