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

This commit is contained in:
fan 2022-12-12 17:00:38 +08:00
commit f6cdf07b06
17 changed files with 5067 additions and 545 deletions

View File

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

View File

@ -0,0 +1,438 @@
<template>
<div class="menus __socpe" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="work" />
<menu-switch ref="menuSwitch" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-signal ref="menuSignal" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-section ref="menuSection" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-train ref="menuTrain" :selected="selected" :work="work" />
<menu-station ref="menuStation" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-limit ref="menuLimit" :selected="selected" :work="work" />
<!--<passive-alarm ref="passiveAlarm" />-->
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" :selected="selected" :work="work" />
<!--<passive-Timeout ref="passiveTimeout" />-->
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuSignal from './menuSignal';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './dispatchWorkMenuBar';
import 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: 'DispatchWorkMenu',
components: {
MenuBar,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
MenuLimit,
// PassiveAlarm,
PassiveContorl
// PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
initCacheMap: {},
initInfo: {},
updateDone: 0,
work: 'dispatchWork'
};
},
computed: {
...mapGetters('config', [
'width'
])
},
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
},
'$store.state.map.mapStateLoadedCount': function () {
this.$store.dispatch('map/flushMapRef');
}
},
mounted() {
this.$root.$on('iniCacheMap', (cmd, cacheMap) => {
this.initCacheMap[cmd] = cacheMap;
});
this.$root.$on('appendCache', (cmd, code, cache) => {
if (!this.initCacheMap[cmd]) {
this.initCacheMap[cmd] = {};
}
this.initCacheMap[cmd][code] = cache;
});
this.$root.$on('removeCache', (cmd, code) => {
if (this.initCacheMap[cmd]) {
delete this.initCacheMap[cmd][code];
}
});
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
const _that = this;
window.onclick = function (e) {
if (!_that.$store.state.training.trainingStart) {
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
}
_that.$refs.menuStationStand.doClose();
_that.$refs.menuSwitch.doClose();
_that.$refs.menuSignal.doClose();
_that.$refs.menuSection.doClose();
_that.$refs.menuTrain.doClose();
_that.$refs.menuStation.doClose();
_that.$refs.menuLimit.doClose();
};
});
},
beforeDestroy() {
this.$root.$off('iniCacheMap');
this.$root.$off('appendCache');
this.$root.$off('removeCache');
window.onclick = function (e) {};
},
methods: {
onUpdateDone() {
this.updateDone++;
},
onChangeInitInfo(initSelect, initParams) {
this.initInfo = {
initSelect,
initParams
};
this.updateDone++;
}
}
};
</script>
<style>
.menus{
height:0px;
}
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.ningbo-01__systerm {
overflow: hidden !important;
}
.ningbo-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.ningbo-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.ningbo-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.ningbo-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.ningbo-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.ningbo-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;
}
.ningbo-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;
}
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.ningbo-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;
}
.ningbo-01__systerm .el-dialog .expand {
width: 120px;
}
.ningbo-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.ningbo-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.ningbo-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.ningbo-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.ningbo-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.ningbo-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.ningbo-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.ningbo-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.ningbo-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.ningbo-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.ningbo-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.ningbo-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.ningbo-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.ningbo-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;
}
.ningbo-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;
}
.ningbo-01__systerm.stand-detain-train .el-dialog .el-table th.el-table-column--selection{
border-right: 1px solid #e2e2e2 !important;
}
.ningbo-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;
}
.ningbo-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.ningbo-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.ningbo-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.ningbo-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;
}
.ningbo-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.ningbo-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.ningbo-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.ningbo-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%;
}
.ningbo-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.ningbo-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.ningbo-01__systerm .el-dialog .base-label {
background: #F0F0F0;
padding: 0 5px;
position: relative;
left: -15px;
top: -18px;
}
.ningbo-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.ningbo-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.ningbo-01__systerm .el-dialog .table {
margin-top: 10px;
}
.ningbo-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.ningbo-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>
<style lang="scss">
.__socpe {
.el-dialog,
.el-dialog__wrapper {
pointer-events: none !important;
}
.el-dialog__header,
.el-dialog__body {
pointer-events: all !important;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<template>
<div class="menus __socpe" :style="{width: width + 'px'}">
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-bar ref="menuBar" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-signal ref="menuSignal" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
@ -61,15 +61,9 @@ export default {
computed: {
...mapGetters('config', [
'width'
]),
isShowBar() {
return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
}
])
},
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
},
'$store.state.map.mapStateLoadedCount': function () {
this.$store.dispatch('map/flushMapRef');
}

View File

@ -0,0 +1,435 @@
<template>
<div class="menus __socpe" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="work" />
<menu-switch ref="menuSwitch" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-signal ref="menuSignal" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-section ref="menuSection" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-train ref="menuTrain" :selected="selected" :work="work" />
<menu-station ref="menuStation" :selected="selected" :work="work" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
<menu-limit ref="menuLimit" :selected="selected" :work="work" />
<!--<passive-alarm ref="passiveAlarm" />-->
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" :selected="selected" :work="work" />
<!--<passive-Timeout ref="passiveTimeout" />-->
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuSignal from './menuSignal';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './localWorkMenuBar';
import 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: 'LocalWorkMenu',
components: {
MenuBar,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
MenuLimit,
// PassiveAlarm,
PassiveContorl
// PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
initCacheMap: {},
initInfo: {},
updateDone: 0,
work: 'localWork'
};
},
computed: {
...mapGetters('config', [
'width'
])
},
watch: {
'$store.state.map.mapStateLoadedCount': function () {
this.$store.dispatch('map/flushMapRef');
}
},
mounted() {
this.$root.$on('iniCacheMap', (cmd, cacheMap) => {
this.initCacheMap[cmd] = cacheMap;
});
this.$root.$on('appendCache', (cmd, code, cache) => {
if (!this.initCacheMap[cmd]) {
this.initCacheMap[cmd] = {};
}
this.initCacheMap[cmd][code] = cache;
});
this.$root.$on('removeCache', (cmd, code) => {
if (this.initCacheMap[cmd]) {
delete this.initCacheMap[cmd][code];
}
});
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
const _that = this;
window.onclick = function (e) {
if (!_that.$store.state.training.trainingStart) {
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
}
_that.$refs.menuStationStand.doClose();
_that.$refs.menuSwitch.doClose();
_that.$refs.menuSignal.doClose();
_that.$refs.menuSection.doClose();
_that.$refs.menuTrain.doClose();
_that.$refs.menuStation.doClose();
_that.$refs.menuLimit.doClose();
};
});
},
beforeDestroy() {
this.$root.$off('iniCacheMap');
this.$root.$off('appendCache');
this.$root.$off('removeCache');
window.onclick = function (e) {};
},
methods: {
onUpdateDone() {
this.updateDone++;
},
onChangeInitInfo(initSelect, initParams) {
this.initInfo = {
initSelect,
initParams
};
this.updateDone++;
}
}
};
</script>
<style>
.menus{
height:0px;
}
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.ningbo-01__systerm {
overflow: hidden !important;
}
.ningbo-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.ningbo-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.ningbo-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.ningbo-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.ningbo-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.ningbo-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;
}
.ningbo-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;
}
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.ningbo-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;
}
.ningbo-01__systerm .el-dialog .expand {
width: 120px;
}
.ningbo-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.ningbo-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.ningbo-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.ningbo-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.ningbo-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.ningbo-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.ningbo-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.ningbo-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.ningbo-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.ningbo-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.ningbo-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.ningbo-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.ningbo-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.ningbo-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;
}
.ningbo-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;
}
.ningbo-01__systerm.stand-detain-train .el-dialog .el-table th.el-table-column--selection{
border-right: 1px solid #e2e2e2 !important;
}
.ningbo-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;
}
.ningbo-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.ningbo-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.ningbo-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.ningbo-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.ningbo-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;
}
.ningbo-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.ningbo-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.ningbo-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.ningbo-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%;
}
.ningbo-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.ningbo-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.ningbo-01__systerm .el-dialog .base-label {
background: #F0F0F0;
padding: 0 5px;
position: relative;
left: -15px;
top: -18px;
}
.ningbo-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.ningbo-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.ningbo-01__systerm .el-dialog .table {
margin-top: 10px;
}
.ningbo-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.ningbo-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>
<style lang="scss">
.__socpe {
.el-dialog,
.el-dialog__wrapper {
pointer-events: none !important;
}
.el-dialog__header,
.el-dialog__body {
pointer-events: all !important;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,14 @@ export default {
components: {
NoticeInfo
},
props: {
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
status: true,
@ -96,9 +104,6 @@ export default {
domIdApply() {
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
},
prdType() {
return this.$store.state.training.prdType;
},
concertrateStationList() {
return this.stationList.filter(station=>{
return station.centralized;
@ -109,7 +114,7 @@ export default {
'selected': function(val) {
if (val) {
const stationEle = this.$store.getters['map/getDeviceByCode'](val.code);
if (stationEle && this.$store.state.training.prdType == '02') {
if (stationEle && this.work == 'dispatchWork') {
this.loading = false;
if (stationEle.controller) {
const memberData = this.$store.state.training.memberData;

View File

@ -70,6 +70,14 @@ export default {
components: {
NoticeInfo
},
props: {
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
status: true,
@ -111,9 +119,6 @@ export default {
domIdApply() {
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
},
prdType() {
return this.$store.state.training.prdType;
},
concertrateStationList() {
return this.stationList.filter((station) => {
return station.centralized;
@ -124,7 +129,7 @@ export default {
'selected': function(val) {
if (val) {
const stationEle = this.$store.getters['map/getDeviceByCode'](val.code);
if (stationEle && this.$store.state.training.prdType == '02') {
if (stationEle && this.work == 'dispatchWork') {
this.loading = false;
if (stationEle.controller) {
const memberData = this.$store.state.training.memberData;

View File

@ -52,6 +52,14 @@ export default {
components: {
NoticeInfo
},
props: {
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
status: true,
@ -98,9 +106,6 @@ export default {
domIdApply() {
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
},
prdType() {
return this.$store.state.training.prdType;
},
concertrateStationList() {
return this.stationList.filter(station=>{
return station.centralized;
@ -113,7 +118,7 @@ export default {
const stationEle = this.$store.getters['map/getDeviceByCode'](val.code);
if (stationEle) {
this.loading = false;
if (this.$store.state.training.prdType == '02') {
if (this.work == 'dispatchWork') {
if (stationEle.controller) {
const memberData = this.$store.state.training.memberData;
if (memberData[stationEle.controller].userId == this.$store.state.user.id) {
@ -128,7 +133,7 @@ export default {
} else {
this.status = false;
}
} else if (this.$store.state.training.prdType == '01') {
} else if (this.work == 'localWork') {
if (stationEle.controller) {
const memberData = this.$store.state.training.memberData;
if (memberData[stationEle.controller].userId == this.$store.state.user.id) {

View File

@ -73,6 +73,14 @@ export default {
components: {
NoticeInfo
},
props: {
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
status: true,
@ -123,9 +131,6 @@ export default {
domIdApply() {
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
},
prdType() {
return this.$store.state.training.prdType;
},
concertrateStationList() {
return this.stationList.filter(station=>{
return station.centralized;

View File

@ -12,6 +12,7 @@ import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'MenuLimit',
@ -25,28 +26,25 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
systemName:'ningbo-01__systerm',
menuNormal: {
Local: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
}
],
Center: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
}
]
}
menuNormal: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
}
]
};
},
computed: {
@ -71,6 +69,16 @@ export default {
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
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);
});
},
doShow(point) {
this.initMenu();

View File

@ -25,6 +25,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'SectionMenu',
@ -62,93 +63,80 @@ export default {
default() {
return 0;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
// {
// label: '',
// handler: this.fault,
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
// },
// {
// label: '',
// handler: this.active,
// cmdType: CMD.Section.CMD_SECTION_ACTIVE
// },
// {
// label: '',
// handler: this.split,
// cmdType: CMD.Section.CMD_SECTION_CUT_OFF
// },
],
Center: [
{
label: '开放',
children: [
{
label: '初始化',
handler: this.handlerInitOpen
},
{
label: '确定/取消',
handler: this.handlerOpen
}
]
},
{
label: '关闭',
children: [
{
label: '初始化',
handler: this.handlerInitClose
},
{
label: '确定/取消',
handler: this.handlerClose
}
]
},
{
label: '临时限速',
children: [
{
label: '设置',
children: [
{
label: '初始化',
handler: this.handlerInitSetLimit
},
{
label: '确定/取消',
handler: this.handlerSetLimit
}
]
},
{
label: '清除',
children: [
{
label: '初始化',
handler: this.handlerInitCancelLimit
},
{
label: '确定/取消',
handler: this.handlerCancelLimit
}
]
}
]
},
{
label: '显示',
handler: this.handlerDetail
}
]
},
menuNormal: [
{
label: '开放',
children: [
{
label: '初始化',
handler: this.handlerInitOpen
},
{
label: '确定/取消',
handler: this.handlerOpen
}
]
},
{
label: '关闭',
children: [
{
label: '初始化',
handler: this.handlerInitClose
},
{
label: '确定/取消',
handler: this.handlerClose
}
]
},
{
label: '临时限速',
children: [
{
label: '设置',
children: [
{
label: '初始化',
handler: this.handlerInitSetLimit
},
{
label: '确定/取消',
handler: this.handlerSetLimit
}
]
},
{
label: '清除',
children: [
{
label: '初始化',
handler: this.handlerInitCancelLimit
},
{
label: '确定/取消',
handler: this.handlerCancelLimit
}
]
}
]
},
{
label: '显示',
handler: this.handlerDetail
}
],
menuForce: [
{
label: this.$t('menu.menuSection.setFault'),
@ -189,7 +177,7 @@ export default {
mounted() {
const isDev = process.env.NODE_ENV === 'development';
if (isDev) {
this.menuNormal.Center.push({
this.menuNormal.push({
label: '新建计划车',
handler: this.addPlanTrain,
cmdType: CMD.Section.CMD_Train_Init_Plan
@ -201,7 +189,17 @@ export default {
//
if (this.selected.type != '04') {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Center;
// this.menu = this.menuNormal.Center;
this.menu = [];
this.menuNormal.forEach(menuItem => {
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);
});
} else {
this.menu = [];
}

View File

@ -29,6 +29,7 @@ import SignalModel from './menuDialog/signalModel';
import SignalBlock from './menuDialog/signalBlock';
import SignalDetail from './menuDialog/signalDetail';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'SignalMenu',
@ -68,104 +69,107 @@ export default {
default() {
return 0;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
],
Center: [
{
label: '引导',
children: [
{
label: '初始化',
handler: this.handlerInitGuide
},
{
label: '确定/取消',
handler: this.handlerGuide
},
{
label: '清除',
handler: this.handlerCancelGuide
}
]
},
{
label: '取消允许锁闭',
children: [
{
label: '初始化',
handler: this.handlerInitAllowLock
},
{
label: '确定/取消',
handler: this.handlerAllowLock
}
]
},
{
label: '进路',
children: [
{
label: '命令',
handler: this.handlerRouteCommand
},
{
label: '显示',
children: [
{
label: 'CBTC进路信息',
handler: this.undeveloped
},
{
label: '后备进路信息',
handler: this.undeveloped
}
]
}
]
},
{
label: '信号指示模式',
handler: this.handlerSignalModel,
cmdType: ''
},
{
label: '封锁',
children: [
{
label: '初始化',
handler: this.handlerInitBlock
},
{
label: '确认/取消',
handler: this.handlerBlock
}
]
},
{
label: '解除封锁',
children: [
{
label: '初始化',
handler: this.handlerInitUnblock
},
{
label: '确认/取消',
handler: this.handlerUnblock
}
]
},
{
label: '显示',
handler: this.handlerDetail
}
]
},
menuNormal: [
{
label: '引导',
children: [
{
label: '初始化',
handler: this.handlerInitGuide
},
{
label: '确定/取消',
handler: this.handlerGuide
},
{
label: '清除',
handler: this.handlerCancelGuide
}
]
},
{
label: '取消允许锁闭',
children: [
{
label: '初始化',
handler: this.handlerInitAllowLock
},
{
label: '确定/取消',
handler: this.handlerAllowLock
}
]
},
{
label: '进路',
children: [
{
label: '命令',
handler: this.handlerRouteCommand
},
{
label: '显示',
children: [
{
label: 'CBTC进路信息',
handler: this.undeveloped
},
{
label: '后备进路信息',
handler: this.undeveloped
}
]
}
]
},
{
label: '信号指示模式',
handler: this.handlerSignalModel,
cmdType: ''
},
{
label: '封锁',
children: [
{
label: '初始化',
handler: this.handlerInitBlock
},
{
label: '确认/取消',
handler: this.handlerBlock
}
]
},
{
label: '解除封锁',
children: [
{
label: '初始化',
handler: this.handlerInitUnblock
},
{
label: '确认/取消',
handler: this.handlerUnblock
}
]
},
{
label: '显示',
handler: this.handlerDetail
}
],
menuForce: [
{
label: '设置故障',
@ -204,7 +208,17 @@ export default {
methods: {
initMenu() {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Center;
// this.menu = this.menuNormal.Center;
this.menu = [];
this.menuNormal.forEach(menuItem => {
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);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;

View File

@ -22,6 +22,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'StationMenu',
@ -39,61 +40,18 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
// {
// label: '',
// handler: this.setAutoTrigger,
// cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
// },
// {
// label: '',
// handler: this.cancelAutoTrigger,
// cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
// },
// {
// label: '',
// handler: this.powerUnLock,
// cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
// },
// {
// label: '',
// handler: this.execKeyOperationTest,
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
// }
],
Center: [
// {
// label: '/',
// handler: ''
// },
// {
// label: '/',
// handler: ''
// },
// {
// label: '',
// handler: ''
// },
// {
// label: '',
// handler: ''
// },
// {
// label: '',
// handler: ''
// },
// {
// label: '',
// handler: ''
// }
]
},
menuNormal: [],
menuForce: [
{
label: '设置ZC故障',
@ -134,6 +92,16 @@ export default {
methods: {
initMenu() {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
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);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;

View File

@ -24,6 +24,7 @@ import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuO
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'StationStandMenu',
@ -43,61 +44,43 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
// {
// label: '',
// handler: this.setDetainTrain,
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
// },
// {
// label: '',
// handler: this.cancelDetainTrain,
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
// },
// {
// label: '',
// handler: this.earlyDeparture,
// cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
// },
// {
// label: '',
// handler: this.detail,
// cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
// }
],
Center: [
{
label: '开放/关闭',
handler: this.handlerOpenOrClose
},
{
label: '设置/取消扣车',
handler: this.handlerDetain
},
{
label: '设置站间列车数量',
handler: this.undeveloped
},
{
label: '分配停站时间',
handler: this.handlerAllocateTime
},
{
label: '授权转移',
handler: this.handlerStationTransfer
},
{
label: '显示',
handler: this.handlerDetail
}
]
},
menuNormal: [
{
label: '开放/关闭',
handler: this.handlerOpenOrClose
},
{
label: '设置/取消扣车',
handler: this.handlerDetain
},
{
label: '设置站间列车数量',
handler: this.undeveloped
},
{
label: '分配停站时间',
handler: this.handlerAllocateTime
},
{
label: '授权转移',
handler: this.handlerStationTransfer
},
{
label: '显示',
handler: this.handlerDetail
}
],
menuForce: [
{
label: '设置故障',
@ -134,7 +117,17 @@ export default {
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Center;
// this.menu = this.menuNormal.Center;
this.menu = [];
this.menuNormal.forEach(menuItem => {
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);
});
//
if (this.operatemode === OperateMode.FAULT) {

View File

@ -21,6 +21,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'SwitchMenu',
@ -56,95 +57,68 @@ export default {
default() {
return 0;
}
},
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
// },
// {
// label: '',
// handler: this.block,
// cmdType: CMD.Switch.CMD_SWITCH_BLOCK
// },
// {
// label: '',
// handler: this.unblock,
// cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
// }
],
Center: [
{
label: '命令',
handler: this.handlerCommand
},
{
label: '封锁',
children: [
{
label: '初始化',
handler: this.handlerInitBlock
},
{
label: '确定/取消',
handler: this.handlerBlock
}
]
},
{
label: '解除封锁',
children: [
{
label: '初始化',
handler: this.handlerInitUnblock
},
{
label: '确定/取消',
handler: this.handlerUnblock
}
]
},
{
label: '请求动岔',
children: [
{
label: '请求或授权/取消',
handler: this.handlerActive
},
{
label: '显示',
disabled: true,
handler: this.undeveloped
}
]
},
{
label: '显示',
handler: this.handlerDetail
}
]
},
menuNormal: [
{
label: '命令',
handler: this.handlerCommand
},
{
label: '封锁',
children: [
{
label: '初始化',
handler: this.handlerInitBlock
},
{
label: '确定/取消',
handler: this.handlerBlock
}
]
},
{
label: '解除封锁',
children: [
{
label: '初始化',
handler: this.handlerInitUnblock
},
{
label: '确定/取消',
handler: this.handlerUnblock
}
]
},
{
label: '请求动岔',
children: [
{
label: '请求或授权/取消',
handler: this.handlerActive
},
{
label: '显示',
disabled: true,
handler: this.undeveloped
}
]
},
{
label: '显示',
handler: this.handlerDetail
}
],
menuForce: [
{
label: '设置故障',
@ -181,7 +155,17 @@ export default {
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Center;
// this.menu = this.menuNormal.Center;
this.menu = [];
this.menuNormal.forEach(menuItem => {
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);
});
//
if (this.operatemode === OperateMode.FAULT) {
// if (!this.$store.state.scriptRecord.bgSet) {

View File

@ -34,6 +34,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'MenuTrain',
@ -56,150 +57,83 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
// {
// label: '',
// handler: this.addTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.delTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.moveTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.addPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.setPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setHeadTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setWorkTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: 'ATP',
// handler: this.setTrainATPdel,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: 'ATP',
// handler: this.setTrainATPRec,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// }
],
Center: [
{
label: '设置车组号',
handler: this.addTrainId,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '删除车组号',
handler: this.delTrainId,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '移动车组号',
handler: this.moveTrainId,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
type: 'separator'
},
{
label: '设置计划车',
handler: this.setPlanTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
},
{
label: '设置头码车',
handler: this.setHeadTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
},
{
label: '设置人工车',
handler: this.setWorkTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
},
{
label: '设乘务组号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
type: 'separator'
},
{
label: '标记ATP切除',
handler: this.setTrainATPdel,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '标记ATP恢复',
handler: this.setTrainATPRec,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
type: 'separator'
},
{
label: '旅行冲突列车',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '列车信息',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
}
]
},
menuNormal: [
{
label: '设置车组号',
handler: this.addTrainId,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '删除车组号',
handler: this.delTrainId,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '移动车组号',
handler: this.moveTrainId,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
type: 'separator'
},
{
label: '设置计划车',
handler: this.setPlanTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
},
{
label: '设置头码车',
handler: this.setHeadTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
},
{
label: '设置人工车',
handler: this.setWorkTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
},
{
label: '设乘务组号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
type: 'separator'
},
{
label: '标记ATP切除',
handler: this.setTrainATPdel,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '标记ATP恢复',
handler: this.setTrainATPRec,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
type: 'separator'
},
{
label: '旅行冲突列车',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '列车信息',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
}
],
menuForce: [
{
label: '设置故障',
@ -304,6 +238,16 @@ export default {
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
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);
});
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {