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

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

View File

@ -247,6 +247,7 @@ export default {
}, },
operationHandler(buttonOperation, selectType) { operationHandler(buttonOperation, selectType) {
switch (buttonOperation) { switch (buttonOperation) {
//
case OperationEvent.Signal.lock.button.operation: { case OperationEvent.Signal.lock.button.operation: {
commitOperate(menuOperate.Signal.lock, {signalCode: selectType.code}, 3).then(({valid, operate}) => { commitOperate(menuOperate.Signal.lock, {signalCode: selectType.code}, 3).then(({valid, operate}) => {
if (valid) { if (valid) {
@ -260,7 +261,8 @@ export default {
}); });
break; break;
} }
case OperationEvent.Signal.lock.unlock.operation: { //
case OperationEvent.Signal.unlock.button.operation: {
// this.unlock(selectType); // this.unlock(selectType);
commitOperate(menuOperate.Signal.unlock, {signalCode: selectType.code}, 3).then(({valid, operate}) => { commitOperate(menuOperate.Signal.unlock, {signalCode: selectType.code}, 3).then(({valid, operate}) => {
if (valid) { if (valid) {
@ -274,6 +276,22 @@ export default {
}); });
break; 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: { default: {
break; break;
} }