| | |
| | | |
| | | ///获取表单总入口 |
| | | /** |
| | | * |
| | | * @param fse传入表名,或 表UUID |
| | | * @return |
| | | */ |
| | |
| | | List<FaceFieldEntity> ls = getFaceFieldByTable(fse); |
| | | if (ls == null) ls = new ArrayList<FaceFieldEntity>(); |
| | | addproperty(tableUuid, fse.getString("table_name"), ls); |
| | | |
| | | //所有表单uuid自动添加,并为hidden |
| | | return ls; |
| | | |
| | |
| | | //递归把主表和子表的字段属性添加进去,如果没有配表单,则取表数据结构进行展示 |
| | | |
| | | /** |
| | | * |
| | | * @param ls查出来的表单信息 |
| | | * @param tables 记录的所有表,对应的表单信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 数据库表字段定义转换成表单定义 |
| | | * |
| | | * @param table_uuid |
| | | * @param table_name |
| | | * @param ls |
| | |
| | | List<FieldSetEntity> fieldSetEntities = groupMap.get(fieldSetEntity2.get(0).getString("group_uuid")); |
| | | //list转map |
| | | Map<String, Object> map = new HashMap<>(); |
| | | String tabsChldren = null; |
| | | // String tabsChldren = null; |
| | | for (FieldSetEntity fieldSetEntity3 : fieldSetEntities) { |
| | | map.put(fieldSetEntity3.getString("property_name"), fieldSetEntity3.getString("property_value")); |
| | | if ("__config__".equals(fieldSetEntity3.getString("property_name"))) { |
| | | configValueList = parentMap.get(fieldSetEntity3.getString("uuid")); |
| | | map.put("__config__", configValueList); |
| | | } |
| | | if ("children".equals(fieldSetEntity3.getString("property_name"))) { |
| | | tabsChldren = fieldSetEntity3.getString("property_value"); |
| | | } |
| | | // if ("children".equals(fieldSetEntity3.getString("property_name"))) { |
| | | // tabsChldren = fieldSetEntity3.getString("property_value"); |
| | | // } |
| | | } |
| | | if (map.get("tag") != null && "el-tabs".equals(map.get("tag"))) { |
| | | map.remove("label"); |
| | | if (tabsChldren != null) { |
| | | |
| | | } |
| | | } |
| | | group.put(parentUuid1, map); |
| | | o = map; |
| | |
| | | String tag = (String) configValueMap.get("tag"); |
| | | if ("el-card".equals(tag)) { |
| | | result.get(i).putOtherParam("parentContainerName", configValueMap.get("label")); |
| | | } else if ("el-tabs".equals(tag)) { |
| | | System.out.println(1); |
| | | } else { |
| | | System.out.println(2); |
| | | } |
| | | // else if ("el-tabs".equals(tag)) { |
| | | // System.out.println(1); |
| | | // } else { |
| | | // System.out.println(2); |
| | | // } |
| | | o.put("configValue", configValueMap); |
| | | } |
| | | } |
| | |
| | | faceFieldEntity.setAllowDelete(setEntity.getBoolean("property_value")); |
| | | } else if ("control_sequence".equals(propertyName)) { |
| | | faceFieldEntity.putOtherParam("controlSequence", setEntity.getInteger("property_value")); |
| | | } else if ("__config__".equals(propertyName)) { |
| | | |
| | | String __config__ = setEntity.getUUID(); |
| | | List<FieldSetEntity> fieldSetEntities2 = parentMap.get(__config__); |
| | | if (!CollectionUtil.isEmpty(fieldSetEntities2)) { |
| | | for (FieldSetEntity fieldSetEntity4 : fieldSetEntities2) { |
| | | if ("label".equals(fieldSetEntity4.getString("property_name"))) { |
| | | faceFieldEntity.setName(fieldSetEntity4.getString("property_value")); |
| | | } else if ("required".equals(fieldSetEntity4.getString("property_name"))) { |
| | | faceFieldEntity.setRequired(fieldSetEntity4.getBoolean("property_value") ? "1" : "0"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | List<FaceFieldEntity> subFieldList = faceFieldEntity.getSubField(); |
| | |
| | | if ("defaultValue".equals(propertyName) && !"0".equals(setEntity.getString("property_value")) && !"1".equals(setEntity.getString("property_value"))) { |
| | | continue; |
| | | } |
| | | |
| | | Object propertyValue = setEntity.getObject("property_value"); |
| | | if (oldParentMap != null && propertyValue == null && StringUtils.equalsAny(setEntity.getString("property_type"), "2", "3", "4")) { |
| | | JSONObject propertyJson = FaceUtil.getPropertyJson(Lists.newArrayList(setEntity), oldParentMap); |