index.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <style>
  2. /*切换选择*/
  3. .tab-con{
  4. position: relative;
  5. height: 30px;
  6. width: 200px;
  7. background: #F2F2F2;
  8. border: 1px solid #2977ff;
  9. border-radius: 15px;
  10. }
  11. .sel-opt{
  12. width: 50%;
  13. position: relative;
  14. color: #2977ff;
  15. line-height: 30px;
  16. text-indent: 6px;
  17. cursor: pointer;
  18. }
  19. .sel-opt:after{
  20. content: '';
  21. border-left: 6px solid transparent;
  22. border-right: 6px solid transparent;
  23. border-top: 8px solid #2977ff;
  24. position: absolute;
  25. right: 12px;
  26. top: 12px;
  27. }
  28. .xdsoft_datetimepicker{
  29. z-index:99999999!important;
  30. }
  31. // .sel-opt select{
  32. // width: 100%;
  33. // height: 30px;
  34. // background: #F2F2F2;
  35. // color: #01B677;
  36. // text-indent: 6px;
  37. // font-size: inherit;
  38. // border-top-right-radius: 15px;
  39. // border-bottom-right-radius: 15px;
  40. // cursor: pointer;
  41. // }
  42. // .sel-opt select option{
  43. // position: relative;
  44. // }
  45. .points{
  46. position: absolute;
  47. top: -2px;
  48. right: 0;
  49. width: 10px;
  50. height: 10px;
  51. background: #F01516;
  52. border-radius: 50%;
  53. }
  54. .sel-cons{
  55. border: 1px solid #2977ff;
  56. width: 50%;
  57. position: absolute;
  58. right: 0;
  59. top: 30px;
  60. text-indent: 10px;
  61. display: none;
  62. }
  63. .sc-lis{
  64. line-height: 30px;
  65. cursor: pointer;
  66. }
  67. .sc-lis span{
  68. position: relative;
  69. }
  70. .sc-lis .points{
  71. top: 2px;
  72. right: -16px;
  73. }
  74. .click-sc:focus {
  75. color: #fff;
  76. }
  77. .click-sc:hover {
  78. color: #fff;
  79. }
  80. .create-third{
  81. position: absolute;
  82. right: 6px;
  83. top: 10px;
  84. }
  85. .tab-con-btn{
  86. height: 31px;
  87. width: 210px;
  88. background: #F2F2F2;
  89. border: 1px solid #2977ff;
  90. border-radius: 15px;
  91. display: inline-block;
  92. text-align: center;
  93. }
  94. .tab_btn{
  95. display: inline-block;
  96. width:100px;
  97. padding: 0;
  98. border: 0;
  99. outline:none;
  100. margin:0;
  101. background: #F2F2F2;
  102. border-radius: inherit;
  103. }
  104. .has-sel{
  105. background: #2977ff;
  106. color: #fff;
  107. width: 50%;
  108. height: 30px;
  109. border-top-left-radius: 15px;
  110. border-bottom-left-radius: 15px;
  111. text-align: center;
  112. line-height: 30px;
  113. }
  114. .has-sel-1{
  115. background: #2977ff;
  116. color: #fff;
  117. width: 50%;
  118. height: 30px;
  119. border-top-right-radius: 15px;
  120. border-bottom-right-radius: 15px;
  121. text-align: center;
  122. line-height: 30px;
  123. }
  124. .layer-upload{padding:10px 20px; display:none;}
  125. .layer-upload p{line-height:20px;color:#aaa;}
  126. .upload-btn{color:#2977ff}
  127. .layer-upload ul{padding:10px;line-height:30px; border:1px solid #ccc;}
  128. .layer-upload li{border-bottom:1px solid #ccc;}
  129. .layer-upload li span{width:40%;}
  130. .layer-upload li em{width:20%;font-size:26px;text-align:center;cursor:pointer}
  131. .tooltip {
  132. position: absolute;
  133. display: none;
  134. z-index: 9900000;
  135. outline: none;
  136. padding: 5px;
  137. border-width: 1px;
  138. border-style: solid;
  139. border-radius: 5px;
  140. -moz-border-radius: 5px 5px 5px 5px;
  141. -webkit-border-radius: 5px 5px 5px 5px;
  142. border-radius: 5px 5px 5px 5px;
  143. }
  144. .table-hover>tbody>tr:hover {
  145. background-color: #E6F1EC
  146. }
  147. .selectSendType{width:180px;height:100px;border:1px solid #ccc;display: inline-block;text-align: center;line-height: 100px;cursor:pointer;border-radius:5px;}
  148. .selected{background:#aaa; }
  149. /* Tooltip 容器 */
  150. .tooltipclass {
  151. display: inline-block;
  152. }
  153. /* Tooltip 文本 */
  154. .tooltipclass .tooltiptext {
  155. visibility: hidden;
  156. width: 160px;
  157. background-color: #555;
  158. color: #fff;
  159. padding: 5px;
  160. border-radius: 6px;
  161. font-size:11px;
  162. text-align: left;
  163. /* 定位 */
  164. position: absolute;
  165. z-index: 1;
  166. }
  167. /* 鼠标移动上去后显示提示框 */
  168. .tooltipclass:hover .tooltiptext {
  169. visibility: visible;
  170. }
  171. .sendLabelTask{margin-left:10px;}
  172. </style>
  173. <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
  174. <link rel="stylesheet" href="/css/alert.css"/>
  175. <link rel="stylesheet" href="/fonts/shangchuan/iconfont.css" />
  176. <script language="javascript" src="<?php echo Yii::app()->params['static_url_js']; ?>/js/MaskUtil.js?<?php echo Yii::app()->params['static_version']; ?>"></script>
  177. <div class="layer-upload">
  178. <p>请上传试卷及答案解析,发送给后台老师标注。支持word、PDF或图片格式</p>
  179. <div class="clearfix">
  180. <span class="fl">试卷:</span>
  181. <a href="javascript:;" class="fr upload-btn upload-btn-paper">+添加附件</a>
  182. </div>
  183. <ul class="upload-ul-paper">
  184. </ul>
  185. <div class="clearfix">
  186. <span class="fl">答案及解析:</span>
  187. <a href="javascript:;" class="fr upload-btn upload-btn-answer">+添加附件</a>
  188. </div>
  189. <ul class="upload-ul-answer">
  190. </ul>
  191. <input type="hidden" name="english_paper" class="english_paper_id" value="0"/>
  192. <p class="red">请确保试卷及答案解析完整,再发送标注,否则无法生成错题本/个性化学习宝</p>
  193. <p class="red">*单个文件不要超过8M</p>
  194. <div class="clearfix">
  195. <div class="mcp-form-menu fl">期望标注完成时间</div>
  196. <div class="mcp-form-detail fl clearfix">
  197. <input type="text" class='core datetimepicker8' style="width: 140px;line-height: 27px;padding-left: 5px;" name="english-print-time" id="trial_begin_time_test" autocomplete="off" readonly="readonly"/>
  198. </div>
  199. <div id="examDate"></div>
  200. </div>
  201. </div>
  202. <?php include(Yii::app()->basePath.'/views/layouts/parse_label.php');?>
  203. <div class="main-content-inner">
  204. <!-- 导航栏开始-->
  205. <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
  206. <!-- 导航栏结束-->
  207. <div class="page-content">
  208. <div class="row" style="margin:0px;">
  209. <div class="col-xs-12">
  210. <!-- PAGE CONTENT BEGINS -->
  211. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  212. <div class="row">
  213. <form method="get" id="form1" action="<?php echo $this->createUrl("homework/index");?>">
  214. <div class="col-xs-12">
  215. <div class="dataTables_length margin-zy">
  216. <input type="hidden" name="list_type" value="<?php if(isset($list_type)){echo $list_type;}else{echo 0;}?>" />
  217. <input type="hidden" name="type" value="<?php echo $printType;?>" />
  218. <input type="checkbox" name="display" style="margin: -1px 2px 0 0;display:inline-block;vertical-align: middle;width:15px;height:15px;" value="1" <?php if($display === '1') echo "checked";?>>显示隐藏作业
  219. <select class="form-control" id="grade" name="grade">
  220. <option value="0">年级</option>
  221. <?php
  222. if(Yii::app()->params['grade_config']){
  223. foreach (Yii::app()->params['grade_config'] as $val){
  224. if($grade==$val['id']){
  225. echo ' <option value="'.$val['id'].'" selected >'.$val['grade_name'].'</option>';
  226. }else{
  227. echo ' <option value="'.$val['id'].'" >'.$val['grade_name'].'</option>';
  228. }
  229. }
  230. }
  231. ?>
  232. </select>
  233. <input type="text" class="form-control input-sm" placeholder="请输入作业名称/命卷人" name="name" value="<?php echo $printName;?>">
  234. <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
  235. </div>
  236. </div>
  237. </form>
  238. </div>
  239. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
  240. <thead>
  241. <tr>
  242. <th>作业名称</th>
  243. <th>命卷人</th>
  244. <th>年级</th>
  245. <th>发送打印时间</th>
  246. <th>布置作业时间</th>
  247. <th>状态</th>
  248. <th>操作</th>
  249. </tr>
  250. </thead>
  251. <tbody>
  252. <?php if(!empty($printList)):foreach($printList as $cl):?>
  253. <tr>
  254. <td style="max-width:260px">
  255. <?php echo $cl['exam_name']; ?>
  256. </td>
  257. <td><?php if($teachers && isset($teachers[$cl['teacher_id']])){ echo $teachers[$cl['teacher_id']];}else{echo "";}?></td>
  258. <td><?php echo Yii::app()->params['grade_config'][$cl['grade']]['grade_name']?></td>
  259. <td><?php if(!empty($cl['create_time'])){ echo date('Y-m-d H:i',$cl['create_time']);}?></td>
  260. <td><?php if(!empty($cl['examDate'])){ echo date('Y-m-d H:i',$cl['examDate']);}else{echo '--';}?></td>
  261. <td >
  262. <?php
  263. if(!isset($exam_sheets[$cl['exam_group_id']]) ){
  264. echo '<span class="red">待制卡</span>';
  265. }elseif(!$exam_sheets[$cl['exam_group_id']]){
  266. echo '<span class="blue">待生成</span>';
  267. }elseif($cl['downloaded']){
  268. echo '已打印/已下载';
  269. }else{
  270. echo '<span class="green">待下载/待打印</span>';
  271. }
  272. ?>
  273. </td>
  274. <td>
  275. <?php
  276. if(!isset($exam_sheets[$cl['exam_group_id']]) || !$exam_sheets[$cl['exam_group_id']]){
  277. ?>
  278. <span class="iconfont" onclick="createCard('<?php echo $cl['xb_homework_id']?>')" aria-hidden="true" title="制作答题卡" ><img src="/images/card_blue.png"></span>
  279. <?php
  280. }else{
  281. ?>
  282. <span class="iconfont " aria-hidden="true" title="制作答题卡" ><img src="/images/card_gray.png"></span>
  283. <?php
  284. }
  285. ?>
  286. <?php
  287. if(isset($exam_sheets[$cl['exam_group_id']]) && $exam_sheets[$cl['exam_group_id']]){
  288. ?>
  289. <span class="iconfont disabled" aria-hidden="true" onclick="downloadOnline('<?php echo $cl['exam_group_id']?>');" title="下载答题卡" ><img src="/images/hw_down_blue.png"></span>
  290. <span class="iconfont" aria-hidden="true" onclick="printOnline('<?php echo $exam_sheets[$cl['exam_group_id']]?>','<?php echo $cl['exam_name']?>','<?php echo $cl['exam_group_id']?>');" title="打印答题卡" ><img src="/images/print_blue.png"></span>
  291. <?php
  292. }else{
  293. ?>
  294. <span class="iconfont disabled" aria-hidden="true" title="下载答题卡" ><img src="/images/hw_down_gray.png"></span>
  295. <span class="iconfont" aria-hidden="true" title="打印答题卡" ><img src="/images/print_gray.png"></span>
  296. <?php
  297. }
  298. ?>
  299. <?php if($cl['is_display'] == 1):?>
  300. <span class="iconfont click-sc click-tc addbx" aria-hidden="true" title="恢复试卷" onclick="oprateExam('<?php echo $cl['exam_group_id'];?>',0)">&#xe68f;</span>
  301. <?php else:?>
  302. <span class="iconfont click-sc click-delete addbx" aria-hidden="true" title="隐藏试卷" onclick="oprateExam('<?php echo $cl['exam_group_id'];?>',1)">&#xe68b;</span>
  303. <?php endif;?>
  304. </td>
  305. </tr>
  306. <?php endforeach;else:?>
  307. <tr><td colspan="10">暂无数据!</td></tr>
  308. <?php endif;?>
  309. </tbody>
  310. </table>
  311. <?php if(!empty($page_total)):?>
  312. <div class="row">
  313. <div class="col-xs-6">
  314. &nbsp;
  315. </div>
  316. <div class="col-xs-6">
  317. <div class="dataTables_paginate paging_simple_numbers">
  318. <?php
  319. $this->widget('CLinkPager', array(
  320. 'header' => '',
  321. 'firstPageLabel'=> '首页',
  322. 'lastPageLabel' => '末页',
  323. 'prevPageLabel' => '上一页',
  324. 'nextPageLabel' => '下一页',
  325. 'pages' => $pages,
  326. 'maxButtonCount'=> 5,
  327. ));
  328. echo '共:'.$page_total.'条';
  329. ?>
  330. </div>
  331. </div>
  332. </div>
  333. <?php endif;?>
  334. </div>
  335. <!--上传模板弹窗-->
  336. <!-- PAGE CONTENT ENDS -->
  337. </div>
  338. </div>
  339. </div>
  340. </div>
  341. <!--题目设置弹窗-->
  342. <style>
  343. .topic_list,.topic_class{width:100%;display: block;clear:both}
  344. .topic_list li{padding:0 10px;height:30px;border:1px solid #ccc;background: #fff;margin:5px;text-align: center;line-height: 30px;cursor: pointer}
  345. .topic_list li.active{background:#aaa}
  346. .topic_class li{margin:0 10px 5px 10px;padding:0;float:left}
  347. .topic-modal-body{margin-top:15px;max-height: 400px;overflow: auto}
  348. .topic_right{float:left;margin-bottom:15px;}
  349. .topic_right li{float:left;}
  350. .gray{background: #0a3e64}
  351. </style>
  352. <div class="confirmbox-mask" style="display:none;" id="fieldModalTopic">
  353. <div class="class-modal" style="padding: 0;width:400px;height:250px;min-height: 250px;">
  354. <div class="class-modal-head" ><span class="change-tpl-close" style="float: right;padding: 5px;cursor: pointer;">X</span></div>
  355. <form id="examSelect">
  356. <div class="topic-modal-body">
  357. <br>
  358. 当前考试已存在在线答题卡数据,请选择你需要的操作<br>
  359. 【仅切换模板】:仅删除在线答题卡扫描模板,原有试题结构及指定题目保留,<br>
  360. 【重新制作】:删除已有试题及模板数据,重新制作模板(仅支持未上传成绩、试卷且未发送标注考试)<br>
  361. <font color="red">注意:选做题含有小题的考试暂不支持切换切割模板</font>
  362. </div>
  363. <br><br>
  364. <p class="class_btn" style="text-align: center;">
  365. <input type="hidden" name="tpl_exam_group_id" value="0">
  366. <input type="hidden" name="tpl_qxk" value="0">
  367. <button type="button" class="tpl_change" style="margin-right: 10px;">仅切换模板</button>
  368. <button type="button" feedback="0" class="tpl_new gray">重新制作</button>
  369. </p>
  370. </form>
  371. </div>
  372. </div>
  373. <!--题目设置弹窗end-->
  374. <?php require "_third.php"?>