北京一成都线路手动设置zc故障

This commit is contained in:
joylink_cuiweidong 2020-07-06 18:45:15 +08:00
parent 8d09215323
commit a6b2f62c3e
3 changed files with 25 additions and 82 deletions

View File

@ -4,6 +4,7 @@
<station-cmd-control ref="stationCmdControl" />
<station-human-control-all ref="stationHumanControlAll" />
<station-set-route-control-all ref="stationSetRouteControlAll" />
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
</div>
</template>
@ -20,12 +21,15 @@ import { DeviceMenu } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
// import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StationMenu',
components: {
PopMenu,
SetFault,
StationCmdControl,
StationHumanControlAll,
StationSetRouteControlAll,
@ -162,42 +166,18 @@ export default {
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//

View File

@ -1,6 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="chengdou-01__systerm" />
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
</div>
</template>
@ -12,11 +13,14 @@ import CancelMouseState from '@/mixin/CancelMouseState';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StationMenu',
components: {
PopMenu,
SetFault,
NoticeInfo
},
mixins: [
@ -98,38 +102,18 @@ export default {
},
//
setStoppage() {
const operate = {
code: this.selected.code,
operation: OperationEvent.Station.stoppage.menu.operation
};
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
code: this.selected.code,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
}

View File

@ -1,6 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
@ -11,13 +12,15 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CancelMouseState from '@/mixin/CancelMouseState';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StationMenu',
components: {
PopMenu,
SetFault,
NoticeInfo
},
mixins: [
@ -100,42 +103,18 @@ export default {
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.stoppage.menu.operation
};
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
}