北京一号线 步骤操作代码调整

This commit is contained in:
joylink_cuiweidong 2020-03-30 13:33:53 +08:00
parent dee1efe00f
commit 3a383793f8
9 changed files with 65 additions and 28 deletions

View File

@ -127,8 +127,11 @@ export default {
//
cancelTrainRoute() {
this.loading = true;
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then((data)=>{
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
@ -138,9 +141,12 @@ export default {
//
signalClose() {
this.loading = true;
commitOperate(menuOperate.Signal.signalClose, {}, 1).then((data)=>{
commitOperate(menuOperate.Signal.signalClose, {}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
this.$refs.confirmControl.doShow(data.operate);
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
@ -149,8 +155,11 @@ export default {
//
reopenSignal() {
this.loading = true;
commitOperate(menuOperate.Signal.reopenSignal, {}, 2).then((data)=>{
commitOperate(menuOperate.Signal.reopenSignal, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();

View File

@ -279,8 +279,11 @@ export default {
//
humanControl() {
this.loading = true;
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then((data)=>{
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
@ -290,8 +293,11 @@ export default {
//
atsAutoControl() {
this.loading = true;
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then((data)=>{
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();

View File

@ -225,8 +225,11 @@ export default {
commit() {
if (this.row && this.row.canSetting) {
this.loading = true;
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then((data)=>{
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();

View File

@ -188,8 +188,11 @@ export default {
},
sendCommand(operate) { //
this.loading = true;
commitOperate(operate, {}, 2).then((data)=>{
commitOperate(operate, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();

View File

@ -189,8 +189,11 @@ export default {
commit() {
if (this.isConfirm) {
this.loading = true;
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then((data)=>{
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();

View File

@ -266,8 +266,11 @@ export default {
},
sendCommand(operate) { //
this.loading = true;
commitOperate(operate, {}, 2).then((data)=>{
commitOperate(operate, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
@ -278,7 +281,6 @@ export default {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {

View File

@ -245,8 +245,11 @@ export default {
//
setJumpStop() {
this.loading = true;
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
@ -257,8 +260,11 @@ export default {
//
cancelJumpStop() {
this.loading = true;
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();

View File

@ -186,8 +186,11 @@ export default {
sendCommand(operate) { //
this.loading = true;
commitOperate(operate, {}, 2).then((data)=>{
commitOperate(operate, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();

View File

@ -173,8 +173,10 @@ export default {
// },
//
faultUnlock(selectType) {
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then((data)=>{
this.$refs.sectionControl.doShow(data.operate, data.selected);
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.sectionControl.doShow(operate, selectType);
}
});
},
undeveloped() {