Commit b2dbdf73 authored by 邢磊's avatar 邢磊

*)图片移到附件分组

parent 444b8037
...@@ -385,9 +385,12 @@ public class DPSubServiceImpl { ...@@ -385,9 +385,12 @@ public class DPSubServiceImpl {
jsonObject.put("value", param.getString(fieldKey)); jsonObject.put("value", param.getString(fieldKey));
} else { } else {
if ("upload".equals(xObj.getString("componentKey"))) { if ("upload".equals(xObj.getString("componentKey"))) {
jsonObject.put("type", "img"); JSONArray attachmentUploadDatas = matinfo.getJSONArray("datas");
if (!ValidationUtil.isEmpty(value)) { if (!ValidationUtil.isEmpty(value)) {
jsonObject.put("value", ((JSONArray) value).getJSONObject(0).getString("url")); JSONObject attachmentUploadDatasObj = new JSONObject();
attachmentUploadDatasObj.put("value", value);
attachmentUploadDatasObj.put("type", "img");
attachmentUploadDatas.add(attachmentUploadDatasObj);
} }
} else if ("attachmentUpload".equals(xObj.getString("componentKey"))) { } else if ("attachmentUpload".equals(xObj.getString("componentKey"))) {
JSONArray attachmentUploadDatas = matinfo.getJSONArray("datas"); JSONArray attachmentUploadDatas = matinfo.getJSONArray("datas");
...@@ -431,7 +434,7 @@ public class DPSubServiceImpl { ...@@ -431,7 +434,7 @@ public class DPSubServiceImpl {
} }
} }
} }
if (!"attachmentUpload".equals(xObj.getString("componentKey"))){ if (!"upload".equals(xObj.getString("componentKey")) || !"attachmentUpload".equals(xObj.getString("componentKey"))){
datas.add(jsonObject); datas.add(jsonObject);
} }
return datas; return datas;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment