增加联锁关系生成过渡和结果展示
This commit is contained in:
parent
ac1d5bfdff
commit
6d38dd5ba3
@ -197,14 +197,33 @@ export default {
|
|||||||
this.$confirm('生成联锁关系会删除旧的联锁关系,是否继续生成', {
|
this.$confirm('生成联锁关系会删除旧的联锁关系,是否继续生成', {
|
||||||
confirmButtonText: '继续',
|
confirmButtonText: '继续',
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type: 'warning'
|
type: 'warning',
|
||||||
}).then(() => {
|
beforeClose: (action, instance, done) => {
|
||||||
|
if (action === 'confirm' && instance.confirmButtonText === '继续') {
|
||||||
|
instance.confirmButtonLoading = true;
|
||||||
|
instance.confirmButtonText = '生成中...';
|
||||||
generateCI(this.$route.params.mapId).then(resp => {
|
generateCI(this.$route.params.mapId).then(resp => {
|
||||||
this.$message.success('生成并保存联锁关系成功!');
|
instance.confirmButtonLoading = false;
|
||||||
}).catch(()=> {
|
instance.confirmButtonText = '确定';
|
||||||
|
instance.dangerouslyUseHTMLString = true;
|
||||||
|
instance.message = `<strong>生成并保存联锁关系成功!</strong><br/><span>生成自动信号数据${resp.data.autoSignalCount}条;</span>
|
||||||
|
<br/><span>生成进路数据${resp.data.routeCount}条;</span><br/><span>生成延续保护数据${resp.data.overlapCount}条;</span><br/>
|
||||||
|
<span>生成自动折返数据${resp.data.cycleCount}条;</span>`;
|
||||||
|
instance.type = 'success';
|
||||||
|
}).catch((error)=> {
|
||||||
|
if (error.code === 500045) {
|
||||||
|
this.$message.error('生成并保存联锁关系失败:地图基础信息有误');
|
||||||
|
} else {
|
||||||
this.$message.error('生成并保存联锁关系失败!');
|
this.$message.error('生成并保存联锁关系失败!');
|
||||||
|
}
|
||||||
|
instance.confirmButtonLoading = false;
|
||||||
|
done();
|
||||||
});
|
});
|
||||||
});
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).then(() => {});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox(this.$t('map.updateFailed'));
|
this.$messageBox(this.$t('map.updateFailed'));
|
||||||
|
Loading…
Reference in New Issue
Block a user