zoukankan      html  css  js  c++  java
  • table中 tr 的奇葩循环

    先来一个效果图

    附上数据库返回值

    {"code":0,"msg":"获取成功","dataList":[{"id":"2","name":"HR","pid":"0","grade":"1","sort":"1","url":"","icons":"bookmark-empty","optdt":"2016-11-07 17:09:06","num":"num_2","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"15","name":"部门员工","pid":"2","grade":"2","sort":"1","url":"admin,employeelist","icons":"bookmark-empty","optdt":"2016-11-07 17:28:44","num":"num_15","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"1","func_name":"添加成员","func_url":"admin/add"},{"id":"2","func_name":"编辑成员","func_url":"admin/add"},{"id":"3","func_name":"添加部门","func_url":"dept/add"},{"id":"4","func_name":"编辑部门","func_url":"dept/add"},{"id":"5","func_name":"导入员工","func_url":"admin/batchimport"},{"id":"6","func_name":"导出员工","func_url":"admin/employeelist"},{"id":"7","func_name":"设置初始密码","func_url":"admin/updateallpwd"}]},{"id":"16","name":"公司制度","pid":"2","grade":"2","sort":"2","url":"word,word_guan","icons":"bookmark-empty","optdt":"2016-11-07 17:30:58","num":"num_16","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"8","func_name":"添加制度","func_url":"document/add"},{"id":"9","func_name":"删除","func_url":"document/del"}]},{"id":"17","name":"办公费用","pid":"2","grade":"2","sort":"3","url":"test,OfficeExpenses","icons":"bookmark-empty","optdt":"2017-01-05 10:33:40","num":"num_17","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[]},{"id":"18","name":"办理入职","pid":"2","grade":"2","sort":"4","url":"admin,ruzhi","icons":"bookmark-empty","optdt":"2016-11-08 10:15:27","num":"num_18","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"10","func_name":"查看全部成员","func_url":"admin/employeelist"},{"id":"11","func_name":"查看","func_url":"admin/loadadmin"},{"id":"12","func_name":"办理入职","func_url":"admin/ruzhisave"},{"id":"13","func_name":"编辑","func_url":"admin/ruzhisave"}]},{"id":"19","name":"办理离职","pid":"2","grade":"2","sort":"5","url":"admin,lizhi","icons":"bookmark-empty","optdt":"2016-11-09 17:34:38","num":"num_19","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"14","func_name":"办理离职","func_url":"admin/employeelist"}]}]},{"id":"3","name":"工作","pid":"0","grade":"1","sort":"2","url":"","icons":"bookmark-empty","optdt":"2016-11-07 17:09:25","num":"num_3","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"20","name":"任务","pid":"3","grade":"2","sort":"1","url":"","icons":"","optdt":"2016-11-07 17:14:25","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"21","name":"发起的任务","pid":"20","grade":"3","sort":"1","url":"task,mylist","icons":"bookmark-empty","optdt":"2016-11-12 10:53:56","num":"num_21","ispir":"0","status":"1","color":"","ishs":"0","powers":[{"id":"15","func_name":"查看列表","func_url":"task/mylist"}]},{"id":"22","name":"执行的任务","pid":"20","grade":"3","sort":"2","url":"task,execute","icons":"bookmark-empty","optdt":"2016-11-12 10:57:43","num":"num_22","ispir":"0","status":"1","color":"","ishs":"0","powers":[{"id":"16","func_name":"查看全部成员","func_url":"task/get-task-member"},{"id":"17","func_name":"添加子任务","func_url":"task/save"},{"id":"18","func_name":"任务转交","func_url":"task/move"}]}],"powers":[]},{"id":"23","name":"审批","pid":"3","grade":"2","sort":"2","url":"","icons":"","optdt":"2016-11-07 17:15:27","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"24","name":"发起审批","pid":"23","grade":"3","sort":"1","url":"flow,apply","icons":"bookmark-empty","optdt":"2016-11-16 10:08:22","num":"num_24","ispir":"0","status":"1","color":"","ishs":"0","powers":[{"id":"19","func_name":"请假","func_url":"work-leave/add"},{"id":"20","func_name":"报销","func_url":"work-to-pay/add"},{"id":"21","func_name":"出差","func_url":"work-business-travel/add"},{"id":"22","func_name":"借款","func_url":"work-borrow-money/add"},{"id":"23","func_name":"招聘","func_url":"work-job/add"},{"id":"24","func_name":"离职","func_url":"work-away/add"},{"id":"25","func_name":"转正","func_url":"work-regular/add"},{"id":"26","func_name":"公章","func_url":"work-seal/add"},{"id":"27","func_name":"合同","func_url":"work-contract/add"},{"id":"28","func_name":"外出","func_url":"work-go-out/add"},{"id":"29","func_name":"调薪","func_url":"work-change-salary/add"},{"id":"30","func_name":"用品采购","func_url":"work-purchase/add"},{"id":"31","func_name":"付款","func_url":"work-payment/add"},{"id":"32","func_name":"物品领用","func_url":"work-goods/add"},{"id":"33","func_name":"普通审批","func_url":"work-general/add"},{"id":"34","func_name":"普通审批","func_url":"work-general/add"}]},{"id":"25","name":"待我审批","pid":"23","grade":"3","sort":"2","url":"flow-check,mycheck","icons":"bookmark-empty","optdt":"2016-11-26 16:36:57","num":"num_25","ispir":"1","status":"1","color":"","ishs":"0","powers":[]},{"id":"26","name":"我已审批","pid":"23","grade":"3","sort":"3","url":"flow-check,mychecked","icons":"bookmark-empty","optdt":"2016-11-26 16:36:47","num":"num_26","ispir":"1","status":"1","color":"","ishs":"0","powers":[]},{"id":"27","name":"我发起的","pid":"23","grade":"3","sort":"4","url":"flow-check,mylist","icons":"bookmark-empty","optdt":"2016-11-26 16:36:03","num":"num_27","ispir":"1","status":"1","color":"","ishs":"0","powers":[]},{"id":"40","name":"抄送我的","pid":"23","grade":"3","sort":"5","url":"flow-check,mycopylist","icons":"bookmark-empty","optdt":"2016-11-26 16:36:26","num":"num_40","ispir":"0","status":"1","color":"","ishs":"0","powers":[]}],"powers":[]},{"id":"28","name":"考勤","pid":"3","grade":"2","sort":"3","url":"","icons":"","optdt":"2016-11-07 17:17:27","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"29","name":"查看考勤","pid":"28","grade":"3","sort":"1","url":"","icons":"","optdt":"2016-11-07 17:17:47","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[{"id":"35","func_name":"查看部门考勤","func_url":"work-sign/department-sign"}]},{"id":"30","name":"统计考勤","pid":"28","grade":"3","sort":"2","url":"","icons":"","optdt":"2016-11-07 17:17:59","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[{"id":"36","func_name":"核对考勤","func_url":"work-sign/month-sign"}]}],"powers":[]}]},{"id":"4","name":"销售","pid":"0","grade":"1","sort":"3","url":"","icons":"bookmark-empty","optdt":"2016-11-07 17:09:42","num":"num_4","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"31","name":"客户","pid":"4","grade":"2","sort":"2","url":"customer,mylist,atype=my","icons":"bookmark-empty","optdt":"2016-11-11 11:44:38","num":"num_201","ispir":"0","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"37","func_name":"客户设置","func_url":"customer/setting"},{"id":"38","func_name":"作废","func_url":"customer/invalid"},{"id":"39","func_name":"删除","func_url":"customer/del"},{"id":"149","func_name":"选择客户负责人","func_url":"customer/chanceowner"}]},{"id":"32","name":"销售流程","pid":"4","grade":"2","sort":"3","url":"customer,flow","icons":"bookmark-empty","optdt":"2016-11-11 10:39:28","num":"num_202","ispir":"0","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"40","func_name":"新建销售流程","func_url":"customer-flow/add"},{"id":"41","func_name":"启用停用","func_url":"customer-flow/status"},{"id":"42","func_name":"编辑","func_url":"customer-flow/update"},{"id":"43","func_name":"删除","func_url":"customer-flow/del"}]},{"id":"33","name":"回款流程","pid":"4","grade":"2","sort":"4","url":"customer,cashflow","icons":"","optdt":"2016-11-11 10:28:55","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"44","func_name":"启用停用","func_url":"customer-pay-flow/status"},{"id":"45","func_name":"编辑","func_url":"customer-pay-flow/update"},{"id":"46","func_name":"删除","func_url":"customer-pay-flow/del"},{"id":"150","func_name":"新建回款流程","func_url":"customer-pay-flow/add"}]},{"id":"34","name":"销售机会","pid":"4","grade":"2","sort":"5","url":"customer,luckperson","icons":"","optdt":"2016-11-11 10:33:12","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"47","func_name":"查看全部销售机会","func_url":"customer-chance/list"}]},{"id":"35","name":"客户拜访","pid":"4","grade":"2","sort":"6","url":"customer,followup","icons":"bookmark-empty","optdt":"2016-11-11 10:34:25","num":"num_205","ispir":"0","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"48","func_name":"新建客户拜访","func_url":"customer-visit/add"},{"id":"49","func_name":"删除","func_url":"customer-visit/del"}]},{"id":"36","name":"销售报价单","pid":"4","grade":"2","sort":"7","url":"customer,quotation","icons":"bookmark-empty","optdt":"2016-11-11 10:36:31","num":"num_206","ispir":"0","status":"1","color":"","ishs":"0","children":[],"powers":[]},{"id":"37","name":"销售订单","pid":"4","grade":"2","sort":"8","url":"customer,order","icons":"","optdt":"2016-11-11 10:37:14","num":"","ispir":"0","status":"1","color":"","ishs":"0","children":[],"powers":[]},{"id":"108","name":"售后单","pid":"4","grade":"2","sort":"9","url":"","icons":"","optdt":"2017-03-17 16:04:14","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"50","func_name":"新建售后单","func_url":"customer-afterorder/add"},{"id":"51","func_name":"编辑","func_url":"customer-afterorder/update"},{"id":"52","func_name":"作废","func_url":"customer-afterorder/invalid"},{"id":"53","func_name":"删除","func_url":"customer-afterorder/del"},{"id":"54","func_name":"分配售后单","func_url":"customer-afterorder/set"}]},{"id":"38","name":"销售退换货","pid":"4","grade":"2","sort":"10","url":"customer,aftersale","icons":"","optdt":"2016-11-11 10:39:07","num":"","ispir":"0","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"55","func_name":"作废","func_url":"customer-report/invalid"},{"id":"56","func_name":"删除","func_url":"customer-report/del"}]}]},{"id":"5","name":"合同管理","pid":"0","grade":"1","sort":"4","url":"","icons":"bookmark-empty","optdt":"2016-11-07 17:09:46","num":"num_5","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"54","name":"合同模板","pid":"5","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-02-17 09:59:31","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"57","func_name":"添加合同模板","func_url":"contract-template/add"},{"id":"58","func_name":"编辑","func_url":"contract-template/update"},{"id":"59","func_name":"作废","func_url":"contract-template/invalid"},{"id":"60","func_name":"删除","func_url":"contract-template/del"}]},{"id":"59","name":"销售合同","pid":"5","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-02-17 10:03:44","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"61","func_name":"作废","func_url":"market-contract/invalid"},{"id":"62","func_name":"删除","func_url":"market-contract/del"}]},{"id":"60","name":"采购合同","pid":"5","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-02-17 10:04:01","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"63","func_name":"作废","func_url":"purchase-contract/invalid"},{"id":"64","func_name":"删除","func_url":"purchase-contract/del"}]},{"id":"61","name":"员工合同","pid":"5","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-02-17 10:04:12","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"65","func_name":"作废","func_url":"employee-contract/invalid"},{"id":"66","func_name":"删除","func_url":"employee-contract/del"}]},{"id":"62","name":"其他合同","pid":"5","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-02-17 10:04:35","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"67","func_name":"作废","func_url":"other-contract/invalid"},{"id":"68","func_name":"删除","func_url":"other-contract/del"}]},{"id":"63","name":"合同备案","pid":"5","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-02-17 10:04:46","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"69","func_name":"销售合同","func_url":"contract-back/market"},{"id":"70","func_name":"采购合同","func_url":"contract-back/purchase"},{"id":"71","func_name":"员工合同","func_url":"contract-back/employee"},{"id":"72","func_name":"其他合同","func_url":"contract-back/other"}]}]},{"id":"6","name":"商品","pid":"0","grade":"1","sort":"5","url":"","icons":"bookmark-empty","optdt":"2016-11-07 17:10:19","num":"num_6","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"47","name":"基本商品","pid":"6","grade":"2","sort":"0","url":"test,pageshop","icons":"bookmark-empty","optdt":"2016-12-14 16:21:00","num":"num_47","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"73","func_name":"新建商品","func_url":"product/add"},{"id":"74","func_name":"基本单位设置","func_url":"product-unit/list"},{"id":"75","func_name":"启用停用","func_url":"product/statuschange"},{"id":"76","func_name":"编辑","func_url":"product/add"},{"id":"77","func_name":"删除","func_url":"product/deldata"}]},{"id":"48","name":"套餐商品","pid":"6","grade":"2","sort":"1","url":"test,packageCommodity","icons":"bookmark-empty","optdt":"2016-12-14 16:21:17","num":"num_48","ispir":"0","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"78","func_name":"新建套餐商品","func_url":"product-package/add"},{"id":"79","func_name":"启用停用","func_url":"product-package/statuschange"},{"id":"80","func_name":"编辑","func_url":"product-package/add"},{"id":"81","func_name":"删除","func_url":"product-package/deldata"}]},{"id":"49","name":"整机商品","pid":"6","grade":"2","sort":"3","url":"test,ProductConfiguration","icons":"bookmark-empty","optdt":"2016-12-14 16:21:30","num":"num_49","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"82","func_name":"新建套餐商品","func_url":"product-setting/add"},{"id":"83","func_name":"启用停用","func_url":"product-setting/statuschange"},{"id":"84","func_name":"编辑","func_url":"product-setting/add"},{"id":"85","func_name":"删除","func_url":"product-setting/deldata"}]},{"id":"50","name":"商品价格","pid":"6","grade":"2","sort":"4","url":"test,commodityPrice","icons":"bookmark-empty","optdt":"2016-12-14 16:21:51","num":"num_50","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"86","func_name":"商品调价","func_url":"product/list"}]},{"id":"51","name":"商品分类","pid":"6","grade":"2","sort":"5","url":"test,commodityClassification","icons":"bookmark-empty","optdt":"2016-12-14 16:22:04","num":"num_51","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"87","func_name":"添加分类","func_url":"product-category/add"},{"id":"88","func_name":"编辑分类","func_url":"product-category/add"}]},{"id":"124","name":"查询序列号","pid":"6","grade":"0","sort":"6","url":null,"icons":null,"optdt":null,"num":null,"ispir":"1","status":"1","color":null,"ishs":"0","children":[],"powers":[]}]},{"id":"7","name":"采购","pid":"0","grade":"1","sort":"6","url":"","icons":"bookmark-empty","optdt":"2016-11-07 17:10:30","num":"num_7","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"64","name":"供应商","pid":"7","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 18:08:06","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"89","func_name":"新建供应商","func_url":"supplier/add"},{"id":"90","func_name":"供应商设置","func_url":"supplier/set"},{"id":"91","func_name":"供应商分类","func_url":"supplier/class"},{"id":"92","func_name":"作废","func_url":"supplier/invalid"},{"id":"93","func_name":"删除","func_url":"supplier/del"}]},{"id":"65","name":"采购报价单","pid":"7","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 18:09:13","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[]},{"id":"66","name":"采购订单","pid":"7","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 18:09:27","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"94","func_name":"新建订单","func_url":"buy-order/add"}]},{"id":"67","name":"采购退换货","pid":"7","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 18:09:39","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"95","func_name":"作废","func_url":"buy-report/invalid"},{"id":"96","func_name":"删除","func_url":"buy-report/del"}]}]},{"id":"8","name":"出入库","pid":"0","grade":"1","sort":"7","url":"","icons":"bookmark-empty","optdt":"2016-11-07 17:11:04","num":"num_8","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"68","name":"库房管理","pid":"8","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 18:09:53","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"97","func_name":"新建库房","func_url":"warehouse/add"},{"id":"98","func_name":"编辑","func_url":"warehouse/add"}]},{"id":"69","name":"入库管理","pid":"8","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 18:10:05","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"99","func_name":"分配入库","func_url":"stock-in/add"},{"id":"100","func_name":"办理入库","func_url":"stock-in/in"}]},{"id":"71","name":"出库管理","pid":"8","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 18:10:39","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"101","func_name":"分配出库","func_url":"stock-out/add"},{"id":"102","func_name":"办理出库","func_url":"stock-out/out"},{"id":"103","func_name":"发货","func_url":"stock-out/shipments"},{"id":"104","func_name":"整机组装","func_url":"pz-package/list"},{"id":"105","func_name":"整机组装时间控制","func_url":"pz-package/package"}]},{"id":"73","name":"库存查询","pid":"8","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 20:57:28","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[]},{"id":"75","name":"调拨商品","pid":"8","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 20:58:00","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"106","func_name":"新建调拨","func_url":"allot/add"},{"id":"107","func_name":"作废","func_url":"allot/cancel"}]}]},{"id":"9","name":"借入借出","pid":"0","grade":"1","sort":"8","url":"","icons":"bookmark-empty","optdt":"2017-03-08 17:37:27","num":"num_9","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"76","name":"借入单","pid":"9","grade":"2","sort":"1","url":"","icons":"","optdt":"2017-03-04 21:01:32","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"108","func_name":"新建借入单","func_url":"borrow/add"},{"id":"109","func_name":"作废","func_url":"borrow/invalid"}]},{"id":"77","name":"借出单","pid":"9","grade":"2","sort":"2","url":"","icons":"","optdt":"2017-03-04 21:01:48","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"110","func_name":"新建借出单","func_url":"lend/add"},{"id":"111","func_name":"作废","func_url":"lend/invalid"}]},{"id":"78","name":"借入归还","pid":"9","grade":"2","sort":"3","url":"","icons":"","optdt":"2017-03-04 21:02:09","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"112","func_name":"新建借入归还","func_url":"borrow-out/add"}]},{"id":"117","name":"借出归还","pid":"9","grade":"2","sort":"4","url":"","icons":"","optdt":"2017-03-04 21:02:09","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"113","func_name":"新建借出归还","func_url":"lend-out/add"}]}]},{"id":"10","name":"财务","pid":"0","grade":"1","sort":"9","url":"","icons":"bookmark-empty","optdt":"2016-11-07 17:11:33","num":"num_10","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"81","name":"账目管理","pid":"10","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 21:03:39","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"114","func_name":"查看","func_url":"accounts/list"},{"id":"115","func_name":"新建账目","func_url":"accounts/add"},{"id":"116","func_name":"启用停用","func_url":"accounts/isopen"},{"id":"117","func_name":"本月临时增票","func_url":"accounts/tmpadd"},{"id":"118","func_name":"编辑","func_url":"accounts/update"},{"id":"119","func_name":"作废","func_url":"accounts/invalid"},{"id":"120","func_name":"删除","func_url":"accounts/del"}]},{"id":"105","name":"日常收入","pid":"10","grade":"2","sort":"1","url":"","icons":"","optdt":"2017-03-04 21:04:49","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"121","func_name":"新建一笔收入","func_url":"income-expend/add"}]},{"id":"107","name":"日常支出","pid":"10","grade":"2","sort":"2","url":"","icons":"","optdt":"2017-03-04 21:12:13","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"122","func_name":"新建一笔支出","func_url":"income-expend/expend"}]},{"id":"84","name":"收款","pid":"10","grade":"2","sort":"3","url":"","icons":"","optdt":"2017-03-04 21:12:13","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"123","func_name":"查看已收款","func_url":"receipt/list"},{"id":"124","func_name":"新建收款单","func_url":"receipt/add"},{"id":"125","func_name":"收款提醒设置","func_url":"receipt/set"}]},{"id":"85","name":"付款","pid":"10","grade":"2","sort":"4","url":"","icons":"","optdt":"2017-03-04 21:12:13","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"126","func_name":"查看已付款","func_url":"paying/list"},{"id":"127","func_name":"新建付款单","func_url":"paying/add"},{"id":"128","func_name":"付款提醒设置","func_url":"paying/set"}]},{"id":"122","name":"销项发票","pid":"10","grade":"2","sort":"5","url":"","icons":"","optdt":"2017-03-04 21:12:13","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"86","name":"销项付票","pid":"122","grade":"3","sort":"3","url":"","icons":"","optdt":"2017-03-04 21:05:36","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[{"id":"129","func_name":"查看已付票","func_url":"output-ticket/list"},{"id":"130","func_name":"办理付款","func_url":"output-ticket/pay"},{"id":"131","func_name":"付票设置","func_url":"output-ticket/set"}]},{"id":"87","name":"销项退票","pid":"122","grade":"3","sort":"4","url":"","icons":"","optdt":"2017-03-04 21:05:57","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[{"id":"132","func_name":"查看已付票","func_url":"refund-ticket/list"},{"id":"133","func_name":"标记已收","func_url":"refund-ticket/flag"}]}],"powers":[]},{"id":"123","name":"进项发票","pid":"10","grade":"2","sort":"6","url":"","icons":"","optdt":"2017-03-04 21:12:13","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"96","name":"进项收票","pid":"123","grade":"3","sort":"0","url":"","icons":"","optdt":"2017-03-04 21:12:33","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[{"id":"134","func_name":"查看已收票","func_url":"financial-logistics/invoice-list"},{"id":"135","func_name":"新建收票单","func_url":"financial-logistics/add-invoice"}]},{"id":"97","name":"进项退票","pid":"123","grade":"3","sort":"0","url":"","icons":"","optdt":"2017-03-04 21:12:43","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[{"id":"136","func_name":"查看已付票","func_url":"financial-logistics/invoice-list"},{"id":"137","func_name":"标记已付","func_url":"financial-logistics/add-invoice"}]},{"id":"100","name":"物流收票","pid":"123","grade":"3","sort":"0","url":"","icons":"","optdt":"2017-03-04 21:13:20","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[{"id":"138","func_name":"新建收票单","func_url":"logistics-invoices/add"},{"id":"139","func_name":"收票详情","func_url":"logistics-invoice/list"}]}],"powers":[]},{"id":"89","name":"物流付款","pid":"10","grade":"2","sort":"7","url":"","icons":"","optdt":"2017-03-04 21:12:13","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"140","func_name":"付款详情","func_url":"financial-logistics/one-pay"},{"id":"141","func_name":"新建付款单","func_url":"financial-logistics/one-to-pay"}]},{"id":"92","name":"工资条","pid":"10","grade":"4","sort":"8","url":"","icons":"bookmark-empty","optdt":"2017-03-16 20:29:17","num":"num_92","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"142","func_name":"发薪记录","func_url":"financial-salary/salary-total"}]}]},{"id":"11","name":"物流","pid":"0","grade":"1","sort":"10","url":"","icons":"bookmark-empty","optdt":"2016-11-07 17:11:45","num":"num_11","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"101","name":"物流","pid":"11","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-04 21:14:56","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"143","func_name":"查看列表","func_url":"logistics/list"},{"id":"144","func_name":"查看详情","func_url":"logistics /infobyid"}]}]},{"id":"1","name":"系统设置","pid":"0","grade":"1","sort":"11","url":"","icons":"cog","optdt":"2016-11-07 16:46:03","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"109","name":"权限模板","pid":"1","grade":"2","sort":"0","url":"","icons":"","optdt":"2017-03-20 15:19:13","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"145","func_name":"查看","func_url":"role/list"}]},{"id":"39","name":"审批流程","pid":"1","grade":"2","sort":"1","url":"flow-manage,index","icons":"","optdt":"2016-11-21 14:43:05","num":"","ispir":"0","status":"1","color":"","ishs":"0","children":[],"powers":[]},{"id":"53","name":"薪资设置","pid":"1","grade":"2","sort":"2","url":"","icons":"","optdt":"2017-01-18 17:25:27","num":"num_53","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"146","func_name":"查看","func_url":"system-wage/list"}]},{"id":"110","name":"功能设置","pid":"1","grade":"2","sort":"3","url":"","icons":"","optdt":"2017-03-20 15:19:52","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"111","name":"销售设置","pid":"110","grade":"3","sort":"0","url":"","icons":"","optdt":"2017-03-20 15:20:12","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[]},{"id":"112","name":"采购设置","pid":"110","grade":"3","sort":"0","url":"","icons":"","optdt":"2017-03-20 15:20:23","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[]},{"id":"113","name":"商品设置","pid":"110","grade":"3","sort":"0","url":"","icons":"","optdt":"2017-03-20 15:20:36","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[]},{"id":"114","name":"出入库设置","pid":"110","grade":"3","sort":"0","url":"","icons":"","optdt":"2017-03-20 15:20:47","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[]},{"id":"115","name":"财务设置","pid":"110","grade":"3","sort":"0","url":"","icons":"","optdt":"2017-03-20 15:21:00","num":"","ispir":"1","status":"1","color":"","ishs":"0","powers":[]}],"powers":[]}]},{"id":"118","name":"公司信息","pid":"0","grade":"1","sort":"60","url":"","icons":"cog","optdt":"2016-11-07 16:46:03","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[{"id":"119","name":"公司信息详情","pid":"118","grade":"2","sort":"61","url":"","icons":"cog","optdt":"2016-11-07 16:46:03","num":"","ispir":"1","status":"1","color":"","ishs":"0","children":[],"powers":[{"id":"147","func_name":"查看","func_url":"company/list"},{"id":"148","func_name":"编辑","func_url":"company/add"}]}]}]}
    

    json解析工具解析后如下:

    {
        "code":0,
        "msg":"获取成功",
        "dataList":[
            {
                "id":"2",
                "name":"HR",
                "pid":"0",
                "grade":"1",
                "sort":"1",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2016-11-07 17:09:06",
                "num":"num_2",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"15",
                        "name":"部门员工",
                        "pid":"2",
                        "grade":"2",
                        "sort":"1",
                        "url":"admin,employeelist",
                        "icons":"bookmark-empty",
                        "optdt":"2016-11-07 17:28:44",
                        "num":"num_15",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"1",
                                "func_name":"添加成员",
                                "func_url":"admin/add"
                            },
                            {
                                "id":"2",
                                "func_name":"编辑成员",
                                "func_url":"admin/add"
                            },
                            {
                                "id":"3",
                                "func_name":"添加部门",
                                "func_url":"dept/add"
                            },
                            {
                                "id":"4",
                                "func_name":"编辑部门",
                                "func_url":"dept/add"
                            },
                            {
                                "id":"5",
                                "func_name":"导入员工",
                                "func_url":"admin/batchimport"
                            },
                            {
                                "id":"6",
                                "func_name":"导出员工",
                                "func_url":"admin/employeelist"
                            },
                            {
                                "id":"7",
                                "func_name":"设置初始密码",
                                "func_url":"admin/updateallpwd"
                            }
                        ]
                    },
                    {
                        "id":"16",
                        "name":"公司制度",
                        "pid":"2",
                        "grade":"2",
                        "sort":"2",
                        "url":"word,word_guan",
                        "icons":"bookmark-empty",
                        "optdt":"2016-11-07 17:30:58",
                        "num":"num_16",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"8",
                                "func_name":"添加制度",
                                "func_url":"document/add"
                            },
                            {
                                "id":"9",
                                "func_name":"删除",
                                "func_url":"document/del"
                            }
                        ]
                    },
                    {
                        "id":"17",
                        "name":"办公费用",
                        "pid":"2",
                        "grade":"2",
                        "sort":"3",
                        "url":"test,OfficeExpenses",
                        "icons":"bookmark-empty",
                        "optdt":"2017-01-05 10:33:40",
                        "num":"num_17",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"18",
                        "name":"办理入职",
                        "pid":"2",
                        "grade":"2",
                        "sort":"4",
                        "url":"admin,ruzhi",
                        "icons":"bookmark-empty",
                        "optdt":"2016-11-08 10:15:27",
                        "num":"num_18",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"10",
                                "func_name":"查看全部成员",
                                "func_url":"admin/employeelist"
                            },
                            {
                                "id":"11",
                                "func_name":"查看",
                                "func_url":"admin/loadadmin"
                            },
                            {
                                "id":"12",
                                "func_name":"办理入职",
                                "func_url":"admin/ruzhisave"
                            },
                            {
                                "id":"13",
                                "func_name":"编辑",
                                "func_url":"admin/ruzhisave"
                            }
                        ]
                    },
                    {
                        "id":"19",
                        "name":"办理离职",
                        "pid":"2",
                        "grade":"2",
                        "sort":"5",
                        "url":"admin,lizhi",
                        "icons":"bookmark-empty",
                        "optdt":"2016-11-09 17:34:38",
                        "num":"num_19",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"14",
                                "func_name":"办理离职",
                                "func_url":"admin/employeelist"
                            }
                        ]
                    }
                ]
            },
            {
                "id":"3",
                "name":"工作",
                "pid":"0",
                "grade":"1",
                "sort":"2",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2016-11-07 17:09:25",
                "num":"num_3",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"20",
                        "name":"任务",
                        "pid":"3",
                        "grade":"2",
                        "sort":"1",
                        "url":"",
                        "icons":"",
                        "optdt":"2016-11-07 17:14:25",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
                            {
                                "id":"21",
                                "name":"发起的任务",
                                "pid":"20",
                                "grade":"3",
                                "sort":"1",
                                "url":"task,mylist",
                                "icons":"bookmark-empty",
                                "optdt":"2016-11-12 10:53:56",
                                "num":"num_21",
                                "ispir":"0",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"15",
                                        "func_name":"查看列表",
                                        "func_url":"task/mylist"
                                    }
                                ]
                            },
                            {
                                "id":"22",
                                "name":"执行的任务",
                                "pid":"20",
                                "grade":"3",
                                "sort":"2",
                                "url":"task,execute",
                                "icons":"bookmark-empty",
                                "optdt":"2016-11-12 10:57:43",
                                "num":"num_22",
                                "ispir":"0",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"16",
                                        "func_name":"查看全部成员",
                                        "func_url":"task/get-task-member"
                                    },
                                    {
                                        "id":"17",
                                        "func_name":"添加子任务",
                                        "func_url":"task/save"
                                    },
                                    {
                                        "id":"18",
                                        "func_name":"任务转交",
                                        "func_url":"task/move"
                                    }
                                ]
                            }
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"23",
                        "name":"审批",
                        "pid":"3",
                        "grade":"2",
                        "sort":"2",
                        "url":"",
                        "icons":"",
                        "optdt":"2016-11-07 17:15:27",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
                            {
                                "id":"24",
                                "name":"发起审批",
                                "pid":"23",
                                "grade":"3",
                                "sort":"1",
                                "url":"flow,apply",
                                "icons":"bookmark-empty",
                                "optdt":"2016-11-16 10:08:22",
                                "num":"num_24",
                                "ispir":"0",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"19",
                                        "func_name":"请假",
                                        "func_url":"work-leave/add"
                                    },
                                    {
                                        "id":"20",
                                        "func_name":"报销",
                                        "func_url":"work-to-pay/add"
                                    },
                                    {
                                        "id":"21",
                                        "func_name":"出差",
                                        "func_url":"work-business-travel/add"
                                    },
                                    {
                                        "id":"22",
                                        "func_name":"借款",
                                        "func_url":"work-borrow-money/add"
                                    },
                                    {
                                        "id":"23",
                                        "func_name":"招聘",
                                        "func_url":"work-job/add"
                                    },
                                    {
                                        "id":"24",
                                        "func_name":"离职",
                                        "func_url":"work-away/add"
                                    },
                                    {
                                        "id":"25",
                                        "func_name":"转正",
                                        "func_url":"work-regular/add"
                                    },
                                    {
                                        "id":"26",
                                        "func_name":"公章",
                                        "func_url":"work-seal/add"
                                    },
                                    {
                                        "id":"27",
                                        "func_name":"合同",
                                        "func_url":"work-contract/add"
                                    },
                                    {
                                        "id":"28",
                                        "func_name":"外出",
                                        "func_url":"work-go-out/add"
                                    },
                                    {
                                        "id":"29",
                                        "func_name":"调薪",
                                        "func_url":"work-change-salary/add"
                                    },
                                    {
                                        "id":"30",
                                        "func_name":"用品采购",
                                        "func_url":"work-purchase/add"
                                    },
                                    {
                                        "id":"31",
                                        "func_name":"付款",
                                        "func_url":"work-payment/add"
                                    },
                                    {
                                        "id":"32",
                                        "func_name":"物品领用",
                                        "func_url":"work-goods/add"
                                    },
                                    {
                                        "id":"33",
                                        "func_name":"普通审批",
                                        "func_url":"work-general/add"
                                    },
                                    {
                                        "id":"34",
                                        "func_name":"普通审批",
                                        "func_url":"work-general/add"
                                    }
                                ]
                            },
                            {
                                "id":"25",
                                "name":"待我审批",
                                "pid":"23",
                                "grade":"3",
                                "sort":"2",
                                "url":"flow-check,mycheck",
                                "icons":"bookmark-empty",
                                "optdt":"2016-11-26 16:36:57",
                                "num":"num_25",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
    
                                ]
                            },
                            {
                                "id":"26",
                                "name":"我已审批",
                                "pid":"23",
                                "grade":"3",
                                "sort":"3",
                                "url":"flow-check,mychecked",
                                "icons":"bookmark-empty",
                                "optdt":"2016-11-26 16:36:47",
                                "num":"num_26",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
    
                                ]
                            },
                            {
                                "id":"27",
                                "name":"我发起的",
                                "pid":"23",
                                "grade":"3",
                                "sort":"4",
                                "url":"flow-check,mylist",
                                "icons":"bookmark-empty",
                                "optdt":"2016-11-26 16:36:03",
                                "num":"num_27",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
    
                                ]
                            },
                            {
                                "id":"40",
                                "name":"抄送我的",
                                "pid":"23",
                                "grade":"3",
                                "sort":"5",
                                "url":"flow-check,mycopylist",
                                "icons":"bookmark-empty",
                                "optdt":"2016-11-26 16:36:26",
                                "num":"num_40",
                                "ispir":"0",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
    
                                ]
                            }
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"28",
                        "name":"考勤",
                        "pid":"3",
                        "grade":"2",
                        "sort":"3",
                        "url":"",
                        "icons":"",
                        "optdt":"2016-11-07 17:17:27",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
                            {
                                "id":"29",
                                "name":"查看考勤",
                                "pid":"28",
                                "grade":"3",
                                "sort":"1",
                                "url":"",
                                "icons":"",
                                "optdt":"2016-11-07 17:17:47",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"35",
                                        "func_name":"查看部门考勤",
                                        "func_url":"work-sign/department-sign"
                                    }
                                ]
                            },
                            {
                                "id":"30",
                                "name":"统计考勤",
                                "pid":"28",
                                "grade":"3",
                                "sort":"2",
                                "url":"",
                                "icons":"",
                                "optdt":"2016-11-07 17:17:59",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"36",
                                        "func_name":"核对考勤",
                                        "func_url":"work-sign/month-sign"
                                    }
                                ]
                            }
                        ],
                        "powers":[
    
                        ]
                    }
                ]
            },
            {
                "id":"4",
                "name":"销售",
                "pid":"0",
                "grade":"1",
                "sort":"3",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2016-11-07 17:09:42",
                "num":"num_4",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"31",
                        "name":"客户",
                        "pid":"4",
                        "grade":"2",
                        "sort":"2",
                        "url":"customer,mylist,atype=my",
                        "icons":"bookmark-empty",
                        "optdt":"2016-11-11 11:44:38",
                        "num":"num_201",
                        "ispir":"0",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"37",
                                "func_name":"客户设置",
                                "func_url":"customer/setting"
                            },
                            {
                                "id":"38",
                                "func_name":"作废",
                                "func_url":"customer/invalid"
                            },
                            {
                                "id":"39",
                                "func_name":"删除",
                                "func_url":"customer/del"
                            },
                            {
                                "id":"149",
                                "func_name":"选择客户负责人",
                                "func_url":"customer/chanceowner"
                            }
                        ]
                    },
                    {
                        "id":"32",
                        "name":"销售流程",
                        "pid":"4",
                        "grade":"2",
                        "sort":"3",
                        "url":"customer,flow",
                        "icons":"bookmark-empty",
                        "optdt":"2016-11-11 10:39:28",
                        "num":"num_202",
                        "ispir":"0",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"40",
                                "func_name":"新建销售流程",
                                "func_url":"customer-flow/add"
                            },
                            {
                                "id":"41",
                                "func_name":"启用停用",
                                "func_url":"customer-flow/status"
                            },
                            {
                                "id":"42",
                                "func_name":"编辑",
                                "func_url":"customer-flow/update"
                            },
                            {
                                "id":"43",
                                "func_name":"删除",
                                "func_url":"customer-flow/del"
                            }
                        ]
                    },
                    {
                        "id":"33",
                        "name":"回款流程",
                        "pid":"4",
                        "grade":"2",
                        "sort":"4",
                        "url":"customer,cashflow",
                        "icons":"",
                        "optdt":"2016-11-11 10:28:55",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"44",
                                "func_name":"启用停用",
                                "func_url":"customer-pay-flow/status"
                            },
                            {
                                "id":"45",
                                "func_name":"编辑",
                                "func_url":"customer-pay-flow/update"
                            },
                            {
                                "id":"46",
                                "func_name":"删除",
                                "func_url":"customer-pay-flow/del"
                            },
                            {
                                "id":"150",
                                "func_name":"新建回款流程",
                                "func_url":"customer-pay-flow/add"
                            }
                        ]
                    },
                    {
                        "id":"34",
                        "name":"销售机会",
                        "pid":"4",
                        "grade":"2",
                        "sort":"5",
                        "url":"customer,luckperson",
                        "icons":"",
                        "optdt":"2016-11-11 10:33:12",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"47",
                                "func_name":"查看全部销售机会",
                                "func_url":"customer-chance/list"
                            }
                        ]
                    },
                    {
                        "id":"35",
                        "name":"客户拜访",
                        "pid":"4",
                        "grade":"2",
                        "sort":"6",
                        "url":"customer,followup",
                        "icons":"bookmark-empty",
                        "optdt":"2016-11-11 10:34:25",
                        "num":"num_205",
                        "ispir":"0",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"48",
                                "func_name":"新建客户拜访",
                                "func_url":"customer-visit/add"
                            },
                            {
                                "id":"49",
                                "func_name":"删除",
                                "func_url":"customer-visit/del"
                            }
                        ]
                    },
                    {
                        "id":"36",
                        "name":"销售报价单",
                        "pid":"4",
                        "grade":"2",
                        "sort":"7",
                        "url":"customer,quotation",
                        "icons":"bookmark-empty",
                        "optdt":"2016-11-11 10:36:31",
                        "num":"num_206",
                        "ispir":"0",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"37",
                        "name":"销售订单",
                        "pid":"4",
                        "grade":"2",
                        "sort":"8",
                        "url":"customer,order",
                        "icons":"",
                        "optdt":"2016-11-11 10:37:14",
                        "num":"",
                        "ispir":"0",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"108",
                        "name":"售后单",
                        "pid":"4",
                        "grade":"2",
                        "sort":"9",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-17 16:04:14",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"50",
                                "func_name":"新建售后单",
                                "func_url":"customer-afterorder/add"
                            },
                            {
                                "id":"51",
                                "func_name":"编辑",
                                "func_url":"customer-afterorder/update"
                            },
                            {
                                "id":"52",
                                "func_name":"作废",
                                "func_url":"customer-afterorder/invalid"
                            },
                            {
                                "id":"53",
                                "func_name":"删除",
                                "func_url":"customer-afterorder/del"
                            },
                            {
                                "id":"54",
                                "func_name":"分配售后单",
                                "func_url":"customer-afterorder/set"
                            }
                        ]
                    },
                    {
                        "id":"38",
                        "name":"销售退换货",
                        "pid":"4",
                        "grade":"2",
                        "sort":"10",
                        "url":"customer,aftersale",
                        "icons":"",
                        "optdt":"2016-11-11 10:39:07",
                        "num":"",
                        "ispir":"0",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"55",
                                "func_name":"作废",
                                "func_url":"customer-report/invalid"
                            },
                            {
                                "id":"56",
                                "func_name":"删除",
                                "func_url":"customer-report/del"
                            }
                        ]
                    }
                ]
            },
            {
                "id":"5",
                "name":"合同管理",
                "pid":"0",
                "grade":"1",
                "sort":"4",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2016-11-07 17:09:46",
                "num":"num_5",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"54",
                        "name":"合同模板",
                        "pid":"5",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-02-17 09:59:31",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"57",
                                "func_name":"添加合同模板",
                                "func_url":"contract-template/add"
                            },
                            {
                                "id":"58",
                                "func_name":"编辑",
                                "func_url":"contract-template/update"
                            },
                            {
                                "id":"59",
                                "func_name":"作废",
                                "func_url":"contract-template/invalid"
                            },
                            {
                                "id":"60",
                                "func_name":"删除",
                                "func_url":"contract-template/del"
                            }
                        ]
                    },
                    {
                        "id":"59",
                        "name":"销售合同",
                        "pid":"5",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-02-17 10:03:44",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"61",
                                "func_name":"作废",
                                "func_url":"market-contract/invalid"
                            },
                            {
                                "id":"62",
                                "func_name":"删除",
                                "func_url":"market-contract/del"
                            }
                        ]
                    },
                    {
                        "id":"60",
                        "name":"采购合同",
                        "pid":"5",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-02-17 10:04:01",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"63",
                                "func_name":"作废",
                                "func_url":"purchase-contract/invalid"
                            },
                            {
                                "id":"64",
                                "func_name":"删除",
                                "func_url":"purchase-contract/del"
                            }
                        ]
                    },
                    {
                        "id":"61",
                        "name":"员工合同",
                        "pid":"5",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-02-17 10:04:12",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"65",
                                "func_name":"作废",
                                "func_url":"employee-contract/invalid"
                            },
                            {
                                "id":"66",
                                "func_name":"删除",
                                "func_url":"employee-contract/del"
                            }
                        ]
                    },
                    {
                        "id":"62",
                        "name":"其他合同",
                        "pid":"5",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-02-17 10:04:35",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"67",
                                "func_name":"作废",
                                "func_url":"other-contract/invalid"
                            },
                            {
                                "id":"68",
                                "func_name":"删除",
                                "func_url":"other-contract/del"
                            }
                        ]
                    },
                    {
                        "id":"63",
                        "name":"合同备案",
                        "pid":"5",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-02-17 10:04:46",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"69",
                                "func_name":"销售合同",
                                "func_url":"contract-back/market"
                            },
                            {
                                "id":"70",
                                "func_name":"采购合同",
                                "func_url":"contract-back/purchase"
                            },
                            {
                                "id":"71",
                                "func_name":"员工合同",
                                "func_url":"contract-back/employee"
                            },
                            {
                                "id":"72",
                                "func_name":"其他合同",
                                "func_url":"contract-back/other"
                            }
                        ]
                    }
                ]
            },
            {
                "id":"6",
                "name":"商品",
                "pid":"0",
                "grade":"1",
                "sort":"5",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2016-11-07 17:10:19",
                "num":"num_6",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"47",
                        "name":"基本商品",
                        "pid":"6",
                        "grade":"2",
                        "sort":"0",
                        "url":"test,pageshop",
                        "icons":"bookmark-empty",
                        "optdt":"2016-12-14 16:21:00",
                        "num":"num_47",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"73",
                                "func_name":"新建商品",
                                "func_url":"product/add"
                            },
                            {
                                "id":"74",
                                "func_name":"基本单位设置",
                                "func_url":"product-unit/list"
                            },
                            {
                                "id":"75",
                                "func_name":"启用停用",
                                "func_url":"product/statuschange"
                            },
                            {
                                "id":"76",
                                "func_name":"编辑",
                                "func_url":"product/add"
                            },
                            {
                                "id":"77",
                                "func_name":"删除",
                                "func_url":"product/deldata"
                            }
                        ]
                    },
                    {
                        "id":"48",
                        "name":"套餐商品",
                        "pid":"6",
                        "grade":"2",
                        "sort":"1",
                        "url":"test,packageCommodity",
                        "icons":"bookmark-empty",
                        "optdt":"2016-12-14 16:21:17",
                        "num":"num_48",
                        "ispir":"0",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"78",
                                "func_name":"新建套餐商品",
                                "func_url":"product-package/add"
                            },
                            {
                                "id":"79",
                                "func_name":"启用停用",
                                "func_url":"product-package/statuschange"
                            },
                            {
                                "id":"80",
                                "func_name":"编辑",
                                "func_url":"product-package/add"
                            },
                            {
                                "id":"81",
                                "func_name":"删除",
                                "func_url":"product-package/deldata"
                            }
                        ]
                    },
                    {
                        "id":"49",
                        "name":"整机商品",
                        "pid":"6",
                        "grade":"2",
                        "sort":"3",
                        "url":"test,ProductConfiguration",
                        "icons":"bookmark-empty",
                        "optdt":"2016-12-14 16:21:30",
                        "num":"num_49",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"82",
                                "func_name":"新建套餐商品",
                                "func_url":"product-setting/add"
                            },
                            {
                                "id":"83",
                                "func_name":"启用停用",
                                "func_url":"product-setting/statuschange"
                            },
                            {
                                "id":"84",
                                "func_name":"编辑",
                                "func_url":"product-setting/add"
                            },
                            {
                                "id":"85",
                                "func_name":"删除",
                                "func_url":"product-setting/deldata"
                            }
                        ]
                    },
                    {
                        "id":"50",
                        "name":"商品价格",
                        "pid":"6",
                        "grade":"2",
                        "sort":"4",
                        "url":"test,commodityPrice",
                        "icons":"bookmark-empty",
                        "optdt":"2016-12-14 16:21:51",
                        "num":"num_50",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"86",
                                "func_name":"商品调价",
                                "func_url":"product/list"
                            }
                        ]
                    },
                    {
                        "id":"51",
                        "name":"商品分类",
                        "pid":"6",
                        "grade":"2",
                        "sort":"5",
                        "url":"test,commodityClassification",
                        "icons":"bookmark-empty",
                        "optdt":"2016-12-14 16:22:04",
                        "num":"num_51",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"87",
                                "func_name":"添加分类",
                                "func_url":"product-category/add"
                            },
                            {
                                "id":"88",
                                "func_name":"编辑分类",
                                "func_url":"product-category/add"
                            }
                        ]
                    },
                    {
                        "id":"124",
                        "name":"查询序列号",
                        "pid":"6",
                        "grade":"0",
                        "sort":"6",
                        "url":null,
                        "icons":null,
                        "optdt":null,
                        "num":null,
                        "ispir":"1",
                        "status":"1",
                        "color":null,
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
    
                        ]
                    }
                ]
            },
            {
                "id":"7",
                "name":"采购",
                "pid":"0",
                "grade":"1",
                "sort":"6",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2016-11-07 17:10:30",
                "num":"num_7",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"64",
                        "name":"供应商",
                        "pid":"7",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 18:08:06",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"89",
                                "func_name":"新建供应商",
                                "func_url":"supplier/add"
                            },
                            {
                                "id":"90",
                                "func_name":"供应商设置",
                                "func_url":"supplier/set"
                            },
                            {
                                "id":"91",
                                "func_name":"供应商分类",
                                "func_url":"supplier/class"
                            },
                            {
                                "id":"92",
                                "func_name":"作废",
                                "func_url":"supplier/invalid"
                            },
                            {
                                "id":"93",
                                "func_name":"删除",
                                "func_url":"supplier/del"
                            }
                        ]
                    },
                    {
                        "id":"65",
                        "name":"采购报价单",
                        "pid":"7",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 18:09:13",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"66",
                        "name":"采购订单",
                        "pid":"7",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 18:09:27",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"94",
                                "func_name":"新建订单",
                                "func_url":"buy-order/add"
                            }
                        ]
                    },
                    {
                        "id":"67",
                        "name":"采购退换货",
                        "pid":"7",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 18:09:39",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"95",
                                "func_name":"作废",
                                "func_url":"buy-report/invalid"
                            },
                            {
                                "id":"96",
                                "func_name":"删除",
                                "func_url":"buy-report/del"
                            }
                        ]
                    }
                ]
            },
            {
                "id":"8",
                "name":"出入库",
                "pid":"0",
                "grade":"1",
                "sort":"7",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2016-11-07 17:11:04",
                "num":"num_8",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"68",
                        "name":"库房管理",
                        "pid":"8",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 18:09:53",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"97",
                                "func_name":"新建库房",
                                "func_url":"warehouse/add"
                            },
                            {
                                "id":"98",
                                "func_name":"编辑",
                                "func_url":"warehouse/add"
                            }
                        ]
                    },
                    {
                        "id":"69",
                        "name":"入库管理",
                        "pid":"8",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 18:10:05",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"99",
                                "func_name":"分配入库",
                                "func_url":"stock-in/add"
                            },
                            {
                                "id":"100",
                                "func_name":"办理入库",
                                "func_url":"stock-in/in"
                            }
                        ]
                    },
                    {
                        "id":"71",
                        "name":"出库管理",
                        "pid":"8",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 18:10:39",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"101",
                                "func_name":"分配出库",
                                "func_url":"stock-out/add"
                            },
                            {
                                "id":"102",
                                "func_name":"办理出库",
                                "func_url":"stock-out/out"
                            },
                            {
                                "id":"103",
                                "func_name":"发货",
                                "func_url":"stock-out/shipments"
                            },
                            {
                                "id":"104",
                                "func_name":"整机组装",
                                "func_url":"pz-package/list"
                            },
                            {
                                "id":"105",
                                "func_name":"整机组装时间控制",
                                "func_url":"pz-package/package"
                            }
                        ]
                    },
                    {
                        "id":"73",
                        "name":"库存查询",
                        "pid":"8",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 20:57:28",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"75",
                        "name":"调拨商品",
                        "pid":"8",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 20:58:00",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"106",
                                "func_name":"新建调拨",
                                "func_url":"allot/add"
                            },
                            {
                                "id":"107",
                                "func_name":"作废",
                                "func_url":"allot/cancel"
                            }
                        ]
                    }
                ]
            },
            {
                "id":"9",
                "name":"借入借出",
                "pid":"0",
                "grade":"1",
                "sort":"8",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2017-03-08 17:37:27",
                "num":"num_9",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"76",
                        "name":"借入单",
                        "pid":"9",
                        "grade":"2",
                        "sort":"1",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:01:32",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"108",
                                "func_name":"新建借入单",
                                "func_url":"borrow/add"
                            },
                            {
                                "id":"109",
                                "func_name":"作废",
                                "func_url":"borrow/invalid"
                            }
                        ]
                    },
                    {
                        "id":"77",
                        "name":"借出单",
                        "pid":"9",
                        "grade":"2",
                        "sort":"2",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:01:48",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"110",
                                "func_name":"新建借出单",
                                "func_url":"lend/add"
                            },
                            {
                                "id":"111",
                                "func_name":"作废",
                                "func_url":"lend/invalid"
                            }
                        ]
                    },
                    {
                        "id":"78",
                        "name":"借入归还",
                        "pid":"9",
                        "grade":"2",
                        "sort":"3",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:02:09",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"112",
                                "func_name":"新建借入归还",
                                "func_url":"borrow-out/add"
                            }
                        ]
                    },
                    {
                        "id":"117",
                        "name":"借出归还",
                        "pid":"9",
                        "grade":"2",
                        "sort":"4",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:02:09",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"113",
                                "func_name":"新建借出归还",
                                "func_url":"lend-out/add"
                            }
                        ]
                    }
                ]
            },
            {
                "id":"10",
                "name":"财务",
                "pid":"0",
                "grade":"1",
                "sort":"9",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2016-11-07 17:11:33",
                "num":"num_10",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"81",
                        "name":"账目管理",
                        "pid":"10",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:03:39",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"114",
                                "func_name":"查看",
                                "func_url":"accounts/list"
                            },
                            {
                                "id":"115",
                                "func_name":"新建账目",
                                "func_url":"accounts/add"
                            },
                            {
                                "id":"116",
                                "func_name":"启用停用",
                                "func_url":"accounts/isopen"
                            },
                            {
                                "id":"117",
                                "func_name":"本月临时增票",
                                "func_url":"accounts/tmpadd"
                            },
                            {
                                "id":"118",
                                "func_name":"编辑",
                                "func_url":"accounts/update"
                            },
                            {
                                "id":"119",
                                "func_name":"作废",
                                "func_url":"accounts/invalid"
                            },
                            {
                                "id":"120",
                                "func_name":"删除",
                                "func_url":"accounts/del"
                            }
                        ]
                    },
                    {
                        "id":"105",
                        "name":"日常收入",
                        "pid":"10",
                        "grade":"2",
                        "sort":"1",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:04:49",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"121",
                                "func_name":"新建一笔收入",
                                "func_url":"income-expend/add"
                            }
                        ]
                    },
                    {
                        "id":"107",
                        "name":"日常支出",
                        "pid":"10",
                        "grade":"2",
                        "sort":"2",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:12:13",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"122",
                                "func_name":"新建一笔支出",
                                "func_url":"income-expend/expend"
                            }
                        ]
                    },
                    {
                        "id":"84",
                        "name":"收款",
                        "pid":"10",
                        "grade":"2",
                        "sort":"3",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:12:13",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"123",
                                "func_name":"查看已收款",
                                "func_url":"receipt/list"
                            },
                            {
                                "id":"124",
                                "func_name":"新建收款单",
                                "func_url":"receipt/add"
                            },
                            {
                                "id":"125",
                                "func_name":"收款提醒设置",
                                "func_url":"receipt/set"
                            }
                        ]
                    },
                    {
                        "id":"85",
                        "name":"付款",
                        "pid":"10",
                        "grade":"2",
                        "sort":"4",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:12:13",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"126",
                                "func_name":"查看已付款",
                                "func_url":"paying/list"
                            },
                            {
                                "id":"127",
                                "func_name":"新建付款单",
                                "func_url":"paying/add"
                            },
                            {
                                "id":"128",
                                "func_name":"付款提醒设置",
                                "func_url":"paying/set"
                            }
                        ]
                    },
                    {
                        "id":"122",
                        "name":"销项发票",
                        "pid":"10",
                        "grade":"2",
                        "sort":"5",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:12:13",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
                            {
                                "id":"86",
                                "name":"销项付票",
                                "pid":"122",
                                "grade":"3",
                                "sort":"3",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-04 21:05:36",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"129",
                                        "func_name":"查看已付票",
                                        "func_url":"output-ticket/list"
                                    },
                                    {
                                        "id":"130",
                                        "func_name":"办理付款",
                                        "func_url":"output-ticket/pay"
                                    },
                                    {
                                        "id":"131",
                                        "func_name":"付票设置",
                                        "func_url":"output-ticket/set"
                                    }
                                ]
                            },
                            {
                                "id":"87",
                                "name":"销项退票",
                                "pid":"122",
                                "grade":"3",
                                "sort":"4",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-04 21:05:57",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"132",
                                        "func_name":"查看已付票",
                                        "func_url":"refund-ticket/list"
                                    },
                                    {
                                        "id":"133",
                                        "func_name":"标记已收",
                                        "func_url":"refund-ticket/flag"
                                    }
                                ]
                            }
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"123",
                        "name":"进项发票",
                        "pid":"10",
                        "grade":"2",
                        "sort":"6",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:12:13",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
                            {
                                "id":"96",
                                "name":"进项收票",
                                "pid":"123",
                                "grade":"3",
                                "sort":"0",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-04 21:12:33",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"134",
                                        "func_name":"查看已收票",
                                        "func_url":"financial-logistics/invoice-list"
                                    },
                                    {
                                        "id":"135",
                                        "func_name":"新建收票单",
                                        "func_url":"financial-logistics/add-invoice"
                                    }
                                ]
                            },
                            {
                                "id":"97",
                                "name":"进项退票",
                                "pid":"123",
                                "grade":"3",
                                "sort":"0",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-04 21:12:43",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"136",
                                        "func_name":"查看已付票",
                                        "func_url":"financial-logistics/invoice-list"
                                    },
                                    {
                                        "id":"137",
                                        "func_name":"标记已付",
                                        "func_url":"financial-logistics/add-invoice"
                                    }
                                ]
                            },
                            {
                                "id":"100",
                                "name":"物流收票",
                                "pid":"123",
                                "grade":"3",
                                "sort":"0",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-04 21:13:20",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
                                    {
                                        "id":"138",
                                        "func_name":"新建收票单",
                                        "func_url":"logistics-invoices/add"
                                    },
                                    {
                                        "id":"139",
                                        "func_name":"收票详情",
                                        "func_url":"logistics-invoice/list"
                                    }
                                ]
                            }
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"89",
                        "name":"物流付款",
                        "pid":"10",
                        "grade":"2",
                        "sort":"7",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:12:13",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"140",
                                "func_name":"付款详情",
                                "func_url":"financial-logistics/one-pay"
                            },
                            {
                                "id":"141",
                                "func_name":"新建付款单",
                                "func_url":"financial-logistics/one-to-pay"
                            }
                        ]
                    },
                    {
                        "id":"92",
                        "name":"工资条",
                        "pid":"10",
                        "grade":"4",
                        "sort":"8",
                        "url":"",
                        "icons":"bookmark-empty",
                        "optdt":"2017-03-16 20:29:17",
                        "num":"num_92",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"142",
                                "func_name":"发薪记录",
                                "func_url":"financial-salary/salary-total"
                            }
                        ]
                    }
                ]
            },
            {
                "id":"11",
                "name":"物流",
                "pid":"0",
                "grade":"1",
                "sort":"10",
                "url":"",
                "icons":"bookmark-empty",
                "optdt":"2016-11-07 17:11:45",
                "num":"num_11",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"101",
                        "name":"物流",
                        "pid":"11",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-04 21:14:56",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"143",
                                "func_name":"查看列表",
                                "func_url":"logistics/list"
                            },
                            {
                                "id":"144",
                                "func_name":"查看详情",
                                "func_url":"logistics /infobyid"
                            }
                        ]
                    }
                ]
            },
            {
                "id":"1",
                "name":"系统设置",
                "pid":"0",
                "grade":"1",
                "sort":"11",
                "url":"",
                "icons":"cog",
                "optdt":"2016-11-07 16:46:03",
                "num":"",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"109",
                        "name":"权限模板",
                        "pid":"1",
                        "grade":"2",
                        "sort":"0",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-20 15:19:13",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"145",
                                "func_name":"查看",
                                "func_url":"role/list"
                            }
                        ]
                    },
                    {
                        "id":"39",
                        "name":"审批流程",
                        "pid":"1",
                        "grade":"2",
                        "sort":"1",
                        "url":"flow-manage,index",
                        "icons":"",
                        "optdt":"2016-11-21 14:43:05",
                        "num":"",
                        "ispir":"0",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
    
                        ]
                    },
                    {
                        "id":"53",
                        "name":"薪资设置",
                        "pid":"1",
                        "grade":"2",
                        "sort":"2",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-01-18 17:25:27",
                        "num":"num_53",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"146",
                                "func_name":"查看",
                                "func_url":"system-wage/list"
                            }
                        ]
                    },
                    {
                        "id":"110",
                        "name":"功能设置",
                        "pid":"1",
                        "grade":"2",
                        "sort":"3",
                        "url":"",
                        "icons":"",
                        "optdt":"2017-03-20 15:19:52",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
                            {
                                "id":"111",
                                "name":"销售设置",
                                "pid":"110",
                                "grade":"3",
                                "sort":"0",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-20 15:20:12",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
    
                                ]
                            },
                            {
                                "id":"112",
                                "name":"采购设置",
                                "pid":"110",
                                "grade":"3",
                                "sort":"0",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-20 15:20:23",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
    
                                ]
                            },
                            {
                                "id":"113",
                                "name":"商品设置",
                                "pid":"110",
                                "grade":"3",
                                "sort":"0",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-20 15:20:36",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
    
                                ]
                            },
                            {
                                "id":"114",
                                "name":"出入库设置",
                                "pid":"110",
                                "grade":"3",
                                "sort":"0",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-20 15:20:47",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
    
                                ]
                            },
                            {
                                "id":"115",
                                "name":"财务设置",
                                "pid":"110",
                                "grade":"3",
                                "sort":"0",
                                "url":"",
                                "icons":"",
                                "optdt":"2017-03-20 15:21:00",
                                "num":"",
                                "ispir":"1",
                                "status":"1",
                                "color":"",
                                "ishs":"0",
                                "powers":[
    
                                ]
                            }
                        ],
                        "powers":[
    
                        ]
                    }
                ]
            },
            {
                "id":"118",
                "name":"公司信息",
                "pid":"0",
                "grade":"1",
                "sort":"60",
                "url":"",
                "icons":"cog",
                "optdt":"2016-11-07 16:46:03",
                "num":"",
                "ispir":"1",
                "status":"1",
                "color":"",
                "ishs":"0",
                "children":[
                    {
                        "id":"119",
                        "name":"公司信息详情",
                        "pid":"118",
                        "grade":"2",
                        "sort":"61",
                        "url":"",
                        "icons":"cog",
                        "optdt":"2016-11-07 16:46:03",
                        "num":"",
                        "ispir":"1",
                        "status":"1",
                        "color":"",
                        "ishs":"0",
                        "children":[
    
                        ],
                        "powers":[
                            {
                                "id":"147",
                                "func_name":"查看",
                                "func_url":"company/list"
                            },
                            {
                                "id":"148",
                                "func_name":"编辑",
                                "func_url":"company/add"
                            }
                        ]
                    }
                ]
            }
        ]
    }
    

      关键问题就是,tr 合并行,如何循环数据进行遍历呢?

    而且涉及到有些是两层,有些是三层,这就让人头疼了,以下是部分关键代码

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>权限模板</title>
        <script src="jquery-1.8.1.min.js"></script>
    </head>
    <body>
    <div>
        <div>
            <table class="system_qxmb_xiaoshou">
                <thead>
                <tr>
                    <th>模板</th>
                    <th>子模块</th>
                    <th>功能</th>
                    <th>权限配置明细</th>
                </tr>
                </thead>
                <tbody class="lik_tbody">
                </tbody>
            </table>
        </div>
    </div>
    </body>
    </html>
    

      

        //获取权限模板
        $.ajax({
            url: SERVER_URL + url,
            type: 'POST',
            data: {},
            dataType: 'json',
            success: function (oE) {
                var likFirstList = oE.dataList;
                var likTr = '';
                $.each(likFirstList, function (i, v) {
                    var likOnOff = true;
                    var likSecondList = v['children'];
                    if (v['name'] == '财务') {
                        //两层、三层都有
                        var likThirdNumTotal = 0;
                        $.each(likSecondList, function (i2, v2) {
                            if (v2['children'].length > 0) {
                                likThirdNumTotal += parseFloat(v2['children'].length);
                            } else {
                                likThirdNumTotal += 1;
                            }
                        });
                        $.each(likSecondList, function (i2, v2) {
                            var likPower = '';
                            if (v2['children'].length == 0) {
                                //循环权限
                                $.each(v2['powers'], function (i3, v3) {
                                    likPower += '<span>
                                            <input type="checkbox" funcid="' + v3['id'] + '">' + v3['func_name'] + '</span>
                                            <span>'
                                })
                                if (likOnOff) {
                                    likTr += '<tr>
                                        <td rowspan="' + likThirdNumTotal + '"><span><input type="checkbox">' + v['name'] + '</span></td>
                                        <td rowspan="' + v2['children'].length + '"></td>
                                        <td><span><input type="checkbox">' + v2['name'] + '</span></td>
                                        <td>' + likPower + '</td>
                                      </tr>';
                                    likOnOff = false;
                                }else{
                                    likTr += '<tr>
                                        <td rowspan="' + v2['children'].length + '"></td>
                                        <td><span><input type="checkbox">' + v2['name'] + '</span></td>
                                        <td>' + likPower + '</td>
                                      </tr>';
                                }
                            }else{
                                var likThirdList = v2['children'];
                                $.each(likThirdList, function (i3, v3) {
                                    //循环权限
                                    var likPower = ''
                                    $.each(v3['powers'], function (i4, v4) {
                                        likPower += '<span>
                                            <input type="checkbox" funcid="' + v4['id'] + '">' + v4['func_name'] + '</span>
                                            <span>'
                                    })
                                    //有三层
                                    if (likOnOff) {
                                        likTr += '<tr>
                                        <td rowspan="' + likThirdNumTotal + '"><span><input type="checkbox">' + v['name'] + '</span></td>
                                        <td rowspan="' + v2['children'].length + '"></td>
                                        <td><span><input type="checkbox">' + v2['name'] + '</span></td>
                                        <td>' + likPower + '</td>
                                      </tr>';
                                        likOnOff = false;
                                    } else if (i2 != 0 && i3 == 0) {
                                        likTr += '<tr>
                                            <td rowspan="' + v2['children'].length + '"><span><input type="checkbox">' + v2['name'] + '</span></td>
                                            <td><span><input type="checkbox">' + v3['name'] + '</span></td>
                                            <td>' + likPower + '</td>
                                          </tr>';
                                    } else {
                                        likTr += '<tr>
                                            <td><span><input type="checkbox">' + v3['name'] + '</span></td>
                                            <td>' + likPower + '</td>
                                          </tr>';
                                    }
                                });
                            }
                        });
                    } else if (v['name'] == '系统设置') {
                        //有多层,但只要两层
                        $.each(likSecondList, function (i2, v2) {
                            if (i2 == 0) {
                                likTr += '<tr>
                                            <td rowspan="' + v['children'].length + '"><span><input type="checkbox">' + v['name'] + '</span></td>
                                            <td rowspan="' + v['children'].length + '"></td>
                                            <td><span><input type="checkbox">' + v2['name'] + '</span></td>
                                            <td></td>
                                          </tr>';
                            } else {
                                likTr += '<tr>
                                            <td><span><input type="checkbox">' + v2['name'] + '</span></td>
                                            <td></td>
                                          </tr>';
                            }
                        });
                    } else {
                        //只有单独的两层、三层
                        var likThirdNumTotal = 0;
                        $.each(likSecondList, function (i2, v2) {
                            likThirdNumTotal += parseFloat(v2['children'].length);
                        })
                        $.each(likSecondList, function (i2, v2) {
                            var likPower = '';
                            if (v2['children'].length == 0) {
                                //循环权限
                                $.each(v2['powers'], function (i3, v3) {
                                    likPower += '<span>
                                            <input type="checkbox" funcid="' + v3['id'] + '">' + v3['func_name'] + '</span>
                                            <span>'
                                })
                                //有两层
                                if (i2 == 0) {
                                    likTr += '<tr>
                                            <td rowspan="' + v['children'].length + '"><span><input type="checkbox">' + v['name'] + '</span></td>
                                            <td rowspan="' + v['children'].length + '"></td>
                                            <td><span><input type="checkbox">' + v2['name'] + '</span></td>
                                            <td>' + likPower + '</td>
                                          </tr>';
                                } else {
                                    likTr += '<tr>
                                            <td><span><input type="checkbox">' + v2['name'] + '</span></td>
                                            <td>' + likPower + '</td>
                                          </tr>';
                                }
                            } else {
                                var likThirdList = v2['children'];
                                $.each(likThirdList, function (i3, v3) {
                                    //循环权限
                                    var likPower = ''
                                    $.each(v3['powers'], function (i4, v4) {
                                        likPower += '<span>
                                            <input type="checkbox" funcid="' + v4['id'] + '">' + v4['func_name'] + '</span>
                                            <span>'
                                    })
                                    //有三层
                                    if (i2 == 0 && i3 == 0) {
                                        likTr += '<tr>
                                            <td rowspan="' + likThirdNumTotal + '"><span><input type="checkbox">' + v['name'] + '</span></td>
                                            <td rowspan="' + v2['children'].length + '"><span><input type="checkbox">' + v2['name'] + '</span></td>
                                            <td><span><input type="checkbox">' + v3['name'] + '</span></td>
                                            <td>' + likPower + '</td>
                                          </tr>';
                                    } else if (i2 != 0 && i3 == 0) {
                                        likTr += '<tr>
                                            <td rowspan="' + v2['children'].length + '"><span><input type="checkbox">' + v2['name'] + '</span></td>
                                            <td><span><input type="checkbox">' + v3['name'] + '</span></td>
                                            <td>' + likPower + '</td>
                                          </tr>';
                                    } else {
                                        likTr += '<tr>
                                            <td><span><input type="checkbox">' + v3['name'] + '</span></td>
                                            <td>' + likPower + '</td>
                                          </tr>';
                                    }
                                });
                            }
                        });
                    }
                });
                $('.lik_tbody').html(likTr);
            }
        });
    

      

    author:Lik
    Endeavoring to powerless, struggling to move yourself.
  • 相关阅读:
    CSS3 not
    rxjs1
    Angular 2 组件之间如何通信?
    开发去。。
    补零补零
    MySQL数据库从复制及企业配置实践
    互联网中接口安全解决方案
    redis服务打不开--解决办法
    搭建Git服务器
    git将当前分支上修改的东西转移到新建分支
  • 原文地址:https://www.cnblogs.com/likwin/p/7245847.html
Copyright © 2011-2022 走看看