fix(接口自动化): 修复切换场景及新增场景变量,参数设置无法获取最新数据问题
This commit is contained in:
parent
455c1ff9dc
commit
3264e56b1d
|
@ -250,6 +250,7 @@
|
|||
<ms-api-variable-advance ref="scenarioVariableAdvance"
|
||||
:append-to-body="true"
|
||||
:current-item="currentItem"
|
||||
:variables="currentScenario.variables"
|
||||
:scenario-definition="scenarioDefinition"/>
|
||||
|
||||
<!--接口列表-->
|
||||
|
@ -1440,8 +1441,6 @@ export default {
|
|||
this.resetResourceId(this.scenarioDefinition);
|
||||
}
|
||||
this.$store.state.scenarioMap.set(this.currentScenario.id, 0);
|
||||
// 让接口自动化参数设置的地方,可以拿到场景变量
|
||||
this.$store.state.scenarioMap.set("currentScenarioVariables", this.currentScenario.variables);
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
@ -233,6 +233,7 @@
|
|||
return false;
|
||||
}
|
||||
},
|
||||
variables: Array,
|
||||
scenarioDefinition: Array,
|
||||
},
|
||||
components: {
|
||||
|
@ -288,7 +289,6 @@
|
|||
// 自定义变量相关
|
||||
defineVariable: "",
|
||||
searchType: "",
|
||||
variables: [],
|
||||
selection: [],
|
||||
loading: false,
|
||||
types: new Map([
|
||||
|
@ -336,9 +336,6 @@
|
|||
this.operatingElements = this.stepFilter.get("ALL");
|
||||
},
|
||||
open() {
|
||||
if(this.$store.state.scenarioMap.get != undefined && this.$store.state.scenarioMap.get("currentScenarioVariables") != undefined){
|
||||
this.variables = this.$store.state.scenarioMap.get("currentScenarioVariables");
|
||||
}
|
||||
if(this.scenarioDefinition != undefined){
|
||||
// 标识为场景编辑入口进入
|
||||
this.ifFromVariableAdvance = true;
|
||||
|
|
Loading…
Reference in New Issue