调整佛山线路行调下道岔操作

This commit is contained in:
zyy 2020-04-21 17:53:46 +08:00
parent f229bc9231
commit 75c1cffa11
2 changed files with 80 additions and 19 deletions

View File

@ -190,7 +190,7 @@ export default {
const operate = { const operate = {
over: true, over: true,
operation: OperationEvent.Switch.locate.menu.operation, operation: OperationEvent.Switch.locate.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
}; };
this.sendCommand(operate); this.sendCommand(operate);
@ -200,7 +200,7 @@ export default {
const operate = { const operate = {
over: true, over: true,
operation: OperationEvent.Switch.reverse.menu.operation, operation: OperationEvent.Switch.reverse.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
}; };
this.sendCommand(operate); this.sendCommand(operate);

View File

@ -45,11 +45,36 @@ export default {
Local: [ Local: [
], ],
Center: [ Center: [
// { {
// label: '', label: '道岔总定',
// handler: this.setSpeed, handler: this.locate,
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED 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: '道岔封闭',
handler: this.block,
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: '道岔解封',
handler: this.unblock,
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
}
] ]
}, },
menuForce: [ menuForce: [
@ -213,48 +238,84 @@ export default {
}, },
// //
locate(selectType) { locate(selectType) {
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ let code = selectType.code;
// this.$refs.switchControl.doShow(data.operate, this.selected); let type = 3;
if (!code) {
code = this.selected.code;
type = 0;
}
commitOperate(menuOperate.Switch.locate, {switchCode: code}, type).then(({valid, operate})=>{
!selectType.code && this.$refs.switchControl.doShow(operate, this.selected);
}).catch(error=>{ }).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.noticeInfo.doShow({}, error.message);
}); });
}, },
// //
reverse(selectType) { reverse(selectType) {
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ let code = selectType.code;
// this.$refs.switchControl.doShow(data.operate, this.selected); let type = 3;
if (!code) {
code = this.selected.code;
type = 0;
}
commitOperate(menuOperate.Switch.reverse, {switchCode: code}, type).then(({valid, operate})=>{
!selectType.code && this.$refs.switchControl.doShow(operate, this.selected);
}).catch(error=>{ }).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.noticeInfo.doShow({}, error.message);
}); });
}, },
// //
lock(selectType) { lock(selectType) {
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ let code = selectType.code;
// this.$refs.switchControl.doShow(data.operate, this.selected); let type = 3;
if (!code) {
code = this.selected.code;
type = 0;
}
commitOperate(menuOperate.Switch.lock, {switchCode: code}, type).then(({valid, operate})=>{
!selectType.code && this.$refs.switchControl.doShow(operate, this.selected);
}).catch(error=>{ }).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.noticeInfo.doShow({}, error.message);
}); });
}, },
// //
unlock(selectType) { unlock(selectType) {
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ let code = selectType.code;
// this.$refs.switchUnLock.doShow(data.operate, this.selected); let type = 3;
if (!code) {
code = this.selected.code;
type = 0;
}
commitOperate(menuOperate.Switch.unlock, {switchCode: code}, type).then(({valid, operate})=>{
!selectType.code && this.$refs.switchUnLock.doShow(operate, this.selected);
}).catch(error=>{ }).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.noticeInfo.doShow({}, error.message);
}); });
}, },
// //
block(selectType) { block(selectType) {
commitOperate(menuOperate.Switch.block, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ let code = selectType.code;
// this.$refs.switchControl.doShow(data.operate, this.selected); let type = 3;
if (!code) {
code = this.selected.code;
type = 0;
}
commitOperate(menuOperate.Switch.block, {switchCode: code}, type).then(({valid, operate})=>{
!selectType.code && this.$refs.switchControl.doShow(operate, this.selected);
}).catch(error=>{ }).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.noticeInfo.doShow({}, error.message);
}); });
}, },
// //
unblock(selectType) { unblock(selectType) {
commitOperate(menuOperate.Switch.unblock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ let code = selectType.code;
// this.$refs.switchUnLock.doShow(data.operate, this.selected); let type = 3;
if (!code) {
code = this.selected.code;
type = 0;
}
commitOperate(menuOperate.Switch.unblock, {switchCode: code}, type).then(({valid, operate})=>{
!selectType.code && this.$refs.switchUnLock.doShow(operate, this.selected);
}).catch(error=>{ }).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.noticeInfo.doShow({}, error.message);
}); });