mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
fix(测试跟踪): 首页跳转后左侧模块树与列表不一致
--bug=1026933 --user=宋昌昌 【测试跟踪】首页-关联用例数量统计-已覆盖跳转链接左右统计信息不一致 https://www.tapd.cn/55049933/s/1384676
This commit is contained in:
parent
59532eba97
commit
b92800d6cd
@ -13,10 +13,7 @@ import io.metersphere.base.mapper.ext.ExtTestPlanTestCaseMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtTestReviewCaseMapper;
|
||||
import io.metersphere.commons.constants.TestCaseConstants;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.BeanUtils;
|
||||
import io.metersphere.commons.utils.CommonBeanFactory;
|
||||
import io.metersphere.commons.utils.JSON;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.commons.utils.*;
|
||||
import io.metersphere.dto.NodeNumDTO;
|
||||
import io.metersphere.dto.TestCaseNodeDTO;
|
||||
import io.metersphere.dto.TestPlanCaseDTO;
|
||||
@ -219,6 +216,7 @@ public class TestCaseNodeService extends NodeTreeService<TestCaseNodeDTO> {
|
||||
}
|
||||
|
||||
public List<TestCaseNodeDTO> getNodeTreeByProjectId(String projectId, QueryTestCaseRequest request) {
|
||||
this.setRequestWeekParam(request);
|
||||
// 判断当前项目下是否有默认模块,没有添加默认模块
|
||||
this.getDefaultNode(projectId);
|
||||
request.setProjectId(projectId);
|
||||
@ -235,6 +233,7 @@ public class TestCaseNodeService extends NodeTreeService<TestCaseNodeDTO> {
|
||||
|
||||
|
||||
public Map<String, Integer> getNodeCountMapByProjectId(String projectId, QueryTestCaseRequest request) {
|
||||
this.setRequestWeekParam(request);
|
||||
request.setProjectId(projectId);
|
||||
request.setUserId(SessionUtils.getUserId());
|
||||
request.setNodeIds(null);
|
||||
@ -707,4 +706,24 @@ public class TestCaseNodeService extends NodeTreeService<TestCaseNodeDTO> {
|
||||
List<Map<String, Object>> moduleCountList = extTestCaseMapper.moduleExtraNodeCount(nodeIds);
|
||||
return this.parseModuleCountList(moduleCountList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置请求参数中本周区间参数
|
||||
* @param request 页面请求参数
|
||||
* @return
|
||||
*/
|
||||
private void setRequestWeekParam(QueryTestCaseRequest request) {
|
||||
Map<String, Date> weekFirstTimeAndLastTime = DateUtils.getWeedFirstTimeAndLastTime(new Date());
|
||||
Date weekFirstTime = weekFirstTimeAndLastTime.get("firstTime");
|
||||
if (request.isSelectThisWeedData()) {
|
||||
if (weekFirstTime != null) {
|
||||
request.setCreateTime(weekFirstTime.getTime());
|
||||
}
|
||||
}
|
||||
if (request.isSelectThisWeedRelevanceData()) {
|
||||
if (weekFirstTime != null) {
|
||||
request.setRelevanceCreateTime(weekFirstTime.getTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -795,7 +795,6 @@ export default {
|
||||
this.condition.selectThisWeedData = false;
|
||||
this.condition.selectThisWeedRelevanceData = false;
|
||||
this.condition.caseCoverage = null;
|
||||
this.condition.filters.reviewStatus = ["Prepare", "Pass", "UnPass"];
|
||||
if (this.selectDataRange && this.selectDataRange.indexOf("single") > -1) {
|
||||
this.condition.ids = [this.selectDataRange.substring(7)];
|
||||
}
|
||||
@ -813,7 +812,7 @@ export default {
|
||||
this.condition.caseCoverage = 'coverage';
|
||||
break;
|
||||
case 'notReviewed':
|
||||
this.condition.filters.review_status = ['Prepare', 'Underway'];
|
||||
this.condition.filters.review_status = ['Prepare', 'Underway', 'Again'];
|
||||
break
|
||||
case 'reviewed':
|
||||
this.condition.filters.review_status = ['UnPass', 'Pass'];
|
||||
|
@ -124,6 +124,11 @@ export default {
|
||||
'condition.filterText'() {
|
||||
this.filter();
|
||||
},
|
||||
caseCondition() {
|
||||
this.$nextTick(() => {
|
||||
this.list();
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let store = useStore();
|
||||
|
Loading…
Reference in New Issue
Block a user