fix(接口测试): 解决场景编辑-场景导入/接口列表导入-切换工作空间后点击模块-模块树发生变更
--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001017124
This commit is contained in:
parent
4be0e60728
commit
ec2ac6defe
|
@ -84,6 +84,12 @@ export default {
|
||||||
default() {
|
default() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
selectProjectId: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return getCurrentProjectID();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -94,7 +100,11 @@ export default {
|
||||||
return this.relevanceProjectId ? true : false;
|
return this.relevanceProjectId ? true : false;
|
||||||
},
|
},
|
||||||
projectId() {
|
projectId() {
|
||||||
return getCurrentProjectID();
|
if (this.selectProjectId) {
|
||||||
|
return this.selectProjectId;
|
||||||
|
} else {
|
||||||
|
return getCurrentProjectID();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -178,15 +188,18 @@ export default {
|
||||||
this.$refs.nodeTree.filter(this.condition.filterText);
|
this.$refs.nodeTree.filter(this.condition.filterText);
|
||||||
},
|
},
|
||||||
list(projectId) {
|
list(projectId) {
|
||||||
|
if (!projectId) {
|
||||||
|
projectId = this.projectId ? this.projectId : getCurrentProjectID();
|
||||||
|
}
|
||||||
let url = undefined;
|
let url = undefined;
|
||||||
if (this.isPlanModel) {
|
if (this.isPlanModel) {
|
||||||
url = '/api/automation/module/list/plan/' + this.planId;
|
url = '/api/automation/module/list/plan/' + this.planId;
|
||||||
} else if (this.isRelevanceModel) {
|
} else if (this.isRelevanceModel) {
|
||||||
url = "/api/automation/module/list/" + this.relevanceProjectId;
|
url = "/api/automation/module/list/" + this.relevanceProjectId;
|
||||||
} else if (this.isTrashData) {
|
} else if (this.isTrashData) {
|
||||||
url = "/api/automation/module/trash/list/" + (projectId ? projectId : this.projectId);
|
url = "/api/automation/module/trash/list/" + projectId;
|
||||||
} else {
|
} else {
|
||||||
url = "/api/automation/module/list/" + (projectId ? projectId : this.projectId);
|
url = "/api/automation/module/list/" + projectId;
|
||||||
if (!this.projectId) {
|
if (!this.projectId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
@setModuleOptions="setModuleOptions"
|
@setModuleOptions="setModuleOptions"
|
||||||
@enableTrash="false"
|
@enableTrash="false"
|
||||||
:is-read-only="true"
|
:is-read-only="true"
|
||||||
|
:select-project-id="projectId"
|
||||||
ref="nodeTree"/>
|
ref="nodeTree"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue