fix(接口定义): 修复点击工作空间筛选后,下拉框只剩当前工作空间的选项的缺陷
--bug=1019884 --user=王孝刚 【接口测试】接口用例查看引用关系 - 场景引用,所属工作空间和所属项目筛选后就只剩所选的选项了 https://www.tapd.cn/55049933/s/1299800
This commit is contained in:
parent
d837f95a41
commit
c50e83b3f4
|
@ -164,17 +164,29 @@ export default {
|
|||
let data = res.data || [];
|
||||
this.total = data.itemCount || 0;
|
||||
if (this.workspaceList) {
|
||||
this.workspaceFilters = this.workspaceList
|
||||
.filter((workspace) => {
|
||||
return data.listObject.find((i) => i.workspaceId === workspace.id);
|
||||
})
|
||||
.map((e) => {
|
||||
return { text: e.name, value: e.id };
|
||||
});
|
||||
if (this.workspaceFilters.length === 0) {
|
||||
this.workspaceFilters = this.workspaceList
|
||||
.filter((workspace) => {
|
||||
return data.listObject.find((i) => i.workspaceId === workspace.id);
|
||||
})
|
||||
.map((e) => {
|
||||
return { text: e.name, value: e.id };
|
||||
});
|
||||
}
|
||||
let workspaceIds = [];
|
||||
this.workspaceFilters.map((item) => {
|
||||
workspaceIds.push(item.value);
|
||||
});
|
||||
if (
|
||||
this.condition.filters &&
|
||||
this.condition.filters.workspace_id &&
|
||||
this.condition.filters.workspace_id.length > 0
|
||||
) {
|
||||
this.condition.filters.workspace_id.map((item) => {
|
||||
workspaceIds.push(item);
|
||||
});
|
||||
} else {
|
||||
this.workspaceFilters.map((item) => {
|
||||
workspaceIds.push(item.value);
|
||||
});
|
||||
}
|
||||
apiProjectRelated({
|
||||
userId: getCurrentUserId(),
|
||||
workspaceIds: workspaceIds,
|
||||
|
|
Loading…
Reference in New Issue