fix(测试跟踪): 高级搜索模块下拉问题回退

--bug=1018289 --user=宋昌昌 【测试跟踪】用例评审-关联功能用例-高级搜索-所属模块和所选项目模块不一致 https://www.tapd.cn/55049933/s/1270029

Co-authored-by: song-cc-rock <changchang.song@fit2cloud.com>
This commit is contained in:
MeterSphere Bot 2022-10-20 18:06:41 +08:00 committed by GitHub
parent 79edd18fa0
commit 7c86d57e1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 11 deletions

View File

@ -181,15 +181,9 @@ export default {
this.isInit = true;
this.init();
} else {
//
this.setModulesParam();
this.refreshComponentOption();
}
},
setModulesParam() {
let comps = this.optional.components.filter(c => c.key === 'moduleIds');
comps.forEach(comp => comp.options.params = {"projectId": this.condition.projectId});
},
refreshComponentOption() {
//
let comps = this.optional.components.filter(cp => cp.init && cp.init instanceof Function);

View File

@ -86,11 +86,7 @@ export default {
let options = cloneDeep(this.component.options);
let {url, params, type} = options;
if (!url) return;
if (params.projectId) {
url += '/' + params.projectId;
} else {
url += '/' + getCurrentProjectID();
}
url += '/' + getCurrentProjectID();
if (type === "POST") {
this.loading = post(url, params || {}).then(response => {
this.handleTreeNodes(response.data);