refactor: 场景默认加载当前项目的环境配置
This commit is contained in:
parent
1b3954fec7
commit
497331f73a
|
@ -1019,6 +1019,7 @@
|
|||
this.$post("/api/automation/getApiScenarioEnv", {definition: definition}, res => {
|
||||
if (res.data) {
|
||||
this.projectIds = new Set(res.data.projectIds);
|
||||
this.projectIds.add(this.projectId);
|
||||
this.isFullUrl = res.data.fullUrl;
|
||||
}
|
||||
resolve();
|
||||
|
|
|
@ -54,6 +54,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
projectId() {
|
||||
return this.$store.state.projectId
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.envMap = this.projectEnvMap;
|
||||
this.getVariableSize();
|
||||
|
@ -124,6 +129,7 @@
|
|||
return new Promise((resolve) => {
|
||||
this.$post("/api/automation/getApiScenarioEnv", {definition: definition}, res => {
|
||||
if (res.data) {
|
||||
res.data.projectIds.push(this.projectId);
|
||||
this.$emit("update:projectIds", new Set(res.data.projectIds));
|
||||
this.$emit("update:isFullUrl", res.data.fullUrl);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue