前端:
lay-data="{url:'/handleCutSwitchAndKnifeGateTableData'}"
lay-filter="cutSwitchAndKnifeGateTableEvent">
应拉断路器(开关)、隔离开关(刀闸)
已执行
后端:
@RequestMapping("/handleCutSwitchAndKnifeGateTableData")
@ResponseBody
private Map handleCutSwitchAndKnifeGateTableData()
{
List cutSwitchAndKnifeGateBeanList=new ArrayList<>();
int size=GlobalVariable.workOrderClass.getWorkOrderSafeMeasureCutSwitchAndKnifeGate().size();
for (int i = 0; i
{
int a=i+1;
CutSwitchAndKnifeGateBean cutSwitchAndKnifeGateBean=new CutSwitchAndKnifeGateBean();
cutSwitchAndKnifeGateBean.setCutSwitchAndKnifeGate("("+a+")"+GlobalVariable.workOrderClass.getWorkOrderSafeMeasureCutSwitchAndKnifeGate().get(i));
cutSwitchAndKnifeGateBean.setCutSwitchAndKnifeGate_impl(" ");
cutSwitchAndKnifeGateBeanList.add(cutSwitchAndKnifeGateBean);
}
Map map=new HashMap<>();
map.put("code",0);
map.put("msg","应拉断路器(开关)、隔离开关(刀闸)");
map.put("count",size);
map.put("data",cutSwitchAndKnifeGateBeanList);
return map;
}
总结:后端给前端传的数据是json数据,且需要按照这种规定的格式写,详情可见layui官方文档
点赞
收藏
分享
文章举报
海中风
发布了13 篇原创文章 · 获赞 0 · 访问量 395
私信
关注