{"hidden":false,"children":[{"configs":{"itemId":"module","serverScript":"// var result = {},\n//   records = {},\n//   record, nodes, rs, meta,data;\n// data=app.get();\n// rs=app.run(\"select m.*,role_id  from wb_menu m left  join wb_role_resource w on w.menu_id=m.menu_id and role_id='\"+data.roleId+\"' order by ORDER_INDEX\");\n// meta = rs.getMetaData();\n\n// while (rs.next()) {\n//   record = Wb.getRecord(rs, meta);\n//   var type = false;\n//   if(record.ROLE_ID !=null){\n//     type=true;\n//   }\n//   if(record.MENU_TYPE == 1 ){\n//      Wb.apply(record, {\n//       text: record.MENU_NAME,\n//       iconCls: 'db_field_icon', \n//       checked:type\n//     });\n//   }else{\n//      Wb.apply(record, {\n//       text: record.MENU_NAME,\n//       iconCls: 'db_field_icon'\n//     });\n//   }\n//   type=false;\n//   nodes = records[record.PARENT_MENU];\n//   if (nodes) {\n//     nodes.push(record);\n//   } else {\n//     nodes = [record];\n//     records[record.PARENT_MENU] = nodes;\n//   }\n// }\n\n// // function createNodes(items, parentMenu) {\n// //   items.children = records[parentMenu]||[];\n// //   if (items.children.length)\n// //     items.expanded = true;\n// //   Wb.each(items.children, function(item) {\n// //     createNodes(item, item.MENU_ID);\n// //   });\n// // }\n// //createNodes(result, '-1');\n// app.send(result);"},"expanded":true,"children":[{"configs":{"itemId":"dataprovider1","sql":"SELECT M.MENU_ID\n  FROM WB_MENU M\n       JOIN WB_ROLE_RESOURCE W ON W.MENU_ID = M.MENU_ID AND ROLE_ID = {?roleId?} \n  order by order_index"},"expanded":false,"children":[],"type":"dataprovider"}],"type":"module"}],"roles":{"demo":1},"title":"模块列表数据","iconCls":"","inframe":false,"pageLink":""}