fix(接口测试): 修复首页跳转到协议后模块树没有跟着刷新的缺陷

--bug=1020480 --user=王孝刚 【接口测试】github
#20341接口测试首页-未覆盖链接无法根据协议类型准确筛选并显示,很容易造成误解
https://www.tapd.cn/55049933/s/1355617
This commit is contained in:
wxg0103 2023-03-24 15:40:13 +08:00 committed by fit2-zhao
parent f932748609
commit 45737dbed1
2 changed files with 40 additions and 35 deletions

View File

@ -153,11 +153,14 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
request.setProtocol(protocol);
Map<String, List<String>> filters = new LinkedHashMap<>();
filters.put(ApiTestConstants.STATUS, ApiTestConstants.STATUS_ALL);
if (MapUtils.isEmpty(request.getFilters()) || !request.getFilters().containsKey(ApiTestConstants.STATUS)) {
request.setFilters(filters);
}
request.setModuleIds(new ArrayList<>());
if (StringUtils.isNotBlank(versionId)) {
request.setVersionId(versionId);
}
apiDefinitionService.checkFilterHasCoverage(request);
List<ApiModuleDTO> countMNodes = extApiDefinitionMapper.moduleCountByCollection(request);
return getNodeTrees(apiModules, getCountMap(countMNodes));
}

View File

@ -588,6 +588,8 @@ export default {
this.getVersionOptions();
this.checkVersionEnable();
this.getProtocolFilter();
//
this.$EventBus.$emit('apiConditionBus', this.condition);
//
if (this.$route.query.resourceId) {