This commit is contained in:
fan 2020-03-10 13:05:36 +08:00
commit 394b80e0e9
8 changed files with 91 additions and 231 deletions

View File

@ -332,7 +332,7 @@ class StationStand extends Group {
fontWeight: style.StationStand.text.fontWeight, fontWeight: style.StationStand.text.fontWeight,
fontSize: style.StationStand.text.fontSize, fontSize: style.StationStand.text.fontSize,
fontFamily: style.fontFamily, fontFamily: style.fontFamily,
text: '行扣车', text: '行扣车',
textFill: '#fff', textFill: '#fff',
textAlign: 'middle', textAlign: 'middle',
textVerticalAlign: 'top' textVerticalAlign: 'top'

View File

@ -149,7 +149,7 @@ export default {
}).catch(error => { }).catch(error => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
@ -169,7 +169,7 @@ export default {
} }
}).catch((error) => { }).catch((error) => {
this.loading = false; this.loading = false;
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
@ -189,7 +189,7 @@ export default {
}).catch(error => { }).catch(error => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //

View File

@ -137,7 +137,7 @@ export default {
} else { } else {
return ''; return '';
} }
}, }
}, },
watch: { watch: {
}, },
@ -306,7 +306,7 @@ export default {
}).catch((error) => { }).catch((error) => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
@ -329,7 +329,7 @@ export default {
}).catch((error) => { }).catch((error) => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
cancel() { cancel() {

View File

@ -1,157 +0,0 @@
<template>
<div>
<el-dialog class="beijing-01__systerm route-lock" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="10"><span>车站名称</span></el-col>
<el-col :span="10" :offset="2"><span>信号机名称</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="signalName" size="small" disabled></el-input>
</el-col>
</el-row>
<div class="table">
<span>信号按钮列表</span>
<el-table ref="table" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
:height="140">
<el-table-column prop="name" label="按钮名称">
</el-table-column>
<el-table-column prop="status" label="按钮状态">
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'RouteLock',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operate: null,
stationName: '',
signalName: ''
}
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.lock.menu.domId : '';
},
title() {
return '封锁信号按钮'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
/** status 04:封锁*/
let signal = (selected || {}).state;
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? '未封锁' : '封锁' }]
let timer = setInterval(() => {
if (this.$refs.table) {
this.$refs.table.setCurrentRow(this.tempData[0]);
clearInterval(timer);
}
}, 300);
}
this.dialogShow = true;
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.menu.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -195,7 +195,7 @@ export default {
// //
row.routeSectionList.forEach(elem => { row.routeSectionList.forEach(elem => {
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem)); const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
if (section.logicSectionCodeList && section.logicSectionCodeList.length){ if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
section.logicSectionCodeList.forEach(item => { section.logicSectionCodeList.forEach(item => {
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item)); const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
sec.cutOff = true; sec.cutOff = true;
@ -246,7 +246,7 @@ export default {
}).catch((error) => { }).catch((error) => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow(operate, error.message);
}); });
} }
}, },

View File

@ -22,10 +22,9 @@ import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -137,6 +136,11 @@ export default {
} else { } else {
this.doClose(); this.doClose();
} }
},
'$store.state.menuOperation.selectedCount': function(val) {
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Section') {
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
}
} }
}, },
computed: { computed: {
@ -176,6 +180,18 @@ export default {
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
operationHandler(buttonOperation, selectType) {
switch (buttonOperation) {
case OperationEvent.Signal.guide.button.operation: {
//
break;
}
case OperationEvent.Signal.guide.button.operation: {
//
break;
}
}
},
// // // //
// alxeFailure() { // alxeFailure() {
// const operate = { // const operate = {

View File

@ -2,7 +2,6 @@
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" /> <route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" /> <route-control ref="routeControl" />
<route-cmd-control ref="routeCmdControl" /> <route-cmd-control ref="routeCmdControl" />
<route-hand-control ref="routeHandControl" /> <route-hand-control ref="routeHandControl" />
@ -15,7 +14,6 @@
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import RouteControl from './dialog/routeControl'; import RouteControl from './dialog/routeControl';
import RouteSelection from './dialog/routeSelection'; import RouteSelection from './dialog/routeSelection';
import RouteLock from './dialog/routeLock';
import RouteCmdControl from './dialog/routeCmdControl'; import RouteCmdControl from './dialog/routeCmdControl';
import RouteHandControl from './dialog/routeHandControl'; import RouteHandControl from './dialog/routeHandControl';
import RouteDetail from './dialog/routeDetail'; import RouteDetail from './dialog/routeDetail';
@ -24,7 +22,7 @@ import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import {OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
@ -33,7 +31,6 @@ export default {
PopMenu, PopMenu,
RouteControl, RouteControl,
RouteSelection, RouteSelection,
RouteLock,
RouteCmdControl, RouteCmdControl,
RouteHandControl, RouteHandControl,
RouteDetail, RouteDetail,
@ -160,9 +157,9 @@ export default {
} }
}, },
'$store.state.menuOperation.selectedCount': function(val) { '$store.state.menuOperation.selectedCount': function(val) {
if (this.buttonOperation) { if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Signal') {
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected._type); this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
} }
} }
}, },
computed: { computed: {
@ -175,7 +172,7 @@ export default {
]), ]),
...mapGetters('map', [ ...mapGetters('map', [
'routeList' 'routeList'
]), ])
}, },
methods: { methods: {
clickEvent() { clickEvent() {
@ -235,16 +232,18 @@ export default {
// //
break; break;
} }
case OperationEvent.Signal.guide.button.operation: { case OperationEvent.Signal.setAutoInterlock.button.operation: {
// //
break; if (selectType.fleetMode != undefined) {
} if (selectType.fleetMode) {
case OperationEvent.Signal.guide.button.operation: { this.singalCancelPassModel(selectType);
// } else {
break; this.singalPassModel(selectType);
} }
case OperationEvent.Signal.guide.button.operation: {
// } else {
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]没有已锁闭进路,不能设置联锁自动进路`);
}
break; break;
} }
} }
@ -340,42 +339,6 @@ export default {
} }
}); });
}, },
// //
// lock() {
// const operate = {
// start: true,
// send: true,
// code: this.selected.code,
// type: MapDeviceType.Signal.type,
// label: MapDeviceType.Signal.label,
// operation: OperationEvent.Signal.lock.menu.operation
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.routeLock.doShow(operate.operation, this.selected);
// }
// }).catch(() => {
// this.$refs.noticeInfo.doShow(operate);
// });
// },
// //
// unlock() {
// const operate = {
// start: true,
// code: this.selected.code,
// type: MapDeviceType.Signal.type,
// label: MapDeviceType.Signal.label,
// operation: OperationEvent.Signal.unlock.menu.operation
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.routeCmdControl.doShow(operate, this.selected);
// }
// });
// },
// //
reopenSignal() { reopenSignal() {
const operate = { const operate = {
@ -456,6 +419,44 @@ export default {
} }
}); });
}, },
//
singalPassModel(selectType) {
const operate = {
start: true,
over: true,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
param: {
signalCode:selectType.code
},
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
});
},
//
singalCancelPassModel(selectType) {
const operate = {
start: true,
over: true,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
param: {
signalCode:selectType.code
},
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
});
},
// //
detail() { detail() {
const step = { const step = {

View File

@ -52,16 +52,16 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [
{ // {
label: '轨道切除', // label: '',
handler: this.split, // handler: this.split,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF // cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
}, // },
{ // {
label: '轨道激活', // label: '',
handler: this.active, // handler: this.active,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE // cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
} // }
// { // {
// label: '', // label: '',
// handler: this.undeveloped // handler: this.undeveloped