fix(接口定义): 修复场景导入切换项目数据不一致的缺陷

--bug=1016234 --user=王孝刚 【接口测试】场景编辑-导入场景-切换项目 / 切换工作空间 -列表数据未对应更新
https://www.tapd.cn/55049933/s/1233227
This commit is contained in:
wxg0103 2022-08-24 18:52:56 +08:00 committed by f2c-ci-robot[bot]
parent a7ff9006f3
commit 952c86c117
2 changed files with 6 additions and 3 deletions

View File

@ -174,7 +174,7 @@ export default {
this.getVersionOptions();
},
methods: {
search() {
search(projectId) {
this.selectRows = new Set();
this.condition.moduleIds = this.selectNodeIds;
if (this.trashEnable) {
@ -182,6 +182,9 @@ export default {
this.condition.moduleIds = [];
}
if (projectId) {
this.projectId = projectId;
}
if (this.projectId != null && typeof projectId === 'string') {
this.condition.projectId = this.projectId;
} else if (this.projectId != null) {

View File

@ -3,6 +3,7 @@
:is-across-space="isAcrossSpace"
:dialog-title="$t('api_test.automation.scenario_import')"
@setProject="setProject"
@refreshNode="refresh"
ref="baseRelevance">
<template v-slot:aside>
<ms-api-scenario-module
@ -221,7 +222,7 @@ export default {
this.moduleOptions = data;
},
refresh() {
this.$refs.apiScenarioList.search();
this.$refs.apiScenarioList.search(this.projectId);
},
setData(data) {
this.currentScenario = Array.from(data).map(row => row);
@ -229,7 +230,6 @@ export default {
},
setProject(projectId) {
this.projectId = projectId;
this.selectNodeIds = [];
},
getConditions() {
return this.$refs.apiScenarioList.getConditions();