代码调整

This commit is contained in:
fan 2020-03-19 18:13:26 +08:00
parent 67f0712eaa
commit 85e7fea0ae

View File

@ -326,7 +326,9 @@ export default {
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
operate.param = {signalCode: deviceList[0].code};
this.deviceList = [];
this.$store.dispatch('training/nextNew', newOperate).then(({ valid, response }) => {});
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
} else if (deviceList.length === 2) {
this.routeList.forEach(item => {
@ -334,7 +336,9 @@ export default {
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
operate.param = {routeCode: item.code};
this.deviceList = [];
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
});
}
@ -414,6 +418,8 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
} else {
const operate = {
@ -429,6 +435,8 @@ export default {
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
} else if (deviceList.length === 2) {
@ -442,7 +450,9 @@ export default {
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
operate.param = {routeCode: item.code};
this.deviceList = [];
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
});
}
@ -555,7 +565,9 @@ export default {
const operate = this.handelOperate(model);
if (this.cmdTypeList.indexOf(model._type) >= 0) {
this.deviceList = [];
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
} else {
Handler.clear(); //
this.$store.dispatch('menuOperation/setButtonOperation', null);