fix: 修复空项目下点击环境报错的问题、修复表格复选框全选时的展示问题
修复空项目下点击环境报错的问题、修复表格复选框全选时的展示问题
This commit is contained in:
parent
23a55fd386
commit
b8fc99bf96
|
@ -12,15 +12,13 @@ import io.metersphere.controller.request.EnvironmentRequest;
|
|||
import io.metersphere.dto.BaseSystemConfigDTO;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.service.SystemParameterService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
@ -36,11 +34,14 @@ public class ApiTestEnvironmentService {
|
|||
}
|
||||
|
||||
public List<ApiTestEnvironmentWithBLOBs> listByConditions(EnvironmentRequest environmentRequest) {
|
||||
if (CollectionUtils.isEmpty(environmentRequest.getProjectIds())) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
ApiTestEnvironmentExample example = new ApiTestEnvironmentExample();
|
||||
ApiTestEnvironmentExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andProjectIdIn(environmentRequest.getProjectIds());
|
||||
if (StringUtils.isNotBlank(environmentRequest.getName())) {
|
||||
environmentRequest.setName(StringUtils.wrapIfMissing(environmentRequest.getName(),'%')); //使搜索文本变成数据库中的正则表达式
|
||||
environmentRequest.setName(StringUtils.wrapIfMissing(environmentRequest.getName(), '%')); //使搜索文本变成数据库中的正则表达式
|
||||
criteria.andNameLike(environmentRequest.getName());
|
||||
}
|
||||
return apiTestEnvironmentMapper.selectByExampleWithBLOBs(example);
|
||||
|
|
|
@ -302,6 +302,7 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
selectNodeIds() {
|
||||
this.condition.selectAll = false;
|
||||
this.initTable();
|
||||
},
|
||||
currentProtocol() {
|
||||
|
|
|
@ -217,6 +217,7 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
selectNodeIds() {
|
||||
this.condition.selectAll = false;
|
||||
this.search();
|
||||
},
|
||||
planId() {
|
||||
|
|
|
@ -414,6 +414,7 @@ export default {
|
|||
this.refreshTableAndPlan();
|
||||
},
|
||||
selectNodeIds() {
|
||||
this.condition.selectAll = false;
|
||||
this.search();
|
||||
},
|
||||
tableLabel: {
|
||||
|
|
|
@ -231,6 +231,7 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
selectProjectId() {
|
||||
this.condition.selectAll = false;
|
||||
this.initTable();
|
||||
},
|
||||
planId() {
|
||||
|
|
Loading…
Reference in New Issue