大铁线路 剧本编制 车站扳道员 添加 道岔钩锁

This commit is contained in:
joylink_cuiweidong 2022-07-29 11:00:28 +08:00
parent 129b1be713
commit 70ec386b9d
3 changed files with 83 additions and 84 deletions

View File

@ -205,7 +205,7 @@ export default {
} else { this.menu.forEach(item => { item.disabled = false; }); }
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
const menuHook = [{
label: '道岔钩锁',
handler: this.hookLock

View File

@ -207,7 +207,7 @@ export default {
this.menu = this.menuNormal.Local;
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
const menuHook = [{
label: '道岔钩锁',
handler: this.hookLock
@ -270,7 +270,7 @@ export default {
},
//
block() {
debugger
debugger;
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);

View File

@ -7,8 +7,7 @@
</template>
<script>
import PopMenu from '@/components/PopMenu';
// OperateMode
import { DeviceMenu } from '@/scripts/ConstDic';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
@ -196,17 +195,17 @@ export default {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
//
// if (this.operatemode === OperateMode.FAULT) {
// if (!this.$store.state.scriptRecord.bgSet) {
// const menuHook = [{
// label: '',
// handler: this.hookLock
// }];
// this.menu = [...this.menuForce, ...menuHook];
// } else {
// this.menu = this.menuForce;
// }
// }
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
const menuHook = [{
label: '道岔钩锁',
handler: this.hookLock
}];
this.menu = [...this.menuForce, ...menuHook];
} else {
this.menu = this.menuForce;
}
}
}
}