This commit is contained in:
lVAL 2021-02-22 17:50:54 +08:00
commit e5cba385b1
12 changed files with 133 additions and 35 deletions

View File

@ -13,7 +13,7 @@
<menu-station ref="menuStation" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" />
<menu-station-light ref="menuStationLight" :selected="selected" />
<menu-station-pre-reset ref="menuStationPreReset" />
<menu-station-pre-reset ref="menuStationPreReset" :selected="selected" />
<!--<passive-alarm ref="passiveAlarm" />-->
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
<!--<passive-Timeout ref="passiveTimeout" />-->

View File

@ -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();

View File

@ -9,8 +9,8 @@
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="ningbo-01__systerm" />
<operate-confirm ref="operateConfirm" @executeConfirm="executeConfirm" />
<section-un-lock ref="sectionUnLock" pop-class="ningbo-01__systerm" />
<operate-confirm ref="operateConfirm" @executeConfirm="executeConfirm" />
<section-un-lock ref="sectionUnLock" pop-class="ningbo-01__systerm" />
</div>
</template>
@ -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);
}
},

View File

@ -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) {

View File

@ -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) {

View File

@ -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();

View File

@ -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);
}

View File

@ -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();
}
},

View File

@ -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);
}
});
});
}
}
};

View File

@ -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();

View File

@ -239,6 +239,7 @@ const training = {
user.online = item.online;
user.memberId = item.memberId;
user.role = item.role;
user.deviceCode = item.deviceCode;
memberIndex = index;
}
});

View File

@ -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: '取消进路时列车紧急制动'
}
};
},