Merge pull request #13091 from dataease/pr@dev-v2@refactor_app-apply

refactor(工作台): 应用保存时,出现重名数据集自动增加加后缀防止出现重名无法保存情况
This commit is contained in:
王嘉豪 2024-11-04 14:20:14 +08:00 committed by GitHub
commit 697a59688d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View File

@ -300,7 +300,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
coreDatasetTableFieldMapper.insert(dsTableFields);
});
List<String> dsGroupNameSave = new ArrayList<>();
// 持久化数据集
newDsGroupInfo.forEach(dsGroup -> {
dsTableIdMap.forEach((key, value) -> {
@ -325,8 +325,10 @@ public class DataVisualizationServer implements DataVisualizationApi {
}
});
if(dsGroupNameSave.contains(dsGroup.getName())){
dsGroup.setName(dsGroup.getName()+"-"+UUID.randomUUID().toString());
}
dsGroupNameSave.add(dsGroup.getName());
datasetGroupManage.innerSave(dsGroup);
});

View File

@ -13,7 +13,7 @@
ref="appSaveForm"
:model="state.form"
:rules="state.rule"
class="de-form-item"
class="de-form-item app-form"
size="middle"
label-width="180px"
label-position="top"
@ -406,6 +406,9 @@ defineExpose({
align-items: center;
justify-content: center;
}
.app-form {
padding-bottom: 95px;
}
</style>
<style lang="less">