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