调整佛山线路行调下道岔操作
This commit is contained in:
parent
f229bc9231
commit
75c1cffa11
@ -190,7 +190,7 @@ export default {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
@ -200,7 +200,7 @@ export default {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
|
@ -45,11 +45,36 @@ export default {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '设置临时限速',
|
||||
// handler: this.setSpeed,
|
||||
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
// },
|
||||
{
|
||||
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: '道岔封闭',
|
||||
handler: this.block,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -213,48 +238,84 @@ export default {
|
||||
},
|
||||
// 单操到定位
|
||||
locate(selectType) {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
let code = selectType.code;
|
||||
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=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse(selectType) {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
let code = selectType.code;
|
||||
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=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock(selectType) {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
let code = selectType.code;
|
||||
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=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
let code = selectType.code;
|
||||
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=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔封锁
|
||||
block(selectType) {
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
let code = selectType.code;
|
||||
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=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unblock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
let code = selectType.code;
|
||||
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=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user