43dfea20997d199c1e7668da6e42c0bf41ab64b2.svn-base 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. </head>
  6. <!--jQuery开始 -->
  7. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  8. <!--jQuery结束 -->
  9. <body>
  10. <div></div>
  11. <script type="text/javascript">
  12. $(function(){
  13. });
  14. function GridTableBase(op){
  15. var defaultOption={};
  16. var option=$.extends({},defaultOption,op);
  17. var finallyState={SUCCESS:0,FAIULRE:1};
  18. }
  19. GridTableBase.prototype.createToolBarBase=function(paramArr){
  20. return this.finallyState.SUCCESS;
  21. }
  22. GridTableBase.prototype.createTableBase=function(paramArr){
  23. return this.finallyState.SUCCESS;
  24. }
  25. GridTableBase.prototype.createPaperBase=function(paramArr){
  26. return this.finallyState.SUCCESS;
  27. }
  28. /**
  29. *工具条
  30. */
  31. function ToolBar(){
  32. var defaultOption={};
  33. var option=$.extends({},defaultOption,op);
  34. var finallyState={SUCCESS:0,FAIULRE:1};
  35. }
  36. ToolBar.prototype.create=function(paramArr){
  37. if(paramArr instanceof Array)throw new Error("请检查数据格式是否符合规则");
  38. var html="<div>";
  39. for(var index=0,len=paramArr.length;index<len;index++){
  40. }
  41. }
  42. function LiList(paramArr,keyName,divClass,ulClass,liClass,fn_before,fn,fn_after){
  43. if(paramArr instanceof Array) throw new Error("请检查数据格式是否为数组");
  44. fn_before($dom,paramArr);
  45. var htmlStr="<div class="+divClass+">";
  46. var htmlStr+="<ul class="+ulClass+">"
  47. if(paramArr.length==0)
  48. for(var index=0,len=paramArr.length;index<len;index++){
  49. var tempStr=fn instanceof Function?fn(paramArr[index])?paramArr[index][keyName];
  50. htmlStr+="<li class=>"+tempStr+"</li>"
  51. }
  52. htmlStr+="</ul></div>";
  53. if(fn_after instanceof Function)
  54. fn_after($dom,paramArr);
  55. // return "SUCCESS";
  56. }
  57. LiList.prototype.changeStyle(){
  58. if(this.$dom.find("div").size()>0)
  59. this.$dom.find("div").attr({"class":divClass});
  60. if(this.$dom.find("ul").size()>0)
  61. this.$dom.find("ul").attr({"class":ulClass});
  62. if(this.$dom.find("li").size()>0)
  63. this.$dom.find("li").attr({"class":liClass});
  64. }
  65. function UlList(paramArr,keyName,divClass,ulClass,liClass,fn_before,fn,fn_after){
  66. if(paramArr instanceof Array) throw new Error("请检查数据格式是否为数组");
  67. var htmlStr="<div><ul>"
  68. for(var index,len=paramArr;index<len;index++){
  69. htmlStr+="<p>"+paramArr.title+"</p><li></li>";
  70. }
  71. }
  72. Math.uuid=function(len){
  73. var digtal=new Date().getTime();
  74. var charStr="0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";
  75. var charArr=charStr.split(" ");
  76. var uuidStr="";
  77. for(var index=0;index<len;index++){
  78. var indexi=Math.round(Math.random()*62);
  79. console.log("index---->"+indexi)
  80. uuidStr+=charArr[indexi];
  81. };
  82. return digtal+uuidStr;
  83. }
  84. </script>
  85. </body>
  86. </html>