Merge pull request #12592 from dataease/pr@dev2@fixds

Pr@dev2@fixds
This commit is contained in:
taojinlong 2024-10-09 16:08:07 +08:00 committed by GitHub
commit 199cb163f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View File

@ -38,6 +38,8 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@ -111,7 +113,7 @@ public class ChartDataServer implements ChartDataApi {
Integer curLimit = getExportLimit();
if (ChartConstants.VIEW_RESULT_MODE.CUSTOM.equals(viewDTO.getResultMode())) {
Integer limitCount = viewDTO.getResultCount();
viewDTO.setResultCount(Math.min(curLimit,limitCount));
viewDTO.setResultCount(Math.min(curLimit, limitCount));
} else {
viewDTO.setResultCount(curLimit);
}
@ -184,7 +186,7 @@ public class ChartDataServer implements ChartDataApi {
response.setContentType("application/vnd.ms-excel");
//文件名称
response.setHeader("Content-disposition", "attachment;filename=" + request.getViewName() + ".xlsx");
response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(request.getViewName(), StandardCharsets.UTF_8) + ".xlsx");
wb.write(outputStream);
outputStream.flush();
outputStream.close();

View File

@ -311,7 +311,7 @@ public class ExcelUtils {
if (StringUtils.isEmpty(value) || value.length() > 19) {
return "TEXT";
}
String regex = "^\\d+(\\.\\d+)?$";
String regex = "^-?\\d+(\\.\\d+)?$";
if (!value.matches(regex)) {
return "TEXT";
}

View File

@ -697,7 +697,7 @@ const delParams = data => {
autofocus: false,
showClose: false
}).then(() => {
gridData.value.splice(form.value.apiConfiguration.indexOf(data), 1)
gridData.value.splice(gridData.value.indexOf(data), 1)
})
}
const datasetTypeList = [