change.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. <div class="main-content-inner">
  83. <!-- 导航栏开始-->
  84. <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
  85. <!-- 导航栏结束-->
  86. <div class="page-content">
  87. <div class="row" style="margin:0px">
  88. <div class="col-xs-12">
  89. <!-- PAGE CONTENT BEGINS -->
  90. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  91. <div class="row">
  92. <div class="col-xs-4">
  93. <form method="get" id="form1" action="<?php echo $this->createUrl("zhiliao/change");?>">
  94. <div class="dataTables_length" style="margin: 6px 0px;">
  95. <div class="dataTables_length">
  96. <label><input type="text" class="form-control input-sm" placeholder="请输入学生姓名" name="sname" value="<?php echo $sname;?>"></label>
  97. <!--<button class="btn btn-minier btn-primary" id="search">搜索</button>-->
  98. <button style="padding:4px 12px;"class="label-primary-s bth-s">搜索</button>
  99. </div>
  100. </div>
  101. <input type="hidden" name="cid" class="clid" value="<?php echo $class_id;?>" />
  102. <input type="hidden" name="eid" class="emid" value="<?php echo $exam_id;?>" />
  103. </form>
  104. </div>
  105. </div>
  106. <div class="row">
  107. <div class="col-xs-12" style="font-weight:bold;padding:0px 15px">
  108. <?php echo $className;?> <?php echo $paperName;?>
  109. </div>
  110. </div>
  111. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
  112. <thead>
  113. <tr>
  114. <th>学生名称</th>
  115. <th>学生编号</th>
  116. <th>身份证号</th>
  117. <th>成绩是否已生成</th>
  118. </tr>
  119. </thead>
  120. <tbody>
  121. <?php if(!empty($result)):foreach($result as $rt):?>
  122. <tr>
  123. <td><?php echo $rt['studentName'];?></td>
  124. <td><?php echo $rt['studentCode'];?></td>
  125. <td><?php echo $rt['id_number'];?></td>
  126. <td><?php echo $rt['is_complete'] ? "<span style='color:green'>是</span>" : "<span style='color:red'>否</span>";?></td>
  127. </tr>
  128. <?php endforeach;else:?>
  129. <tr><td colspan="5">暂无数据!</td></tr>
  130. <?php endif;?>
  131. </tbody>
  132. </table>
  133. </div>
  134. <!-- PAGE CONTENT ENDS -->
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <script type="text/javascript">
  140. $(document).ready(function(){
  141. /*var str = '<div class="points"></div>';
  142. $(".sc-lis").each(function(){
  143. if($(this).find(".points").length>0){
  144. $(".sel-opt").append(str);
  145. }
  146. });*/
  147. $(".sel-opt,.sel-cons").mouseover(function(){
  148. $(".sel-cons").show();
  149. }).mouseout(function(){
  150. $(".sel-cons").hide();
  151. });
  152. $(".sc-lis").click(function(){
  153. var data = {
  154. subjectId : $(this).attr('val')
  155. };
  156. $.post("<?php echo Yii::app()->createUrl('print/setSubjectId')?>",data,function(flags){
  157. if(flags)
  158. {
  159. location.reload();
  160. }else
  161. {
  162. alert('网络异常');
  163. }
  164. });
  165. $('.has-sel').text($(this).text());
  166. $(".sel-cons").hide();
  167. });
  168. })
  169. function ccc(){
  170. layer.msg('敬请期待!', {
  171. time: 0,
  172. btn: ['确定', '取消'],
  173. yes: function(index){
  174. layer.close(index);
  175. return false;
  176. }
  177. });
  178. }
  179. $(function(){
  180. // 全选\反选
  181. $(".selectAll").click(function(){
  182. if ($(this).prop("checked")) {
  183. $(".myselect").prop("checked",true);
  184. } else {
  185. $(".myselect").prop("checked",false);
  186. }
  187. });
  188. $("body").delegate("#stu_select_all","click",function(){
  189. $(this).closest("table").find("tbody .myselect").prop("checked",$(this).prop("checked"))
  190. });
  191. })
  192. </script>