优化甘特图展示信息

pull/1/head
wangziyangyang 2021-03-09 15:42:57 +08:00
parent b49c010c3e
commit eaa71f78a0
2 changed files with 17 additions and 22 deletions

View File

@ -126,33 +126,28 @@ public class SpOrderController extends BaseController {
@ResponseBody @ResponseBody
@RequestMapping(value = "/gantt/list", method = RequestMethod.POST, produces = "application/json") @RequestMapping(value = "/gantt/list", method = RequestMethod.POST, produces = "application/json")
public Result getListGantt(Map<String, Object> params) throws Exception { public Result getListGantt(Map<String, Object> params) throws Exception {
//刚特图总数据
List<Map<String, Object>> result = new ArrayList<>(); List<Map<String, Object>> result = new ArrayList<>();
//具体的订单信息
for (int i = 0; i < 20; i++) { for (int i = 0; i < 20; i++) {
Map<String, Object> map = new HashMap<>(8); Map<String, Object> map = new HashMap<>(8);
map.put("id", "id" + (i + 1)); Map<String, Object> value = new HashMap<>(8);
List<Map<String, Object>> values = new ArrayList<>();
if (i % 2 == 0) { if (i % 2 == 0) {
map.put("name", "物料编码" + (i + 1)); map.put("id", "id" + (i + 1));
map.put("desc", "计划:"); map.put("name", "除湿器一线:工单号" + (i + 1));
map.put("desc", "计划数量:");
value.put("from", "/Date(" + System.currentTimeMillis() + ")/");
value.put("to", "/Date(" + (System.currentTimeMillis() + 2000000000) + ")/");
value.put("label", "黑科除湿器");
value.put("desc", "完工进度100%");
value.put("customClass", "ganttGreen");
value.put("dataObj", "1");
values.add(value);
} else { } else {
map.put("desc", "实际:"); map.put("desc", "完工数量0");
} }
map.put("cssClass", "redLabel"); map.put("cssClass", "redLabel");
List<Map<String, Object>> values = new ArrayList<>();
Map<String, Object> value = new HashMap<>(8);
value.put("from", "/Date(" + System.currentTimeMillis() + ")/");
value.put("to", "/Date(" + (System.currentTimeMillis() + 1000000000) + ")/");
value.put("label", "黑科除湿器");
value.put("desc", "我的甘特图...");
value.put("customClass", "ganttGreen");
if (i == 1) {
value.put("customClass", "ganttOrange");
}
if (i == 2) {
value.put("customClass", "ganttRed");
}
value.put("dataObj", "1");
values.add(value);
map.put("values", values); map.put("values", values);
result.add(map); result.add(map);
} }

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>系统角色列表</title> <title>派工界面</title>
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@ -99,7 +99,7 @@
maxScale: "months", maxScale: "months",
minScale: "days", minScale: "days",
waitText: "请稍后...", waitText: "请稍后...",
itemsPerPage: 10, itemsPerPage: 15,
tnTitle1: '物料编码', tnTitle1: '物料编码',
tnTitle2: '计划/实际', tnTitle2: '计划/实际',
onItemClick: function (data) { onItemClick: function (data) {