代码调整

This commit is contained in:
joylink_cuiweidong 2019-11-18 15:42:05 +08:00
parent 5a9099aa35
commit f68cb84648

View File

@ -112,17 +112,22 @@ export default {
handlePlanEffectiveCheck() {
const planId = this.$route.query.planId;
if (planId) {
planEffectiveCheck(planId).then(resp => {
this.$emit('dispatchDialog', {
name: 'systermOut',
params: {
width: 600,
contextList: resp.data.length > 0 ? resp.data : ['检查成功']
}
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
this.$messageBox(' 功能待完善');
} else {
planEffectiveCheck(planId).then(resp => {
this.$emit('dispatchDialog', {
name: 'systermOut',
params: {
width: 600,
contextList: resp.data.length > 0 ? resp.data : ['检查成功']
}
});
}).catch(error => {
this.$messageBox(error.message + ' ' + this.$t('tip.runGraphVerificationFailed'));
});
}).catch(error => {
this.$messageBox(error.message + ' ' + this.$t('tip.runGraphVerificationFailed'));
});
}
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
@ -130,19 +135,24 @@ export default {
//
async handleTestRunPlan() {
const data = { planId: this.$route.query.planId };
runPlanNotify(data).then(resp => {
if (resp.data) {
const query = {
prdType: '01', group: resp.data, mapId: this.$route.query.mapId, planId: this.$route.query.planId
};
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
launchFullscreen();
} else {
this.$messageBox(this.$t('error.checkTheValidityFirst'));
}
}).catch(error => {
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
});
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
this.$messageBox(' 功能待完善');
} else {
runPlanNotify(data).then(resp => {
if (resp.data) {
const query = {
prdType: '01', group: resp.data, mapId: this.$route.query.mapId, planId: this.$route.query.planId
};
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
launchFullscreen();
} else {
this.$messageBox(this.$t('error.checkTheValidityFirst'));
}
}).catch(error => {
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
});
}
}
}
};