mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
Merge pull request #13774 from dataease/pr@dev-v2@fixds
fix: 【数据源】-新建Excel数据源,设置主键时没有设置字段长度,保存时报错后,返回修改后再次提交保存,确定按钮无响应
This commit is contained in:
@@ -155,7 +155,7 @@ public class FontManage {
|
||||
FontDto fontDto = new FontDto();
|
||||
try {
|
||||
String filename = file.getOriginalFilename();
|
||||
if (StringUtils.isEmpty(filename) || !filename.endsWith(".ttf")) {
|
||||
if (StringUtils.isEmpty(filename) || !filename.toLowerCase().endsWith(".ttf")) {
|
||||
DEException.throwException("非法格式的文件!");
|
||||
}
|
||||
String suffix = filename.substring(filename.lastIndexOf(".") + 1);
|
||||
|
||||
@@ -220,6 +220,7 @@ const saveExcelDs = (params, successCb, finallyCb) => {
|
||||
message: selectNode[i].excelLabel + t('datasource.api_field_not_empty'),
|
||||
type: 'error'
|
||||
})
|
||||
finallyCb?.()
|
||||
return
|
||||
}
|
||||
for (let j = 0; j < selectNode[i].fields.length; j++) {
|
||||
@@ -237,6 +238,7 @@ const saveExcelDs = (params, successCb, finallyCb) => {
|
||||
selectNode[i].fields[j].name,
|
||||
type: 'error'
|
||||
})
|
||||
finallyCb?.()
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -249,9 +251,11 @@ const saveExcelDs = (params, successCb, finallyCb) => {
|
||||
message: t('dataset.ple_select_excel'),
|
||||
type: 'error'
|
||||
})
|
||||
finallyCb?.()
|
||||
return
|
||||
}
|
||||
if (!validate) {
|
||||
finallyCb?.()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user