fix(测试跟踪): 用例评审关联功能用例时切换项目后高级搜索中所属模块数据查询有误
--bug=1018289 --user=宋昌昌 【测试跟踪】用例评审-关联功能用例-高级搜索-所属模块和所选项目模块不一致 https://www.tapd.cn/55049933/s/1266832 Co-authored-by: song-cc-rock <changchang.song@fit2cloud.com>
This commit is contained in:
parent
e155d4b02c
commit
96be530110
|
@ -181,9 +181,15 @@ 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);
|
||||
|
|
|
@ -86,7 +86,11 @@ export default {
|
|||
let options = cloneDeep(this.component.options);
|
||||
let {url, params, type} = options;
|
||||
if (!url) return;
|
||||
url += '/' + getCurrentProjectID();
|
||||
if (params.projectId) {
|
||||
url += '/' + params.projectId;
|
||||
} else {
|
||||
url += '/' + getCurrentProjectID();
|
||||
}
|
||||
if (type === "POST") {
|
||||
this.loading = post(url, params || {}).then(response => {
|
||||
this.handleTreeNodes(response.data);
|
||||
|
|
Loading…
Reference in New Issue