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

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

View File

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

View File

@ -225,8 +225,11 @@ export default {
commit() { commit() {
if (this.row && this.row.canSetting) { if (this.row && this.row.canSetting) {
this.loading = true; 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.doClose(); this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => { }).catch((error) => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();

View File

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

View File

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

View File

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

View File

@ -245,8 +245,11 @@ export default {
// //
setJumpStop() { setJumpStop() {
this.loading = true; 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.doClose(); this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => { }).catch((error) => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
@ -257,8 +260,11 @@ export default {
// //
cancelJumpStop() { cancelJumpStop() {
this.loading = true; 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.doClose(); this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => { }).catch((error) => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();

View File

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

View File

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