do_ruanyun_pdf.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <style>
  2. /*切换选择*/
  3. .tab-con{
  4. position: relative;
  5. height: 30px;
  6. width: 200px;
  7. background: #F2F2F2;
  8. border: 1px solid #01B677;
  9. border-radius: 15px;
  10. }
  11. .has-sel{
  12. background: #01B677;
  13. color: #fff;
  14. width: 50%;
  15. height: 30px;
  16. border-top-left-radius: 15px;
  17. border-bottom-left-radius: 15px;
  18. text-align: center;
  19. line-height: 30px;
  20. }
  21. .sel-opt{
  22. width: 50%;
  23. position: relative;
  24. color: #01B677;
  25. line-height: 30px;
  26. text-indent: 6px;
  27. cursor: pointer;
  28. }
  29. .sel-opt:after{
  30. content: '';
  31. border-left: 6px solid transparent;
  32. border-right: 6px solid transparent;
  33. border-top: 8px solid #01B677;
  34. position: absolute;
  35. right: 12px;
  36. top: 12px;
  37. }
  38. // .sel-opt select{
  39. // width: 100%;
  40. // height: 30px;
  41. // background: #F2F2F2;
  42. // color: #01B677;
  43. // text-indent: 6px;
  44. // font-size: inherit;
  45. // border-top-right-radius: 15px;
  46. // border-bottom-right-radius: 15px;
  47. // cursor: pointer;
  48. // }
  49. // .sel-opt select option{
  50. // position: relative;
  51. // }
  52. .points{
  53. position: absolute;
  54. top: -2px;
  55. right: 0;
  56. width: 10px;
  57. height: 10px;
  58. background: #F01516;
  59. border-radius: 50%;
  60. }
  61. .sel-cons{
  62. border: 1px solid #01B677;
  63. width: 50%;
  64. position: absolute;
  65. right: 0;
  66. top: 30px;
  67. text-indent: 10px;
  68. display: none;
  69. }
  70. .sc-lis{
  71. line-height: 30px;
  72. cursor: pointer;
  73. }
  74. .sc-lis span{
  75. position: relative;
  76. }
  77. .sc-lis .points{
  78. top: 2px;
  79. right: -16px;
  80. }
  81. </style>
  82. <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
  83. <div class="main-content-inner">
  84. <ul class="clearfix main-content-inner-ul">
  85. <li class="pull-left">
  86. <button onclick='location.href="<?php echo $this->createUrl("print/index",array('type'=>'wp'));?>"' class="button button_normal button_group button_arrow " data-button="red">打印试卷</button>
  87. <img src="/images/line.jpg" style="height:45px;" />
  88. </li>
  89. <li class="pull-left">
  90. <button onclick='location.href="<?php echo $this->createUrl("export/index");?>"' class="button button_normal button_group button_arrow " data-button="red">导出报告</button>
  91. <img src="/images/line.jpg" style="height:45px;" />
  92. </li>
  93. <li class="pull-left">
  94. <button onclick='location.href="<?php echo $this->createUrl("print/do_ruanyun_pdf");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">下载PDF</button>
  95. <img src="/images/line.jpg" style="height:45px;" />
  96. </li>
  97. <li class="pull-left">
  98. <button onclick='location.href="<?php echo $this->createUrl("cylet/index");?>"' class="button button_normal button_group button_arrow" data-button="red">全学科统考</button>
  99. </li>
  100. <div class="tab-con clearfix pull-right" style="margin:8px 11px 0 0">
  101. <div class="has-sel fl"><?php echo isset(Yii::app()->params["subjectId"][Yii::app()->session['session_subject_id']])?Yii::app()->params["subjectId"][Yii::app()->session['session_subject_id']]:'物理'?></div>
  102. <div class="sel-opt fl">
  103. 切换学科
  104. <?php if($subject){?>
  105. <div class="points"></div>
  106. <?php }?>
  107. </div>
  108. <div class="sel-cons" style="z-index:6;background-color: #fff;">
  109. <div class="sc-lis" val="12"><span>物理<?php if($subject && isset($subject[12]) && !empty($subject[12])){?><div class="points"></div><?php }?></span></div>
  110. <div class="sc-lis" val="13"><span>化学<?php if($subject && isset($subject[13]) && !empty($subject[13])){?><div class="points"></div><?php }?></span></div>
  111. <div class="sc-lis" val="14"><span>生物<?php if($subject && isset($subject[14]) && !empty($subject[14])){?><div class="points"></div><?php }?></span></div>
  112. </div>
  113. </div>
  114. </ul>
  115. <div class="page-content">
  116. <div class="row" style="margin:0px;">
  117. <div class="col-xs-12">
  118. <!-- PAGE CONTENT BEGINS -->
  119. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  120. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
  121. <thead>
  122. <tr>
  123. <th>名称</th>
  124. <th>班级</th>
  125. <th >操作</th>
  126. </tr>
  127. </thead>
  128. <tbody>
  129. <?php if(!empty($printList)):foreach($printList as $cl):?>
  130. <tr>
  131. <td style="max-width:260px"><?php
  132. if($cl['is_new']==0)
  133. {
  134. echo "<span style='color: #ff0000;font-weight: bold;'>【New】</span>";
  135. }
  136. ?>
  137. <?php echo $cl['print_name'];?>
  138. </td>
  139. <td style="max-width:100px"><?php echo $cl['class_name'];?></td>
  140. <td style="width:265px;">
  141. <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生" onclick="javascript:location.href='<?php echo $this->createUrl('print/ruanyun_change',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'tid'=>$cl['type']));?>'">&#xe668;</span>
  142. </td>
  143. </tr>
  144. <?php endforeach;else:?>
  145. <tr><td colspan="3">暂无数据!</td></tr>
  146. <?php endif;?>
  147. </tbody>
  148. </table>
  149. <?php if(!empty($page_total)):?>
  150. <div class="row">
  151. <div class="col-xs-6">
  152. &nbsp;
  153. </div>
  154. <div class="col-xs-6">
  155. <div class="dataTables_paginate paging_simple_numbers">
  156. <?php
  157. $this->widget('CLinkPager', array(
  158. 'header' => '',
  159. 'firstPageLabel'=> '首页',
  160. 'lastPageLabel' => '末页',
  161. 'prevPageLabel' => '上一页',
  162. 'nextPageLabel' => '下一页',
  163. 'pages' => $pages,
  164. 'maxButtonCount'=> 5,
  165. ));
  166. echo '共:'.$page_total.'条';
  167. ?>
  168. </div>
  169. </div>
  170. </div>
  171. <?php endif;?>
  172. </div>
  173. <!--上传模板弹窗-->
  174. <!-- PAGE CONTENT ENDS -->
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. <script src="/js/jquery.ajaxfileupload.js"></script>
  180. <script type="text/javascript">
  181. $(document).ready(function(){
  182. /*var str = '<div class="points"></div>';
  183. $(".sc-lis").each(function(){
  184. if($(this).find(".points").length>0){
  185. $(".sel-opt").append(str);
  186. }
  187. });*/
  188. $(".sel-opt,.sel-cons").mouseover(function(){
  189. $(".sel-cons").show();
  190. }).mouseout(function(){
  191. $(".sel-cons").hide();
  192. });
  193. $(".sc-lis").click(function(){
  194. var data = {
  195. subjectId : $(this).attr('val')
  196. };
  197. $.post("<?php echo Yii::app()->createUrl('print/setSubjectId')?>",data,function(flags){
  198. if(flags)
  199. {
  200. location.reload();
  201. }else
  202. {
  203. alert('网络异常');
  204. }
  205. });
  206. $('.has-sel').text($(this).text());
  207. $(".sel-cons").hide();
  208. });
  209. });
  210. </script>