a29d1526bc7a231f81f7a9f17155a9683e7cbc9d.svn-base 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. var nodes1 = [
  2. { id:1, parentId:0, name:"中心1", open: true},
  3. { id:11, parentId:1, name:"部门1"},
  4. { id:12, parentId:1, name:"部门2"},
  5. { id:13, parentId:1, name:"部门3"},
  6. { id:2, parentId:0, name:"中心2", open: true},
  7. { id:21, parentId:2, name:"部门4"},
  8. { id:22, parentId:2, name:"部门5"},
  9. { id:23, parentId:2, name:"部门6"}
  10. ];
  11. var g;
  12. function initComplete(){
  13. $("#layout1").layout({ leftWidth: 150,onEndResize:function(){
  14. g.resetWidth();
  15. }});
  16. //本地数据源
  17. $.fn.zTree.init($("#tree-1"), {}, nodes1);
  18. alert("开始");
  19. g = $("#maingrid").quiGrid({
  20. columns:[
  21. { name: 'FD_OBJECTID280', hide : true},
  22. { display: '用户名称', name: '', align: 'center', width: "10%"},
  23. { display: '用户编号', name: '', align: 'center' , width: "20%"},
  24. { display: '用电地址', name: '', align: 'center', width: "15%" },
  25. { display: '用电类别', name: '', align: 'center', width: "10%" },
  26. { display: '供电单位', name: '', align: 'center', width: "10%" },
  27. { display: '电压等级', name: '', align: 'center' , width: "15%"},
  28. { display: '重要客户等级', name: '', align: 'center', width: "20%" }
  29. ],
  30. url :$.pathname() + '/ws/crud/CRUDService/queryQui',
  31. params : loadParams,
  32. sortName : 'UPDATEDATE_280 ',
  33. sortOrder : 'desc nulls last',
  34. rownumbers:true,
  35. checkbox:true,
  36. height: '100%',
  37. width:"100%",
  38. pageSize: 10,
  39. percentWidthMode:true,
  40. //顶部图标按钮栏
  41. toolbar:{
  42. items:[
  43. {text: '查看详情', click: addUnit, iconClass: 'icon_view'},
  44. { line : true },
  45. {text: '导出', click: updateUnit, iconClass: 'icon_history'},
  46. { line : true },
  47. {text: '汇总', click: deleteUnit, iconClass: 'icon_poll'},
  48. { line : true }
  49. ]
  50. }
  51. });
  52. alert("结束");
  53. }