rock_infor_tikuxx.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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':'knowtikutype'}),
  9. columns:[{
  10. text:'题库分类',dataIndex:'name',align:'left',xtype:'treecolumn'
  11. }],
  12. load:function(d){
  13. if(sspid==0){
  14. typeid = d.pid;
  15. sspid = d.pid;
  16. c.loadfile('0','所有题库');
  17. }
  18. },
  19. itemdblclick:function(d){
  20. typeid = d.id;
  21. c.loadfile(d.id,d.name);
  22. }
  23. });;
  24. var modenum='knowtiku';
  25. var a = $('#view_{rand}').bootstable({
  26. tablename:modenum,celleditor:false,autoLoad:false,modenum:modenum,fanye:true,params:{atype:'xuexi'},
  27. columns:[{
  28. text:'题名',dataIndex:'title',editor:false,align:'left'
  29. },{
  30. text:'分类',dataIndex:'typename'
  31. },{
  32. text:'类型',dataIndex:'type'
  33. },{
  34. text:'A',dataIndex:'ana'
  35. },{
  36. text:'B',dataIndex:'anb'
  37. },{
  38. text:'C',dataIndex:'anc'
  39. },{
  40. text:'D',dataIndex:'and'
  41. },{
  42. text:'E',dataIndex:'ane'
  43. },{
  44. text:'答案',dataIndex:'answer',renderer:function(v,d,oi){
  45. return '<a href="javascript:;" onclick="openxiangs(\'知识学习\',\'knowtiku\','+d.id+')">查看</a>';
  46. }
  47. }],
  48. itemdblclick:function(d){
  49. openxiangs(d.title,modenum, d.id);
  50. }
  51. });
  52. var c = {
  53. reload:function(){
  54. at.reload();
  55. },
  56. loadfile:function(spd,nsd){
  57. $('#megss{rand}').html(nsd);
  58. a.setparams({'typeid':spd}, true);
  59. },
  60. genmu:function(){
  61. typeid = sspid;
  62. at.changedata={};
  63. this.loadfile('0','所有题库');
  64. },
  65. daochu:function(){
  66. a.exceldown();
  67. },
  68. search:function(){
  69. var s=get('key_{rand}').value;
  70. a.setparams({key:s},true);
  71. }
  72. };
  73. js.initbtn(c);
  74. $('#optionview_{rand}').css('height',''+(viewheight-70)+'px');
  75. });
  76. </script>
  77. <table width="100%">
  78. <tr valign="top">
  79. <td width="220">
  80. <div style="border:1px #cccccc solid">
  81. <div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
  82. <div class="panel-footer">
  83. <a href="javascript:" click="reload" onclick="return false"><i class="icon-refresh"></i></a>
  84. </div>
  85. </div>
  86. </td>
  87. <td width="10" nowrap><div style="width:10px">&nbsp;</div></td>
  88. <td>
  89. <div>
  90. <table width="100%"><tr>
  91. <td align="left" nowrap>
  92. <button class="btn btn-default" click="genmu" type="button">所有题库</button>&nbsp;
  93. </td>
  94. <td style="padding-left:10px">
  95. <input class="form-control" style="width:200px" id="key_{rand}" placeholder="题名/分类">
  96. </td>
  97. <td style="padding-left:10px">
  98. <button class="btn btn-default" click="search" type="button">搜索</button>
  99. </td>
  100. <td width="90%">
  101. &nbsp;&nbsp;<span id="megss{rand}"></span>
  102. </td>
  103. <td align="right">
  104. <button class="btn btn-default" click="daochu" type="button">导出</button>
  105. </td>
  106. </tr></table>
  107. </div>
  108. <div class="blank10"></div>
  109. <div id="view_{rand}"></div>
  110. </td>
  111. </tr>
  112. </table>
粤ICP备19079148号