@@ -216,7 +216,7 @@ public interface SwEnum { | |||||
public static WidgetType instance = new WidgetType(); | public static WidgetType instance = new WidgetType(); | ||||
public static StrEnumBean GRID = instance.addEnum("grid", "表格"); | public static StrEnumBean GRID = instance.addEnum("grid", "表格"); | ||||
public static StrEnumBean TREE = instance.addEnum("tree", "下拉树"); | |||||
public static StrEnumBean TREE = instance.addEnum("tree", "树"); | |||||
public static StrEnumBean COMBOGRID = instance.addEnum("combogrid", "下拉表格"); | public static StrEnumBean COMBOGRID = instance.addEnum("combogrid", "下拉表格"); | ||||
public static StrEnumBean COMBOTREE = instance.addEnum("combotree", "下拉树"); | public static StrEnumBean COMBOTREE = instance.addEnum("combotree", "下拉树"); | ||||
public static StrEnumBean CUSTOM = instance.addEnum("custom", "自定义"); | public static StrEnumBean CUSTOM = instance.addEnum("custom", "自定义"); | ||||
@@ -491,7 +491,7 @@ public class DatabaseUtil { | |||||
if (SwEnum.IndexType.PK.value.equalsIgnoreCase(modelIndex.getType())) return null; | if (SwEnum.IndexType.PK.value.equalsIgnoreCase(modelIndex.getType())) return null; | ||||
SwEnum.IndexTypeBean type = SwEnum.IndexType.instance.getByValue(modelIndex.getType()); | SwEnum.IndexTypeBean type = SwEnum.IndexType.instance.getByValue(modelIndex.getType()); | ||||
return "CREATE " + (SwEnum.IndexType.U.value.equalsIgnoreCase(modelIndex.getType()) ? SwEnum.IndexType.U.fullName : "") + | return "CREATE " + (SwEnum.IndexType.U.value.equalsIgnoreCase(modelIndex.getType()) ? SwEnum.IndexType.U.fullName : "") + | ||||
" INDEX " + entity.getAbbr() + "_" + getDbIndexName(entity, modelIndex) + | |||||
" INDEX " + getDbIndexName(entity, modelIndex) + | |||||
" ON " + entity.getSchemaTableName() + " (" + modelIndex.getFields() + ")"; | " ON " + entity.getSchemaTableName() + " (" + modelIndex.getFields() + ")"; | ||||
} | } | ||||
@@ -551,6 +551,6 @@ public class DatabaseUtil { | |||||
} | } | ||||
private String getDbIndexName(ModelTable entity, ModelIndex modelIndex) { | private String getDbIndexName(ModelTable entity, ModelIndex modelIndex) { | ||||
return entity.getAbbr() + "_" + modelIndex; | |||||
return entity.getAbbr() + "_" + modelIndex.getName(); | |||||
} | } | ||||
} | } |
@@ -5,4 +5,4 @@ | |||||
3. 移除数据集的表类型属性tableType, 添加 initData | 3. 移除数据集的表类型属性tableType, 添加 initData | ||||
后台写 event.js 后台 ctrl+shift+f9 | |||||
后台写 defaultEvent.js 后台 ctrl+shift+f9 |
@@ -293,7 +293,9 @@ public class ModelFormHelper { | |||||
List widgetIds = (List) option.get("widgetRef"); | List widgetIds = (List) option.get("widgetRef"); | ||||
for (Object v : widgetIds) { | for (Object v : widgetIds) { | ||||
long id; | long id; | ||||
if (v instanceof Integer) { | |||||
if (v instanceof String) { | |||||
id = Long.parseLong((String)v); | |||||
} else if (v instanceof Integer) { | |||||
id = (Integer)v; | id = (Integer)v; | ||||
} else if (v instanceof Long) { | } else if (v instanceof Long) { | ||||
id = (Long)v; | id = (Long)v; | ||||