index.php 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011
  1. <style>
  2. .nav-btns{
  3. margin: 10px 20px;
  4. }
  5. .nav-btns>a{
  6. display: inline-block;
  7. width: 120px;
  8. border: 1px solid #2977ff;
  9. text-align: center;
  10. line-height: 30px;
  11. }
  12. .active{
  13. color: #fff;
  14. background-color: #2977ff;
  15. }
  16. .fr{
  17. float: right;
  18. }
  19. .filter * {
  20. font-size: 14px;
  21. }
  22. .filter label {
  23. font-weight: bold;
  24. }
  25. .filter select {
  26. height: 36px;
  27. font-size: 14px;
  28. margin-left: 10px;
  29. }
  30. .filter select:nth-child(2) {
  31. width: 82px;
  32. }
  33. .filter select:nth-child(3) {
  34. width: 110px;
  35. }
  36. .filter button {
  37. border: none;
  38. background: #009965;
  39. width: 111px;
  40. height: 36px;
  41. border-radius: 3px;
  42. font-size: 14px;
  43. color: #fff;
  44. outline: none;
  45. cursor: pointer;
  46. margin-left: 10px;
  47. }
  48. .showClassInfo{
  49. cursor: pointer;
  50. }
  51. .list table {
  52. width: 96%;
  53. margin-top: 20px;
  54. text-align: center;
  55. border-right: 1px solid #ccc;
  56. margin:20px auto 0 auto;
  57. }
  58. .list table th {
  59. background: #f2f2f2;
  60. border: 1px solid #ccc;
  61. border-right: none;
  62. padding: 12px 15px;
  63. }
  64. .list table td {
  65. border: 1px solid #ccc;
  66. border-right: none;
  67. border-top: none;
  68. padding: 12px 15px;
  69. font-weight: bold;
  70. }
  71. .list table tr:nth-child(even) {
  72. background: #f2f2f2;
  73. }
  74. .list .tl {
  75. text-align: left;
  76. }
  77. .list .red {
  78. color: #cc3400;
  79. }
  80. .list .green {
  81. color: #079b67;
  82. }
  83. .icon {
  84. display: inline-block;
  85. background: center/contain no-repeat;
  86. width: 25px;
  87. height: 25px;
  88. cursor: pointer;
  89. vertical-align: middle;
  90. }
  91. .list .subjects {
  92. line-height: 22px;
  93. font-size: 0;
  94. }
  95. .list .icon{
  96. margin: 0 4px;
  97. }
  98. .list .subjects span {
  99. display: inline-block;
  100. font-size: 16px;
  101. word-break: keep-all;
  102. margin: 0 4px;
  103. }
  104. .confirmbox {
  105. background: #fff;
  106. border: 1px solid #cccccc;
  107. border-radius: 3px;
  108. padding: 40px 40px 30px;
  109. text-align: center;
  110. position: fixed;
  111. left: 50%;
  112. top: 50%;
  113. transform: translate(-50%, -50%);
  114. z-index: 99;
  115. }
  116. .confirmbox-mask {
  117. background: rgba(0, 0, 0, .7);
  118. left: 0;
  119. right: 0;
  120. top: 0;
  121. bottom: 0;
  122. z-index: 99;
  123. position: fixed;
  124. }
  125. .btn_area button {
  126. border: none;
  127. background: #009965;
  128. width: 111px;
  129. height: 36px;
  130. border-radius: 3px;
  131. font-size: 14px;
  132. color: #fff;
  133. outline: none;
  134. cursor: pointer;
  135. }
  136. .btn_area button.save {
  137. display: block;
  138. margin: 40px auto;
  139. }
  140. .confirmbox .confirmbox-btns {
  141. margin-top: 40px;
  142. }
  143. .class-modal-body .classes {
  144. margin-bottom: 10px;
  145. }
  146. .class-modal-body .classes > div {
  147. display: inline-block;
  148. max-width: 640px;
  149. vertical-align: top;
  150. }
  151. .class-modal-body .classes a {
  152. text-decoration: none;
  153. display: inline-block;
  154. margin: 0 5px 5px;
  155. color: #136bfb;
  156. font-size: 14px;
  157. }
  158. .class-modal-body .classes a.active {
  159. color: #fc091b
  160. }
  161. .class-modal .icon-close{
  162. position: absolute;
  163. right: 20px;
  164. top: 20px;
  165. }
  166. .class-modal-1 {
  167. width: auto;
  168. background: #fff;
  169. border-radius: 5px;
  170. position: absolute;
  171. top: 50%;
  172. left: 50%;
  173. transform: translate(-50%, -50%);
  174. }
  175. .class-modal-head-1 {
  176. font-size: 14px;
  177. text-align: left;
  178. color:#fff;
  179. line-height:30px;
  180. background: #2977ff;
  181. padding-left:15px;
  182. }
  183. .class-modal-body-1{
  184. padding:15px;
  185. }
  186. .class-modal-body-1 h2,.class-modal-body-1 h3{
  187. font-size:14px;
  188. font-weight:normal;
  189. margin-top:10px;
  190. }
  191. .class-modal-body-1 h3 span{
  192. font-size:10px;
  193. color:#ccc;
  194. }
  195. .class-modal-body-1 label{
  196. display: inline-block;
  197. font-weight: normal;
  198. margin-right: 15px;
  199. height:30px;
  200. position: relative;
  201. }
  202. .class-modal-1 .icon-close-1{
  203. position: absolute;
  204. right: 10px;
  205. top:5px;
  206. }
  207. .class-modal-1 .class_area{
  208. height:115px;
  209. border:1px solid #ccc;
  210. padding:5px;
  211. overflow-y: auto;
  212. margin-bottom:15px;
  213. }
  214. .class-modal-1 .checkAll{
  215. position:absolute;
  216. right:5px;
  217. top:115px;
  218. }
  219. .class-modal-1 .subsection{
  220. }
  221. .class-modal-1 .btn p{color:#000;}
  222. .class-modal-1 .btn_area{
  223. padding: 10px;
  224. border-top: 1px solid #aab6aa;
  225. margin-top:10px;
  226. }
  227. .class-modal-1 .btn_area p{
  228. display: inline-block;
  229. }
  230. .class-modal-1 .btn_area button{
  231. margin-left:5px;
  232. }
  233. .class-modal-1 .btn_area .cancel{
  234. background: #fff;
  235. color:#000;
  236. border:1px solid #666;
  237. }
  238. .c-red-1 {
  239. color: #CC3300;
  240. font-size:10px;
  241. display: inline-block;
  242. position:absolute;
  243. left:15px;
  244. top:18px;
  245. }
  246. .vtm{vertical-align: middle;}
  247. .pointer{cursor: pointer;}
  248. .dib{display: inline-block;}
  249. .pdp-con .pop-opt-con{border-top: 1px solid #ddd;padding-top: 20px;}
  250. .tit-sub-intro{color: #666;}
  251. .tit-sub-intro span{font-size: 12px;}
  252. .subsection{width: 44px;height: 24px;border: 1px solid #ddd;text-align: center;font-size: 12px;}
  253. .reduce-btn,.add-btn{width: 16px;height: 16px;line-height: 16px;text-align: center;color: #16AE68;border: 1px solid #16AE68;border-radius: 3px;font-size: 16px;font-weight: bold;margin-right: 6px;}
  254. .reduce-btn.forbidden,.add-btn.forbidden{color: #bbb;border: 1px solid #bbb;cursor: no-drop;}
  255. /*打印历史产品弹框*/
  256. .modal-content{position: absolute;left: 50%;top: 50%;padding-top: 40px; width: 500px;background: #fff; transform: translate(-50%,-50%);}
  257. .modal-title{position: absolute;top: 0;left: 0;padding-left: 20px; width: 100%;height: 40px;line-height: 40px;background: #009965;color:#fff;}
  258. .modal-title em{width: 40px;height: 40px;text-align: center;font-size: 20px;cursor: pointer;}
  259. .modal-btn{text-align: center;margin:10px 0;}
  260. .modal-btn a{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #50d2c2;color: #fff;}
  261. .modal-btn{text-align: center;margin:10px 0;}
  262. .modal-btn a{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #009965;color: #fff;}
  263. .modal-btn .close3{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #fff;color: #000;border:1px solid #555;border-radius: 3px;}
  264. .modal1_multi{position: fixed;top: 0;left: 0;width: 100%;height: 100%;font-size:14px;display:none ;background: rgba(0,0,0,.4)}
  265. .modal1_multi .model-score-m{width:80%;margin:5px auto;height: 20px;}
  266. .model-rule{width:80%;margin:8px auto;text-align: left;font-size:12px;}
  267. .modal1_multi .model-score-m label{margin:5px 0;font-size: 12px;color:red;font-weight: initial}
  268. </style>
  269. <script type="text/javascript">
  270. function in_array(search, array){
  271. for(var i in array){
  272. if(array[i]==search){
  273. return true;
  274. }
  275. }
  276. return false;
  277. }
  278. testFlag = "<?php echo $this->testFlag;?>";
  279. customTplsIds = new Array();
  280. var i = 0;
  281. <?php foreach(Yii::app()->params["custom_tpls_ids"] as $tplId){?>
  282. customTplsIds[i] = "<?php echo $tplId;?>";
  283. i++;
  284. <?php }?>
  285. jQuery(document).ready(function(){
  286. // 打印答案解析
  287. $(".answerAnalysis").click(function(){
  288. var element = this;
  289. layer.msg('您确定下载答案解析嘛?', {
  290. time: 0,
  291. btn: ['确定', '取消'],
  292. yes: function(index){
  293. layer.close(index);
  294. var wpCode = jQuery(element).attr("examId");
  295. if (!wpCode) {
  296. layer.msg('周周练id有误!');return false;
  297. }
  298. jQuery.post(
  299. '<?php echo $this->createUrl('print/createtempelate');?>',
  300. {"eid":wpCode},
  301. function(data){
  302. var obj = JSON.parse(data);
  303. if (obj.success == 1) {
  304. /*alert(obj.message);
  305. alert(obj);*/
  306. evaluationClient.printDAJX(JSON.stringify(obj.object));
  307. } else {
  308. layer.msg(obj.message);
  309. }
  310. }
  311. );
  312. }
  313. });
  314. });
  315. jQuery(".needToSendLabelTask").click(function(){
  316. layer.msg("请先发送标注任务");
  317. });
  318. jQuery(".sendLabelTask").click(function(){
  319. var examId = jQuery(this).attr("examId");
  320. var examName = jQuery(this).attr("examName");
  321. var subjectId = jQuery(this).attr("subjectId");
  322. var createTime = jQuery(this).attr("createTime");
  323. layer.msg('您确定发送试题标注任务吗?', {
  324. time: 0,
  325. btn: ['确定', '取消'],
  326. yes: function(index){
  327. layer.close(index);
  328. jQuery.post(
  329. "<?php echo $this->createUrl("print/sendlabeltask");?>",
  330. {"examId": examId, "examName": examName, "createTime": createTime},
  331. function(data){
  332. data = JSON.parse(data);
  333. if(data.success == 1){
  334. layer.msg(data.message);
  335. setTimeout(function(){location.reload();}, 1300);
  336. }
  337. else{
  338. layer.msg(data.message);
  339. }
  340. }
  341. );
  342. }
  343. });
  344. });
  345. jQuery(".enterStudentsList1").click(function(){
  346. layer.msg("请先发送标注任务");
  347. });
  348. jQuery(".paperType").click(function(){
  349. var is_show = jQuery(this).attr("is_show");
  350. if(is_show>0)
  351. {
  352. return false;
  353. }
  354. var _display = '';
  355. var examId = jQuery(this).attr("examId");
  356. var tpl_index = jQuery(this).attr("tpl_index");
  357. if(in_array(jQuery(this).attr("tpl_index"), customTplsIds)){
  358. if(in_array(jQuery(this).attr("tpl_index"), [1010,1009,10,1011,7,11])){
  359. var style = "width:200px;color:gray; ";
  360. var state = "disabled";
  361. }else{
  362. _display = '';
  363. var style = "width:200px;";
  364. var state = "enabled";
  365. }
  366. }
  367. else{
  368. _display = '';
  369. var style = "width:200px;color:gray;";
  370. var state = "disabled";
  371. }
  372. var mar = 'margin:30px auto;';
  373. html = ""+
  374. '<div style="padding:10px 30px">'+
  375. '<div style="margin:5px 0; float: left;'+_display+'">选择纸张:</div>'+
  376. '<div style="float: left"><select id="paperSize" style="'+style+'" '+state+' >'+
  377. '<option value="A3" ';
  378. if(jQuery(this).attr("paper_size")=='A3'){ html=html+'selected';}
  379. html=html+'>A3</option>'+
  380. '<option value="A4" ';
  381. if(jQuery(this).attr("paper_size")=='A4'){ html=html+'selected';}
  382. html=html+'>A4</option>'+
  383. '<option value="8K" ';
  384. if(jQuery(this).attr("paper_size")=='8K'){ html=html+'selected';}
  385. html=html+'>8K</option>'+
  386. '<option value="16K" ';
  387. if(jQuery(this).attr("paper_size")=='16K'){ html=html+'selected';}
  388. html=html+'>16K</option>'+
  389. '</select></div>'+
  390. '<div style="padding-top:10px;clear: left"></div>'+
  391. '<div style="margin:5px 0; float: left;';
  392. if(parseInt(jQuery(this).attr("mark_type")) !=0 && parseInt(jQuery(this).attr("mark_type")) != 3)
  393. {
  394. html=html+'display:none';
  395. mar = 'margin:0px auto;';
  396. }
  397. html=html+'">阅卷方式:</div>'+
  398. '<div style="float: left"><select id="mark_type" style="width:200px;' ;
  399. if(parseInt(jQuery(this).attr("mark_type")) !=0 && parseInt(jQuery(this).attr("mark_type")) != 3)
  400. {
  401. html=html+'display:none';
  402. }
  403. html=html+'">'+
  404. '<option value="0" ';
  405. if(jQuery(this).attr("mark_type")=='0'){ html=html+'selected';}
  406. html=html+'>线下阅卷</option>';
  407. html=html+' <option value="3" ';
  408. if(jQuery(this).attr("mark_type")=='3'){ html=html+'selected';}
  409. html=html+'>班级混合阅卷</option> '+
  410. '</select></div>'+
  411. '<div class="row" style="'+mar+'text-align: center;"><button id="confirm" class="label-primary-s bth-s" style="padding:4px 12px;margin:20px 0 0 15px">确定</button>'+
  412. '<button id="cancel" class="label-primary-s bth-s" style="border:gray;background:gray;padding:4px 12px;margin:20px 0 0 25px">取消</button></div>'+
  413. '<div>注意:<br/>1、班级单独阅卷暂时不能与其他阅卷方式相互切换<br/>2、固定模板不能切换答题卡模板类型,只有自定义的可以<br/>3、切换完答题卡纸张类型后请记住使用切换后的答题卡类型打印复印</div>'+
  414. '</div>'+
  415. "";
  416. layer.open({
  417. type: 1,
  418. area: ['350px', '350px'],
  419. title: "更改试卷",
  420. content: html,
  421. success: function(index, layerObj){
  422. jQuery("#cancel").on("click", function(){
  423. layer.closeAll();
  424. });
  425. jQuery("#confirm").on("click", function(){
  426. var paperSize = jQuery("#paperSize").val();
  427. var mark_type = jQuery("#mark_type").val();
  428. jQuery.post(
  429. "<?php echo $this->createUrl("print/setpapersize");?>",
  430. {"examId": examId, "paperSize": paperSize,"mark_type":mark_type,"tpl_index":tpl_index},
  431. function(data){
  432. data = JSON.parse(data);
  433. layer.msg(data.message);
  434. if(data.success == 1){
  435. setTimeout(function(){location.reload();}, 1300);
  436. }
  437. }
  438. );
  439. layer.closeAll();
  440. });
  441. },
  442. end: function(){
  443. }
  444. });
  445. });
  446. // 根据年级筛选班级
  447. jQuery("#grade").change(function(){
  448. var grade = $(this).val();
  449. var subjectId='<?php echo $subjectId?>';
  450. if (!grade) return false;
  451. jQuery.post(
  452. '<?php echo $this->createUrl("print/getGradeClass");?>',{"grade": grade,"subjectId":subjectId},function(data){
  453. data = JSON.parse(data);
  454. var html = "<option value=''>全部班级</option>";
  455. if(data.success == 1){
  456. var classObj = $("#class");
  457. classObj.empty();
  458. $.each(data.message,function(i,n){
  459. html += "<option value='"+n.class_id+"'>" + n.class_name + "</option>";
  460. });
  461. }
  462. classObj.append(html);
  463. }
  464. );
  465. });
  466. });
  467. </script>
  468. <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
  469. <div class="main-content-inner">
  470. <!-- 导航栏开始-->
  471. <?php include(Yii::app()->basePath.'/views/layouts/view_production_navigation.php');?>
  472. <!-- 导航栏结束-->
  473. <?php if($printType == 'third_isp'):?>
  474. <div class="nav-btns">
  475. <a href="<?php echo $this->createUrl("print/sub_index/type/third_isp");?>" class="active">个性化学习宝</a><a href="<?php echo $this->createUrl("print/mrv");?>">晨读词汇</a>
  476. </div>
  477. <?php endif;?>
  478. <div class="page-content">
  479. <div class="row" style="margin:0px;">
  480. <div class="col-xs-12">
  481. <!-- PAGE CONTENT BEGINS -->
  482. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  483. <div class="row">
  484. <form method="get" id="form1" action="<?php echo $this->createUrl("print/sub_index");?>">
  485. <div class="col-xs-12">
  486. <div class="dataTables_length margin-zy">
  487. <input type="hidden" name="type" value="<?php echo $printType;?>" />
  488. <div class="dataTables_filter" id="dynamic-table_filter" style="float: right;">
  489. <a href="javascript:void(0);" class="btn label-primary-green btn-sm" id="selectPrint">
  490. <i style="font-style: normal;" class=""></i> 生成纠错本
  491. </a>
  492. </div>
  493. </div>
  494. </div>
  495. </form>
  496. </div>
  497. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
  498. <thead>
  499. <tr>
  500. <th class="center">
  501. <input type="checkbox" class="ace selectAll" />
  502. </th>
  503. <th>名称</th>
  504. <th>班级</th>
  505. <th>完成日期</th>
  506. <?php if($printType == 'wp'){?><th>考试日期</th><?php }?>
  507. <th><?php echo $printType == "wp" ? "是否打印" : "是否下载/打印";?></th>
  508. <th ><?php if($printType == 'wp'){echo '已上传';}else{echo '已生成';}?>/总数</th>
  509. <?php if($printType == 'wp'){?><th >状态</th><?php }?>
  510. <th >操作</th>
  511. </tr>
  512. </thead>
  513. <tbody>
  514. <?php if(!empty($printList)):foreach($printList as $cl):?>
  515. <tr>
  516. <td>
  517. <?php
  518. $iType = 0;
  519. if($printType == 'wtb'){
  520. $iType = 1;
  521. }elseif ($printType == 'isp' || $printType == 'studytrend'){
  522. $iType = $printType == "isp" ? 2 : 3;
  523. }elseif ($printType == 'third_wb' || $printType == 'studytrend'){
  524. $iType = 1;
  525. }elseif ($printType == 'third_isp' || $printType == 'studytrend'){
  526. $iType=$printType == "isp" ? 2 : 3;
  527. }
  528. ?>
  529. <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id']. '_' . $printType) != 1){?>
  530. <input type="checkbox" class="ace myselect" value="<?php echo $cl['class_id'].'_'.$cl['exam_id'].'_'.$iType.'_',Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id']. '_' . $printType) == 1 ? 1 :0; ?>">
  531. <?php }?>
  532. </td>
  533. <td style="max-width:260px"><?php if($printType == 'wp'){
  534. if($cl['is_new']==0)
  535. {
  536. echo "<span style='color: #ff0000;font-weight: bold;'>【New】</span>";
  537. }
  538. $imgSrc = "";if($cl["mark_type"] > 0){$imgTitle="线上阅卷";$imgSrc.="/images/online/";}else{$imgTitle="线下阅卷";$imgSrc.="/images/offline/";}$imgSrc.="{$cl["paper_size"]}.png";$cursor = "pointer";echo "<img class='paperType' examId='{$cl["exam_id"]}' tpl_index='".$cl["tpl_index"]."' paper_size='".$cl["paper_size"]."' mark_type='".$cl["mark_type"]."' is_show = '".$cl['group_upload_status']."' style='cursor:pointer;width:22px;height:22px;margin-right:5px;' title='{$imgTitle}' src='{$imgSrc}'/>";}?>
  539. <?php if($printType == 'wp' && isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){
  540. ?>
  541. <a href="<?php echo Yii::app()->createUrl('paper/index',array('eid'=>$cl['exam_id']))?>"><?php echo $cl['print_name'];?></a>
  542. <?php }else{
  543. echo "<a href=".$this->createUrl("print/getExamClass",array("examGroupId" => $cl['exam_group_id'],"printType"=>$printType,"subjectId"=>$duo_sub_id)).">{$cl['print_name']}</a>";
  544. // if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 ){
  545. // echo "<a href=".$this->createUrl("print/getExamClass",array("examGroupId" => $cl['exam_group_id'],"printType"=>$printType,"subjectId"=>$duo_sub_id)).">{$cl['print_name']}</a>";
  546. // }else{
  547. // echo $cl['print_name'];
  548. // }
  549. }?>
  550. <!-- <a href="<?php /*echo Yii::app()->createUrl('paper/index',array('eid'=>$cl['exam_id']))*/?>"><?php /*echo $cl['print_name'];*/?></a>-->
  551. </td>
  552. <td style="max-width:100px"><?php echo $cl['class_name'];?></td>
  553. <td><?php if(!empty($cl['complete_time'])){ echo date('Y-m-d H:i',$cl['complete_time']);}?></td>
  554. <?php if($printType == 'wp'){?><td><?php if(!empty($cl['exam_time'])){ echo date('Y-m-d',$cl['exam_time']);}?></td><?php }?>
  555. <td>
  556. <?php
  557. if($printType == 'wp'){
  558. if(!empty($cl['is_print'])){ echo "已打印";}else{echo "未打印";}
  559. }elseif($printType == 'wtb' || $printType == 'third_wb'){
  560. echo $cl["wrongbook_download_count"] ? '已下载/打印' : '未下载/打印';
  561. }elseif($printType == 'isp'){
  562. echo $cl["isp_download_count"] ? '已下载/打印' : '未下载/打印';
  563. }elseif($printType == 'studytrend'){
  564. echo $cl["wbisp_download_count"] ? '已下载/打印' : '未下载/打印';
  565. }elseif($printType == 'third_wb'){
  566. echo $cl["wbisp_download_count"] ? '已下载/打印' : '未下载/打印';
  567. }elseif($printType == 'third_isp'){
  568. echo $cl["wbisp_download_count"] ? '已下载/打印' : '未下载/打印';
  569. }?>
  570. </td>
  571. <td>
  572. <?php if($printType == 'wp'){ echo '<span style="color:#697aff;font-weight: bold">'.$cl["is_uploaded_count"].'</span>/'.$cl["students_count"];}
  573. elseif($printType == 'wtb' || $printType == 'third_wb'){echo '<span style="color:#697aff;font-weight: bold">'.$cl["wrongbook_pdf_count"].'</span>/'.$cl["is_uploaded_count"];}
  574. elseif($printType == 'isp'){echo '<span style="color:#697aff;font-weight: bold">'.$cl['isp_pdf_count'].'</span>/'.$cl["is_uploaded_count"];}
  575. elseif($printType == 'studytrend'){echo '<span style="color:#697aff;font-weight: bold">'.$cl["wbisp_pdf_count"].'</span>/'.$cl["is_uploaded_count"];}
  576. elseif($printType == 'third_wb'){echo '<span style="color:#697aff;font-weight: bold">'.$cl["wbisp_pdf_count"].'</span>/'.$cl["is_uploaded_count"];}
  577. elseif($printType == 'third_isp'){echo '<span style="color:#697aff;font-weight: bold">'.$cl["wbisp_pdf_count"].'</span>/'.$cl["is_uploaded_count"];}
  578. ?>
  579. </td>
  580. <?php if($printType == 'wp'){?>
  581. <td>
  582. <?php if($cl["is_labelled"] == 1){
  583. echo "<span style='color:green;font-weight:normal;'>已标注</span>";
  584. }else if($cl["is_labelled"] == 2){
  585. echo "<span style='color:orange;font-weight:normal;'>已发送</span>";
  586. }else {?>
  587. <span class="iconfont click-sc addbx sendLabelTask" examId="<?php echo $cl["exam_id"];?>" examName="<?php echo $cl["exam_name"];?>" subjectId="<?php echo $cl["subject_id"];?>" createTime="<?php echo $cl["create_time"];?>" aria-hidden="true" title="发送试题标注">&#xe71f;</span>
  588. <?php }?>
  589. </td>
  590. <?php }?>
  591. <td style="width:265px;">
  592. <?php if($printType == 'wp'):?>
  593. <?php if(!$cl['is_custom_tpl'] && $cl['paper_tpl_type'] != 3){ ?><span class="iconfont click-sc addbx" aria-hidden="true" title="<?php if($cl['paper_tpl_type'] == 2){echo '打印答题卡';}else{echo '打印试卷';}?>" onclick="<?php if($cl["paper_tpl_type"] == 2 && !$cl["answer_card_uploaded"]){?>layer.msg('请先上传答题卡模板');<?php }else{?>print('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>','<?php echo $cl['type'];?>',<?php echo $cl['is_tpl'];?>);<?php }?>">&#xe6bb;</span>
  594. <?php }?>
  595. <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生" onclick="javascript:location.href='<?php echo $this->createUrl('print/change',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'tid'=>$cl['type']));?>'">&#xe668;</span>
  596. <?php if($cl['type'] == 0 && $cl['paper_tpl_type'] == 1):?>
  597. <span class="iconfont click-sc addbx" aria-hidden="true" title="生成模板" onclick="createTemplate('<?php echo $cl['exam_id'];?>',1)">&#xe618;</span>
  598. <span class="iconfont click-sc addbx" aria-hidden="true" title="上传模板" onclick="uploadTemplate('<?php echo $cl['exam_id'];?>','<?php echo $cl['print_name'];?>', 1)">&#xe640;</span>
  599. <?php endif;?>
  600. <?php if($cl['paper_tpl_type'] == 2):?>
  601. <?php if($cl['is_custom_tpl']){?><!--<span class="iconfont click-sc addbx" aria-hidden="true" title="打印答题卡" onclick="print('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>','<?php echo $cl['type'];?>',<?php echo $cl['is_tpl'];?>);">&#xe6bb;</span>
  602. <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生打印答题卡" onclick="javascript:location.href='<?php echo $this->createUrl('print/change',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'tid'=>$cl['type']));?>'">&#xe668;</span>--><?php }?>
  603. <span class="iconfont click-sc addbx" aria-hidden="true" title="下载试卷" onclick="createTemplate('<?php echo $cl['exam_id'];?>',2)">&#xe6c8;</span>
  604. <span class="iconfont click-sc addbx" aria-hidden="true" title="下载答题卡" onclick="createTemplate('<?php echo $cl['exam_id'];?>',3)">&#xe804;</span>
  605. <?php if(!$cl['is_custom_tpl']){?><span class="iconfont click-sc addbx" aria-hidden="true" title="上传答题卡" onclick="uploadTemplate('<?php echo $cl['exam_id'];?>','<?php echo $cl['print_name'] ?>', 2)">&#xe640;</span><?php }?>
  606. <?php if($cl["is_custom_tpl"]){?><span class="iconfont click-sc addbx answerAnalysis" examId="<?php echo $cl["exam_id"];?>" aria-hidden="true" title="下载答案解析">&#xe65b;</span><?php }?>
  607. <?php endif;?>
  608. <?php if($cl['paper_tpl_type'] == 3){
  609. ?>
  610. <span class="iconfont click-sc addbx" aria-hidden="true" title="下载题卡合一" onclick="createTemplate('<?php echo $cl['exam_id'];?>',4)">&#xe804;</span>
  611. <span class="iconfont click-sc addbx answerAnalysis" examId="<?php echo $cl["exam_id"];?>" aria-hidden="true" title="下载答案解析">&#xe65b;</span>
  612. <?php
  613. }?>
  614. <?php if($cl['paper_tpl_type'] == 4){
  615. ?>
  616. <span class="iconfont click-sc addbx" aria-hidden="true" title="下载试卷" onclick="createTemplate('<?php echo $cl['exam_id'];?>',2)">&#xe6c8;</span>
  617. <span class="iconfont click-sc addbx" aria-hidden="true" title="下载题卡分离" onclick="createTemplate('<?php echo $cl['exam_id'];?>',4)">&#xe804;</span>
  618. <span class="iconfont click-sc addbx answerAnalysis" examId="<?php echo $cl["exam_id"];?>" aria-hidden="true" title="下载答案解析">&#xe65b;</span>
  619. <?php
  620. }?>
  621. <?php if ($cl['mark_type'] > 0 AND $cl['type'] == 0): ?>
  622. <?php if ($cl['upload_status'] == 1): ?>
  623. <!--<span style="cursor:pointer" title="已上传" class="label label-sm label-pink arrowed-right" onclick="uploadConfirm('<?php echo $cl['class_id'];?>', '<?php echo $cl['exam_id'];?>');">已上传</span>-->
  624. <!--<span class="iconfont click-delete addbx" style="background-color: red;" aria-hidden="true" title="确定试卷已上传" onclick="uploadConfirm('<?php /*echo $cl['class_id'];*/?>', '<?php /*echo $cl['exam_id'];*/?>','<?php /*echo $cl['class_name'];*/?>','<?php /*echo $cl['is_uploaded_count'];*/?>','<?php /*echo $cl['students_count'];*/?>');">&#xe688;</span>-->
  625. <?php elseif ($cl['upload_status'] == 2): ?>
  626. <!--<span class="label label-sm label-success">已上传</span>-->
  627. <!--<span class="iconfont click-sc addbx" aria-hidden="true" title="试卷已上传">&#xe688;</span>-->
  628. <?php endif; ?>
  629. <?php if($cl['upload_status']==0 && isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){
  630. ?>
  631. <span class="iconfont addbx click-delete delClass" style="background-color: red;" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="删除" onclick="delExam(this)">&#xe616;</span>
  632. <?php
  633. }?>
  634. <?php endif; ?>
  635. <!-- 隐藏试卷操作 -->
  636. <?php if($cl['is_display'] == 1):?>
  637. <span class="iconfont click-sc click-tc addbx" aria-hidden="true" title="恢复试卷" onclick="oprateExam('<?php echo $cl['exam_id'];?>',0)">&#xe68f;</span>
  638. <?php else:?>
  639. <span class="iconfont click-sc click-delete addbx" aria-hidden="true" title="隐藏试卷" onclick="oprateExam('<?php echo $cl['exam_id'];?>',1)">&#xe68b;</span>
  640. <?php endif;?>
  641. <?php if($printType == 'wp'&&(Yii::app()->session['session_subject_id']!=3 && Yii::app()->session['session_subject_id']!=6)&&($cl["is_uploaded_count"] == $cl["students_count"]) && $cl["students_count"]!=0){?>
  642. <span class="iconfont click-sc icon-yifasong addbx ruanyun" exam_id="<?php echo $cl['exam_id']; ?>" title="发送第三方,并生成提分方案"></span>
  643. <?php }?>
  644. <?php elseif($printType == 'wtb'):?>
  645. <span class="iconfont click-sc addbx printBookTools" aria-hidden="true" title="打印错题本" printType="<?php echo $printType ?>" class_id="<?php echo $cl['class_id'];?>" ptype="1" exam_id="<?php echo $cl['exam_id'];?>" >&#xe6bb;</span>
  646. <span class="iconfont click-sc addbx icon-download-file" aria-hidden="true" title="下载错题本" onclick="downloadBook('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',1)"><img src="/images/download.png" style="margin-bottom:-2px;"></span>
  647. <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生下载错题本" onclick="javascript:location.href='<?php echo $this->createUrl('print/changewrongtopic',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id']));?>'">&#xe668;</span>
  648. <!-- 发送云印任务 -->
  649. <span class="iconfont click-sc addbx" <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1) echo 'style="background-color:gray"';?> aria-hidden="true" title="<?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1){echo ' 24小时内不可重复发送';}else{echo '发送云印任务';}?>" onclick="sendCloudTask('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',1,<?php echo Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1 ? 1 :0;?>)">云</span>
  650. <?php if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 ){?>
  651. <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成错题本" onclick="wb_html(this)">&#xe6db;</span>
  652. <?php if($sub_id != 8):?>
  653. <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成二步个性化学习宝" onclick="isp2_html(this)">二</span>
  654. <?php endif;?>
  655. <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成<?php echo ($sub_id != 8)?'三步':'';?>个性化学习宝" onclick="isp3_html(this)"><?php echo ($sub_id != 8)?'三':'提';?></span>
  656. <?php }?>
  657. <?php elseif($printType == 'isp' || $printType == 'studytrend'):?>
  658. <span class="iconfont click-sc addbx printBookTools" aria-hidden="true" title="打印个性化学习宝" printType="<?php echo $printType ?>" class_id="<?php echo $cl['class_id'];?>" ptype="<?php echo $printType == "isp" ? 2 : 3;?>" exam_id="<?php echo $cl['exam_id'];?>" >&#xe6bb;</span>
  659. <span class="iconfont click-sc addbx" aria-hidden="true" title="下载个性化学习宝" onclick="downloadBook('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',<?php echo $printType == "isp" ? 2 : 3;?>);"><img src="/images/download.png" style="margin-bottom:-2px;"></span>
  660. <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生下载个性化学习宝" onclick="javascript:location.href='<?php echo $this->createUrl('print/changeraisescheme',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'tid'=>$cl['type'],"type" => $printType,'subid'=>$sub_id));?>'">&#xe668;</span>
  661. <!-- 发送云印任务 -->
  662. <span class="iconfont click-sc addbx" <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1) echo 'style="background-color:gray"';?> aria-hidden="true" title="<?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1){echo ' 24小时内不可重复发送';}else{echo '发送云印任务';}?>" onclick="sendCloudTask('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',<?php echo $printType == "isp" ? 2 : 3;?>,<?php echo Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1 ? 1 :0;?>)">云</span>
  663. <?php elseif($printType == 'third_wb' || $printType == 'studytrend'):?>
  664. <span class="iconfont click-sc addbx printBookTools" aria-hidden="true" title="打印错题本" printType="<?php echo $printType ?>" class_id="<?php echo $cl['class_id'];?>" ptype="1" exam_id="<?php echo $cl['exam_id'];?>" >&#xe6bb;</span>
  665. <span class="iconfont click-sc addbx" aria-hidden="true" title="下载错题本" onclick="downloadBook('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',1)"><img src="/images/download.png" style="margin-bottom:-2px;"></span>
  666. <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生下载错题本" onclick="javascript:location.href='<?php echo $this->createUrl('print/changewrongtopic',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'printType' => $printType));?>'">&#xe668;</span>
  667. <!-- 发送云印任务 -->
  668. <span class="iconfont click-sc addbx" <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1) echo 'style="background-color:gray"';?> aria-hidden="true" title="<?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1){echo ' 24小时内不可重复发送';}else{echo '发送云印任务';}?>" onclick="sendCloudTask('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',1,<?php echo Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1 ? 1 :0;?>)">云</span>
  669. <?php if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 ){?>
  670. <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成错题本" onclick="wb_html(this)">&#xe6db;</span>
  671. <?php if($duo_sub_id == 8):?>
  672. <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成个性化学习宝" onclick="isp3_html(this)">提</span>
  673. <?php endif;?>
  674. <?php if($duo_sub_id == 12):?>
  675. <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成二步个性化学习宝" onclick="isp2_html(this)">二</span>
  676. <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成三步个性化学习宝" onclick="isp3_html(this)">三</span>
  677. <?php endif;?>
  678. <?php }?>
  679. <?php elseif($printType == 'third_isp' || $printType == 'studytrend'):?>
  680. <span class="iconfont click-sc addbx printBookTools" aria-hidden="true" title="打印个性化学习宝" printType="<?php echo $printType ?>" class_id="<?php echo $cl['class_id'];?>" ptype="<?php echo $printType == "isp" ? 2 : 3;?>" exam_id="<?php echo $cl['exam_id'];?>" >&#xe6bb;</span>
  681. <span class="iconfont click-sc addbx" aria-hidden="true" title="下载个性化学习宝" onclick="downloadBook('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',<?php echo $printType == "isp" ? 2 : 3;?>);"><img src="/images/download.png" style="margin-bottom:-2px;"></span>
  682. <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生下载个性化学习宝" onclick="javascript:location.href='<?php echo $this->createUrl('print/changeraisescheme',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'tid'=>$cl['type'],'type' => $printType,'subid'=>$duo_sub_id));?>'">&#xe668;</span>
  683. <!-- 发送云印任务 -->
  684. <span class="iconfont click-sc addbx" <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1) echo 'style="background-color:gray"';?> aria-hidden="true" title="<?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1){echo ' 24小时内不可重复发送';}else{echo '发送云印任务';}?>" onclick="sendCloudTask('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',<?php echo $printType == "isp" ? 2 : 3;?>,<?php echo Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1 ? 1 :0;?>)">云</span>
  685. <?php endif;?>
  686. </td>
  687. </tr>
  688. <?php endforeach;else:?>
  689. <tr><td colspan="8">暂无数据!</td></tr>
  690. <?php endif;?>
  691. </tbody>
  692. </table>
  693. <?php if(!empty($page_total)):?>
  694. <div class="row">
  695. <div class="col-xs-6">
  696. &nbsp;
  697. </div>
  698. <div class="col-xs-6">
  699. <div class="dataTables_paginate paging_simple_numbers">
  700. <?php
  701. $this->widget('CLinkPager', array(
  702. 'header' => '',
  703. 'firstPageLabel'=> '首页',
  704. 'lastPageLabel' => '末页',
  705. 'prevPageLabel' => '上一页',
  706. 'nextPageLabel' => '下一页',
  707. 'pages' => $pages,
  708. 'maxButtonCount'=> 5,
  709. ));
  710. echo '共:'.$page_total.'条';
  711. ?>
  712. </div>
  713. </div>
  714. </div>
  715. <?php endif;?>
  716. </div>
  717. <!--上传模板弹窗-->
  718. <!--发送云印任务弹窗-->
  719. <div class="confirmbox-mask" id="classModal-1" style="display: none;">
  720. <div class="class-modal-1">
  721. <i class="icon icon-close-1" style="color: white">X</i><div class="class-modal-head-1">发送云印任务</div>
  722. <div class="class-modal-body-1">
  723. <div>
  724. <span>亲爱的学管:您正在发起云印任务,请核对以下云印任务数据!</span>
  725. <span style="float: right;">共<i id="task_count">0</i>条任务,<i id="total_print_num">0</i>份云印任务</span>
  726. </div>
  727. <table style="margin-top: 15px;" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
  728. <thead>
  729. <tr>
  730. <th>序号</th>
  731. <th>任务名称</th>
  732. <th>班级</th>
  733. <th>完成日期</th>
  734. <th>已生成/已开通/可下载</th>
  735. <th>已下载</th>
  736. <th>云印份数</th>
  737. <th>备注</th>
  738. </tr>
  739. </thead>
  740. <tbody id="taskList">
  741. </tbody>
  742. </table>
  743. <div style="margin-top: 40px;">
  744. <span><img width="20px" height="20px" src="/images/icon-tip.svg">发送后,请至学管端【IMS-云印任务】模块查看任务进程,请等待云印中心打印后,寄回给学校!</span>
  745. <span style="margin-left:15px;float: right;"><input id="filter-uploaded" checked="checked" type="checkbox">过滤【已下载】的学生</span>
  746. </div>
  747. <div class="btn_area" style="text-align: center;">
  748. <input type="hidden" id="sendJson" name="sendJson" value="">
  749. <button id="sendCloudPrint" class="download">发送</button>
  750. <button class="cancel">取消</button>
  751. </div>
  752. </div>
  753. </div>
  754. </div>
  755. <!-- PAGE CONTENT ENDS -->
  756. </div>
  757. </div>
  758. </div>
  759. </div>
  760. <!-- 打印历史产品盘库 -->
  761. <div class="modal1_multi">
  762. <div class="modal-shadow"></div>
  763. <div class="modal-content">
  764. <div class="modal-title clearfix">
  765. 打印过期产品<em class="fr close3">×</em>
  766. </div>
  767. <div class="model-rule">
  768. <p>说明:</p><p>1、本次操作可将已开通订单权限,但未生成产品的考试显示在列表中</p><p>2、找到想要生成产品的考试,点击【重置产品】</p>
  769. </div>
  770. <div class="model-score-m">
  771. </div>
  772. <div class="modal-btn">
  773. <a href="javascript:;" class="sumbit3" id="sendHistoryProduct">确定</a>
  774. <a href="javascript:;" class="close3 chameleon">取消</a>
  775. </div>
  776. </div>
  777. </div>
  778. <?php require_once "_print.php" ?>
  779. <script src="/js/jquery.ajaxfileupload.js"></script>
  780. <script type="text/javascript">
  781. $(document).ready(function(){
  782. /*var str = '<div class="points"></div>';
  783. $(".sc-lis").each(function(){
  784. if($(this).find(".points").length>0){
  785. $(".sel-opt").append(str);
  786. }
  787. });*/
  788. $(".sel-opt,.sel-cons").mouseover(function(){
  789. $(".sel-cons").show();
  790. }).mouseout(function(){
  791. $(".sel-cons").hide();
  792. });
  793. $(".sc-lis").click(function(){
  794. var data = {
  795. subjectId : $(this).attr('val')
  796. };
  797. $.post("<?php echo Yii::app()->createUrl('print/setSubjectId')?>",data,function(flags){
  798. if(flags)
  799. {
  800. location.reload();
  801. }else
  802. {
  803. alert('网络异常');
  804. }
  805. });
  806. $('.has-sel').text($(this).text());
  807. $(".sel-cons").hide();
  808. });
  809. $(".ruanyun").click(function(){
  810. var exam_id = $(this).attr('exam_id');
  811. layer.msg("确定发送吗?学生是否全部上传成绩", {
  812. time: 0,
  813. btn: ['确定', '取消'],
  814. yes: function(index){
  815. layer.close(index);
  816. $.ajax({
  817. url: "<?php echo $this->createUrl('print/send_ruanyun_pdf');?>",
  818. type: "POST",
  819. dataType: "json",
  820. data:{ examId: exam_id
  821. },
  822. success: function (data){
  823. if(data.status == 1){
  824. layer.msg('发送成功',{
  825. icon: 1
  826. }, function(){
  827. layer.closeAll();
  828. location.reload();
  829. });
  830. }else if(data.status == 2){
  831. layer.msg('发送失败,未上传成绩',{
  832. icon: 5
  833. }, function(){
  834. layer.closeAll();
  835. location.reload();
  836. });
  837. }else{
  838. layer.msg('发送失败',{
  839. icon: 5
  840. }, function(){
  841. layer.closeAll();
  842. location.reload();
  843. });
  844. }
  845. },
  846. error: function (data, status, e){ //服务器响应失败处理函数
  847. layer.msg('返回失败!',{
  848. icon: 5
  849. }, function(){
  850. layer.closeAll();
  851. });
  852. }
  853. });
  854. }
  855. });
  856. });
  857. });
  858. function objToJson(obj){
  859. var json = "{ ";
  860. for(var item in obj){
  861. json += "'"+item+"':'"+obj[item]+"',";
  862. }
  863. json += " }";
  864. return json;
  865. }
  866. function ccc(){
  867. layer.msg('敬请期待!', {
  868. time: 0,
  869. btn: ['确定', '取消'],
  870. yes: function(index){
  871. layer.close(index);
  872. return false;
  873. }
  874. });
  875. }
  876. function delExam(odj){
  877. if (!odj) return false;
  878. var classId = odj.getAttribute("w_class_id");
  879. var examId = odj.getAttribute("w_exam_id");
  880. if (!classId || !examId) return false;
  881. var msg = '您确定要删除此班的考试吗?';
  882. layer.msg(msg, {
  883. time: 0,
  884. btn: ['确定', '取消'],
  885. yes: function(index){
  886. layer.close(index);
  887. $.ajax({
  888. url: "<?php echo $this->createUrl('print/delexam');?>",
  889. type: "POST",
  890. dataType: "json",
  891. data: {
  892. examId: examId,
  893. classId:classId
  894. },
  895. success: function (data){
  896. if(data.status == 1){
  897. layer.msg('删除成功',{
  898. icon: 1
  899. }, function(){
  900. layer.closeAll();
  901. location.reload();
  902. });
  903. }else{
  904. layer.msg('删除失败',{
  905. icon: 5
  906. }, function(){
  907. layer.closeAll();
  908. location.reload();
  909. });
  910. }
  911. },
  912. error: function (data, status, e){ //服务器响应失败处理函数
  913. layer.msg('返回失败!',{
  914. icon: 5
  915. }, function(){
  916. layer.closeAll();
  917. });
  918. }
  919. });
  920. }
  921. });
  922. }
  923. // 确认上传成绩
  924. function uploadConfirm(classId, examId,className,is_uploaded_count,students_count) {
  925. //if (confirm('您确定已上传成绩了吗?')) {
  926. msg = "<div style='text-align:left;'>("+className+")已上传(<span style=' font-size:20px;color:#15ae68 ;font-weight: bold'>"+is_uploaded_count+"</span>)份试卷,还有(<span style='font-size:20px;color: red;font-weight: bold'>"+(students_count-is_uploaded_count)+"</span>)份试卷未上传!是否确认本班级试卷都已上传?<br/><br/><span style='color: red'>请注意!试卷上传确认后将不能再次上传本班的试卷!!!</span></div>";
  927. layer.msg(msg, {
  928. time: 0,
  929. btn: ['确定', '取消'],
  930. yes: function(index, layerObj){
  931. layer.close(index);
  932. $.ajax({
  933. url: "<?php echo $this->createUrl('print/uploadConfirm');?>",
  934. type: "POST",
  935. data: {
  936. classId: classId,
  937. examId: examId
  938. },
  939. beforeSend:function(){
  940. // 发送请求显示打印中
  941. layer.msg('确认中...', {time: 20000});
  942. },
  943. dataType: "JSON",
  944. success: function(data) {
  945. if (data.status == 1) {
  946. layer.msg('确认成功!');
  947. setTimeout(function(){location.reload();}, 1300);
  948. } else {
  949. layer.msg(data.error);
  950. }
  951. },
  952. complete:function(){
  953. },
  954. error:function(){
  955. }
  956. });
  957. }
  958. });
  959. //}
  960. }
  961. // 打印错题本
  962. function downloadBook(cid,eid,type){
  963. if (!cid || !eid || !type) {
  964. layer.msg("打印参数有误");return;
  965. }
  966. var message = '';
  967. var objUrl = '';
  968. if (type == 1) {
  969. message = "您确定要下载该班级纠错本吗?";
  970. objUrl = "<?php echo $this->createUrl('print/downloadwrongtopic');?>";
  971. divTitle = "下载错题本";
  972. improveName = "错题本";
  973. } else if (type == 2){
  974. //英语个性化学习宝提示不一样
  975. var print_type = "<?php echo $printType;?>";
  976. if(print_type == 'third_isp'){
  977. var sub_id = "<?php echo $duo_sub_id;?>";
  978. }else{
  979. var sub_id = "<?php echo $sub_id;?>";
  980. }
  981. if(sub_id == 8){
  982. message = "您确定要下载该班级个性化学习宝吗?";
  983. divTitle = "下载个性化学习宝";
  984. improveName = "个性化学习宝";
  985. }else{
  986. message = "您确定要下载该班级个性化学习方案吗?";
  987. divTitle = "下载个性化学习方案";
  988. improveName = "个性化学习方案";
  989. }
  990. objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
  991. }else if (type == 3){
  992. message = "您确定要下载该班级个性化学习宝吗?";
  993. objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
  994. divTitle = "下载个性化学习宝";
  995. improveName = "个性化学习宝";
  996. }
  997. else{
  998. layer.msg("打印参数有误");return;
  999. }
  1000. html = ""+
  1001. '<div style="padding:20px 30px 0px 30px">'+
  1002. '<div style="padding:8px 0;">请复制下方链接下载'+improveName+'。</div>'+
  1003. '<div id="downloadUrl" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:455px;"></div>'+
  1004. '<div class="row" style="margin:30px auto 0px auto;text-align:center"><button id="confirm" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;background:gray;border-color:gray;">关闭</button>'+
  1005. '</div>'+
  1006. '</div>'+
  1007. "";
  1008. var absent_filter = $("input[name='absent-filter']").is(':checked') ? 1 : 0;
  1009. layer.msg(message, {
  1010. time: 0,
  1011. btn: ['确定', '取消'],
  1012. yes: function(index){
  1013. layer.close(index);
  1014. $.ajax({
  1015. url: "<?php echo $this->createUrl('productdownload/getImproveFile');?>",
  1016. type: "GET",
  1017. dataType: "json",
  1018. data: {"examId": eid, "classId": cid, "type": type,"absent_filter":absent_filter,"printType":"<?php echo $printType;?>"},
  1019. timeout: <?php echo Yii::app()->params["product_download_time_limit"];?>,
  1020. beforeSend:function(){
  1021. layer.msg("下载中请稍后...",{"time": <?php echo Yii::app()->params["product_download_time_limit"];?>});
  1022. },
  1023. error: function (jqXHR, textStatus, errorThrown) {
  1024. if(textStatus=="timeout"){
  1025. $.ajax({
  1026. type:'GET',
  1027. url: "<?php echo $this->createUrl("productdownload/addIspTask");?>",
  1028. data: {"examId": eid, "classId": cid, "type": type,"printType":"<?php echo $printType;?>"},
  1029. dataType: "json",
  1030. success:function (data) {
  1031. layer.alert('文件正在打包,请去右上角“下载”窗口获取下载链接!',{
  1032. icon: 1,
  1033. yes:function(){
  1034. layer.closeAll();
  1035. }
  1036. });
  1037. }
  1038. })
  1039. }else {
  1040. layer.msg('返回失败!',{
  1041. icon: 5
  1042. }, function(){
  1043. layer.closeAll();
  1044. });
  1045. }
  1046. },
  1047. success: function (data){
  1048. layer.closeAll();
  1049. if(data.success == 1||data.success == 2){
  1050. layer.open({
  1051. type: 1,
  1052. area: ['550px', '220px'],
  1053. title: divTitle,
  1054. content: html,
  1055. success: function(index, layerObj){
  1056. // 更试卷打印时间
  1057. $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {cid: cid, eid: eid,type:type } );
  1058. jQuery("#downloadUrl").html('下载地址:<span style=""><input id="url" type="text" size="40" readonly value="'+data.downloadPath+'" /></span><button id="copy" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;">全选</button>');
  1059. jQuery("#confirm, #cancel").on("click", function(){
  1060. layer.close(layerObj);
  1061. });
  1062. jQuery("#copy").on("click", function(){
  1063. jQuery("#url").select();
  1064. });
  1065. },
  1066. end: function(){
  1067. }
  1068. });
  1069. }else if(data.success == 3){
  1070. // 更试卷打印时间
  1071. $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {cid: cid, eid: eid,type:type } );
  1072. layer.alert('文件正在打包,请去右上角“下载”窗口获取下载链接!',{
  1073. icon: 1,
  1074. yes:function(){
  1075. layer.closeAll();
  1076. }
  1077. });
  1078. }
  1079. else if(data.success == 0){
  1080. layer.msg(data.message, {"time": 3000});
  1081. }
  1082. },
  1083. });
  1084. }
  1085. });
  1086. }
  1087. // 上传试卷模板
  1088. function uploadTemplate(eid,name, type){
  1089. if (!eid) {
  1090. layer.msg('操作失败!');
  1091. return false;
  1092. }
  1093. if(type == 1)
  1094. forCheckUrl = "<?php echo $this->createUrl('print/verifyTpl');?>";
  1095. else
  1096. forCheckUrl = "<?php echo $this->createUrl('print/checkanswercard');?>";
  1097. $.post(forCheckUrl,{eid:eid},function(data){
  1098. var obj = JSON.parse(data);
  1099. var html ='<div class="layer_notice" style="padding:5px;">';
  1100. html +='<table class="table table-striped table-bordered table-hover ">';
  1101. html +='<thead class="thin-border-bottom">';
  1102. html +='<tr>';
  1103. html +='<th>试卷名称</th>';
  1104. html +='<th>是否上传</th>';
  1105. html +='<th>操作</th>';
  1106. html +='</tr>';
  1107. html +='</thead>';
  1108. html +='<tbody class="content_tbody">';
  1109. if (obj.success == 1) {
  1110. html +='<td>'+name+'</td><td><span style="color:red;">已上传</span></td><td><input type="file" name="word_file" id="word_file" /></td></tr>';
  1111. } else {
  1112. html +='<td>'+name+'</td><td id="alreadUpload">未上传</td><td><input type="file" name="word_file" id="word_file" /></td></tr>';
  1113. }
  1114. html +='</tbody>';
  1115. html +='</table>';
  1116. html +='<span style="width:582px;display:inline-block;text-align:center;">';
  1117. html +='<button class="btn btn-success btn-sm" onclick="uploadWord('+type+')"><i class="ace-icon fa fa-check bigger-110"></i>确定</button>';
  1118. html +='</span>';
  1119. html +='<input type="hidden" id="mpEid" value="'+eid+'">';
  1120. html +='</div>';
  1121. layer.open({
  1122. type: 1,
  1123. skin: 'layui-layer-rim', //加上边框
  1124. area: ['600px', '300px'], //宽高
  1125. content: html
  1126. });
  1127. });
  1128. }
  1129. function uploadWord(type) {
  1130. var paramEid = $('#mpEid').val();
  1131. if (!paramEid) {
  1132. layer.msg('没找到周周练ID!');
  1133. return false;
  1134. }
  1135. var obj_file = $("#word_file").val();
  1136. if (!obj_file) {
  1137. layer.msg('请选择上传文件');
  1138. return false;
  1139. }
  1140. var extStart = obj_file.lastIndexOf('.');
  1141. var extName = obj_file.substring(extStart,obj_file.length).toLowerCase();
  1142. if (extName != ".dotx" && extName != ".dotm") {
  1143. layer.msg('模板格式有误,请上传dotx格式word!');
  1144. return false;
  1145. }
  1146. $.ajaxFileUpload({
  1147. url: "<?php echo $this->createUrl('print/uploadTpl');?>", //用于文件上传的服务器端请求地址
  1148. secureuri: false, //是否需要安全协议,一般设置为false
  1149. fileElementId: 'word_file', //文件上传域的ID
  1150. dataType: 'text', //返回值类型 一般设置为json
  1151. data:{"eid":paramEid, "type": type},
  1152. success: function (data, status){
  1153. var obj = JSON.parse(data);
  1154. if (obj.success == 1) {
  1155. layer.msg(obj.message,{
  1156. icon: 1,
  1157. }, function(){
  1158. layer.closeAll();
  1159. });
  1160. $("#alreadUpload").html('<span style="color:red;">已上传</span>');
  1161. } else {
  1162. layer.msg(obj.message,{
  1163. icon: 5,
  1164. }, function(){
  1165. layer.closeAll();
  1166. });
  1167. }
  1168. },
  1169. error: function (data, status, e){ //服务器响应失败处理函数
  1170. layer.msg('返回失败!',{
  1171. icon: 5,
  1172. }, function(){
  1173. layer.closeAll();
  1174. });
  1175. }
  1176. });
  1177. return false;
  1178. }
  1179. // 搜索事件
  1180. $("#search").click(function(){
  1181. $("#form1").submit();
  1182. });
  1183. function print(cid,eid,tid,fg){
  1184. if (!cid || !eid) return false;
  1185. var msg = '';
  1186. if (tid == 0) {
  1187. if (fg == 1) {
  1188. msg = '打印答题卡';
  1189. } else {
  1190. msg = '您确定要打印该试卷嘛?';
  1191. }
  1192. } else if (tid == 1) {
  1193. msg = '您确定要打印该错题本嘛?';
  1194. } else if (tid == 2) {
  1195. msg = '您确定要打印该个性化学习宝吗?';
  1196. }
  1197. layer.msg(msg, {
  1198. time: 0,
  1199. btn: ['确定', '取消'],
  1200. yes: function(index){
  1201. layer.close(index);
  1202. ajaxPrint(cid, eid, tid);
  1203. }
  1204. });
  1205. }
  1206. function ajaxPrint(cid, eid, tid) {
  1207. $.ajax({
  1208. url:"<?php echo $this->createUrl('print/ajaxupdate');?>",
  1209. type:"post",
  1210. data:{cid:cid,eid:eid,tid:tid},
  1211. dataType: "json",
  1212. beforeSend:function(){
  1213. // 发送请求显示打印中
  1214. layer.msg('打印中', {icon: 16,time: 20000});
  1215. },
  1216. success:function(obj){
  1217. var index = layer.msg();
  1218. layer.close(index);
  1219. if (obj.success == 1) {
  1220. if (tid == 0) {//console.log(JSON.stringify(obj.message));
  1221. evaluationClient.printPaper(JSON.stringify(obj.message));
  1222. //alert('提交打印试卷成功!');
  1223. } else if (tid == 1) {
  1224. evaluationClient.printCTB(JSON.stringify(obj.message));
  1225. //alert('提交打印错题本成功!');
  1226. } else if (tid == 2) {
  1227. evaluationClient.printTFFA(JSON.stringify(obj.message));
  1228. //alert('提交打印提分册成功!');
  1229. } else {
  1230. layer.msg('操作错误!');
  1231. }
  1232. location.reload();
  1233. } else {//alert(obj.message);
  1234. layer.msg(obj.message);
  1235. }
  1236. },
  1237. complete:function(){
  1238. //layer.msg('打印失败!');
  1239. //var index = layer.msg();
  1240. //layer.close(index);
  1241. },
  1242. error:function(){
  1243. //var index = layer.msg();
  1244. //layer.close(index);
  1245. }
  1246. });
  1247. }
  1248. // 生成试卷模板
  1249. function createTemplate (eid,flag){
  1250. if (!eid) {
  1251. layer.msg('未找到周周练id');
  1252. }
  1253. var msg = '';
  1254. if (flag == 2) {
  1255. msg = '您确定要下载试卷嘛?';
  1256. } else if(flag == 1){
  1257. msg = '您确定要生成模板嘛?';
  1258. }
  1259. else if(flag == 3){
  1260. msg = "<div style='text-align:left;'>编辑答题卡注意事项:<br/>1、试卷的名字最多支持2行,字体的大小和字体种类保持原有格式不变<br/>2、选择题和填空题的答题区域中里面的内容和识别点不许更改<br/>3、整套试卷中所有的识别点不许更改<br/><br/>点击确定下载</div>";
  1261. }else if(flag == 4){
  1262. msg = "<div style='text-align:left;'>编辑题卡合一注意事项:<br/>1、试卷的名字最多支持2行,字体的大小和字体种类保持原有格式不变<br/>2、选择题和填空题的答题区域中里面的内容和识别点不许更改<br/>3、整套试卷中所有的识别点不许更改<br/><br/>点击确定下载</div>";
  1263. }else{
  1264. layer.msg("参数错误");
  1265. }
  1266. layer.msg(msg, {
  1267. time: 0,
  1268. btn: ['确定', '取消'],
  1269. yes: function(index){
  1270. layer.close(index);
  1271. $.post('<?php echo $this->createUrl('print/createtempelate');?>',{eid:eid},function(data){
  1272. var obj = JSON.parse(data);
  1273. if (obj.success == 1) {
  1274. if (flag == 2) {
  1275. evaluationClient.CreatePaperTiGan(JSON.stringify(obj.object));
  1276. } else if(flag == 1){
  1277. evaluationClient.createPaper(JSON.stringify(obj.object));
  1278. }
  1279. else if(flag == 3){
  1280. evaluationClient.CreatePaperDaTiKa(JSON.stringify(obj.object));
  1281. }else if(flag == 4){
  1282. evaluationClient.CreatePaperDaTiKa(JSON.stringify(obj.object));
  1283. }else{
  1284. layer.msg("参数错误");
  1285. }
  1286. } else {
  1287. layer.msg(obj.message);
  1288. }
  1289. });
  1290. }
  1291. });
  1292. }
  1293. function wb_html(odj){
  1294. if (!odj) return false;
  1295. var classId = odj.getAttribute("w_class_id");
  1296. var examId = odj.getAttribute("w_exam_id");
  1297. if (!classId || !examId) return false;
  1298. var msg = '您确定要生成该班级的错题本吗?';
  1299. layer.msg(msg, {
  1300. time: 0,
  1301. btn: ['确定', '取消'],
  1302. yes: function(index){
  1303. layer.close(index);
  1304. $.ajax({
  1305. url: "<?php echo $this->createUrl('client/wbhtml');?>",
  1306. type: "POST",
  1307. dataType: "json",
  1308. data: {
  1309. examId: examId,
  1310. classId:classId
  1311. },
  1312. success: function (data){
  1313. if(data > 0){
  1314. layer.msg('操作成功,重新生成错题本',{
  1315. icon: 1
  1316. }, function(){
  1317. layer.closeAll();
  1318. });
  1319. }else if(data==0){
  1320. layer.msg('操作失败,此班无错题本',{
  1321. icon: 5
  1322. }, function(){
  1323. layer.closeAll();
  1324. });
  1325. }
  1326. else{
  1327. layer.msg('操作失败,重新生成错题本',{
  1328. icon: 5
  1329. }, function(){
  1330. layer.closeAll();
  1331. });
  1332. }
  1333. },
  1334. error: function (data, status, e){ //服务器响应失败处理函数
  1335. layer.msg('返回失败!',{
  1336. icon: 5
  1337. }, function(){
  1338. layer.closeAll();
  1339. });
  1340. }
  1341. });
  1342. }
  1343. });
  1344. }
  1345. function isp2_html(odj){
  1346. if (!odj) return false;
  1347. var classId = odj.getAttribute("w_class_id");
  1348. var examId = odj.getAttribute("w_exam_id");
  1349. if (!classId || !examId) return false;
  1350. //英语个性化学习宝提示不一样
  1351. var print_type = "<?php echo $printType;?>";
  1352. if(print_type == 'third_isp'){
  1353. var sub_id = "<?php echo $duo_sub_id;?>";
  1354. }else{
  1355. var sub_id = "<?php echo $sub_id;?>";
  1356. }
  1357. if(sub_id == 8){
  1358. var product_name = '个性化学习宝';
  1359. }else{
  1360. var product_name = '个性化学习方案';
  1361. }
  1362. var msg = '您确定要生成该班级的'+product_name+'吗?';
  1363. layer.msg(msg, {
  1364. time: 0,
  1365. btn: ['确定', '取消'],
  1366. yes: function(index){
  1367. layer.close(index);
  1368. $.ajax({
  1369. url: "<?php echo $this->createUrl('client/isp2html');?>",
  1370. type: "POST",
  1371. dataType: "json",
  1372. data: {
  1373. examId: examId,
  1374. classId:classId
  1375. },
  1376. success: function (data){
  1377. if(data > 0){
  1378. layer.msg('操作成功,重新生成'+product_name,{
  1379. icon: 1
  1380. }, function(){
  1381. layer.closeAll();
  1382. });
  1383. }else if(data==0){
  1384. layer.msg('操作失败,此班无'+product_name,{
  1385. icon: 5
  1386. }, function(){
  1387. layer.closeAll();
  1388. });
  1389. }
  1390. else{
  1391. layer.msg('操作失败,重新生成'+product_name,{
  1392. icon: 5
  1393. }, function(){
  1394. layer.closeAll();
  1395. });
  1396. }
  1397. },
  1398. error: function (data, status, e){ //服务器响应失败处理函数
  1399. layer.msg('返回失败!',{
  1400. icon: 5
  1401. }, function(){
  1402. layer.closeAll();
  1403. });
  1404. }
  1405. });
  1406. }
  1407. });
  1408. }
  1409. function isp3_html(odj){
  1410. if (!odj) return false;
  1411. var classId = odj.getAttribute("w_class_id");
  1412. var examId = odj.getAttribute("w_exam_id");
  1413. if (!classId || !examId) return false;
  1414. var msg = '您确定要生成该班级的个性化学习宝吗?';
  1415. layer.msg(msg, {
  1416. time: 0,
  1417. btn: ['确定', '取消'],
  1418. yes: function(index){
  1419. layer.close(index);
  1420. $.ajax({
  1421. url: "<?php echo $this->createUrl('client/isp3html');?>",
  1422. type: "POST",
  1423. dataType: "json",
  1424. data: {
  1425. examId: examId,
  1426. classId:classId
  1427. },
  1428. success: function (data){
  1429. if(data > 0){
  1430. layer.msg('操作成功,重新生成提分方案',{
  1431. icon: 1
  1432. }, function(){
  1433. layer.closeAll();
  1434. });
  1435. }else if(data==0){
  1436. layer.msg('操作失败,此班无提分方案',{
  1437. icon: 5
  1438. }, function(){
  1439. layer.closeAll();
  1440. });
  1441. }
  1442. else{
  1443. layer.msg('操作失败,重新生成提分方案',{
  1444. icon: 5
  1445. }, function(){
  1446. layer.closeAll();
  1447. });
  1448. }
  1449. },
  1450. error: function (data, status, e){ //服务器响应失败处理函数
  1451. layer.msg('返回失败!',{
  1452. icon: 5
  1453. }, function(){
  1454. layer.closeAll();
  1455. });
  1456. }
  1457. });
  1458. }
  1459. });
  1460. }
  1461. // 隐藏试卷
  1462. function oprateExam(examId,flag){
  1463. if (examId) {
  1464. layer.msg('未找到周周练id');
  1465. }
  1466. var msg = '您确定要隐藏该试卷吗?';
  1467. if (flag == 0) {
  1468. msg = '您确定要恢复该试卷吗?';
  1469. }
  1470. layer.msg(msg, {
  1471. time: 0,
  1472. btn: ['确定', '取消'],
  1473. yes: function(index){
  1474. layer.close(index);
  1475. $.post('<?php echo $this->createUrl("print/oprateexam");?>',{examId:examId,flag:flag},function(data){
  1476. var obj = JSON.parse(data);
  1477. if (obj.success == 1) {
  1478. location.reload();
  1479. } else {
  1480. layer.msg(obj.message);
  1481. }
  1482. });
  1483. }
  1484. });
  1485. }
  1486. $('.confirmbox-mask .icon-close-1').click(function () {
  1487. $('.confirmbox-mask').hide();
  1488. })
  1489. $('.confirmbox-mask .cancel').click(function () {
  1490. $('.confirmbox-mask').hide();
  1491. })
  1492. //发送云印任务
  1493. function sendCloudTask(cid,eid,type,isDisable){
  1494. if(isDisable === 1){
  1495. return false;
  1496. }
  1497. //$('.confirmbox-mask').show();return false;
  1498. if (!cid || !eid || !type) {
  1499. layer.msg("参数有误");return;
  1500. }
  1501. // 更试卷打印时间
  1502. //$.post("<?php //echo $this->createUrl('print/updatepaperprinttime');?>//", {cid: cid, eid: eid,type:type } );
  1503. var saveDataAry=[];
  1504. var data1={"examId": eid, "classId": cid, "type": type,"printType":"<?php echo $printType;?>"};
  1505. saveDataAry.push(data1);
  1506. $.ajax({
  1507. type: "POST",
  1508. url: "<?php echo $this->createUrl("printCloud/generateTaskList");?>",
  1509. dataType: "json",
  1510. contentType: "application/json",
  1511. data: JSON.stringify(saveDataAry),
  1512. beforeSend:function(){
  1513. layer.load(1, {
  1514. shade: [0.1,'#fff'] //0.1透明度的白色背景
  1515. });
  1516. },
  1517. success:function(data) {
  1518. var index = layer.load();
  1519. layer.close(index);
  1520. if (data.status == 1) {
  1521. $('#sendJson').attr('value', JSON.stringify(data));
  1522. var con = '';
  1523. var task_count = 0;
  1524. var totalCount = 0;
  1525. $.each(data.data, function(index, item) {
  1526. var one_count = item.enable_download_count - item.download_count;
  1527. totalCount += (one_count>0?one_count:0);
  1528. if((item.enable_download_count - item.download_count)>0) {
  1529. task_count += 1;
  1530. }
  1531. con += '<tr><td>' + (index + 1) + '</td><td>' + item.taskName + '</td><td>' + item.clazzName + '</td><td>' + item.complete_time + '</td><td>'
  1532. + item.generate_count + '/' + item.dredge_count + '/' + '<i style="color: green">' + item.enable_download_count + '</i><input type="hidden" name="drege_count" value="'+ item.enable_download_count +'"></td><td>'
  1533. + item.download_count + '</td><td>' + (one_count>0?one_count:0) + '</td><td>' + (one_count>0?'可发送':'不可发送')
  1534. + '</td></tr>'
  1535. });
  1536. $('#task_count').html(task_count);
  1537. $('#total_print_num').html(totalCount);
  1538. $('#taskList').html(con);
  1539. $('#filter-uploaded').attr({'cid':cid, 'eid':eid, 'typeId':type, 'printType':"<?php echo $printType;?>"});
  1540. $('#filter-uploaded').prop("checked", true)
  1541. $('.confirmbox-mask').show();
  1542. } else if (data.status == 0) {
  1543. layer.msg(data.message);
  1544. }
  1545. }
  1546. }
  1547. );
  1548. }
  1549. //批量发送云印任务
  1550. $("#selectPrint").click(function() {
  1551. // 判断是否有选中
  1552. if (!$("input[class='ace myselect']").is(':checked')) {
  1553. layer.msg('至少选择一个目标!');
  1554. return false;
  1555. }
  1556. var result = [];
  1557. $(".myselect").each(function(m,n){
  1558. if ($(this).prop('checked')) {
  1559. if ($(this).val() /*&& $(this).attr("stnm")*/) {
  1560. result.push($(this).val());
  1561. }
  1562. }
  1563. })
  1564. var sp = [];
  1565. var cid = 0;
  1566. var eid = 0;
  1567. var type = 0;
  1568. var isDisable = 0;
  1569. var saveDataAry=[];
  1570. var data1 = [];
  1571. for(i=0;i<result.length;i++)
  1572. {
  1573. sp = result[i].split('_');
  1574. cid = sp[0];
  1575. eid = sp[1];
  1576. type = sp[2];
  1577. isDisable = sp[3];
  1578. if(isDisable == 1 || !cid || !eid || !type) continue;
  1579. // 更试卷打印时间
  1580. //$.post("<?php //echo $this->createUrl('print/updatepaperprinttime');?>//", {cid: cid, eid: eid,type:type } );
  1581. //alert(cid);alert(eid);alert(type);alert(printType);
  1582. data1 = {"examId": eid, "classId": cid, "type": type,"printType":"<?php echo $printType;?>"};
  1583. saveDataAry.push(data1);
  1584. }
  1585. $.ajax({
  1586. type: "POST",
  1587. url: "<?php echo $this->createUrl("printCloud/generateTaskList");?>",
  1588. dataType: "json",
  1589. contentType: "application/json",
  1590. data: JSON.stringify(saveDataAry),
  1591. beforeSend:function(){
  1592. layer.load(1, {
  1593. shade: [0.1,'#fff'] //0.1透明度的白色背景
  1594. });
  1595. },
  1596. success:function(data) {
  1597. var index = layer.load();
  1598. layer.close(index);
  1599. if (data.status == 1) {
  1600. $('#sendJson').attr('value', JSON.stringify(data));
  1601. var con = '';
  1602. var task_count = 0;
  1603. var totalCount = 0;
  1604. $.each(data.data, function(index, item) {
  1605. var one_count = item.enable_download_count - item.download_count;
  1606. totalCount += (one_count>0?one_count:0);
  1607. if((item.enable_download_count - item.download_count)>0) {
  1608. task_count += 1;
  1609. }
  1610. con += '<tr><td>' + (index + 1) + '</td><td>' + item.taskName + '</td><td>' + item.clazzName + '</td><td>' + item.complete_time + '</td><td>'
  1611. + item.generate_count + '/' + item.dredge_count + '/' + '<i style="color: green">' + item.enable_download_count + '</i><input type="hidden" name="drege_count" value="'+ item.enable_download_count +'"></td><td>'
  1612. + item.download_count + '</td><td>' + (one_count>0?one_count:0) + '</td><td>' + (one_count>0?'可发送':'不可发送')
  1613. + '</td></tr>'
  1614. });
  1615. $('#task_count').html(task_count);
  1616. $('#total_print_num').html(totalCount);
  1617. $('#taskList').html(con);
  1618. $('#filter-uploaded').attr({'cid':cid, 'eid':eid, 'typeId':type, 'printType':"<?php echo $printType;?>"});
  1619. $('#filter-uploaded').prop("checked", true);
  1620. $('.confirmbox-mask').show();
  1621. } else if (data.status == 0) {
  1622. layer.msg(data.message);
  1623. }
  1624. }
  1625. }
  1626. );
  1627. });
  1628. //显示打印历史产品
  1629. $("#printHistoryPorduct").click(function () {
  1630. $('.modal1_multi').show();
  1631. });
  1632. $('.close3').click(function(){
  1633. $('.modal1_multi').hide();
  1634. });
  1635. //打印历史产品
  1636. $("#sendHistoryProduct").click(function () {
  1637. $('.modal1_multi').hide();
  1638. $.post({
  1639. url: "<?php echo $this->createUrl("historyProduct/viewProduct");?>",
  1640. data: { 'printType':"<?php echo $printType;?>"},
  1641. dataType: "json",
  1642. beforeSend:function(){
  1643. layer.load(1, {
  1644. shade: [0.1,'#fff'] //0.1透明度的白色背景
  1645. });
  1646. },
  1647. success:function(data) {
  1648. var index = layer.load();
  1649. layer.close(index);
  1650. if (data.status == 1) {
  1651. layer.alert('操作成功,可重置考试:'+data.data.exam_num+'个,学生:'+data.data.student_num+'个',{
  1652. icon: 1,
  1653. yes:function(){
  1654. location.reload();
  1655. }
  1656. });
  1657. } else if (data.status == 0) {
  1658. layer.msg(data.message,{
  1659. time: 3000,
  1660. icon: 5
  1661. }, function(){
  1662. layer.closeAll();
  1663. });
  1664. }
  1665. },
  1666. error: function (data, status, e){ //服务器响应失败处理函数
  1667. layer.msg('返回失败!',{
  1668. time: 2000,
  1669. icon: 5
  1670. }, function(){
  1671. layer.closeAll();
  1672. });
  1673. }
  1674. });
  1675. });
  1676. // 全选\反选
  1677. $(".selectAll").click(function(){
  1678. if ($(this).prop("checked")) {
  1679. var s_obj = $(".myselect");
  1680. var s_len = s_obj.length;
  1681. for (var i=0;i<s_len;i++) {
  1682. if (!s_obj[i].disabled) {
  1683. s_obj[i].checked=true;
  1684. }
  1685. }
  1686. } else {
  1687. $(".myselect").prop("checked",false);
  1688. }
  1689. });
  1690. //过滤已下载学生
  1691. $('#filter-uploaded').click(function () {
  1692. if($(this).is(':checked')){
  1693. var totalCount = 0;
  1694. var task_count = 0;
  1695. $('#taskList tr').each(function () {
  1696. var enable_count = parseInt($(this).children("td:eq(4)").children('i').html());
  1697. var dowanload_count = parseInt($(this).children("td:eq(5)").html());
  1698. $(this).children("td:eq(6)").html((enable_count-dowanload_count)>0?(enable_count-dowanload_count):0);
  1699. totalCount += ((enable_count-dowanload_count)>0?(enable_count-dowanload_count):0);
  1700. if((enable_count-dowanload_count)==0){
  1701. $(this).children("td:eq(7)").html('不可发送');
  1702. }else{
  1703. $(this).children("td:eq(7)").html('可发送');
  1704. task_count += 1;
  1705. }
  1706. });
  1707. $('#task_count').html(task_count);
  1708. $('#total_print_num').html(totalCount)
  1709. }else {
  1710. var totalCount = 0;
  1711. var task_count = 0;
  1712. $('#taskList tr').each(function () {
  1713. var enable_count = $(this).children("td:eq(4)").children('i').html();
  1714. $(this).children("td:eq(6)").html(enable_count);
  1715. totalCount += parseInt(enable_count);
  1716. if(enable_count==0){
  1717. $(this).children("td:eq(7)").html('不可发送');
  1718. }else{
  1719. $(this).children("td:eq(7)").html('可发送');
  1720. task_count += 1;
  1721. }
  1722. });
  1723. $('#task_count').html(task_count);
  1724. $('#total_print_num').html(totalCount);
  1725. $('#filter-uploaded').attr('isFilter',0)
  1726. }
  1727. });
  1728. //发送云印任务(真正发送)
  1729. $('#sendCloudPrint').click(function (){
  1730. var task_count = parseInt($('#task_count').html());
  1731. if(task_count === 0){
  1732. layer.msg('没有可发送的任务');
  1733. return false;
  1734. }
  1735. var json_data = $('#sendJson').val();
  1736. var is_filter = $('#filter-uploaded').is(':checked') ? 1 : 0;
  1737. $.post({
  1738. url: "<?php echo $this->createUrl("printCloud/sendCloudTask");?>",
  1739. data: {
  1740. 'json_data' : json_data,
  1741. 'is_filter' : is_filter,
  1742. 'printType':"<?php echo $printType;?>"
  1743. },
  1744. dataType: "json",
  1745. beforeSend:function(){
  1746. layer.load(1, {
  1747. shade: [0.1,'#fff'] //0.1透明度的白色背景
  1748. });
  1749. },
  1750. success:function(data) {
  1751. var index = layer.load();
  1752. layer.close(index);
  1753. if (data.status == 1) {
  1754. layer.msg('操作成功,请耐心等待后台打包');
  1755. $('.confirmbox-mask').hide();
  1756. location.reload();
  1757. } else if (data.status == 0) {
  1758. layer.msg(data.message);
  1759. }
  1760. }
  1761. });
  1762. })
  1763. //批量下载
  1764. $("#batchPrint").click(function(){
  1765. var message = "您确定要批量下载该产品吗?";
  1766. // 判断是否有选中
  1767. if (!$("input[class='ace myselect']").is(':checked')) {
  1768. layer.msg('至少选择一个目标!');
  1769. return false;
  1770. }
  1771. var result = [];
  1772. $(".myselect").each(function(m,n){
  1773. if ($(this).prop('checked')) {
  1774. if ($(this).val() /*&& $(this).attr("stnm")*/) {
  1775. result.push($(this).val());
  1776. }
  1777. }
  1778. })
  1779. var sp = [];
  1780. var cid = 0;
  1781. var eid = 0;
  1782. var type = 0;
  1783. var saveDataAry=[];
  1784. var data1 = [];
  1785. for(i=0;i<result.length;i++)
  1786. {
  1787. sp = result[i].split('_');
  1788. cid = sp[0];
  1789. eid = sp[1];
  1790. type = sp[2];
  1791. if(!cid || !eid || !type) continue;
  1792. var absent_filter = $("input[name='absent-filter']").is(':checked') ? 1 : 0;
  1793. data1 = {"examId": eid, "classId": cid, "type": type,"absent_filter":absent_filter,"printType":"<?php echo $printType;?>"};
  1794. saveDataAry.push(data1);
  1795. }
  1796. layer.msg(message, {
  1797. time: 0,
  1798. btn: ['确定', '取消'],
  1799. yes: function(index){
  1800. layer.close(index);
  1801. $.ajax({
  1802. type: "POST",
  1803. url: "<?php echo $this->createUrl('productdownload/batchIsp');?>",
  1804. dataType: "json",
  1805. contentType: "application/json",
  1806. data: JSON.stringify(saveDataAry),
  1807. success: function (data){
  1808. layer.closeAll();
  1809. if(data.success == 1) {
  1810. layer.alert('文件正在打包,请去右上角“下载”窗口获取下载链接!', {
  1811. icon: 1,
  1812. yes: function () {
  1813. layer.closeAll();
  1814. }
  1815. });
  1816. }else {
  1817. layer.msg(data.message);
  1818. }
  1819. },
  1820. });
  1821. }
  1822. });
  1823. });
  1824. </script>