style(接口自动化): 修复数据源被删除显示问题
This commit is contained in:
parent
50ea7f76bf
commit
04e30ba664
|
@ -235,15 +235,22 @@
|
||||||
this.$refs.environmentConfig.open(getCurrentProjectID());
|
this.$refs.environmentConfig.open(getCurrentProjectID());
|
||||||
},
|
},
|
||||||
initDataSource() {
|
initDataSource() {
|
||||||
|
let flag = false;
|
||||||
for (let i in this.environments) {
|
for (let i in this.environments) {
|
||||||
if (this.environments[i].id === this.request.environmentId) {
|
if (this.environments[i].id === this.request.environmentId) {
|
||||||
this.databaseConfigsOptions = [];
|
this.databaseConfigsOptions = [];
|
||||||
this.environments[i].config.databaseConfigs.forEach(item => {
|
this.environments[i].config.databaseConfigs.forEach(item => {
|
||||||
|
if (item.id === this.request.dataSourceId) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
this.databaseConfigsOptions.push(item);
|
this.databaseConfigsOptions.push(item);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!flag) {
|
||||||
|
this.request.dataSourceId = undefined;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setDataSource() {
|
setDataSource() {
|
||||||
for (let item of this.databaseConfigsOptions) {
|
for (let item of this.databaseConfigsOptions) {
|
||||||
|
|
Loading…
Reference in New Issue