diff --git a/src/jmapNew/theme/ningbo_01/menus/index.vue b/src/jmapNew/theme/ningbo_01/menus/index.vue index 5a221d396..a52ecabe2 100644 --- a/src/jmapNew/theme/ningbo_01/menus/index.vue +++ b/src/jmapNew/theme/ningbo_01/menus/index.vue @@ -13,7 +13,7 @@ - + diff --git a/src/jmapNew/theme/ningbo_01/menus/menuAutoTrunRoute.vue b/src/jmapNew/theme/ningbo_01/menus/menuAutoTrunRoute.vue index ed34443f4..a157ada12 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuAutoTrunRoute.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuAutoTrunRoute.vue @@ -11,7 +11,7 @@ import TurnBackControl from './dialog/turnBackControl'; import { mapGetters } from 'vuex'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; +import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; export default { @@ -91,6 +91,16 @@ export default { if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; } + if (this.$store.state.training.mode === TrainingMode.NORMAL) { + const station = this.$store.getters['map/getDeviceByCode'](this.selected.stationCode); + const memberData = this.$store.state.training.memberData; + const userId = this.$store.state.user.id; + if (!station.controller || !memberData[station.controller] || memberData[station.controller].userId != userId) { + this.menu.forEach(item => { + item.disabled = true; + }); + } + } }, doShow(point) { this.clickEvent(); diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index 8695e7720..aa5402fa0 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -9,8 +9,8 @@ - - + + @@ -29,7 +29,7 @@ import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock import CMD from '@/scripts/cmdPlugin/CommandEnum'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import { mapGetters } from 'vuex'; -import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; +import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; @@ -45,8 +45,8 @@ export default { SetFault, ConfirmControl, LoadSpareTrain, - OperateConfirm, - SectionUnLock + OperateConfirm, + SectionUnLock }, props: { selected: { @@ -188,6 +188,16 @@ export default { if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } + if (this.$store.state.training.mode === TrainingMode.NORMAL) { + const station = this.$store.getters['map/getDeviceByCode'](this.selected.stationCode); + const memberData = this.$store.state.training.memberData; + const userId = this.$store.state.user.id; + if (!station.controller || !memberData[station.controller] || memberData[station.controller].userId != userId) { + this.menu.forEach(item => { + item.disabled = true; + }); + } + } }, doShow(point) { this.clickEvent(); @@ -266,8 +276,8 @@ export default { unlock() { commitOperate(menuOperate.Section.unlock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ if (valid) { - operate.message = '是否执行解锁命令?'; - Object.assign(operate, {operation: OperationEvent.Section.unlock.confirm.operation}) + operate.message = '是否执行解锁命令?'; + Object.assign(operate, {operation: OperationEvent.Section.unlock.confirm.operation}); this.$refs.operateConfirm.doShow(operate, this.selected); } }); @@ -318,11 +328,11 @@ export default { } }); }, - // 二次弹窗 - executeConfirm(operate) { - if (operate.operation === OperationEvent.Section.fault.confirm.operation) { - this.$refs.sectionUnLock.doShow(menuOperate.Section.fault, this.selected); - } else if (operate.operation === OperationEvent.Section.unlock.confirm.operation) { + // 二次弹窗 + executeConfirm(operate) { + if (operate.operation === OperationEvent.Section.fault.confirm.operation) { + this.$refs.sectionUnLock.doShow(menuOperate.Section.fault, this.selected); + } else if (operate.operation === OperationEvent.Section.unlock.confirm.operation) { this.$refs.sectionUnLock.doShow(menuOperate.Section.unlock, this.selected); } }, diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue b/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue index fbbe0900b..81450416b 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue @@ -30,7 +30,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import PasswordInput from './dialog/passwordInput'; import { mapGetters } from 'vuex'; -import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; +import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; export default { @@ -235,6 +235,16 @@ export default { if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; } + if (this.$store.state.training.mode === TrainingMode.NORMAL) { + const station = this.$store.getters['map/getDeviceByCode'](this.selected.stationCode); + const memberData = this.$store.state.training.memberData; + const userId = this.$store.state.user.id; + if (!station.controller || !memberData[station.controller] || memberData[station.controller].userId != userId) { + this.menu.forEach(item => { + item.disabled = true; + }); + } + } }, executeConfirm(operate) { if (operate.operation === OperationEvent.Signal.unlock.confirm.operation) { diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue index 60a65bb68..fc3d88d1d 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue @@ -17,8 +17,7 @@ import StationSetRouteControlAll from '@/jmapNew/theme/components/menus/dialog/s import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { mapGetters } from 'vuex'; -import { OperateMode } from '@/scripts/ConstDic'; -import { DeviceMenu } from '@/scripts/ConstDic'; +import { OperateMode, DeviceMenu, TrainingMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; // import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; @@ -136,6 +135,15 @@ export default { if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; } + if (this.$store.state.training.mode === TrainingMode.NORMAL) { + const memberData = this.$store.state.training.memberData; + const userId = this.$store.state.user.id; + if (!this.selected.controller || !memberData[this.selected.controller] || memberData[this.selected.controller].userId != userId) { + this.menu.forEach(item => { + item.disabled = true; + }); + } + } } }, doShow(point) { diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationLight.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationLight.vue index df1752dc2..080af2fca 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStationLight.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationLight.vue @@ -12,7 +12,7 @@ import PopMenu from '@/components/PopMenu'; import PasswordInput from './dialog/passwordInput'; import { mapGetters } from 'vuex'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; -import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; +import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; @@ -82,7 +82,16 @@ export default { if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; } - this.getCurrentStateObject(); + if (this.$store.state.training.mode === TrainingMode.NORMAL) { + const memberData = this.$store.state.training.memberData; + const userId = this.$store.state.user.id; + this.getCurrentStateObject(); + if (!this.selected.controller || !memberData[this.selected.controller] || memberData[this.selected.controller].userId != userId) { + this.menu.forEach(item => { + item.disabled = true; + }); + } + } }, doShow(point) { this.clickEvent(); diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue index 3cb2213d4..bf0797f19 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue @@ -9,7 +9,7 @@ import PopMenu from '@/components/PopMenu'; import { mapGetters } from 'vuex'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; -import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; +import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; @@ -87,11 +87,19 @@ export default { this.menu = this.menuForce; } this.getCurrentStateObject(); + if (this.$store.state.training.mode === TrainingMode.NORMAL) { + const memberData = this.$store.state.training.memberData; + const userId = this.$store.state.user.id; + if (!this.selected.controller || !memberData[this.selected.controller] || memberData[this.selected.controller].userId != userId) { + this.menu.forEach(item => { + item.disabled = true; + }); + } + } }, doShow(point) { this.clickEvent(); this.initMenu(); - console.log(this.menu, this.$refs.popMenu); if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { this.$refs.popMenu.resetShowPosition(point); } diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue index d60c8fd59..bc6ef8889 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue @@ -24,7 +24,7 @@ import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import { mapGetters } from 'vuex'; -import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; +import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; @@ -190,6 +190,16 @@ export default { if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; } + if (this.$store.state.training.mode === TrainingMode.NORMAL) { + const station = this.$store.getters['map/getDeviceByCode'](this.selected.stationCode); + const memberData = this.$store.state.training.memberData; + const userId = this.$store.state.user.id; + if (!station.controller || !memberData[station.controller] || memberData[station.controller].userId != userId) { + this.menu.forEach(item => { + item.disabled = true; + }); + } + } }, doShow(point) { this.clickEvent(); @@ -199,7 +209,7 @@ export default { } }, doClose() { - if (this.$refs && this.$refs.popMenu) { + if (this.$refs && this.$refs.popMenu) { this.$refs.popMenu.close(); } }, diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationTurnBack.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationTurnBack.vue index e32b7dcf2..86aab4fdb 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStationTurnBack.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationTurnBack.vue @@ -10,10 +10,10 @@ import PopMenu from '@/components/PopMenu'; import StationBackStrategy from './dialog/stationBackStrategy'; import { mapGetters } from 'vuex'; -import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; +import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; -import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuStationTurnBack', @@ -85,6 +85,16 @@ export default { if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; } + if (this.$store.state.training.mode === TrainingMode.NORMAL) { + const station = this.$store.getters['map/getDeviceByCode'](this.selected.stationCode); + const memberData = this.$store.state.training.memberData; + const userId = this.$store.state.user.id; + if (!station.controller || !memberData[station.controller] || memberData[station.controller].userId != userId) { + this.menu.forEach(item => { + item.disabled = true; + }); + } + } }, doShow(point) { this.clickEvent(); @@ -100,17 +110,17 @@ export default { }, // 设置折返策略 setBackStrategy() { - const operate = { - operation: menuOperate.StationControl.setBackStrategy.operation, - code: this.selected.code, - param: {stationCode: this.selected.stationCode} - }; + const operate = { + operation: menuOperate.StationControl.setBackStrategy.operation, + code: this.selected.code, + param: {stationCode: this.selected.stationCode} + }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$refs.stationBackStrategy.doShow(operate, this.selected); } - }); + }); } } }; diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue index 04497d79b..542b45a8f 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue @@ -26,7 +26,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { mapGetters } from 'vuex'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; +import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; @@ -198,6 +198,16 @@ export default { // this.menu = this.menuForce; // } } + if (this.$store.state.training.mode === TrainingMode.NORMAL) { + const station = this.$store.getters['map/getDeviceByCode'](this.selected.stationCode); + const memberData = this.$store.state.training.memberData; + const userId = this.$store.state.user.id; + if (!station.controller || !memberData[station.controller] || memberData[station.controller].userId != userId) { + this.menu.forEach(item => { + item.disabled = true; + }); + } + } }, doShow(point) { this.clickEvent(); diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 0eab2ce2d..f6f1a4e7c 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -239,6 +239,7 @@ const training = { user.online = item.online; user.memberId = item.memberId; user.role = item.role; + user.deviceCode = item.deviceCode; memberIndex = index; } }); diff --git a/src/views/system/configLine/config.vue b/src/views/system/configLine/config.vue index 2b7b648ef..6ecc306d9 100644 --- a/src/views/system/configLine/config.vue +++ b/src/views/system/configLine/config.vue @@ -99,7 +99,11 @@ export default { 'adjustOperationAutomatically', 'setRouteBeforeSetFlt', 'cancelRouteWhenCancelFlt', - 'needApproachLockBeforeSetGuide' + 'needApproachLockBeforeSetGuide', + 'allowEarlyDepartureWhenHoldTrain', + 'standSkipSetTrainOnlyOnce', + 'blockadeCommandOnlyValidInStandbyMode', + 'ebwhenCancelRoute' ], selectList: ['runMode'], generalConfig: [ @@ -129,7 +133,11 @@ export default { 'adjustOperationAutomatically', 'setRouteBeforeSetFlt', 'cancelRouteWhenCancelFlt', - 'needApproachLockBeforeSetGuide' + 'needApproachLockBeforeSetGuide', + 'allowEarlyDepartureWhenHoldTrain', + 'standSkipSetTrainOnlyOnce', + 'blockadeCommandOnlyValidInStandbyMode', + 'ebwhenCancelRoute' ], rangeList: ['noParkingSM', 'parkingSM'], speedList: ['rmAtpSpeed', 'urmAtpSpeed'], @@ -164,7 +172,11 @@ export default { adjustOperationAutomatically: 'ATS自动调整运行', setRouteBeforeSetFlt: '在办理车队进路前是否要先排列进路', cancelRouteWhenCancelFlt: '在取消车队进路时同时取消进路', - needApproachLockBeforeSetGuide: '办理引导前需要信号机接近锁闭' + needApproachLockBeforeSetGuide: '办理引导前需要信号机接近锁闭', + allowEarlyDepartureWhenHoldTrain: '扣车时是否允许提前发车', + standSkipSetTrainOnlyOnce: '站台指定列车跳停仅跳停一次', + blockadeCommandOnlyValidInStandbyMode: '封锁命令(状态)仅在后备模式下有效', + ebwhenCancelRoute: '取消进路时列车紧急制动' } }; },