Commit c692702c authored by 邢磊's avatar 邢磊

*)多选框解析

parent 8e500e46
...@@ -361,7 +361,12 @@ public class DPSubServiceImpl { ...@@ -361,7 +361,12 @@ public class DPSubServiceImpl {
} }
} else if ("checkbox".equals(xObj.getString("componentKey"))) { } else if ("checkbox".equals(xObj.getString("componentKey"))) {
jsonObject.put("type", "text"); jsonObject.put("type", "text");
if (!ValidationUtil.isEmpty(value)) { ResponseModel checkboxResult = this.getApiResult(visualParams.getJSONObject("api"), null);
if (!ValidationUtil.isEmpty(checkboxResult) && checkboxResult.getStatus() == 200 && !ValidationUtil.isEmpty(value)) {
List<Object> collect = ((JSONArray) checkboxResult.getResult()).stream().filter(y -> ((JSONArray) value).contains(JsonValueUtils.getValueByKey(y, "valueKey", "valueKey"))).collect(Collectors.toList());
String nameKey = collect.stream().map(item -> ((JSONObject) item).getString("nameKey")).collect(Collectors.joining("、"));
jsonObject.put("value", nameKey);
} else {
jsonObject.put("value", value); jsonObject.put("value", value);
} }
} else if ("select".equals(xObj.getString("componentKey"))) { } else if ("select".equals(xObj.getString("componentKey"))) {
......
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