Commit 15ac1b7b authored by 邢磊's avatar 邢磊

*)列表宽度设置

parent d829ee8a
...@@ -71,6 +71,7 @@ public class DPSubServiceImpl { ...@@ -71,6 +71,7 @@ public class DPSubServiceImpl {
Long formSeq = tab.getLong("formSeq"); Long formSeq = tab.getLong("formSeq");
Object resultConvert = JsonValueUtils.getValueByKey(tab, "dataConfig", "dataConfig.resultConvert"); Object resultConvert = JsonValueUtils.getValueByKey(tab, "dataConfig", "dataConfig.resultConvert");
Object api = JsonValueUtils.getValueByKey(tab, "dataConfig", "dataConfig.api"); Object api = JsonValueUtils.getValueByKey(tab, "dataConfig", "dataConfig.api");
Object columnWidth = JsonValueUtils.getValueByKey(tab, "dataConfig", "dataConfig.columnWidth");
JSONObject map = content.getJSONObject(tab.getString("key")); JSONObject map = content.getJSONObject(tab.getString("key"));
JSONObject apiResult = new JSONObject(); JSONObject apiResult = new JSONObject();
...@@ -107,7 +108,15 @@ public class DPSubServiceImpl { ...@@ -107,7 +108,15 @@ public class DPSubServiceImpl {
this.buildSubFormData(map, i, yObj, apiResult); this.buildSubFormData(map, i, yObj, apiResult);
} else if("formTable".equals(yObj.get("componentKey"))){ } else if("formTable".equals(yObj.get("componentKey"))){
map = new JSONObject(); map = new JSONObject();
map.put("columns", JsonValueUtils.getValueByKey(yObj, "visualParams", "visualParams.modelTableColumns")); JSONArray columns = (JSONArray) JsonValueUtils.getValueByKey(yObj, "visualParams", "visualParams.modelTableColumns");
JSONObject columnWidthMap = (JSONObject) columnWidth;
columns.stream().forEach(x -> {
JSONObject xObj = (JSONObject) x;
if (!ValidationUtil.isEmpty(columnWidthMap.get(xObj.get("dataIndex")))){
xObj.put("width", columnWidthMap.get(xObj.get("dataIndex")));
}
});
map.put("columns", columns);
map.put("dataList", apiResult); map.put("dataList", apiResult);
map.put("showPage", true); map.put("showPage", true);
map.put("api", api); map.put("api", api);
......
...@@ -31,6 +31,16 @@ ...@@ -31,6 +31,16 @@
"size": 14, "size": 14,
"USE_UNIT_CREDIT_CODE": "{useUnitCode}" "USE_UNIT_CREDIT_CODE": "{useUnitCode}"
} }
},
"columnWidth": {
"EQU_LIST": 150,
"EQU_CATEGORY": 160,
"EQU_DEFINE": 150,
"PRODUCT_NAME": 180,
"EQU_CODE": 180,
"FACTORY_NUM": 180,
"PRODUCE_UNIT_NAME": 180,
"USE_UNIT_NAME": 180
} }
} }
} }
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
"size": 10, "size": 10,
"record": "{record}" "record": "{record}"
} }
},
"columnWidth": {
} }
} }
} }
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
"size": 10, "size": 10,
"record": "{record}" "record": "{record}"
} }
},
"columnWidth": {
} }
} }
} }
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
"size": 10, "size": 10,
"record": "{record}" "record": "{record}"
} }
},
"columnWidth": {
} }
} }
} }
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
"size": 10, "size": 10,
"record": "{record}" "record": "{record}"
} }
},
"columnWidth": {
} }
} }
} }
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
"size": 10, "size": 10,
"record": "{record}" "record": "{record}"
} }
},
"columnWidth": {
} }
} }
} }
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
"size": 10, "size": 10,
"record": "{record}" "record": "{record}"
} }
},
"columnWidth": {
} }
} }
} }
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
"size": 10, "size": 10,
"record": "{record}" "record": "{record}"
} }
},
"columnWidth": {
} }
} }
} }
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
"size": 10, "size": 10,
"record": "{record}" "record": "{record}"
} }
},
"columnWidth": {
} }
} }
} }
......
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