forked from github/dataease
style: 地理信息树节点超出长度未处理样式
This commit is contained in:
parent
38a87a5df9
commit
19feb13f74
@ -1,5 +1,7 @@
|
||||
package io.dataease.map.manage;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.dataease.api.map.dto.GeometryNodeCreator;
|
||||
import io.dataease.api.map.vo.AreaNode;
|
||||
import io.dataease.constant.StaticResourceConstants;
|
||||
@ -29,6 +31,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static io.dataease.constant.CacheConstant.CommonCacheConstant.WORLD_MAP_CACHE;
|
||||
|
||||
@ -147,10 +150,30 @@ public class MapManage {
|
||||
if (!StringUtils.startsWith(code, GEO_PREFIX)) {
|
||||
DEException.throwException("内置Geometry,禁止删除");
|
||||
}
|
||||
coreAreaCustomMapper.deleteById(code);
|
||||
File file = buildGeoFile(code);
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
CoreAreaCustom coreAreaCustom = coreAreaCustomMapper.selectById(code);
|
||||
if (ObjectUtils.isEmpty(coreAreaCustom)) {
|
||||
DEException.throwException("Geometry code 不存在!");
|
||||
}
|
||||
List<String> codeResultList = new ArrayList<>();
|
||||
codeResultList.add(code);
|
||||
childTreeIdList(ListUtil.of(code), codeResultList);
|
||||
coreAreaCustomMapper.deleteBatchIds(codeResultList);
|
||||
codeResultList.forEach(id -> {
|
||||
File file = buildGeoFile(id);
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void childTreeIdList(List<String> pidList, List<String> resultList) {
|
||||
QueryWrapper<CoreAreaCustom> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.in("pid", pidList);
|
||||
List<CoreAreaCustom> coreAreaCustoms = coreAreaCustomMapper.selectList(queryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(coreAreaCustoms)) {
|
||||
List<String> codeList = coreAreaCustoms.stream().map(CoreAreaCustom::getId).toList();
|
||||
resultList.addAll(codeList);
|
||||
childTreeIdList(codeList, resultList);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node" :class="{ 'is-disabled': node.disabled || data.root }">
|
||||
<span
|
||||
class="geo-name-span"
|
||||
:title="data.name"
|
||||
v-html="data.colorName && keyword ? data.colorName : data.name"
|
||||
/>
|
||||
@ -304,14 +305,19 @@ loadTreeData(true)
|
||||
padding-right: 4px;
|
||||
overflow: hidden;
|
||||
justify-content: space-between;
|
||||
|
||||
.geo-name-span {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.geo-operate-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.geo-operate-container {
|
||||
display: contents;
|
||||
display: inline-flex;
|
||||
padding-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 0352814e63af722b8811159704d36d9ca2244c0d
|
||||
Subproject commit e584ed4e9f88eac8de7bd31c74eb32e91eb9279b
|
Loading…
Reference in New Issue
Block a user