This commit is contained in:
fit2-zhao 2021-02-08 14:46:55 +08:00
commit 6501890d5c
3 changed files with 26 additions and 18 deletions

View File

@ -180,14 +180,16 @@ public class TestCaseNodeService extends NodeTreeService<TestCaseNodeDTO> {
List<String> projectIds = testPlanProjectService.getProjectIdsByPlanId(planId); List<String> projectIds = testPlanProjectService.getProjectIdsByPlanId(planId);
projectIds.forEach(id -> { projectIds.forEach(id -> {
Project project = projectMapper.selectByPrimaryKey(id); Project project = projectMapper.selectByPrimaryKey(id);
String name = project.getName(); if (project != null) {
List<TestCaseNodeDTO> nodeList = getNodeDTO(id, planId); String name = project.getName();
TestCaseNodeDTO testCaseNodeDTO = new TestCaseNodeDTO(); List<TestCaseNodeDTO> nodeList = getNodeDTO(id, planId);
testCaseNodeDTO.setId(project.getId()); TestCaseNodeDTO testCaseNodeDTO = new TestCaseNodeDTO();
testCaseNodeDTO.setName(name); testCaseNodeDTO.setId(project.getId());
testCaseNodeDTO.setLabel(name); testCaseNodeDTO.setName(name);
testCaseNodeDTO.setChildren(nodeList); testCaseNodeDTO.setLabel(name);
list.add(testCaseNodeDTO); testCaseNodeDTO.setChildren(nodeList);
list.add(testCaseNodeDTO);
}
}); });
return list; return list;

View File

@ -62,15 +62,16 @@ public class TestPlanProjectService {
} }
public List<String> getPlanIdByProjectId(String projectId) { public List<String> getPlanIdByProjectId(String projectId) {
TestPlanProjectExample testPlanProjectExample = new TestPlanProjectExample(); TestPlanExample testPlanExample = new TestPlanExample();
testPlanProjectExample.createCriteria().andProjectIdEqualTo(projectId); testPlanExample.createCriteria().andProjectIdEqualTo(projectId);
List<TestPlanProject> testPlanProjects = testPlanProjectMapper.selectByExample(testPlanProjectExample); List<TestPlan> testPlans = testPlanMapper.selectByExample(testPlanExample);
if (CollectionUtils.isEmpty(testPlanProjects)) {
if (CollectionUtils.isEmpty(testPlans)) {
return null; return null;
} }
return testPlanProjects return testPlans
.stream() .stream()
.map(TestPlanProject::getTestPlanId) .map(TestPlan::getId)
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
} }

View File

@ -148,7 +148,9 @@ export default {
}, },
tooltip: { tooltip: {
show: true, show: true,
trigger: 'axis' trigger: 'axis',
// extraCssText: 'z-index: 999;',
confine: true,
}, },
legend: {}, legend: {},
xAxis: {}, xAxis: {},
@ -226,7 +228,8 @@ export default {
tooltip: { tooltip: {
show: true, show: true,
trigger: 'axis', trigger: 'axis',
extraCssText: 'z-index: 999;', // extraCssText: 'z-index: 999;',
confine: true,
formatter: function (params, ticket, callback) { formatter: function (params, ticket, callback) {
let result = ""; let result = "";
let name = params[0].name; let name = params[0].name;
@ -306,7 +309,8 @@ export default {
tooltip: { tooltip: {
show: true, show: true,
trigger: 'axis', trigger: 'axis',
extraCssText: 'z-index: 999;', // extraCssText: 'z-index: 999;',
confine: true,
formatter: function (params, ticket, callback) { formatter: function (params, ticket, callback) {
let result = ""; let result = "";
let name = params[0].name; let name = params[0].name;
@ -376,7 +380,8 @@ export default {
tooltip: { tooltip: {
show: true, show: true,
trigger: 'axis', trigger: 'axis',
extraCssText: 'z-index: 999;', // extraCssText: 'z-index: 999;',
confine: true,
formatter: function (params, ticket, callback) { formatter: function (params, ticket, callback) {
let result = ""; let result = "";
let name = params[0].name; let name = params[0].name;