rock_infor_zhishixx.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. {params};
  5. var num = params.num,pid,optlx=0;
  6. var typeid=0,sspid=0;
  7. var at = $('#optionview_{rand}').bootstree({
  8. url:js.getajaxurl('gettreedata','option','system',{'num':'knowledgetype'}),
  9. columns:[{
  10. text:'知识分类',dataIndex:'name',align:'left',xtype:'treecolumn',width:'79%'
  11. },{
  12. text:'ID',dataIndex:'id',width:'20%'
  13. }],
  14. load:function(d){
  15. if(sspid==0){
  16. typeid = d.pid;
  17. sspid = d.pid;
  18. c.loadfile('0','所有知识');
  19. }
  20. },
  21. itemdblclick:function(d){
  22. typeid = d.id;
  23. c.loadfile(d.id,d.name);
  24. }
  25. });;
  26. var a = $('#view_{rand}').bootstable({
  27. tablename:'knowledge',celleditor:true,autoLoad:false,modenum:'knowledge',
  28. columns:[{
  29. text:'标题',dataIndex:'title',editor:false,align:'left'
  30. },{
  31. text:'分类',dataIndex:'typename'
  32. },{
  33. text:'添加时间',dataIndex:'adddt',sortable:true
  34. },{
  35. text:'操作时间',dataIndex:'optdt',sortable:true
  36. },{
  37. text:'操作人',dataIndex:'optname',sortable:true
  38. },{
  39. text:'排序',dataIndex:'sort',sortable:true
  40. },{
  41. text:'ID',dataIndex:'id'
  42. },{
  43. text:'',dataIndex:'opt',renderer:function(v,d,oi){
  44. return '<a href="javascript:;" onclick="openxiangs(\'知识\',\'knowledge\','+d.id+')">查看</a>';
  45. }
  46. }],
  47. itemdblclick:function(d){
  48. openxiangs(d.title,'knowledge', d.id);
  49. }
  50. });
  51. var c = {
  52. reload:function(){
  53. at.reload();
  54. },
  55. loadfile:function(spd,nsd){
  56. $('#megss{rand}').html(nsd);
  57. a.setparams({'typeid':spd}, true);
  58. },
  59. genmu:function(){
  60. typeid = sspid;
  61. at.changedata={};
  62. this.loadfile('0','所有知识');
  63. },
  64. daochu:function(){
  65. a.exceldown();
  66. },
  67. search:function(){
  68. var s=get('key_{rand}').value;
  69. a.setparams({key:s},true);
  70. }
  71. };
  72. js.initbtn(c);
  73. $('#optionview_{rand}').css('height',''+(viewheight-70)+'px');
  74. });
  75. </script>
  76. <table width="100%">
  77. <tr valign="top">
  78. <td width="220">
  79. <div style="border:1px #cccccc solid">
  80. <div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
  81. <div class="panel-footer">
  82. <a href="javascript:" click="reload" onclick="return false"><i class="icon-refresh"></i></a>
  83. </div>
  84. </div>
  85. </td>
  86. <td width="10" nowrap><div style="width:10px">&nbsp;</div></td>
  87. <td>
  88. <div>
  89. <table width="100%"><tr>
  90. <td align="left" nowrap>
  91. <button class="btn btn-default" click="genmu" type="button">所有知识</button>&nbsp;
  92. </td>
  93. <td style="padding-left:10px">
  94. <input class="form-control" style="width:180px" id="key_{rand}" placeholder="标题/分类">
  95. </td>
  96. <td style="padding-left:10px">
  97. <button class="btn btn-default" click="search" type="button">搜索</button>
  98. </td>
  99. <td width="90%">
  100. &nbsp;&nbsp;<span id="megss{rand}"></span>
  101. </td>
  102. <td align="right">
  103. <button class="btn btn-default" click="daochu" type="button">导出</button>
  104. </td>
  105. </tr></table>
  106. </div>
  107. <div class="blank10"></div>
  108. <div id="view_{rand}"></div>
  109. </td>
  110. </tr>
  111. </table>
粤ICP备19079148号