Browse Source

REPORT-58260 组件包安装适配zip

final/10.0
kuangshuai 3 years ago
parent
commit
feed168831
  1. 11
      designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java

11
designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java

@ -84,7 +84,7 @@ public class InstallUtils {
@Nullable
private static Group createComponentGroup(String fileName) {
String groupName = fileName.substring(0, fileName.indexOf(DOT + ReuxUtils.REUS_SUFFIX));
String groupName = createGroupName(fileName);
//有重名分组则加后缀
if (DefaultShareGroupManager.getInstance().getGroup(groupName) != null) {
@ -101,6 +101,15 @@ public class InstallUtils {
return DefaultShareGroupManager.getInstance().getGroup(groupName);
}
private static String createGroupName(String fileName) {
for (String suffix : ReuxUtils.SUPPORT_REUS_SUFFIX) {
if (fileName.endsWith(suffix)) {
return fileName.substring(0, fileName.indexOf(DOT + suffix));
}
}
return fileName;
}
private static boolean installReuFile(Group group, File chosenFile, long installTime) {
try {
if (!group.installModule(chosenFile)) {

Loading…
Cancel
Save