福州三号线车辆端 信号机 添加操作指令

This commit is contained in:
joylink_cuiweidong 2021-09-07 13:05:30 +08:00
parent c699a09431
commit 67bf5babb0
2 changed files with 57 additions and 40 deletions

View File

@ -26,7 +26,7 @@
<button :id="Signal.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.unlock.button.operation)">
<span class="buttonColor">钮解</span>
</button>
<button :id="Command.cancel.clearMbm.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)">
<button :id="Signal.cancelTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.cancelTrainRoute.button.operation)">
<span class="buttonColor">取消</span>
</button>
<button :id="Section.fault.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor,color:'#DA2D29'}" @click="buttonDown(Section.fault.button.operation)">
@ -69,7 +69,7 @@ import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordIn
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import Handler from '@/scripts/cmdPlugin/Handler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name:'MenuDeplotButton',
components: {
@ -186,7 +186,7 @@ export default {
buttonDown(operation) {
//
this.deviceList = [];
if (operation != this.Command.cancel.clearMbm.operation) {
// if (operation != this.Command.cancel.clearMbm.operation) {
const operate = {
operation: operation
};
@ -212,20 +212,19 @@ export default {
this.$store.dispatch('training/emitTipFresh');
}
});
} else {
const operate = {
start: true,
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', null);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.clear(); //
}
});
}
// } else {
// const operate = {
// start: true,
// operation: operation
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/setButtonOperation', null);
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// Handler.clear(); //
// }
// });
// }
}
}
};

View File

@ -247,6 +247,7 @@ export default {
},
operationHandler(buttonOperation, selectType) {
switch (buttonOperation) {
//
case OperationEvent.Signal.lock.button.operation: {
commitOperate(menuOperate.Signal.lock, {signalCode: selectType.code}, 3).then(({valid, operate}) => {
if (valid) {
@ -260,7 +261,8 @@ export default {
});
break;
}
case OperationEvent.Signal.lock.unlock.operation: {
//
case OperationEvent.Signal.unlock.button.operation: {
// this.unlock(selectType);
commitOperate(menuOperate.Signal.unlock, {signalCode: selectType.code}, 3).then(({valid, operate}) => {
if (valid) {
@ -274,6 +276,22 @@ export default {
});
break;
}
//
case OperationEvent.Signal.cancelTrainRoute.button.operation: {
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode: selectType.code}, 3).then(({valid, operate}) => {
if (valid) {
// this.$refs.routeLock.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow();
}
}).catch(error=>{
console.error(error);
this.$refs.noticeInfo.doShow();
});
break;
}
//
//
default: {
break;
}