forked from github/dataease
fix(工作台): 修复模版管理创建可视化资源可能因为url路径编码导致无法创建问题
This commit is contained in:
parent
23a0b49917
commit
6e32b7cf80
@ -23,6 +23,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -52,6 +54,8 @@ public class TemplateCenterManage {
|
|||||||
*/
|
*/
|
||||||
public TemplateManageFileDTO getTemplateFromMarket(String templateUrl) {
|
public TemplateManageFileDTO getTemplateFromMarket(String templateUrl) {
|
||||||
if (StringUtils.isNotEmpty(templateUrl)) {
|
if (StringUtils.isNotEmpty(templateUrl)) {
|
||||||
|
String templateName = templateUrl.substring(templateUrl.lastIndexOf("/")+1,templateUrl.length());
|
||||||
|
templateUrl = templateUrl.replace(templateName,URLEncoder.encode(templateName, StandardCharsets.UTF_8).replace("+", "%20"));
|
||||||
String sufUrl = sysParameterManage.groupVal("template.").get("template.url");
|
String sufUrl = sysParameterManage.groupVal("template.").get("template.url");
|
||||||
String templateInfo = HttpClientUtil.get(sufUrl + templateUrl, null);
|
String templateInfo = HttpClientUtil.get(sufUrl + templateUrl, null);
|
||||||
return JsonUtil.parseObject(templateInfo, TemplateManageFileDTO.class);
|
return JsonUtil.parseObject(templateInfo, TemplateManageFileDTO.class);
|
||||||
|
@ -60,7 +60,9 @@ const classBackground = computed(() => {
|
|||||||
return {
|
return {
|
||||||
width: props.width + 'px',
|
width: props.width + 'px',
|
||||||
height: props.width * 0.58 + 'px',
|
height: props.width * 0.58 + 'px',
|
||||||
background: `url(${imgUrlTrans(thumbnailUrl.value)}) no-repeat`,
|
background: `url(${imgUrlTrans(thumbnailUrl.value)
|
||||||
|
.replace(/\(/g, '%28')
|
||||||
|
.replace(/\)/g, '%29')}) no-repeat`,
|
||||||
'background-size': `100% 100%`
|
'background-size': `100% 100%`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user