Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly1
Conflicts: src/jmapNew/theme/factory.js
This commit is contained in:
commit
7029394ea8
@ -107,7 +107,7 @@ export default {
|
|||||||
.chengdou-03__systerm .el-dialog {
|
.chengdou-03__systerm .el-dialog {
|
||||||
background: #0055E8;
|
background: #0055E8;
|
||||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||||
border: 1px solid rgb(69, 134, 247);
|
border: 1px solid #041c7d;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
font-size: 13px !important;
|
font-size: 13px !important;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
@ -109,12 +109,12 @@ class Theme {
|
|||||||
}
|
}
|
||||||
// 加载行调菜单组件
|
// 加载行调菜单组件
|
||||||
loadDispatchWorkMenuComponent(code) {
|
loadDispatchWorkMenuComponent(code) {
|
||||||
if (['02', '09', '10', '11', '16', '08', '03', '07'].includes(code)) {
|
if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07'].includes(code)) {
|
||||||
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default);
|
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadLocalWorkMenuComponent(code) {
|
loadLocalWorkMenuComponent(code) {
|
||||||
if (['02', '09', '10', '11', '16', '08', '03', '07'].includes(code)) {
|
if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07'].includes(code)) {
|
||||||
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
|
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,380 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
|
||||||
<menu-button ref="menuButton" />
|
|
||||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
|
||||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
|
||||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
|
||||||
<menu-signal ref="menuSignal" :selected="selected" />
|
|
||||||
<menu-section ref="menuSection" :selected="selected" />
|
|
||||||
<menu-train ref="menuTrain" :selected="selected" />
|
|
||||||
<menu-station ref="menuStation" :selected="selected" />
|
|
||||||
<menu-limit ref="menuLimit" :selected="selected" />
|
|
||||||
<passive-alarm ref="passiveAlarm" />
|
|
||||||
<passive-contorl ref="passiveControl" pop-class="foshan-01__systerm" />
|
|
||||||
<passive-Timeout ref="passiveTimeout" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import MenuSignal from './menuSignal';
|
|
||||||
import MenuButton from './menuButton';
|
|
||||||
import MenuAxleReset from './menuAxleReset';
|
|
||||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
|
||||||
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 MenuLimit from './menuLimit';
|
|
||||||
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,
|
|
||||||
MenuButton,
|
|
||||||
MenuAxleReset,
|
|
||||||
MenuAutoTrunRoute,
|
|
||||||
MenuSignal,
|
|
||||||
MenuSwitch,
|
|
||||||
MenuSection,
|
|
||||||
MenuStationStand,
|
|
||||||
MenuStation,
|
|
||||||
MenuTrain,
|
|
||||||
MenuLimit,
|
|
||||||
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 .pop-menu {
|
|
||||||
background: #F0F0F0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menus .pop-menu span {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menus .pop-menu .is-disabled span {
|
|
||||||
color: #B4B3B8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm {
|
|
||||||
overflow: hidden !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog {
|
|
||||||
background: linear-gradient(to bottom, #9BB6D3, #B8D0EA);
|
|
||||||
border: 1px solid rgba(118, 162, 198, 1);
|
|
||||||
border-radius: 6px;
|
|
||||||
color: #000;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-dialog__header {
|
|
||||||
padding: 10px;
|
|
||||||
height: 26px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-dialog__footer {
|
|
||||||
background: #F0F0F0;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-dialog__body {
|
|
||||||
padding: 10px;
|
|
||||||
margin: 2px;
|
|
||||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
|
||||||
background: #F0F0F0;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-dialog__title {
|
|
||||||
position: absolute;
|
|
||||||
top: 6px;
|
|
||||||
color: #000;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 0px 2px;
|
|
||||||
height: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .expand {
|
|
||||||
width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-button:focus span {
|
|
||||||
border: 1px dashed gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-button:active {
|
|
||||||
border: 2px inset #E2E2E2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-button:disabled {
|
|
||||||
border: 2px inset #E2E2E2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-button:disabled span {
|
|
||||||
border: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-input {
|
|
||||||
border: 2px inset #E9E9E9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-input .el-input__inner {
|
|
||||||
color: #000;
|
|
||||||
background: #fff !important;
|
|
||||||
border: 0px;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
|
||||||
background: #F0F0F0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-textarea {
|
|
||||||
border: 2px inset #E9E9E9;
|
|
||||||
border-radius: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-textarea .el-textarea__inner {
|
|
||||||
color: #000;
|
|
||||||
background: #fff !important;
|
|
||||||
border: 0px;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
|
||||||
background: #F0F0F0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-table--border th.gutter {
|
|
||||||
background: #EBEADB !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-table {
|
|
||||||
border: 2px inset #E9E9E9;
|
|
||||||
color: #000 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-table .cell {
|
|
||||||
line-height: unset !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-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;
|
|
||||||
}
|
|
||||||
.foshan-01__systerm.stand-detain-train .el-dialog .el-table th.el-table-column--selection{
|
|
||||||
border-right: 1px solid #e2e2e2 !important;
|
|
||||||
}
|
|
||||||
.foshan-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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-table tr td {
|
|
||||||
height: 20px !important;
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-table .el-table__empty-text {
|
|
||||||
top: 15px !important;
|
|
||||||
line-height: normal;
|
|
||||||
max-width:60%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .current-row>td {
|
|
||||||
background: #3399FF !important;
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-checkbox__inner {
|
|
||||||
border: 1px inset #dcdfe6 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-checkbox__label {
|
|
||||||
color: #000 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
|
||||||
background: #E6E6E6 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
|
||||||
color: #C5C9CC !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
|
||||||
background: #fff !important;
|
|
||||||
border: 1px inset #dcdfe6 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-radio__inner {
|
|
||||||
border: 1px inset #dcdfe6 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-radio__label {
|
|
||||||
color: #000 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
|
||||||
background: #fff !important;
|
|
||||||
border: 1px inset #dcdfe6 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-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%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
|
||||||
background: #E6E6E6 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
|
||||||
color: #C5C9CC !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .base-label {
|
|
||||||
background: #F0F0F0;
|
|
||||||
padding: 0 5px;
|
|
||||||
position: relative;
|
|
||||||
left: -15px;
|
|
||||||
top: -18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .el-form-item label {
|
|
||||||
font-weight: normal !important;
|
|
||||||
color: #000 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .context {
|
|
||||||
height: 100px;
|
|
||||||
border: 2px inset #E2E2E2;
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .table {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .notice {
|
|
||||||
margin-left: 62px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foshan-01__systerm .el-dialog .button-group {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
File diff suppressed because it is too large
Load Diff
@ -25,6 +25,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
|||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
||||||
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
@ -61,11 +62,10 @@ export default {
|
|||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
cmdType: CMD.Section.CMD_SECTION_BLOCK,
|
cmdType: CMD.Section.CMD_SECTION_BLOCK,
|
||||||
isDisabled: (section, work) => {
|
isDisabled: (section, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade === 1 || device.controlMode !== 'Local';
|
return section.blockade === 1;
|
||||||
} else {
|
} else {
|
||||||
return section.blockade === 1 || device.controlMode !== 'Center';
|
return section.blockade === 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||||
@ -75,11 +75,10 @@ export default {
|
|||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK,
|
cmdType: CMD.Section.CMD_SECTION_UNBLOCK,
|
||||||
isDisabled: (section, work) => {
|
isDisabled: (section, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade !== 1 || device.controlMode !== 'Local';
|
return section.blockade !== 1;
|
||||||
} else {
|
} else {
|
||||||
return section.blockade !== 1 || device.controlMode !== 'Center';
|
return section.blockade !== 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||||
@ -89,12 +88,7 @@ export default {
|
|||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||||
isDisabled: (section, work) => {
|
isDisabled: (section, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||||
},
|
},
|
||||||
@ -103,12 +97,7 @@ export default {
|
|||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
|
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
|
||||||
isDisabled: (section, work) => {
|
isDisabled: (section, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
isShow: (section, work) => section.type === '02'
|
isShow: (section, work) => section.type === '02'
|
||||||
},
|
},
|
||||||
@ -117,12 +106,7 @@ export default {
|
|||||||
handler: this.cancelSpeed,
|
handler: this.cancelSpeed,
|
||||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
|
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
|
||||||
isDisabled: (section, work) => {
|
isDisabled: (section, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
isShow: (section, work) => section.type === '02'
|
isShow: (section, work) => section.type === '02'
|
||||||
},
|
},
|
||||||
@ -212,7 +196,8 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
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;
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||||
this.menu.push(menuItem);
|
this.menu.push(menuItem);
|
||||||
});
|
});
|
||||||
|
@ -29,6 +29,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import ConflictRoute from './dialog/conflictRoute';
|
import ConflictRoute from './dialog/conflictRoute';
|
||||||
|
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
@ -67,12 +68,7 @@ export default {
|
|||||||
handler: this.arrangementRoute,
|
handler: this.arrangementRoute,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -80,12 +76,7 @@ export default {
|
|||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -93,11 +84,10 @@ export default {
|
|||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
|
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade === 1;
|
return signal.blockade === 1;
|
||||||
} else {
|
} else {
|
||||||
return signal.blockade === 1 || device.controlMode !== 'Center';
|
return signal.blockade === 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -106,11 +96,10 @@ export default {
|
|||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
|
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade !== 1;
|
return signal.blockade !== 1;
|
||||||
} else {
|
} else {
|
||||||
return signal.blockade !== 1 || device.controlMode !== 'Center';
|
return signal.blockade !== 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -119,12 +108,7 @@ export default {
|
|||||||
handler: this.signalClose,
|
handler: this.signalClose,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL,
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -132,12 +116,7 @@ export default {
|
|||||||
handler: this.reopenSignal,
|
handler: this.reopenSignal,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -145,12 +124,7 @@ export default {
|
|||||||
handler: this.guide,
|
handler: this.guide,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -158,69 +132,55 @@ export default {
|
|||||||
handler: this.setAutoInterlock,
|
handler: this.setAutoInterlock,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 0;
|
return signal.fleetMode !== 0;
|
||||||
} else {
|
} else {
|
||||||
return signal.fleetMode !== 0 || device.controlMode !== 'Center';
|
return signal.fleetMode !== 0;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
isShow: (signal, work) => work === 'localWork'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消联锁自动进路',
|
label: '取消联锁自动进路',
|
||||||
handler: this.cancelAutoInterlock,
|
handler: this.cancelAutoInterlock,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
console.log('🚀 ~ file: menuSignal.vue:182 ~ data ~ signal', signal);
|
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 1;
|
return signal.fleetMode !== 1;
|
||||||
} else {
|
} else {
|
||||||
return signal.fleetMode !== 1 || device.controlMode !== 'Center';
|
return signal.fleetMode !== 1;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
isShow: (signal, work) => work === 'localWork'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置联锁自动触发',
|
label: '设置联锁自动触发',
|
||||||
handler: this.setAutoTrigger,
|
handler: this.setAutoTrigger,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl === 1 || !signal.canSetCi;
|
return signal.ciControl === 1 && !signal.canSetCi;
|
||||||
} else {
|
} else {
|
||||||
return signal.ciControl === 1 || !signal.canSetCi || device.controlMode !== 'Center';
|
return signal.ciControl === 1 && !signal.canSetCi;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
isShow: (signal, work) => work === 'localWork'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消联锁自动触发',
|
label: '取消联锁自动触发',
|
||||||
handler: this.cancelAutoTrigger,
|
handler: this.cancelAutoTrigger,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl !== 1;
|
return signal.ciControl !== 1;
|
||||||
} else {
|
} else {
|
||||||
return signal.ciControl !== 1 || device.controlMode !== 'Center';
|
return signal.ciControl !== 1;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
isShow: (signal, work) => work === 'localWork'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '进路交人工控',
|
label: '进路交人工控',
|
||||||
handler: this.humanControl,
|
handler: this.humanControl,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -228,12 +188,7 @@ export default {
|
|||||||
handler: this.atsAutoControl,
|
handler: this.atsAutoControl,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||||
isDisabled: (signal, work) => {
|
isDisabled: (signal, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -305,7 +260,8 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
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;
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||||
this.menu.push(menuItem);
|
this.menu.push(menuItem);
|
||||||
});
|
});
|
||||||
|
@ -22,6 +22,7 @@ import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
|||||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationMenu',
|
name: 'StationMenu',
|
||||||
@ -100,8 +101,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return station.controlMode !== 'Center';
|
return station.controlMode !== 'Center';
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
isShow: (station, work) => work === 'localWork'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所有进路交人工控',
|
label: '所有进路交人工控',
|
||||||
@ -113,40 +113,31 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return station.controlMode !== 'Center';
|
return station.controlMode !== 'Center';
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
isShow: (station, work) => work === 'localWork'
|
}
|
||||||
},
|
|
||||||
// {
|
// {
|
||||||
// label: '执行关键操作测试',
|
// label: '执行关键操作测试',
|
||||||
// handler: this.execKeyOperationTest,
|
// handler: this.execKeyOperationTest,
|
||||||
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
|
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
|
||||||
// }
|
// }
|
||||||
{
|
// {
|
||||||
label: '所有进路交人工控',
|
// label: '所有进路交人工控',
|
||||||
handler: this.humanControlALL,
|
// handler: this.humanControlALL,
|
||||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
// cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||||
isDisabled: (station, work) => {
|
// isDisabled: (station, work) => {
|
||||||
if (work === 'localWork') {
|
// return false;
|
||||||
return station.controlMode !== 'Local';
|
// },
|
||||||
} else {
|
// isShow: (station, work) => work === 'dispatchWork'
|
||||||
return station.controlMode !== 'Center';
|
// },
|
||||||
}
|
// {
|
||||||
},
|
// label: '所有进路交ATS自动控',
|
||||||
isShow: (station, work) => work === 'dispatchWork'
|
// handler: this.atsAutoControlALL,
|
||||||
},
|
// cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||||
{
|
// isDisabled: (station, work) => {
|
||||||
label: '所有进路交ATS自动控',
|
// return false;
|
||||||
handler: this.atsAutoControlALL,
|
// },
|
||||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
// isShow: (station, work) => work === 'dispatchWork'
|
||||||
isDisabled: (station, work) => {
|
// }
|
||||||
if (work === 'localWork') {
|
|
||||||
return station.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return station.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isShow: (station, work) => work === 'dispatchWork'
|
|
||||||
}
|
|
||||||
// {
|
// {
|
||||||
// label: '执行关键操作测试',
|
// label: '执行关键操作测试',
|
||||||
// handler: this.execKeyOperationTest,
|
// handler: this.execKeyOperationTest,
|
||||||
@ -201,7 +192,8 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
const status = judgeStationControl(this.selected.code, this.selected.stationCode, this.work);
|
||||||
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) || !status : true;
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||||
this.menu.push(menuItem);
|
this.menu.push(menuItem);
|
||||||
});
|
});
|
||||||
|
@ -29,6 +29,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
@ -67,9 +68,8 @@ export default {
|
|||||||
handler: this.setDetainTrain,
|
handler: this.setDetainTrain,
|
||||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
||||||
isDisabled: (stand, work) => {
|
isDisabled: (stand, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 0 || device.controlMode !== 'Local';
|
return stand.stationHoldTrain !== 0;
|
||||||
} else {
|
} else {
|
||||||
return stand.centerHoldTrain !== 0;
|
return stand.centerHoldTrain !== 0;
|
||||||
}
|
}
|
||||||
@ -80,9 +80,8 @@ export default {
|
|||||||
handler: this.cancelDetainTrain,
|
handler: this.cancelDetainTrain,
|
||||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||||
isDisabled: (stand, work) => {
|
isDisabled: (stand, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1 || device.controlMode !== 'Local';
|
return stand.stationHoldTrain !== 1;
|
||||||
} else {
|
} else {
|
||||||
return stand.centerHoldTrain !== 1;
|
return stand.centerHoldTrain !== 1;
|
||||||
}
|
}
|
||||||
@ -93,12 +92,7 @@ export default {
|
|||||||
handler: this.cancelDetainTrainForce,
|
handler: this.cancelDetainTrainForce,
|
||||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN,
|
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN,
|
||||||
isDisabled: (stand, work) => {
|
isDisabled: (stand, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
isShow: (section, work) => work === 'dispatchWork'
|
isShow: (section, work) => work === 'dispatchWork'
|
||||||
},
|
},
|
||||||
@ -107,12 +101,7 @@ export default {
|
|||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS,
|
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS,
|
||||||
isDisabled: (stand, work) => {
|
isDisabled: (stand, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -127,7 +116,7 @@ export default {
|
|||||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||||
isDisabled: (stand, work) => {
|
isDisabled: (stand, work) => {
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return stand.allSkip !== 0;
|
return stand.allSkip !== 0;
|
||||||
}
|
}
|
||||||
@ -140,7 +129,7 @@ export default {
|
|||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||||
isDisabled: (stand, work) => {
|
isDisabled: (stand, work) => {
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return stand.allSkip !== 1 && stand.assignSkip !== 1;
|
return stand.allSkip !== 1 && stand.assignSkip !== 1;
|
||||||
}
|
}
|
||||||
@ -213,7 +202,8 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
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;
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||||
this.menu.push(menuItem);
|
this.menu.push(menuItem);
|
||||||
});
|
});
|
||||||
@ -225,15 +215,15 @@ export default {
|
|||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
// 非故障模式 且 角色为车站值班员时 增加PSL盘
|
// 非故障模式 且 角色为车站值班员时 增加PSL盘
|
||||||
if (this.operatemode !== OperateMode.FAULT && this.work === 'localWork') {
|
// if (this.operatemode !== OperateMode.FAULT && this.work === 'localWork') {
|
||||||
this.menu = [
|
// this.menu = [
|
||||||
...this.menu,
|
// ...this.menu,
|
||||||
{
|
// {
|
||||||
label: 'PSL',
|
// label: 'PSL',
|
||||||
handler: this.openPsl
|
// handler: this.openPsl
|
||||||
}
|
// }
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
|
@ -22,6 +22,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
@ -57,11 +58,10 @@ export default {
|
|||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
|
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock === 1 || device.controlMode !== 'Local';
|
return switchDevice.singleLock === 1;
|
||||||
} else {
|
} else {
|
||||||
return switchDevice.singleLock === 1 || device.controlMode !== 'Center';
|
return switchDevice.singleLock === 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -70,11 +70,10 @@ export default {
|
|||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
|
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock !== 1 || device.controlMode !== 'Local';
|
return switchDevice.singleLock !== 1;
|
||||||
} else {
|
} else {
|
||||||
return switchDevice.singleLock !== 1 || device.controlMode !== 'Center';
|
return switchDevice.singleLock !== 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -83,11 +82,10 @@ export default {
|
|||||||
handler: this.block,
|
handler: this.block,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK,
|
cmdType:CMD.Switch.CMD_SWITCH_BLOCK,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade === 1 || device.controlMode !== 'Local';
|
return switchDevice.blockade === 1;
|
||||||
} else {
|
} else {
|
||||||
return switchDevice.blockade === 1 || device.controlMode !== 'Center';
|
return switchDevice.blockade === 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -96,11 +94,10 @@ export default {
|
|||||||
handler: this.unblock,
|
handler: this.unblock,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK,
|
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
|
||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade !== 1 || device.controlMode !== 'Local';
|
return switchDevice.blockade !== 1;
|
||||||
} else {
|
} else {
|
||||||
return switchDevice.blockade !== 1 || device.controlMode !== 'Center';
|
return switchDevice.blockade !== 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -109,12 +106,7 @@ export default {
|
|||||||
handler: this.switchTurnout,
|
handler: this.switchTurnout,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_TURN,
|
cmdType:CMD.Switch.CMD_SWITCH_TURN,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -122,12 +114,7 @@ export default {
|
|||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK,
|
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@ -140,12 +127,7 @@ export default {
|
|||||||
handler: this.split,
|
handler: this.split,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF,
|
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -153,12 +135,7 @@ export default {
|
|||||||
handler: this.active,
|
handler: this.active,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE,
|
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -166,12 +143,7 @@ export default {
|
|||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED,
|
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -179,12 +151,7 @@ export default {
|
|||||||
handler: this.cancelSpeed,
|
handler: this.cancelSpeed,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED,
|
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED,
|
||||||
isDisabled: (switchDevice, work) => {
|
isDisabled: (switchDevice, work) => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
|
return false;
|
||||||
if (work === 'localWork') {
|
|
||||||
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
|
|
||||||
} else {
|
|
||||||
return device.controlMode !== 'Center';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -235,7 +202,8 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
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;
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||||
this.menu.push(menuItem);
|
this.menu.push(menuItem);
|
||||||
});
|
});
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getCompanyListPaging, deleteCompany, getCompanyQrCode } from '@/api/company';
|
import { getCompanyListPaging, deleteCompany, getCompanyQrCode } from '@/api/company';
|
||||||
|
import { getAllBackProjectConfig} from '@/api/projectConfig';
|
||||||
import EditCompany from './add';
|
import EditCompany from './add';
|
||||||
import QrCode from '@/components/QrCode';
|
import QrCode from '@/components/QrCode';
|
||||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CompanyManage',
|
name: 'CompanyManage',
|
||||||
components: {
|
components: {
|
||||||
@ -96,9 +96,15 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
ProjectList.forEach(elem => {
|
getAllBackProjectConfig().then(res=>{
|
||||||
// this.projectMap[elem.value.toUpperCase()] = elem.label;
|
const response = res.data || [];
|
||||||
this.projectListNew.push({value: elem.value.toUpperCase(), label: elem.label});
|
const projectList = [];
|
||||||
|
response.forEach(elem => {
|
||||||
|
projectList.push({value: elem.code, label: elem.name});
|
||||||
|
});
|
||||||
|
this.projectListNew = projectList;
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('获取项目列表失败');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -60,14 +60,6 @@ export default {
|
|||||||
],
|
],
|
||||||
description: [
|
description: [
|
||||||
{ required: true, message: '请输入项目描述', trigger: 'blur' }
|
{ required: true, message: '请输入项目描述', trigger: 'blur' }
|
||||||
],
|
|
||||||
mapId: [
|
|
||||||
{ required: true, message: '请选择实训室关联地图', trigger: 'blur' },
|
|
||||||
{ required: true, message: '请选择实训室关联地图', trigger: 'change' }
|
|
||||||
],
|
|
||||||
functionId: [
|
|
||||||
{ required: true, message: '请选择实训室关联功能', trigger: 'blur' },
|
|
||||||
{ required: true, message: '请选择实训室关联功能', trigger: 'change' }
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
|
Loading…
Reference in New Issue
Block a user