This commit is contained in:
lVAL 2021-02-19 18:30:34 +08:00
commit c6ecccc788
13 changed files with 467 additions and 141 deletions

View File

@ -248,7 +248,11 @@ export default {
reopenSignal() { reopenSignal() {
switch (this.popClass) { switch (this.popClass) {
case 'ningbo-01__systerm': case 'ningbo-01__systerm':
this.sendCommand(menuOperate.Signal.reopenSignal); // this.sendCommand(menuOperate.Signal.reopenSignal);
this.sendCommandNext(menuOperate.Signal.reopenSignal).then(operate => {
operate.message = `命令:信号重开<br/>信号机:${this.stationName} ${this.signalName}`;
this.$refs.ningBoConfirmTip.doShow(operate);
});
break; break;
case 'fuzhou-01__systerm': case 'fuzhou-01__systerm':
this.sendCommandNext(menuOperate.Signal.reopenSignal).then(operate => { this.sendCommandNext(menuOperate.Signal.reopenSignal).then(operate => {
@ -268,15 +272,15 @@ export default {
}, },
// //
lock() { lock() {
// switch (this.popClass) { switch (this.popClass) {
// case 'chengdou-03__systerm': case 'ningbo-01__systerm':
// this.sendCommandNext(menuOperate.Signal.lock).then(operate => { this.sendCommandNext(menuOperate.Signal.lock).then(operate => {
// this.$refs.password.doShow(operate); operate.message = `命令:信号封锁<br/>设备:${this.stationName} ${this.signalName}`;
// }); this.$refs.ningBoConfirmTip.doShow(operate);
// break; });
// default: this.sendCommand(menuOperate.Signal.lock); break;
// } default: this.sendCommand(menuOperate.Signal.lock);
this.sendCommand(menuOperate.Signal.lock); }
}, },
// //
unlock() { unlock() {
@ -300,11 +304,27 @@ export default {
}, },
// //
singalPassModel() { singalPassModel() {
this.sendCommand(menuOperate.Signal.setAutoInterlock); switch (this.popClass) {
case 'ningbo-01__systerm':
this.sendCommandNext(menuOperate.Signal.setAutoInterlock).then(operate => {
operate.message = `命令:设置自动通过<br/>信号机:${this.stationName} ${this.signalName}`;
this.$refs.ningBoConfirmTip.doShow(operate);
});
break;
default: this.sendCommand(menuOperate.Signal.setAutoInterlock);
}
}, },
// //
singalCancelPassModel() { singalCancelPassModel() {
this.sendCommand(menuOperate.Signal.cancelAutoInterlock); switch (this.popClass) {
case 'ningbo-01__systerm':
this.sendCommandNext(menuOperate.Signal.cancelAutoInterlock).then(operate => {
operate.message = `命令:取消自动通过<br/>信号机:${this.stationName} ${this.signalName}`;
this.$refs.ningBoConfirmTip.doShow(operate);
});
break;
default: this.sendCommand(menuOperate.Signal.cancelAutoInterlock);
}
}, },
// //
setAutoTrigger() { setAutoTrigger() {

View File

@ -70,6 +70,7 @@
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" :pop-class="systemName" /> <notice-info ref="noticeInfo" :pop-class="systemName" />
<ning-bo-confirm-tip ref="ningBoConfirmTip" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -78,6 +79,7 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confirmTip';
// import { mouseCancelState } from '../utils/menuItemStatus'; // import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from '../childDialog/noticeInfo'; import NoticeInfo from '../childDialog/noticeInfo';
import {menuOperate, commitOperate} from '../../utils/menuOperate'; import {menuOperate, commitOperate} from '../../utils/menuOperate';
@ -85,7 +87,8 @@ import {menuOperate, commitOperate} from '../../utils/menuOperate';
export default { export default {
name: 'RouteHandControl', name: 'RouteHandControl',
components: { components: {
NoticeInfo NoticeInfo,
NingBoConfirmTip
}, },
props:{ props:{
systemName:{ systemName:{
@ -111,7 +114,8 @@ export default {
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'signalList' 'signalList',
'routeData'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -306,33 +310,71 @@ export default {
humanControl() { humanControl() {
this.loading = true; this.loading = true;
const val = this.systemName === 'xian-01__systerm' || this.systemName === 'fuzhou-01__systerm' ? `${this.selection[0]}` : ''; const val = this.systemName === 'xian-01__systerm' || this.systemName === 'fuzhou-01__systerm' ? `${this.selection[0]}` : '';
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2, val).then(({valid})=>{ if (this.systemName === 'ningbo-01__systerm') {
this.loading = false; commitOperate(menuOperate.Signal.humanControl, {routeCodeList: this.selection}, 1).then(({valid, operate}) => {
if (valid) { this.loading = false;
if (valid) {
this.doClose();
let msg = '';
this.selection.forEach(item => {
msg = msg + `<br/>进路:${this.routeData[item].name + (this.routeData[item].turnBack ? '(Z)' : '')}`;
});
operate.message = `命令:进路交人工控<br/>始端信号机:${this.stationName} ${this.signalName}` + msg;
this.$refs.ningBoConfirmTip.doShow(operate);
}
}).catch((error) => {
this.loading = false;
this.doClose(); this.doClose();
} this.$refs.noticeInfo.doShow();
}).catch((error) => { });
this.loading = false; } else {
this.doClose(); commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2, val).then(({valid})=>{
console.error(error); this.loading = false;
this.$refs.noticeInfo.doShow(); if (valid) {
}); this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
}
}, },
// //
atsAutoControl() { atsAutoControl() {
this.loading = true; this.loading = true;
const val = this.systemName === 'xian-01__systerm' || this.systemName === 'fuzhou-01__systerm' ? `${this.selection[0]}` : ''; const val = this.systemName === 'xian-01__systerm' || this.systemName === 'fuzhou-01__systerm' ? `${this.selection[0]}` : '';
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2, val).then(({valid})=>{ if (this.systemName === 'ningbo-01__systerm') {
this.loading = false; commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList: this.selection}, 1).then(({valid, operate}) => {
if (valid) { this.loading = false;
if (valid) {
this.doClose();
let msg = '';
this.selection.forEach(item => {
msg = msg + `<br/>进路:${this.routeData[item].name + (this.routeData[item].turnBack ? '(Z)' : '')}`;
});
operate.message = `命令:进路交自动控<br/>始端信号机:${this.stationName} ${this.signalName}` + msg;
this.$refs.ningBoConfirmTip.doShow(operate);
}
}).catch((error) => {
this.loading = false;
this.doClose(); this.doClose();
} this.$refs.noticeInfo.doShow();
}).catch((error) => { });
this.loading = false; } else {
this.doClose(); commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2, val).then(({valid})=>{
console.error(error); this.loading = false;
this.$refs.noticeInfo.doShow(); if (valid) {
}); this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
}, },
cancel() { cancel() {
const operate = { const operate = {

View File

@ -43,6 +43,7 @@
</el-row> </el-row>
<notice-info ref="noticeInfo" :pop-class="popClass" /> <notice-info ref="noticeInfo" :pop-class="popClass" />
<password-box ref="passwordBox" :pop-class="popClass" @checkOver="passWordCommit" /> <password-box ref="passwordBox" :pop-class="popClass" @checkOver="passWordCommit" />
<ning-bo-confirm-tip ref="ningBoConfirmTip" />
</el-dialog> </el-dialog>
</template> </template>
@ -51,13 +52,15 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../childDialog/noticeInfo'; import NoticeInfo from '../childDialog/noticeInfo';
import PasswordBox from '../childDialog/passwordInputBox'; import PasswordBox from '../childDialog/passwordInputBox';
import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confirmTip';
import {menuOperate, commitOperate} from '../../utils/menuOperate'; import {menuOperate, commitOperate} from '../../utils/menuOperate';
export default { export default {
name: 'SectionControl', name: 'SectionControl',
components: { components: {
NoticeInfo, NoticeInfo,
PasswordBox PasswordBox,
NingBoConfirmTip
}, },
props: { props: {
popClass: { popClass: {
@ -172,11 +175,27 @@ export default {
}, },
// //
split() { split() {
this.sendCommand(menuOperate.Section.split); switch (this.popClass) {
case 'ningbo-01__systerm':
this.sendCommandNext(menuOperate.Section.split).then(operate => {
operate.message = `命令:区段切除<br/>轨道:${this.stationName} ${this.sectionName}`;
this.$refs.ningBoConfirmTip.doShow(operate);
});
break;
default: this.sendCommand(menuOperate.Section.split);
}
}, },
// //
active() { active() {
this.sendCommand(menuOperate.Section.active); switch (this.popClass) {
case 'ningbo-01__systerm':
this.sendCommandNext(menuOperate.Section.active).then(operate => {
operate.message = `命令:区段激活<br/>轨道:${this.stationName} ${this.sectionName}`;
this.$refs.ningBoConfirmTip.doShow(operate);
});
break;
default: this.sendCommand(menuOperate.Section.active);
}
}, },
// //
axlePreReset() { axlePreReset() {
@ -219,6 +238,25 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
sendCommandNext(operate) {
const that = this;
return new Promise(function(resolve, reject) {
that.loading = true;
commitOperate(operate, {}, 1).then(({valid})=>{
that.loading = false;
if (valid) {
that.doClose();
that.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
resolve({...operate});
}
}).catch((error) => {
that.loading = false;
that.doClose();
console.error(error);
that.$refs.noticeInfo.doShow();
});
});
},
cancel() { cancel() {
const operate = { const operate = {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation

View File

@ -342,6 +342,7 @@ export default {
this.disabledConfirm2 = true; this.disabledConfirm2 = true;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.message = '发送 Second Confirm消息成功请等待服务器'; this.message = '发送 Second Confirm消息成功请等待服务器';
setTimeout(() => { this.doClose(); }, 1000);
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();

View File

@ -346,7 +346,14 @@ export default {
}, },
// //
earlyDeparture() { earlyDeparture() {
this.sendCommand(menuOperate.StationStand.earlyDeparture); if (this.systemName === 'ningbo-01__systerm') {
this.sendCommandNext(menuOperate.StationStand.earlyDeparture).then(operate => {
operate.message = `命令:提前发车<br/>范围:${this.radio2 === '1' ? '本站台上行' : '本站台下行'}<br/>车站:${this.stationName}<br/>站台:${this.standName}`;
this.$refs.ningBoConfirmTip.doShow(operate);
});
} else {
this.sendCommand(menuOperate.StationStand.earlyDeparture);
}
}, },
// //
cancelDetainTrainForce() { cancelDetainTrainForce() {

View File

@ -5,7 +5,7 @@
:class="popClass" :class="popClass"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="400px" width="500px"
:before-close="doClose" :before-close="doClose"
:z-index="2000" :z-index="2000"
:modal="false" :modal="false"
@ -90,6 +90,11 @@ export default {
name: '跳停', name: '跳停',
value: '', value: '',
level: 2 level: 2
},
{
name: '区间自动扣车',
value: '',
level: 2
} }
], ],
name: '站台基本信息', name: '站台基本信息',
@ -180,6 +185,8 @@ export default {
this.treeData[0].children[2].value = selected.parkingTime >= 0 ? `${selected.parkingTime}` : '自动'; this.treeData[0].children[2].value = selected.parkingTime >= 0 ? `${selected.parkingTime}` : '自动';
// //
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置'; this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
//
this.treeData[0].children[4].value = selected.trainLimit > 0 ? '允许自动扣车' : '不允许自动扣车';
if (!stationStand || !station) { if (!stationStand || !station) {
this.treeData[2].children[0].value = `自动`; this.treeData[2].children[0].value = `自动`;

View File

@ -67,96 +67,199 @@ export default {
this.message = operate.message || ''; this.message = operate.message || '';
this.dialogShow = true; this.dialogShow = true;
this.operation = operate.operation; this.operation = operate.operation;
console.log(this.operation, '--');
}, },
confirm() { confirm() {
try { if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) { const step = {
const step = { operation: OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation,
operation: OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation, cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE };
}; commitOperate(step, {}, 2).then(({valid, operate})=>{
commitOperate(step, {}, 2).then(({valid, operate})=>{ if (valid) {
if (valid) { this.$emit('close');
this.$emit('close'); this.doClose();
this.doClose(); }
} }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
}); } else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) { const step = {
const step = { operation: OperationEvent.Signal.cancelTrainRoute.secondaryConfirm.operation,
operation: OperationEvent.Signal.cancelTrainRoute.secondaryConfirm.operation, cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE };
}; commitOperate(step, {}, 2).then(({valid}) => {
commitOperate(step, {}, 2).then(({valid}) => { if (valid) {
if (valid) { this.doClose();
this.doClose(); }
} }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
}); } else if (this.operation === OperationEvent.StationStand.setDetainTrain.menu.operation) {
} else if (this.operation === OperationEvent.StationStand.setDetainTrain.menu.operation) { const step = {
const step = { operation: OperationEvent.StationStand.setDetainTrain.secondaryConfirm.operation,
operation: OperationEvent.StationStand.setDetainTrain.secondaryConfirm.operation, cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN };
}; commitOperate(step, {}, 2).then(({valid}) => {
commitOperate(step, {}, 2).then(({valid}) => { if (valid) {
if (valid) { this.doClose();
this.doClose(); }
} }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
}); } else if (this.operation === OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
} else if (this.operation === OperationEvent.StationStand.cancelDetainTrain.menu.operation) { const step = {
const step = { operation: OperationEvent.StationStand.cancelDetainTrain.secondaryConfirm.operation,
operation: OperationEvent.StationStand.cancelDetainTrain.secondaryConfirm.operation, cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN };
}; commitOperate(step, {}, 2).then(({valid}) => {
commitOperate(step, {}, 2).then(({valid}) => { if (valid) {
if (valid) { this.doClose();
this.doClose(); }
} }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
}); } else if (this.operation === OperationEvent.Switch.locate.menu.operation) {
} else if (this.operation === OperationEvent.Switch.locate.menu.operation) { const step = {
const step = { operation: OperationEvent.Switch.locate.secondaryConfirm.operation,
operation: OperationEvent.Switch.locate.secondaryConfirm.operation, cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION };
}; commitOperate(step, {}, 2).then(({valid}) => {
commitOperate(step, {}, 2).then(({valid}) => { if (valid) {
if (valid) { this.doClose();
this.doClose(); }
} }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
}); } else if (this.operation === OperationEvent.Switch.reverse.menu.operation) {
} else if (this.operation === OperationEvent.Switch.reverse.menu.operation) { const step = {
const step = { operation: OperationEvent.Switch.reverse.secondaryConfirm.operation,
operation: OperationEvent.Switch.reverse.secondaryConfirm.operation, cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION };
}; commitOperate(step, {}, 2).then(({valid}) => {
commitOperate(step, {}, 2).then(({valid}) => { if (valid) {
if (valid) { this.doClose();
this.doClose(); }
} }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
}); } else if (this.operation === OperationEvent.Switch.lock.menu.operation) {
} else if (this.operation === OperationEvent.Switch.lock.menu.operation) { const step = {
const step = { operation: OperationEvent.Switch.lock.secondaryConfirm.operation,
operation: OperationEvent.Switch.lock.secondaryConfirm.operation, cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK };
}; commitOperate(step, {}, 2).then(({valid}) => {
commitOperate(step, {}, 2).then(({valid}) => { if (valid) {
if (valid) { this.doClose();
this.doClose(); }
} }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
}); } else if (this.operation === OperationEvent.Switch.block.menu.operation) {
} else if (this.operation === OperationEvent.Switch.block.menu.operation) { const step = {
const step = { operation: OperationEvent.Switch.block.secondaryConfirm.operation,
operation: OperationEvent.Switch.block.secondaryConfirm.operation, cmdType: CMD.Switch.CMD_SWITCH_BLOCK
cmdType: CMD.Switch.CMD_SWITCH_BLOCK };
}; commitOperate(step, {}, 2).then(({valid}) => {
commitOperate(step, {}, 2).then(({valid}) => { if (valid) {
if (valid) { this.doClose();
this.doClose(); }
} }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
}); } else if (this.operation === OperationEvent.Signal.lock.menu.operation) {
} const step = {
} catch (e) { operation: OperationEvent.Signal.lock.secondaryConfirm.operation,
console.error(e); cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
this.doClose(); };
this.$refs.noticeInfo.doShow(); commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
const step = {
operation: OperationEvent.Signal.reopenSignal.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.Signal.setAutoInterlock.menu.operation) {
const step = {
operation: OperationEvent.Signal.setAutoInterlock.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
const step = {
operation: OperationEvent.Signal.cancelAutoInterlock.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
const step = {
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
const step = {
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.StationStand.earlyDeparture.menu.operation) {
const step = {
operation: OperationEvent.StationStand.earlyDeparture.secondaryConfirm.operation,
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.Section.split.menu.operation) {
const step = {
operation: OperationEvent.Section.split.secondaryConfirm.operation,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.Section.active.menu.operation) {
const step = {
operation: OperationEvent.Section.active.secondaryConfirm.operation,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
const step = {
operation: OperationEvent.Signal.humanControl.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
const step = {
operation: OperationEvent.Signal.atsAutoControl.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} }
}, },
doClose() { doClose() {

View File

@ -89,6 +89,20 @@ export default {
this.doClose(); this.doClose();
} }
}); });
} else if (this.operation === OperationEvent.Switch.unblock.confirm.operation) {
commitOperate({ operation: this.operation }, {}, 1).then(({valid, operate}) => {
if (valid) {
this.$emit('executeConfirm', operate);
this.doClose();
}
});
} else if (this.operation === OperationEvent.Signal.unlock.confirm.operation) {
commitOperate({ operation: this.operation }, {}, 1).then(({valid, operate}) => {
if (valid) {
this.$emit('executeConfirm', operate);
this.doClose();
}
});
} }
}, },
doClose() { doClose() {

View File

@ -40,12 +40,14 @@
</el-row> </el-row>
<confirm-control ref="confirmControl" /> <confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<confirm-tip ref="confirmTip" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import ConfirmTip from './childDialog/confirmTip';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus'; import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
@ -54,7 +56,8 @@ export default {
name: 'RouteControl', name: 'RouteControl',
components: { components: {
ConfirmControl, ConfirmControl,
NoticeInfo NoticeInfo,
ConfirmTip
}, },
data() { data() {
return { return {
@ -139,11 +142,17 @@ export default {
}, },
// //
singalPassModel() { singalPassModel() {
this.sendCommand(menuOperate.Signal.setAutoTurnBack); this.sendCommandNext(menuOperate.Signal.setAutoTurnBack).then(operate => {
operate.message = `命令:设置折返<br/>车站:${this.stationName}<br/>折返:${this.signalName}`;
this.$refs.confirmTip.doShow(operate);
});
}, },
// //
singalCancelPassModel() { singalCancelPassModel() {
this.sendCommand(menuOperate.Signal.cancelAutoTurnBack); this.sendCommandNext(menuOperate.Signal.cancelAutoTurnBack).then(operate => {
operate.message = `命令:取消折返<br/>车站:${this.stationName}<br/>折返:${this.signalName}`;
this.$refs.confirmTip.doShow(operate);
});
}, },
sendCommand(operate) { sendCommand(operate) {
this.loading = true; this.loading = true;
@ -156,6 +165,25 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
sendCommandNext(operate) {
const that = this;
return new Promise(function(resolve, reject) {
that.loading = true;
commitOperate(operate, {}, 1).then(({valid})=>{
that.loading = false;
if (valid) {
that.doClose();
that.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
resolve({...operate});
}
}).catch((error) => {
that.loading = false;
that.doClose();
console.error(error);
that.$refs.noticeInfo.doShow();
});
});
},
// //
cancel() { cancel() {
const operate = { const operate = {

View File

@ -10,6 +10,7 @@
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="ningbo-01__systerm" /> <set-fault ref="setFault" pop-class="ningbo-01__systerm" />
<password-input ref="passwordInput" @confirm="passwordConfirm" /> <password-input ref="passwordInput" @confirm="passwordConfirm" />
<operate-confirm ref="operateConfirm" @executeConfirm="executeConfirm" />
</div> </div>
</template> </template>
@ -23,6 +24,7 @@ import RouteHandControl from '@/jmapNew/theme/components/menus/dialog/routeHandC
import RouterCommand from './dialog/routerCommand'; import RouterCommand from './dialog/routerCommand';
import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail'; import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import OperateConfirm from './dialog/childDialog/operateConfirm';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
@ -43,7 +45,8 @@ export default {
RouterCommand, RouterCommand,
NoticeInfo, NoticeInfo,
SetFault, SetFault,
PasswordInput PasswordInput,
OperateConfirm
}, },
props: { props: {
selected: { selected: {
@ -77,12 +80,12 @@ export default {
type: 'separator' type: 'separator'
}, },
{ {
label: 'Fleet进路办理', label: '设置自动通过进路',
handler: this.singalPassModel, handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
}, },
{ {
label: 'Fleet进路取消', label: '取消自动通过进路',
handler: this.singalCancelPassModel, handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
}, },
@ -232,7 +235,11 @@ export default {
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce; this.menu = this.menuForce;
} }
},
executeConfirm(operate) {
if (operate.operation === OperationEvent.Signal.unlock.confirm.operation) {
this.$refs.routeUnLock.doShow(menuOperate.Signal.unlock, this.selected);
}
}, },
doShow(point) { doShow(point) {
this.clickEvent(); this.clickEvent();
@ -284,7 +291,11 @@ export default {
unlock() { unlock() {
commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.routeUnLock.doShow(operate, this.selected); const nextOperate = {
message: '是否执行信号解封命令?',
operation: OperationEvent.Signal.unlock.confirm.operation
};
this.$refs.operateConfirm.doShow(nextOperate);
} }
}); });
}, },

View File

@ -244,12 +244,15 @@ export default {
operation: OperationEvent.Switch.unlock.confirm.operation operation: OperationEvent.Switch.unlock.confirm.operation
}; };
this.$refs.operateConfirm.doShow(nextOperate); this.$refs.operateConfirm.doShow(nextOperate);
// this.$refs.sectionUnLock.doShow(nextOperate, this.selected);
} }
}); });
}, },
executeConfirm(operate) { executeConfirm(operate) {
this.$refs.sectionUnLock.doShow(menuOperate.Switch.unlock, this.selected); if (operate.operation === OperationEvent.Switch.unlock.confirm.operation) {
this.$refs.sectionUnLock.doShow(menuOperate.Switch.unlock, this.selected);
} else if (operate.operation === OperationEvent.Switch.unblock.confirm.operation) {
this.$refs.sectionUnLock.doShow(menuOperate.Switch.unblock, this.selected);
}
}, },
// //
block() { block() {
@ -263,7 +266,12 @@ export default {
unblock() { unblock() {
commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.sectionUnLock.doShow(operate, this.selected); // this.$refs.sectionUnLock.doShow(operate, this.selected);
const nextOperate = {
message: '是否执行信号解封命令?',
operation: OperationEvent.Switch.unblock.confirm.operation
};
this.$refs.operateConfirm.doShow(nextOperate);
} }
}); });
}, },

View File

@ -1150,6 +1150,10 @@ export const OperationEvent = {
menuButton: { menuButton: {
operation: '3042', operation: '3042',
domId: '_Tips-Signal-Reopen-Menu{BOTTOM}' domId: '_Tips-Signal-Reopen-Menu{BOTTOM}'
},
secondaryConfirm: {
operation: '3043',
domId: '_Tips-Signal-Reopen-SecondaryConfirm'
} }
}, },
// 人解列车进路 (总人解) // 人解列车进路 (总人解)
@ -1196,6 +1200,10 @@ export const OperationEvent = {
confirm1: { confirm1: {
operation: '3064', operation: '3064',
domId: '_Tips-Signal-Lock-Confirm1' domId: '_Tips-Signal-Lock-Confirm1'
},
secondaryConfirm: {
operation: '3065',
domId: '_Tips-Signal-Lock-SecondaryConfirm'
} }
}, },
// 解锁 // 解锁
@ -1297,6 +1305,10 @@ export const OperationEvent = {
menuButton: { menuButton: {
operation: '3092', operation: '3092',
domId: '_Tips-Signal-SetAutoInterlock-Menu{BOTTOM}' domId: '_Tips-Signal-SetAutoInterlock-Menu{BOTTOM}'
},
secondaryConfirm: {
operation: '3093',
domId: '_Tips-Signal-SetAutoInterlock-SecondaryConfirm'
} }
}, },
// 取消联锁自动进路 // 取消联锁自动进路
@ -1312,6 +1324,10 @@ export const OperationEvent = {
menuButton:{ menuButton:{
operation: '3102', operation: '3102',
domId: '_Tips-Signal-CancelAutoInterlock-Menu{BOTTOM}' domId: '_Tips-Signal-CancelAutoInterlock-Menu{BOTTOM}'
},
secondaryConfirm: {
operation: '3103',
domId: '_Tips-Signal-CancelAutoInterlock-SecondaryConfirm'
} }
}, },
// 设置联锁自动触发 // 设置联锁自动触发
@ -1380,6 +1396,10 @@ export const OperationEvent = {
menuButton:{ menuButton:{
operation: '3143', operation: '3143',
domId: '_Tips-Signal-HumanControl-Menu{BOTTOM}' domId: '_Tips-Signal-HumanControl-Menu{BOTTOM}'
},
secondaryConfirm: {
operation: '3144',
domId: '_Tips-Signal-HumanControl-SecondaryConfirm'
} }
}, },
// 进路交自动控 // 进路交自动控
@ -1403,6 +1423,10 @@ export const OperationEvent = {
menuButton:{ menuButton:{
operation: '3153', operation: '3153',
domId: '_Tips-Signal-AtsAutoControl-Menu{BOTTOM}' domId: '_Tips-Signal-AtsAutoControl-Menu{BOTTOM}'
},
secondaryConfirm: {
operation: '3154',
domId: '_Tips-Signal-HumanControl-SecondaryConfirm'
} }
}, },
// 查询进路状态 // 查询进路状态
@ -1600,6 +1624,10 @@ export const OperationEvent = {
mbar: { mbar: {
operation: '4051', operation: '4051',
domId: '_Tips-Section-split-Mbar' domId: '_Tips-Section-split-Mbar'
},
secondaryConfirm: {
operation: '4052',
domId: '_Tips-Section-split-SecondaryConfirm'
} }
}, },
// 激活 // 激活
@ -1611,6 +1639,10 @@ export const OperationEvent = {
mbar: { mbar: {
operation: '4061', operation: '4061',
domId: '_Tips-Section-Active-mbar' domId: '_Tips-Section-Active-mbar'
},
secondaryConfirm: {
operation: '4062',
domId: '_Tips-Section-Active-SecondaryConfirm'
} }
}, },
// 设置速度 // 设置速度
@ -1883,6 +1915,10 @@ export const OperationEvent = {
downSelect: { downSelect: {
operation: '5012', operation: '5012',
domId: '_Tips-Stand-EarlyDeparture-downSelect' domId: '_Tips-Stand-EarlyDeparture-downSelect'
},
secondaryConfirm: {
operation: '5013',
domId: '_Tips-Stand-EarlyDeparture-SecondaryConfirm'
} }
}, },
// 设置跳停 // 设置跳停
@ -2830,6 +2866,10 @@ export const OperationEvent = {
confirm: { confirm: {
operation: '9001', operation: '9001',
domId: '_Tips-Turn-Back-confirm-Menu' domId: '_Tips-Turn-Back-confirm-Menu'
},
secondaryConfirm: {
operation: '9002',
domId: '_Tips-Turn-Back-SecondaryConfirm'
} }
}, },
CancelAutoTurnBackButton: { CancelAutoTurnBackButton: {
@ -2840,6 +2880,10 @@ export const OperationEvent = {
confirm: { confirm: {
operation: '9011', operation: '9011',
domId: '_Tips-Turn-Back-confirm-Menu' domId: '_Tips-Turn-Back-confirm-Menu'
},
secondaryConfirm: {
operation: '9012',
domId: '_Tips-Turn-Back-SecondaryConfirm'
} }
} }
}, },

View File

@ -98,7 +98,8 @@ export default {
'signalHumanControlBeforeSetAtsControlOrCIAutoTrigger', 'signalHumanControlBeforeSetAtsControlOrCIAutoTrigger',
'adjustOperationAutomatically', 'adjustOperationAutomatically',
'setRouteBeforeSetFlt', 'setRouteBeforeSetFlt',
'cancelRouteWhenCancelFlt' 'cancelRouteWhenCancelFlt',
'needApproachLockBeforeSetGuide'
], ],
selectList: ['runMode'], selectList: ['runMode'],
generalConfig: [ generalConfig: [
@ -127,7 +128,8 @@ export default {
'signalHumanControlBeforeSetAtsControlOrCIAutoTrigger', 'signalHumanControlBeforeSetAtsControlOrCIAutoTrigger',
'adjustOperationAutomatically', 'adjustOperationAutomatically',
'setRouteBeforeSetFlt', 'setRouteBeforeSetFlt',
'cancelRouteWhenCancelFlt' 'cancelRouteWhenCancelFlt',
'needApproachLockBeforeSetGuide'
], ],
rangeList: ['noParkingSM', 'parkingSM'], rangeList: ['noParkingSM', 'parkingSM'],
speedList: ['rmAtpSpeed', 'urmAtpSpeed'], speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
@ -161,7 +163,8 @@ export default {
signalHumanControlBeforeSetAtsControlOrCIAutoTrigger: '在设置自排开或自动触发之前,信号机需处于人工控状态', signalHumanControlBeforeSetAtsControlOrCIAutoTrigger: '在设置自排开或自动触发之前,信号机需处于人工控状态',
adjustOperationAutomatically: 'ATS自动调整运行', adjustOperationAutomatically: 'ATS自动调整运行',
setRouteBeforeSetFlt: '在办理车队进路前是否要先排列进路', setRouteBeforeSetFlt: '在办理车队进路前是否要先排列进路',
cancelRouteWhenCancelFlt: '在取消车队进路时同时取消进路' cancelRouteWhenCancelFlt: '在取消车队进路时同时取消进路',
needApproachLockBeforeSetGuide: '办理引导前需要信号机接近锁闭'
} }
}; };
}, },