rock_infor_zhishi.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. var a = $('#view_{rand}').bootstable({
  5. tablename:'knowledge',celleditor:true,autoLoad:false,modenum:'knowledge',fanye:true,
  6. columns:[{
  7. text:'标题',dataIndex:'title',editor:false,align:'left'
  8. },{
  9. text:'分类',dataIndex:'typename'
  10. },{
  11. text:'添加时间',dataIndex:'adddt',sortable:true
  12. },{
  13. text:'操作时间',dataIndex:'optdt',sortable:true
  14. },{
  15. text:'操作人',dataIndex:'optname'
  16. },{
  17. text:'排序',dataIndex:'sort',sortable:true,editor:true
  18. },{
  19. text:'ID',dataIndex:'id'
  20. },{
  21. text:'',dataIndex:'caozuo'
  22. }],
  23. itemdblclick:function(d){
  24. openxiangs(d.title,'knowledge', d.id);
  25. }
  26. });
  27. var c = {
  28. del:function(){
  29. a.del();
  30. },
  31. adds:function(){
  32. openinput('知识','knowledge');
  33. },
  34. search:function(){
  35. var s=get('key_{rand}').value;
  36. a.setparams({key:s},true);
  37. },
  38. daochu:function(){
  39. a.exceldown();
  40. },
  41. mobj:a,
  42. title:'知识分类',
  43. stable:'knowledge',
  44. optionview:'optionview_{rand}',
  45. optionnum:'knowledgetype',
  46. rand:'{rand}'
  47. };
  48. var c = new optionclass(c);
  49. js.initbtn(c);
  50. });
  51. </script>
  52. <table width="100%">
  53. <tr valign="top">
  54. <td>
  55. <div style="border:1px #cccccc solid;width:220px">
  56. <div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
  57. </div>
  58. </td>
  59. <td width="10" nowrap><div style="width:10px">&nbsp;</div></td>
  60. <td width="95%">
  61. <div>
  62. <table width="100%"><tr>
  63. <td align="left" nowrap>
  64. <button class="btn btn-primary" click="adds" type="button"><i class="icon-plus"></i> 新增</button>&nbsp;
  65. <button class="btn btn-default" click="allshow" type="button">所有知识</button>&nbsp;
  66. </td>
  67. <td style="padding-left:10px">
  68. <input class="form-control" style="width:180px" id="key_{rand}" placeholder="标题/分类">
  69. </td>
  70. <td style="padding-left:10px">
  71. <button class="btn btn-default" click="search" type="button">搜索</button>
  72. </td>
  73. <td width="90%">
  74. &nbsp;&nbsp;<span id="megss{rand}"></span>
  75. </td>
  76. <td align="right">
  77. <button class="btn btn-default" click="daochu" type="button">导出</button>
  78. </td>
  79. </tr></table>
  80. </div>
  81. <div class="blank10"></div>
  82. <div id="view_{rand}"></div>
  83. </td>
  84. </tr>
  85. </table>
粤ICP备19079148号