index.php 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. <script src="/js/xsgl.js"></script>
  2. <link rel="stylesheet" href="/css/cylet.css" />
  3. <link rel="stylesheet" href="/css/export/report.css?v=1.0.10" />
  4. <style>
  5. a:hover, a:focus {
  6. color: #23527c;
  7. text-decoration: none;
  8. }
  9. @font-face {font-family: "iconfont";
  10. src: url('/fonts/pdf/iconfont.eot?t=1484561666180'); /* IE9*/
  11. src: url('/fonts/pdf/iconfont.eot?t=1484561666180#iefix') format('embedded-opentype'), /* IE6-IE8 */
  12. url('/fonts/pdf/iconfont.woff?t=1484561666180') format('woff'), /* chrome, firefox */
  13. url('/fonts/pdf/iconfont.ttf?t=1484561666180') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
  14. url('/fonts/pdf/iconfont.svg?t=1484561666180#iconfont') format('svg'); /* iOS 4.1- */
  15. }
  16. .iconfont {
  17. font-family:"iconfont" !important;
  18. font-size:16px;
  19. font-style:normal;
  20. -webkit-font-smoothing: antialiased;
  21. -moz-osx-font-smoothing: grayscale;
  22. }
  23. /*切换选择*/
  24. .tab-con{
  25. position: relative;
  26. height: 30px;
  27. width: 200px;
  28. background: #F2F2F2;
  29. border: 1px solid #01B677;
  30. border-radius: 15px;
  31. }
  32. .has-sel{
  33. background: #01B677;
  34. color: #fff;
  35. width: 50%;
  36. height: 30px;
  37. border-top-left-radius: 15px;
  38. border-bottom-left-radius: 15px;
  39. text-align: center;
  40. line-height: 30px;
  41. }
  42. .sel-opt{
  43. width: 50%;
  44. position: relative;
  45. color: #01B677;
  46. line-height: 30px;
  47. text-indent: 6px;
  48. cursor: pointer;
  49. }
  50. .sel-opt:after{
  51. content: '';
  52. border-left: 6px solid transparent;
  53. border-right: 6px solid transparent;
  54. border-top: 8px solid #01B677;
  55. position: absolute;
  56. right: 12px;
  57. top: 12px;
  58. }
  59. .sel-opt select{
  60. width: 100%;
  61. height: 30px;
  62. background: #F2F2F2;
  63. color: #01B677;
  64. text-indent: 6px;
  65. font-size: inherit;
  66. border-top-right-radius: 15px;
  67. border-bottom-right-radius: 15px;
  68. cursor: pointer;
  69. }
  70. .sel-opt select option{
  71. position: relative;
  72. }
  73. .points{
  74. position: absolute;
  75. top: -2px;
  76. right: 0;
  77. width: 10px;
  78. height: 10px;
  79. background: #F01516;
  80. border-radius: 50%;
  81. }
  82. .sel-cons{
  83. border: 1px solid #01B677;
  84. width: 50%;
  85. position: absolute;
  86. right: 0;
  87. top: 30px;
  88. text-indent: 10px;
  89. display: none;
  90. }
  91. .sc-lis{
  92. line-height: 30px;
  93. cursor: pointer;
  94. }
  95. .sc-lis span{
  96. position: relative;
  97. }
  98. .sc-lis .points{
  99. top: 2px;
  100. right: -16px;
  101. }
  102. .icon-pdf:before { content: "\e618"; }}
  103. .fl{float:left;}
  104. /* 往期教师讲案按钮 */
  105. .history-teacher-exolaincase-btn{cursor: pointer;background: #2977ff;color: #fff;width: 190px;height: 28px;margin-left: 10px;text-indent: 10px;}
  106. .history-teacher-exolaincase-btn img,.history-teacher-exolaincase-btn span{ color: #fff;vertical-align: middle;line-height: 28px;font-size: 12px;}
  107. .dtw-top-right-btns{float: right;padding-right:10px;}
  108. .dtw-top-left-cons{float: left;padding-left: 12px;}
  109. .layui-layer-btn a:hover{color: #fff}
  110. </style>
  111. <div class="main-content-inner">
  112. <!-- 导航栏开始-->
  113. <?php include(Yii::app()->basePath.'/views/layouts/view_production_navigation.php');?>
  114. <!-- 导航栏结束-->
  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. <div class="row">
  121. <form method="get" action="<?php echo $this->createUrl('export/index'); ?>" style="padding-left: 0px;">
  122. <div class="dtw-top-left-cons" >
  123. <div style="float: left; line-height: 30px; margin: 10px;">
  124. <input type="checkbox" name="display" class="" style="margin: -1px 2px 0 0;display:inline-block;vertical-align: middle;width:15px;height:15px;" value="1" <?php if($display === '1') echo "checked";?>>显示隐藏试卷
  125. </div>
  126. <div class="dataTables_length margin-zy fl" style="width: 650px">
  127. <div class='diy_select2' style="display: inline;margin-right: 5px;border: 1px solid #c9ccd2;width:140px;">
  128. <input type='hidden' id="type_id" name="type_id" class='diy_select_input2' value="<?php if (empty($type_id)) {
  129. echo 0;
  130. } else {
  131. echo $type_id;
  132. } ?>"/>
  133. <div class='diy_select_txt2'>
  134. <?php
  135. if (empty($type_id)) {
  136. echo '请选择试卷类别';
  137. } else {
  138. switch ($type_id) {
  139. case 1:echo '校本课程平台试卷';
  140. break;
  141. case 2:echo '第三方线上阅卷试卷';
  142. break;
  143. case 3:echo '第三方导入成绩试卷';
  144. break;
  145. }
  146. }
  147. ?>
  148. </div>
  149. <div class='diy_select_btn2'></div>
  150. <ul class='diy_select_list2'>
  151. <li val="0" >请选择试卷类别</li>
  152. <li val="1">校本课程平台试卷</li>
  153. <li val="2">第三方线上阅卷试卷</li>
  154. <li val="3">第三方导入成绩试卷</li>
  155. </ul>
  156. </div>
  157. <div class='diy_select1' style="display: inline;margin-right: 5px;border: 1px solid #c9ccd2;">
  158. <input type='hidden' id="grade_id" name="grade_id" class='diy_select_input1' value="<?php if (empty($grade_id)) {
  159. echo 0;
  160. } else {
  161. echo $grade_id;
  162. } ?>"/>
  163. <div class='diy_select_txt1'><?php
  164. if (empty($grade_id)) {
  165. echo '请选择年级';
  166. } else {
  167. if(isset(Yii::app()->params['grade_list'][$grade_id])){
  168. echo Yii::app()->params['grade_list'][$grade_id]['grade_name'];
  169. }
  170. }
  171. ?></div>
  172. <div class='diy_select_btn1'></div>
  173. <ul class='diy_select_list1'>
  174. <li val="0" >请选择年级</li>
  175. <?php
  176. if(Yii::app()->params['grade_config']){
  177. foreach (Yii::app()->params['grade_config'] as $id=> $val){
  178. echo '<li val="'.$id.'">'.$val['grade_name'].'</li>';
  179. }
  180. }
  181. ?>
  182. </ul>
  183. </div>
  184. <div class='diy_select'>
  185. <input type='hidden' id="class_id" name="class_id" class='diy_select_input' value="<?php if (empty($grade_id) || empty($grade_class) || empty($class_id)) {
  186. echo 0;
  187. } else {
  188. echo $class_id;
  189. } ?>"/>
  190. <div class='diy_select_txt'><?php if (empty($grade_id) || empty($class_id) || empty($grade_class)) {
  191. echo '请选择班级';
  192. } else {
  193. if (isset($grade_class[$class_id]) && !empty($grade_class[$class_id])) {
  194. echo $grade_class[$class_id]['class_name'];
  195. }
  196. } ?></div>
  197. <div class='diy_select_btn'></div>
  198. <ul class='diy_select_list'>
  199. <li val="0">请选择班级</li>
  200. <?php if (empty($grade_id) || empty($grade_class)) {
  201. echo '';
  202. } else {
  203. foreach ($grade_class as $v) {
  204. ?>
  205. <li val="<?php echo $v['class_id'] ?>"><?php echo $v['class_name'] ?></li>
  206. <?php }
  207. } ?>
  208. </ul>
  209. </div>
  210. <input type="text" class="form-control input-sm" placeholder="请输入报告名称!" name="realname" value="<?php if (!empty($realname)) {
  211. echo $realname;
  212. } ?>">
  213. <!--<button class="btn btn-minier btn-primary">搜索</button>-->
  214. <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
  215. </div>
  216. </div>
  217. </form>
  218. <?php if(isset(Yii::app()->session['session_subject_id']) && in_array(Yii::app()->session['session_subject_id'],Yii::app()->params['mathSubjectId'])) { ?>
  219. <div class="dtw-top-right-btns mt15" >
  220. <!-- <div class="history-teacher-exolaincase-btn fl" style="width:110px;/*background:#FD8A01*/">
  221. <img src="/images/holiday_download.png" alt="" class="" href="" style="width:14px">
  222. <a href="<?php // echo Yii::app()->createUrl('export/holiday_index');?>"><span>学生假期总结</span></a>
  223. </div>-->
  224. <!--
  225. <div class="history-teacher-exolaincase-btn fl">
  226. <img src="/images/download.png" alt="" class="" href="">
  227. <a href="<?php echo Yii::app()->createUrl('productset/teachingIndex');?>"><span>个性化学习宝教学宝设置</span></a>
  228. </div>
  229. <?php if ($past_sem_exist):?>
  230. <div class="history-teacher-exolaincase-btn fl">
  231. <img src="/images/download.png" alt="" class="" href="">
  232. <a href="<?php echo Yii::app()->createUrl('export/pastacdemicrs');?>"><span>往期个性化学习宝教学宝</span></a>
  233. </div>
  234. <?php endif;?>
  235. <div id="dynamic-table_filter" class="dataTables_filter position_g fl" >
  236. <a class="btn btn-success btn-sm" href="<?php echo Yii::app()->createUrl('export/statistics') ?>">
  237. <i class="fa fa-plus " style="font-style: normal;"></i> 校长报告
  238. </a>
  239. </div>
  240. -->
  241. <div id="dynamic-table_filter" class="dataTables_filter position_g fl" >
  242. <a class="btn btn-success btn-sm" href="<?php echo Yii::app()->createUrl('export/batch') ?>">
  243. <i class="fa fa-plus " style="font-style: normal;"></i> 批量下载
  244. </a>
  245. </div>
  246. </div>
  247. <?php }?>
  248. </div>
  249. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
  250. <thead>
  251. <tr>
  252. <th width="30%">名称</th>
  253. <th >试卷类别</th>
  254. <th >年级</th>
  255. <th width="10%">班级</th>
  256. <th width="10%">阅卷状态</th>
  257. <th width="10%">错题文档</th>
  258. <th width="30%">操作</th>
  259. </tr>
  260. </thead>
  261. <tbody>
  262. <?php if (!empty($printList)):foreach ($printList as $cl): ?>
  263. <tr>
  264. <td><?php if($cl['is_new']==1 && $sub_id != 8){?><span style='color: #ff0000;font-weight: bold;'>【New】</span><?php }?>
  265. <?php
  266. if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 ){
  267. echo "<a href=".$this->createUrl("export/classExamAc",array("examGroupId" => $cl['exam_group_id'])).">{$cl['print_name']}</a>";
  268. }else{
  269. echo $cl['print_name'];
  270. }
  271. ?>
  272. </td>
  273. <td><?php echo $cl['type_name']; ?></td>
  274. <td><?php echo $cl['grade_name']; ?></td>
  275. <td><?php echo $cl['class_name']; ?></td>
  276. <td><?php if($cl['status']==1){echo '已完成';}else{echo '未完成';}?></td>
  277. <td><span style="color: #619aff;font-weight: bold">
  278. <?php if($cl['type_name']=='第三方导入成绩试卷'){
  279. echo '';
  280. }else { ?>
  281. <?php if ($cl['is_topwb_html'] == 0 || $cl['is_topwb_html'] == 90) {
  282. echo '未生成';
  283. } elseif ($cl['is_topwb_html'] == 1 && $cl['is_topwb_pdf'] == 0) {
  284. echo "正在生成中";
  285. } elseif ($cl['is_topwb_pdf'] == 1) {
  286. echo '已生成';
  287. } elseif ($cl['is_topwb_pdf'] == 9) {
  288. echo '已删除';
  289. };
  290. } ?>
  291. </span>
  292. </td>
  293. <td>
  294. <?php if ($this->schoolManager->classExamHasPaperRs($cl['exam_id'], $cl['class_id'])): ?>
  295. <!-- <a class="green" style="margin-left:4px;" href="<?php /*echo $this->createUrl("export/excel?examId={$cl['exam_id']}&classId={$cl['class_id']}&type=word&is_outer=0"); */?>">
  296. <span class="fa fa-file-word-o click-sc addbx" style="padding:0.5px 9px" aria-hidden="true" title="导出Word(精简)"></span>
  297. </a>-->
  298. <!-- <i class="icon icon-download " rel="<?php echo $cl['exam_id']?>" subject="<?php echo Yii::app()->session['session_subject_id']?>" class_id="<?php echo $cl['class_id']?>" title="下载报表"></i> -->
  299. <?php if($cl['status']==1){
  300. ?>
  301. <a class="green setEduce" href="javascript:;">
  302. <span
  303. class="fa fa-file-word-o click-sc addbx downloadFileBtn"
  304. data-downloadType="1"
  305. style="padding:0.5px 9px"
  306. aria-hidden="true"
  307. title="导出Word"
  308. <?php
  309. if($cl['status']==1){
  310. echo ' complete="1" ';
  311. }else{
  312. echo ' complete="0" ';
  313. }
  314. ?>
  315. rel="<?php echo $cl['exam_id']?>"
  316. subject="<?php echo Yii::app()->session['session_subject_id']?>"
  317. class_id="<?php echo $cl['class_id']?>" topic_count="<?php echo isset($cl['topic_count'])?$cl['topic_count']:0;?>"
  318. ></span>
  319. </a>
  320. <?php
  321. }?>
  322. <a class="green setEduce" href="javascript:;" >
  323. <span
  324. class="fa fa-file-excel-o click-sc addbx downloadFileBtn"
  325. data-downloadType="2"
  326. style="padding:0.5px 9px"
  327. aria-hidden="true"
  328. title="导出Excel"
  329. <?php
  330. if($cl['status']==1){
  331. echo ' complete="1" ';
  332. }else{
  333. echo ' complete="0" ';
  334. }
  335. ?>
  336. rel="<?php echo $cl['exam_id']?>"
  337. subject="<?php echo Yii::app()->session['session_subject_id']?>"
  338. class_id="<?php echo $cl['class_id']?>"
  339. ></span>
  340. </a>
  341. <!--
  342. <?php if ($cl['status']==1) :?>
  343. <a class="green" onclick="downpdfPrint('<?php echo $cl['exam_id'] ?>', '<?php echo $cl['class_id'] ?>', '<?php echo $cl['is_labelled'] ?>')" href="javascript:void(0);">
  344. <span class="fa fa-file-pdf-o click-sc addbx" style="padding:0.5px 9px" aria-hidden="true" title="下载个性化学习宝教学宝"></span>
  345. </a>
  346. <?php if($cl['is_tagging'] == 1):?>
  347. <?php if($this->isOpenProductMethod($cl['class_id'],$cl['exam_id'])): ?>
  348. <a class="green" onclick="downMethodPdfPrint('<?php echo $cl['exam_id'] ?>')" >
  349. <span class="iconfont click-sc addbx" aria-hidden="true" title="下载方法宝教学宝">方</span>
  350. </a>
  351. <?php else: ?>
  352. <a class="green" onclick="notProductMethodAuth()" >
  353. <span class="iconfont click-sc addbx" aria-hidden="true" title="该班未开通方法宝订单,无法下载方法宝教学宝">方</span>
  354. </a>
  355. <?php endif; ?>
  356. <?php endif;?>
  357. <?php if ($cl['is_topwb_pdf'] == 1) { ?>
  358. <a class="green " onclick="downCTQSPrint('<?php echo $cl['exam_id'] ?>')" href="#">
  359. <span class="fa fa-file-pdf-o click-sc addbx" style="padding:0.5px 9px" aria-hidden="true" title="下载错题前十"></span>
  360. </a>
  361. <?php } ?>
  362. <?php //if(isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){ ?>
  363. <?php if($cl['is_academicr_pdf']=='1'&&$cl['academicr_pdf_path']!=""){ ?>
  364. <span class="iconfont click-sc addbx" aria-hidden="true" title="重新生成个性化学习宝教学宝" onclick="reloadAcademicr('<?php echo $cl['exam_id']; ?>',1,this)">&#xe6db;</span>
  365. <?php } ?>
  366. <?php if($sub_id != 8):?>
  367. <span class="iconfont click-sc addbx" aria-hidden="true" title="重新生成错题前十" onclick="reloadAcademicr('<?php echo $cl['exam_id']; ?>',2,this)">&#xe6db;</span>
  368. <?php endif;?>
  369. <?php if($cl['is_method_pdf']):?>
  370. <span class="iconfont click-sc addbx" aria-hidden="true" title="重新生成方法宝教学宝" onclick="reloadAcademicr('<?php echo $cl['exam_id']; ?>',3,this)">&#xe6db;</span>
  371. <?php endif;?>
  372. <?php //} ?>
  373. <?php endif;?>
  374. -->
  375. <?php else: ?>
  376. <a style="margin-left:10px">
  377. <span class="iconfont click-sc addbx" aria-hidden="true" title="数据异常">&#xe7e6;</span>
  378. </a>
  379. <?php endif; ?>
  380. <?php if(!$display){?>
  381. <span class="iconfont click-sc click-delete addbx" aria-hidden="true" title="隐藏试卷" onclick="oprateExam('<?php echo $cl['exam_id'];?>',1)">&#xe68b;</span>
  382. <?php }else{
  383. ?>
  384. <span class="iconfont click-sc click-tc addbx" aria-hidden="true" title="显示试卷" onclick="oprateExam('<?php echo $cl['exam_id'];?>',0)">&#xe68f;</span>
  385. <?php
  386. }?>
  387. </td>
  388. </tr>
  389. <?php endforeach;
  390. else: ?>
  391. <tr><td colspan="4">暂无数据!</td></tr>
  392. <?php endif; ?>
  393. </tbody>
  394. </table>
  395. <?php if (!empty($page_total)): ?>
  396. <div class="row" style="padding-top:10px;">
  397. <div class="col-xs-7">
  398. &nbsp;
  399. </div>
  400. <div class="col-xs-5" style="font-size: 16px">
  401. <div class="dataTables_paginate paging_simple_numbers" style="vertical-align:sub;">
  402. <?php
  403. $this->widget('CLinkPager', array(
  404. 'header' => '',
  405. 'firstPageLabel' => '首页',
  406. 'lastPageLabel' => '末页',
  407. 'prevPageLabel' => '上一页',
  408. 'nextPageLabel' => '下一页',
  409. 'pages' => $pages,
  410. 'maxButtonCount' => 5,
  411. ));
  412. echo '<span style="vertical-align:middle;">共:' . $page_total . '条</span>';
  413. ?>
  414. </div>
  415. </div>
  416. </div>
  417. <?php endif; ?>
  418. </div>
  419. <!-- PAGE CONTENT ENDS -->
  420. </div>
  421. </div>
  422. </div>
  423. </div>
  424. <?php include(Yii::app()->basePath.'/views/print/_print.php');?>
  425. <script src="/js/export/report.js?v=1.1.10"></script>
  426. <script type="text/javascript">
  427. function reloadAcademicr(examId,type,obj){
  428. $.get("<?php echo $this->createUrl("export/reload_academicr") ?>", {examId: examId, type: type}, function(data) {
  429. var m = JSON.parse(data);
  430. if (m.status == 0)
  431. {
  432. alert('重置成功');
  433. $(obj).hide()
  434. }
  435. });
  436. }
  437. function downpdf(examId, classId) {
  438. layer.msg('生成中,请稍后...', { time: 0, shade: 0.4 })
  439. var subjectId = "<?php echo Yii::app()->session['session_subject_id'];?>";
  440. var url = '';
  441. if(subjectId == 8){
  442. url = "<?php echo $this->createUrl("teaching/index") ?>";
  443. }else{
  444. url = "<?php echo $this->createUrl("export/academicr") ?>";
  445. }
  446. $.get(url, {examId: examId, classId: classId}, function(data) {
  447. console.log(data);
  448. var m = JSON.parse(data);
  449. if (m.status == 0)
  450. {
  451. if (m.is_create == 1) {
  452. setTimeout(function() {
  453. layer.closeAll()
  454. }, 500);
  455. } else {
  456. layer.closeAll()
  457. }
  458. location.href="<?php echo $this->createUrl("export/down_load")?>?examId="+examId;
  459. } else
  460. {
  461. setTimeout(function() {
  462. layer.closeAll()
  463. }, 500);
  464. layer.msg(m.error)
  465. // alert(m.error);
  466. }
  467. });
  468. }
  469. //方法宝教师版
  470. function downMethodPdf(examId) {
  471. layer.msg('生成中,请稍后...', { time: 0, shade: 0.4 });
  472. var url = "<?php echo $this->createUrl("productexam/method_pdf");?>?examId="+examId+"&productType=31";
  473. window.location.href = url;
  474. layer.closeAll();
  475. // $.get(url, {examId: examId, productType: 31}, function(data) {
  476. // console.log(data);
  477. // var m = JSON.parse(data);
  478. // if (m.status == 0)
  479. // {
  480. // if (m.is_create == 1) {
  481. // setTimeout(function() {
  482. // layer.closeAll()
  483. // }, 500);
  484. // } else {
  485. // layer.closeAll()
  486. // }
  487. //
  488. // } else
  489. // {
  490. // setTimeout(function() {
  491. // layer.closeAll()
  492. // }, 500);
  493. // layer.msg(m.error)
  494. // // alert(m.error);
  495. // }
  496. // });
  497. }
  498. $(document).ready(function() {
  499. $(".sel-opt,.sel-cons").mouseover(function() {
  500. $(".sel-cons").show();
  501. }).mouseout(function() {
  502. $(".sel-cons").hide();
  503. });
  504. $(".sc-lis").click(function() {
  505. var data = {
  506. subjectId: $(this).attr('val')
  507. };
  508. $.post("<?php echo Yii::app()->createUrl('print/setSubjectId') ?>", data, function(flags) {
  509. if (flags)
  510. {
  511. location.reload();
  512. } else
  513. {
  514. alert('网络异常');
  515. }
  516. });
  517. $('.has-sel').text($(this).text());
  518. $(".sel-cons").hide();
  519. });
  520. });
  521. function ccc() {
  522. layer.msg('敬请期待!', {
  523. time: 0,
  524. btn: ['确定', '取消'],
  525. yes: function(index) {
  526. layer.close(index);
  527. return false;
  528. }
  529. });
  530. }
  531. $(function() {
  532. $(".diy_select1").click(function() {
  533. var grade = $(".diy_select1 input[class=diy_select_input1]").val();
  534. if (grade == 0)
  535. {
  536. $(".diy_select input[class=diy_select_input]").val(0);
  537. $(".diy_select_txt").text("请选择班级");
  538. $(".diy_select_list li").text("请选择班级");
  539. $(".diy_select_list li").attr("val", 0);
  540. }
  541. $.post("<?php echo $this->createUrl('classes/getclass'); ?>", {grade_id: grade}, function(data) {
  542. var m = JSON.parse(data);
  543. if (m.status == 0)
  544. {
  545. $(".diy_select input[class=diy_select_input]").val(0);
  546. $(".diy_select_txt").text("请选择班级");
  547. $(".diy_select_list").empty();
  548. var html = '<li val="0">请选择班级</li>';
  549. $(".diy_select_list").html(html);
  550. } else {
  551. $(".diy_select input[class=diy_select_input]").val(0);
  552. $(".diy_select_txt").text("请选择班级");
  553. $(".diy_select_list").empty();
  554. var html = '<li val="0">请选择班级</li>';
  555. $.each(m.result, function(i, n) {
  556. html += '<li val="' + n.class_id + '">' + n.class_name + '</li>';
  557. });
  558. $(".diy_select_list").html(html);
  559. }
  560. });
  561. });
  562. });
  563. // 隐藏试卷
  564. function oprateExam(exam_Id,flag){
  565. if (exam_Id) {
  566. layer.msg('未找到周周练id');
  567. }
  568. if(flag==0){
  569. var msg = '您确定要恢复该报告吗?';
  570. }else{
  571. var msg = '您确定要隐藏该报告吗?';
  572. }
  573. layer.msg(msg, {
  574. time: 0,
  575. btn: ['确定', '取消'],
  576. yes: function(index){
  577. layer.close(index);
  578. $.post('<?php echo $this->createUrl("export/oprateexam");?>',{exam_id:exam_Id,flag:flag},function(data){
  579. var obj = JSON.parse(data);
  580. if (obj.success == 1) {
  581. layer.msg(obj.message);
  582. location.reload();
  583. } else {
  584. layer.msg(obj.message);
  585. }
  586. });
  587. }
  588. });
  589. }
  590. // 无下载方法宝教学宝权限提示
  591. function notProductMethodAuth(){
  592. var msg = '该班未开通方法宝订单,无法下载方法宝教学宝';
  593. layer.msg(msg, {
  594. time: 0,
  595. btn: ['确定'],
  596. yes: function(index){
  597. layer.close(index);
  598. }
  599. });
  600. }
  601. </script>