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

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

@ -7,7 +7,7 @@
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
<set-fault ref="setFault" pop-class="datie-02__systerm" />
<draw-select ref="drawSelect" />
<route-cancel ref="routeCancel" />
<route-cancel ref="routeCancel" />
</div>
</template>
@ -36,7 +36,7 @@ export default {
SetFault,
SwitchHookLock,
DrawSelect,
RouteCancel
RouteCancel
},
mixins: [
CancelMouseState
@ -54,72 +54,72 @@ export default {
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: '封锁',
handle: this.block,
{
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: '封锁',
handle: this.block,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: '解封',
handle: this.unblock,
{
label: '解封',
handle: this.unblock,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: '区故解',
handle: ''
},
{
label: '岔前 分路不良',
handle: ''
},
{
label: '定位 分路不良',
handle: ''
},
{
label: '反位 分路不良',
handle: ''
},
{
label: '接触网定位无电',
handle: ''
},
{
label: '接触网反位无电',
handle: ''
},
{
label: '添加调机号',
handle: ''
},
{
label: '删除调机号',
handle: ''
},
{
label: '修改调机号',
handle: ''
}
},
{
label: '区故解',
handle: ''
},
{
label: '岔前 分路不良',
handle: ''
},
{
label: '定位 分路不良',
handle: ''
},
{
label: '反位 分路不良',
handle: ''
},
{
label: '接触网定位无电',
handle: ''
},
{
label: '接触网反位无电',
handle: ''
},
{
label: '添加调机号',
handle: ''
},
{
label: '删除调机号',
handle: ''
},
{
label: '修改调机号',
handle: ''
}
],
Center: [
// {
@ -193,7 +193,7 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
@ -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);
@ -306,7 +306,7 @@ export default {
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
// this.$refs.switchControl.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
}
});
},
@ -315,7 +315,7 @@ export default {
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
// this.$refs.switchControl.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
this.$refs.routeCancel.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;
}
}
}
}