index.php 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998
  1. <script src="/js/xsgl.js"></script>
  2. <script type="text/javascript">
  3. function in_array(search, array){
  4. for(var i in array){
  5. if(array[i]==search){
  6. return true;
  7. }
  8. }
  9. return false;
  10. }
  11. testFlag = "<?php echo $this->testFlag;?>";
  12. customTplsIds = new Array();
  13. var i = 0;
  14. <?php foreach(Yii::app()->params["custom_tpls_ids"] as $tplId){?>
  15. customTplsIds[i] = "<?php echo $tplId;?>";
  16. i++;
  17. <?php }?>
  18. jQuery(document).ready(function(){
  19. // 打印答案解析
  20. $(".answerAnalysis").click(function(){
  21. var element = this;
  22. layer.msg('您确定下载答案解析嘛?', {
  23. time: 0,
  24. btn: ['确定', '取消'],
  25. yes: function(index){
  26. layer.close(index);
  27. var wpCode = jQuery(element).attr("examId");
  28. if (!wpCode) {
  29. layer.msg('周周练id有误!');return false;
  30. }
  31. jQuery.post(
  32. '<?php echo $this->createUrl('print/createtempelate');?>',
  33. {"eid":wpCode},
  34. function(data){
  35. var obj = JSON.parse(data);
  36. if (obj.success == 1) {
  37. /*alert(obj.message);
  38. alert(obj);*/
  39. evaluationClient.printDAJX(JSON.stringify(obj.object));
  40. } else {
  41. layer.msg(obj.message);
  42. }
  43. }
  44. );
  45. }
  46. });
  47. });
  48. jQuery(".needToSendLabelTask").click(function(){
  49. layer.msg("请先发送标注任务");
  50. });
  51. jQuery(".sendLabelTask").click(function(){
  52. var examId = jQuery(this).attr("examId");
  53. var examName = jQuery(this).attr("examName");
  54. var subjectId = jQuery(this).attr("subjectId");
  55. var createTime = jQuery(this).attr("createTime");
  56. layer.msg('您确定发送试题标注任务吗?', {
  57. time: 0,
  58. btn: ['确定', '取消'],
  59. yes: function(index){
  60. layer.close(index);
  61. jQuery.post(
  62. "<?php echo $this->createUrl("print/sendlabeltask");?>",
  63. {"examId": examId, "examName": examName, "createTime": createTime},
  64. function(data){
  65. data = JSON.parse(data);
  66. if(data.success == 1){
  67. layer.msg(data.message);
  68. setTimeout(function(){location.reload();}, 1300);
  69. }
  70. else{
  71. layer.msg(data.message);
  72. }
  73. }
  74. );
  75. }
  76. });
  77. });
  78. jQuery(".enterStudentsList1").click(function(){
  79. layer.msg("请先发送标注任务");
  80. });
  81. jQuery(".paperType").click(function(){
  82. if(testFlag != 1)
  83. return false;
  84. var examId = jQuery(this).attr("examId");
  85. var tpl_index = jQuery(this).attr("tpl_index");
  86. if(in_array(jQuery(this).attr("tpl_index"), customTplsIds)){
  87. if(in_array(jQuery(this).attr("tpl_index"), [10,1011,11])){
  88. var style = "width:200px;color:gray;";
  89. var state = "disabled";
  90. }else{
  91. var style = "width:200px;";
  92. var state = "enabled";
  93. }
  94. }
  95. else{
  96. var style = "width:200px;color:gray;";
  97. var state = "disabled";
  98. }
  99. html = ""+
  100. '<div style="padding:10px 30px">'+
  101. '<div style="margin:5px 0; float: left">选择纸张:</div>'+
  102. '<div style="float: left"><select id="paperSize" style="'+style+'" '+state+' >'+
  103. '<option value="A3" ';
  104. if(jQuery(this).attr("paper_size")=='A3'){ html=html+'selected';}
  105. html=html+'>A3</option>'+
  106. '<option value="A4" ';
  107. if(jQuery(this).attr("paper_size")=='A4'){ html=html+'selected';}
  108. html=html+'>A4</option>'+
  109. '<option value="8K" ';
  110. if(jQuery(this).attr("paper_size")=='8K'){ html=html+'selected';}
  111. html=html+'>8K</option>'+
  112. '<option value="16K" ';
  113. if(jQuery(this).attr("paper_size")=='16K'){ html=html+'selected';}
  114. html=html+'>16K</option>'+
  115. '</select></div>'+
  116. '<div style="padding-top:10px;clear: left"></div>'+
  117. '<div style="margin:5px 0; float: left">阅卷方式:</div>'+
  118. '<div style="float: left"><select id="mark_type" style="width:200px">'+
  119. '<option value="0" ';
  120. if(jQuery(this).attr("mark_type")=='0'){ html=html+'selected';}
  121. html=html+'>线下阅卷</option>'+
  122. '<option value="1" ';
  123. if(jQuery(this).attr("mark_type")=='1'){ html=html+'selected';}
  124. html=html+'>在线阅卷(题)</option> <option value="3" ';
  125. if(jQuery(this).attr("mark_type")=='3'){ html=html+'selected';}
  126. html=html+'>班级混合阅卷</option> <option value="4" ';
  127. if(jQuery(this).attr("mark_type")=='4'){ html=html+'selected';}
  128. html=html+'>班级单独阅卷</option> '+
  129. '</select></div>'+
  130. '<div class="row" style="margin:30px auto;"><button id="confirm" class="label-primary-s bth-s" style="padding:4px 12px;margin:20px 0 0 15px">确定</button>'+
  131. '<button id="cancel" class="label-primary-s bth-s" style="border:gray;background:gray;padding:4px 12px;margin:20px 0 0 25px">取消</button></div>'+
  132. '</div>'+
  133. '</div>'+
  134. "";
  135. layer.open({
  136. type: 1,
  137. area: ['350px', '220px'],
  138. title: "更改试卷",
  139. content: html,
  140. success: function(index, layerObj){
  141. jQuery("#cancel").on("click", function(){
  142. layer.closeAll();
  143. });
  144. jQuery("#confirm").on("click", function(){
  145. var paperSize = jQuery("#paperSize").val();
  146. var mark_type = jQuery("#mark_type").val();
  147. jQuery.post(
  148. "<?php echo $this->createUrl("print/setpapersize");?>",
  149. {"examId": examId, "paperSize": paperSize,"mark_type":mark_type,"tpl_index":tpl_index},
  150. function(data){
  151. data = JSON.parse(data);
  152. layer.msg(data.message);
  153. if(data.success == 1){
  154. setTimeout(function(){location.reload();}, 1300);
  155. }
  156. }
  157. );
  158. layer.closeAll();
  159. });
  160. },
  161. end: function(){
  162. }
  163. });
  164. });
  165. // 根据年级筛选班级
  166. jQuery("#grade").change(function(){
  167. var grade = $(this).val();
  168. if (!grade) return false;
  169. jQuery.post(
  170. '<?php echo $this->createUrl("print/getGradeClass");?>',{"grade": grade},function(data){
  171. data = JSON.parse(data);
  172. if(data.success == 1){
  173. var classObj = $("#class");
  174. var html = "<option value=''>全部班级</option>";
  175. classObj.empty();
  176. $.each(data.message,function(i,n){
  177. html += "<option value='"+n.class_id+"'>" + n.class_name + "</option>";
  178. });
  179. classObj.append(html);
  180. }
  181. }
  182. );
  183. });
  184. });
  185. </script>
  186. <style>
  187. /*切换选择*/
  188. .tab-con{
  189. position: relative;
  190. height: 30px;
  191. width: 200px;
  192. background: #F2F2F2;
  193. border: 1px solid #01B677;
  194. border-radius: 15px;
  195. }
  196. .has-sel{
  197. background: #01B677;
  198. color: #fff;
  199. width: 50%;
  200. height: 30px;
  201. border-top-left-radius: 15px;
  202. border-bottom-left-radius: 15px;
  203. text-align: center;
  204. line-height: 30px;
  205. }
  206. .sel-opt{
  207. width: 50%;
  208. position: relative;
  209. color: #01B677;
  210. line-height: 30px;
  211. text-indent: 6px;
  212. cursor: pointer;
  213. }
  214. .sel-opt:after{
  215. content: '';
  216. border-left: 6px solid transparent;
  217. border-right: 6px solid transparent;
  218. border-top: 8px solid #01B677;
  219. position: absolute;
  220. right: 12px;
  221. top: 12px;
  222. }
  223. // .sel-opt select{
  224. // width: 100%;
  225. // height: 30px;
  226. // background: #F2F2F2;
  227. // color: #01B677;
  228. // text-indent: 6px;
  229. // font-size: inherit;
  230. // border-top-right-radius: 15px;
  231. // border-bottom-right-radius: 15px;
  232. // cursor: pointer;
  233. // }
  234. // .sel-opt select option{
  235. // position: relative;
  236. // }
  237. .points{
  238. position: absolute;
  239. top: -2px;
  240. right: 0;
  241. width: 10px;
  242. height: 10px;
  243. background: #F01516;
  244. border-radius: 50%;
  245. }
  246. .sel-cons{
  247. border: 1px solid #01B677;
  248. width: 50%;
  249. position: absolute;
  250. right: 0;
  251. top: 30px;
  252. text-indent: 10px;
  253. display: none;
  254. }
  255. .sc-lis{
  256. line-height: 30px;
  257. cursor: pointer;
  258. }
  259. .sc-lis span{
  260. position: relative;
  261. }
  262. .sc-lis .points{
  263. top: 2px;
  264. right: -16px;
  265. }
  266. .click-sc:focus {
  267. color: #fff;
  268. }
  269. .click-sc:hover {
  270. color: #fff;
  271. }
  272. .create-third{
  273. position: absolute;
  274. right: 6px;
  275. top: 10px;
  276. }
  277. .dn{display: none}
  278. </style>
  279. <style>
  280. *{margin: 0;padding: 0;}
  281. .loading-pop{position: fixed;left: 0;top: 0;bottom: 0;right: 0;background: rgba(0,0,0,0.5);z-index: 200;}
  282. .loading-pop-msg{color: #fff;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 22px;letter-spacing: 4px;}
  283. a:hover, a:focus {
  284. color: #23527c;
  285. text-decoration: none;
  286. }
  287. @font-face {font-family: "iconfont";
  288. src: url('/fonts/pdf/iconfont.eot?t=1484561666180'); /* IE9*/
  289. src: url('/fonts/pdf/iconfont.eot?t=1484561666180#iefix') format('embedded-opentype'), /* IE6-IE8 */
  290. url('/fonts/pdf/iconfont.woff?t=1484561666180') format('woff'), /* chrome, firefox */
  291. url('/fonts/pdf/iconfont.ttf?t=1484561666180') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
  292. url('/fonts/pdf/iconfont.svg?t=1484561666180#iconfont') format('svg'); /* iOS 4.1- */
  293. }
  294. .iconfont {
  295. font-family:"iconfont" !important;
  296. font-size:16px;
  297. font-style:normal;
  298. -webkit-font-smoothing: antialiased;
  299. -moz-osx-font-smoothing: grayscale;
  300. }
  301. /*切换选择*/
  302. .tab-con{
  303. position: relative;
  304. height: 30px;
  305. width: 200px;
  306. background: #F2F2F2;
  307. border: 1px solid #01B677;
  308. border-radius: 15px;
  309. }
  310. .has-sel{
  311. background: #01B677;
  312. color: #fff;
  313. width: 50%;
  314. height: 30px;
  315. border-top-left-radius: 15px;
  316. border-bottom-left-radius: 15px;
  317. text-align: center;
  318. line-height: 30px;
  319. }
  320. .sel-opt{
  321. width: 50%;
  322. position: relative;
  323. color: #01B677;
  324. line-height: 30px;
  325. text-indent: 6px;
  326. cursor: pointer;
  327. }
  328. .sel-opt:after{
  329. content: '';
  330. border-left: 6px solid transparent;
  331. border-right: 6px solid transparent;
  332. border-top: 8px solid #01B677;
  333. position: absolute;
  334. right: 12px;
  335. top: 12px;
  336. }
  337. // .sel-opt select{
  338. // width: 100%;
  339. // height: 30px;
  340. // background: #F2F2F2;
  341. // color: #01B677;
  342. // text-indent: 6px;
  343. // font-size: inherit;
  344. // border-top-right-radius: 15px;
  345. // border-bottom-right-radius: 15px;
  346. // cursor: pointer;
  347. // }
  348. // .sel-opt select option{
  349. // position: relative;
  350. // }
  351. .points{
  352. position: absolute;
  353. top: -2px;
  354. right: 0;
  355. width: 10px;
  356. height: 10px;
  357. background: #F01516;
  358. border-radius: 50%;
  359. }
  360. .sel-cons{
  361. border: 1px solid #01B677;
  362. width: 50%;
  363. position: absolute;
  364. right: 0;
  365. top: 30px;
  366. text-indent: 10px;
  367. display: none;
  368. }
  369. .sc-lis{
  370. line-height: 30px;
  371. cursor: pointer;
  372. }
  373. .sc-lis span{
  374. position: relative;
  375. }
  376. .sc-lis .points{
  377. top: 2px;
  378. right: -16px;
  379. }
  380. .icon-pdf:before { content: "\e618"; }}
  381. .fl{float:left;}
  382. /* 往期教师讲案按钮 */
  383. .history-teacher-exolaincase-btn{cursor: pointer;background: rgb(21,174,104);color: #fff;width: 130px;height: 28px;margin-left: 20px;text-indent: 10px;}
  384. .history-teacher-exolaincase-btn img,.history-teacher-exolaincase-btn span{ color: #fff;vertical-align: middle;line-height: 28px;font-size: 12px;}
  385. .dtw-top-right-btns{float: right;padding-right:10px;}
  386. .dtw-top-left-cons{float: left;padding-left: 12px;}
  387. .tabs a{
  388. margin:5px 10px;
  389. padding:0 10px;
  390. line-height: 24px;
  391. background: #15ae68;
  392. color: #fff;
  393. }
  394. .tabs a.active{
  395. background: green;
  396. }
  397. </style>
  398. <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
  399. <link rel="stylesheet" href="/fonts/shangchuan/iconfont.css" />
  400. <div class="main-content-inner">
  401. <ul class="clearfix main-content-inner-ul">
  402. <li class="pull-left">
  403. <button onclick='location.href="<?php echo $this->createUrl("print/index",array('type'=>'wp'));?>"' class="button button_normal button_group button_arrow " data-button="red">打印试卷</button>
  404. <img src="/images/line.jpg" style="height:45px;" />
  405. </li>
  406. <li class="pull-left">
  407. <!--<button onclick='ccc()' class="button button_normal button_group button_arrow <?php if($printType == 'wtb'){echo 'button_active';}?>" data-button="red">下载错题本</button>-->
  408. <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'wtb'));?>"' class="button button_normal button_group button_arrow " data-button="red">下载错题本</button>
  409. <img src="/images/line.jpg" style="height:45px;" />
  410. </li>
  411. <li class="pull-left">
  412. <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'isp'));?>"' class="button button_normal button_group button_arrow " data-button="red">下载个性化学习方案</button>
  413. <img src="/images/line.jpg" style="height:45px;" />
  414. </li>
  415. <li class="pull-left">
  416. <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'studytrend'));?>"' class="button button_normal button_group button_arrow " data-button="red">下载个性化学习宝</button>
  417. <img src="/images/line.jpg" style="height:45px;" />
  418. </li>
  419. <li class="pull-left">
  420. <button onclick='location.href="<?php echo $this->createUrl("print/student_product");?>"' class="button button_normal button_group button_arrow " data-button="red">阶段复习个性化学习宝</button>
  421. <img src="/images/line.jpg" style="height:45px;" />
  422. </li>
  423. <li class="pull-left">
  424. <button onclick='location.href="<?php echo $this->createUrl("third/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">第三方试卷</button>
  425. <img src="/images/line.jpg" style="height:45px;" />
  426. </li>
  427. <li class="pull-left">
  428. <button onclick='location.href="<?php echo $this->createUrl("export/index");?>"' class="button button_normal button_group button_arrow <?php if($printType == ''){echo 'button_active';}?>" data-button="red">导出报告</button>
  429. <img src="/images/line.jpg" style="height:45px;" />
  430. </li>
  431. <li class="pull-left">
  432. <button onclick='location.href="<?php echo $this->createUrl("upload/index");?>"' class="button button_normal button_group button_arrow" data-button="red">上传试卷</button>
  433. <img src="/images/line.jpg" style="height:45px;" />
  434. </li>
  435. <?php if(isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){
  436. ?>
  437. <li class="pull-left">
  438. <button onclick='location.href="<?php echo $this->createUrl("print/restore");?>"' class="button button_normal button_group button_arrow" data-button="red">还原考试</button>
  439. <img src="/images/line.jpg" style="height:45px;" />
  440. </li>
  441. <?php
  442. }?>
  443. <li class="pull-left">
  444. <button onclick='location.href="<?php echo $this->createUrl("record/importscore"); ?>"'
  445. class="button button_normal button_group button_arrow " data-button="red">导入成绩
  446. </button>
  447. <img src="/images/line.jpg" style="height:45px;"/>
  448. </li>
  449. <li class="pull-left">
  450. <button onclick='location.href="<?php echo $this->createUrl("cylet/index");?>"' class="button button_normal button_group button_arrow" data-button="red">全学科统考</button>
  451. </li>
  452. </ul>
  453. <div class="tabs clearfix">
  454. <a href="javascript:;" class="fl <?php if(isset($_GET['_tab'])){if($_GET['_tab'] ==0){echo 'active';}}else{echo 'active';}?>" id="_third_shijuan">全学科</a>
  455. <a href="javascript:;" class="fl <?php if(isset($_GET['_tab'])){if($_GET['_tab'] ==1){echo 'active';}}?>" id="_baogao">导出报告</a>
  456. <div class="tab-con clearfix pull-right" style="margin:8px 11px 0 0">
  457. <div class="has-sel fl"><?php echo isset(Yii::app()->params["subjectId"][Yii::app()->session['session_duoxueke_subject_id']])?Yii::app()->params["subjectId"][Yii::app()->session['session_duoxueke_subject_id']]:'数学'?></div>
  458. <div class="sel-opt fl">
  459. 切换学科
  460. <?php if($subject){?>
  461. <div class="points"></div>
  462. <?php }?>
  463. </div>
  464. <div class="sel-cons" style="z-index:6;background-color: #fff;">
  465. <div class="sc-lis" val="3"><span>数学<?php if($subject && isset($subject[3]) && !empty($subject[3])){?><div class="points"></div><?php }?></span></div>
  466. <div class="sc-lis" val="8"><span>英语<?php if($subject && isset($subject[8]) && !empty($subject[8])){?><div class="points"></div><?php }?></span></div>
  467. <div class="sc-lis" val="9"><span>语文<?php if($subject && isset($subject[9]) && !empty($subject[9])){?><div class="points"></div><?php }?></span></div>
  468. <div class="sc-lis" val="12"><span>物理<?php if($subject && isset($subject[12]) && !empty($subject[12])){?><div class="points"></div><?php }?></span></div>
  469. <div class="sc-lis" val="13"><span>化学<?php if($subject && isset($subject[13]) && !empty($subject[13])){?><div class="points"></div><?php }?></span></div>
  470. <div class="sc-lis" val="14"><span>生物<?php if($subject && isset($subject[14]) && !empty($subject[14])){?><div class="points"></div><?php }?></span></div>
  471. <div class="sc-lis" val="15"><span>政治<?php if($subject && isset($subject[15]) && !empty($subject[15])){?><div class="points"></div><?php }?></span></div>
  472. <div class="sc-lis" val="16"><span>历史<?php if($subject && isset($subject[16]) && !empty($subject[16])){?><div class="points"></div><?php }?></span></div>
  473. <div class="sc-lis" val="17"><span>地理<?php if($subject && isset($subject[17]) && !empty($subject[17])){?><div class="points"></div><?php }?></span></div>
  474. <div class="sc-lis" val="18"><span>理综<?php if($subject && isset($subject[18]) && !empty($subject[18])){?><div class="points"></div><?php }?></span></div>
  475. <div class="sc-lis" val="19"><span>文综<?php if($subject && isset($subject[19]) && !empty($subject[19])){?><div class="points"></div><?php }?></span></div>
  476. </div>
  477. </div>
  478. </div>
  479. <div class="third_shijuan <?php if(isset($_GET['_tab'])){if(isset($_GET['_tab']) && $_GET['_tab']==1){echo 'dn';}}?>">
  480. <div class="page-content">
  481. <div class="row" style="margin:0px;">
  482. <div class="col-xs-12">
  483. <!-- PAGE CONTENT BEGINS -->
  484. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  485. <div class="row">
  486. <form method="get" id="form1" action="<?php echo $this->createUrl("third/index");?>">
  487. <div class="col-xs-12">
  488. <div class="dataTables_length margin-zy">
  489. <input type="hidden" name="type" value="<?php echo $printType;?>" />
  490. <input type="hidden" name="_tab" value="<?php if(isset($_GET['_tab'])){echo $_GET['_tab'];}else{echo 0;}?>" />
  491. <input type="checkbox" name="display" style="margin: -1px 2px 0 0;display:inline-block;vertical-align: middle;width:15px;height:15px;" value="1" <?php if($display === '1') echo "checked";?>>显示隐藏试卷
  492. <?php if(in_array(Yii::app()->session['session_duoxueke_subject_id'],array(3,6)))
  493. {
  494. ?> <select class="form-control" id="labelled" name="labelled">
  495. <option value="">标注状态</option>
  496. <option value="0" <?php if($labelled === '0') echo "selected";?> >未发送</option>
  497. <option value="2" <?php if($labelled == 2) echo "selected";?> >已发送</option>
  498. <option value="1" <?php if($labelled == 1) echo "selected";?>>已标注</option>
  499. </select><?php } ?>
  500. <input type="text" class="form-control input-sm" placeholder="请输入打印任务名称" name="name" value="<?php echo $printName;?>">
  501. <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
  502. </div>
  503. </div>
  504. </form>
  505. <button onclick='location.href="<?php if(in_array(Yii::app()->session['session_duoxueke_subject_id'],array(3,6))){echo $this->createUrl("third/thirdview");}else{echo $this->createUrl("third/thirdview_duo");}?>"' class="label-primary-s bth-s create-third" data-button="red">创建试卷</button>
  506. </div>
  507. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
  508. <thead>
  509. <tr>
  510. <th>名称</th>
  511. <th>创建日期</th>
  512. <th>是否创建答题卡</th>
  513. <th>选择题量</th>
  514. <th>填空题量</th>
  515. <th>解答题量</th>
  516. <!-- <th>选做题量</th>-->
  517. <?php if(in_array(Yii::app()->session['session_duoxueke_subject_id'],array(3,6)))
  518. {
  519. ?> <th >状态</th><?php } ?>
  520. <th >操作</th>
  521. </tr>
  522. </thead>
  523. <tbody>
  524. <?php if(!empty($printList)):foreach($printList as $cl):?>
  525. <tr>
  526. <td style="max-width:260px">
  527. <?php
  528. if($cl['is_new']==0)
  529. {
  530. echo "<span style='color: #ff0000;font-weight: bold;'>【New】</span>";
  531. }
  532. ?>
  533. <?php if( isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){
  534. ?>
  535. <a href="<?php echo Yii::app()->createUrl('paper/index',array('eid'=>$cl['exam_id'],'is_third'=>1))?>"><?php echo $cl['exam_name'];?></a>
  536. <?php }else{
  537. ?>
  538. <a href="<?php echo Yii::app()->createUrl('paper/index',array('eid'=>$cl['exam_id'],'is_third'=>1,'tag'=>1))?>"><?php echo $cl['exam_name'];?></a>
  539. <?php
  540. }?>
  541. <!-- <a href="<?php /*echo Yii::app()->createUrl('paper/index',array('eid'=>$cl['exam_id']))*/?>"><?php /*echo $cl['print_name'];*/?></a>-->
  542. </td>
  543. <td><?php if(!empty($cl['create_time'])){ echo date('Y-m-d',$cl['create_time']);}?></td>
  544. <td><?php if(isset($exam_sheets[$cl['exam_group_id']]) && !empty($exam_sheets[$cl['exam_group_id']])){ echo '已创建';}else{echo "未创建";}?></td>
  545. <td><?php if(isset($sheet_rs[$cl['exam_group_id']]) && !empty($sheet_rs[$cl['exam_group_id']])){
  546. echo $sheet_rs[$cl['exam_group_id']]->ke_topic_num;
  547. }else{echo 0;}?></td>
  548. <td><?php if(isset($sheet_rs[$cl['exam_group_id']]) && !empty($sheet_rs[$cl['exam_group_id']])){
  549. echo $sheet_rs[$cl['exam_group_id']]->tian_topic_num;
  550. }else{echo 0;}?></td>
  551. <td><?php if(isset($sheet_rs[$cl['exam_group_id']]) && !empty($sheet_rs[$cl['exam_group_id']])){
  552. echo $sheet_rs[$cl['exam_group_id']]->zu_topic_num;
  553. }else{echo 0;}?></td>
  554. <!-- <td><?php /*if(isset($sheet_rs[$cl['exam_group_id']]) && !empty($sheet_rs[$cl['exam_group_id']])){
  555. echo $sheet_rs[$cl['exam_group_id']]->xuan_topic_num;
  556. }else{echo 0;}*/?></td>-->
  557. <?php if(in_array(Yii::app()->session['session_duoxueke_subject_id'],array(3,6)))
  558. {
  559. ?>
  560. <td>
  561. <?php if($cl['is_answersheet']==1){if($cl["is_labelled"] == 1){
  562. echo "<span style='color:green;font-weight:normal;'>已标注</span>";
  563. }else if($cl["is_labelled"] == 2 ){
  564. echo "<span style='color:orange;font-weight:normal;'>已发送</span>";
  565. }
  566. if($cl["is_labelled"] == 0 && $cl['tw_status']==2){?>
  567. <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["examDate"];?>" aria-hidden="true" title="发送试题标注">&#xe71f;</span>
  568. <?php }}else{if($cl['tw_status']==2){echo "<span style='color:orange;font-weight:normal;'>解析成功</span>";}elseif($cl['tw_status']==3){echo "<span style='color:orange;font-weight:normal;cursor:pointer' onclick=showError('".$cl['wrong_reason']."')>解析失败</span>";}elseif($cl['word_path']){echo "<span style='color:orange;font-weight:normal;'>等待解析</span>";}else{echo "<span style='color:orange;font-weight:normal;'>上传试卷</span>";}}?>
  569. </td>
  570. <?php } ?>
  571. <td style="width:265px;">
  572. <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生" onclick="javascript:location.href='<?php echo $this->createUrl('third/exam_list',array('exam_group_id'=>$cl['exam_group_id']));?>'">&#xe668;</span>
  573. <?php if(in_array(Yii::app()->session['session_duoxueke_subject_id'],array(3,6)))
  574. {
  575. ?>
  576. <a class="iconfont click-sc addbx create_sheet" aria-hidden="true" title="<?php if(isset($exam_sheets[$cl['exam_group_id']]) && !empty($exam_sheets[$cl['exam_group_id']])){ echo '修改答题卡';}else{echo "创建答题卡";}?>" exam_group_id="<?php echo $cl['exam_group_id']?>" sheet_id ="<?php if(isset($exam_sheets[$cl['exam_group_id']]) && !empty($exam_sheets[$cl['exam_group_id']])){ echo $exam_sheets[$cl['exam_group_id']];}else{echo 0;}?>">&#xe804;</a>
  577. <!-- <span class="iconfont click-sc addbx" aria-hidden="true" title="创建客观题答案" onclick="javascript:location.href='<?php /*echo $this->createUrl('third/exam_answer',array('exam_group_id'=>$cl['exam_group_id']));*/?>'">答</span>-->
  578. <span class="iconfont click-sc addbx" aria-hidden="true" title="扫描答题卡" onclick="createTemplate('<?php echo $cl['exam_group_id'];?>')">扫</span>
  579. <span class="iconfont click-sc addbx" aria-hidden="true" title="上传试卷" onclick="uploadTemplate('<?php echo $cl['exam_group_id'];?>','<?php echo $cl['exam_name'];?>')">&#xe640;</span>
  580. <?php
  581. }else{
  582. ?>
  583. <a class="iconfont click-sc addbx create_sheet_subject" aria-hidden="true" title="<?php if(isset($exam_sheets[$cl['exam_group_id']]) && !empty($exam_sheets[$cl['exam_group_id']])){ echo '修改答题卡';}else{echo "创建答题卡";}?>" exam_group_id="<?php echo $cl['exam_group_id']?>" sheet_id ="<?php if(isset($exam_sheets[$cl['exam_group_id']]) && !empty($exam_sheets[$cl['exam_group_id']])){ echo $exam_sheets[$cl['exam_group_id']];}else{echo 0;}?>">&#xe804;</a>
  584. <!-- <span class="iconfont click-sc addbx" aria-hidden="true" title="创建客观题答案" onclick="javascript:location.href='<?php /*echo $this->createUrl('third/exam_answer',array('exam_group_id'=>$cl['exam_group_id']));*/?>'">答</span>-->
  585. <span class="iconfont click-sc addbx" aria-hidden="true" title="扫描答题卡" onclick="createTemplateSubject('<?php echo $cl['exam_group_id'];?>',<?php echo Yii::app()->session['session_duoxueke_subject_id']?>)">扫</span>
  586. <?php
  587. }?>
  588. <?php if($cl['is_display'] == 1):?>
  589. <span class="iconfont click-sc click-tc addbx" aria-hidden="true" title="恢复试卷" onclick="oprateExam('<?php echo $cl['exam_group_id'];?>',0)">&#xe68f;</span>
  590. <?php else:?>
  591. <span class="iconfont click-sc click-delete addbx" aria-hidden="true" title="隐藏试卷" onclick="oprateExam('<?php echo $cl['exam_group_id'];?>',1)">&#xe68b;</span>
  592. <?php endif;?>
  593. </td>
  594. </tr>
  595. <?php endforeach;else:?>
  596. <tr><td colspan="8">暂无数据!</td></tr>
  597. <?php endif;?>
  598. </tbody>
  599. </table>
  600. <?php if(!empty($page_total)):?>
  601. <div class="row">
  602. <div class="col-xs-6">
  603. &nbsp;
  604. </div>
  605. <div class="col-xs-6">
  606. <div class="dataTables_paginate paging_simple_numbers">
  607. <?php
  608. $this->widget('CLinkPager', array(
  609. 'header' => '',
  610. 'firstPageLabel'=> '首页',
  611. 'lastPageLabel' => '末页',
  612. 'prevPageLabel' => '上一页',
  613. 'nextPageLabel' => '下一页',
  614. 'pages' => $pages,
  615. 'maxButtonCount'=> 5,
  616. ));
  617. echo '共:'.$page_total.'条';
  618. ?>
  619. </div>
  620. </div>
  621. </div>
  622. <?php endif;?>
  623. </div>
  624. <!--上传模板弹窗-->
  625. <!-- PAGE CONTENT ENDS -->
  626. </div>
  627. </div>
  628. </div>
  629. </div>
  630. <div class="baogao <?php if(!isset($_GET['_tab'])){echo 'dn';}else{if(isset($_GET['_tab']) && $_GET['_tab']==0){echo 'dn';}}?>">
  631. <div class="page-content" >
  632. <div class="row" style="margin:0px;">
  633. <div class="col-xs-12">
  634. <!-- PAGE CONTENT BEGINS -->
  635. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  636. <div class="row">
  637. <form method="get" action="<?php echo $this->createUrl('third/index'); ?>" style="padding-left: 0px;">
  638. <input type="hidden" name="_tab" value="<?php if(isset($_GET['_tab'])){echo $_GET['_tab'];}else{echo 0;}?>" />
  639. <div class="dtw-top-left-cons">
  640. <div class="dataTables_length margin-zy">
  641. <div class='diy_select1' style="display: inline;margin-right: 5px;border: 1px solid #c9ccd2;">
  642. <input type='hidden' id="grade_id" name="grade_id" class='diy_select_input1' value="<?php if (empty($grade_id)) {
  643. echo 0;
  644. } else {
  645. echo $grade_id;
  646. } ?>"/>
  647. <div class='diy_select_txt1'><?php
  648. if (empty($grade_id)) {
  649. echo '请选择年级';
  650. } else {
  651. switch ($grade_id) {
  652. case 1:echo '高一';
  653. break;
  654. case 2:echo '高二';
  655. break;
  656. case 3:echo '高三';
  657. break;
  658. }
  659. }
  660. ?></div>
  661. <div class='diy_select_btn1'></div>
  662. <ul class='diy_select_list1'>
  663. <li val="0" >请选择年级</li>
  664. <li val="1">高一</li>
  665. <li val="2">高二</li>
  666. <li val="3">高三</li>
  667. </ul>
  668. </div>
  669. <div class='diy_select'>
  670. <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)) {
  671. echo 0;
  672. } else {
  673. echo $class_id;
  674. } ?>"/>
  675. <div class='diy_select_txt'><?php if (empty($grade_id) || empty($class_id) || empty($grade_class)) {
  676. echo '请选择班级';
  677. } else {
  678. if (isset($grade_class[$class_id]) && !empty($grade_class[$class_id])) {
  679. echo $grade_class[$class_id]['class_name'];
  680. }
  681. } ?></div>
  682. <div class='diy_select_btn'></div>
  683. <ul class='diy_select_list'>
  684. <li val="0">请选择班级</li>
  685. <?php if (empty($grade_id) || empty($grade_class)) {
  686. echo '';
  687. } else {
  688. foreach ($grade_class as $v) {
  689. ?>
  690. <li val="<?php echo $v['class_id'] ?>"><?php echo $v['class_name'] ?></li>
  691. <?php }
  692. } ?>
  693. </ul>
  694. </div>
  695. <input type="text" class="form-control input-sm" placeholder="请输入报告名称!" name="realname1" value="<?php if (!empty($realname1)) {
  696. echo $realname;
  697. } ?>">
  698. <!--<button class="btn btn-minier btn-primary">搜索</button>-->
  699. <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
  700. </div>
  701. </div>
  702. </form>
  703. <?php if ((isset(Yii::app()->session['session_duoxueke_subject_id']) && Yii::app()->session['session_duoxueke_subject_id'] == 3) || (isset(Yii::app()->session['session_duoxueke_subject_id']) && Yii::app()->session['session_duoxueke_subject_id'] == 6)) { ?>
  704. <div class="dtw-top-right-btns mt15" >
  705. <?php if ($past_sem_exist):?>
  706. <div class="history-teacher-exolaincase-btn fl">
  707. <img src="/images/download.png" alt="" class="" href="">
  708. <a href="<?php echo Yii::app()->createUrl('export/pastacdemicrs');?>"><span>往期教师讲案</span></a>
  709. </div>
  710. <?php endif;?>
  711. <div id="dynamic-table_filter" class="dataTables_filter position_g fl" >
  712. <a class="btn btn-success btn-sm" href="<?php echo Yii::app()->createUrl('export/statistics') ?>">
  713. <i class="fa fa-plus " style="font-style: normal;"></i> 校长专用分析报告
  714. </a>
  715. </div>
  716. </div>
  717. <?php }?>
  718. </div>
  719. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
  720. <thead>
  721. <tr>
  722. <th width="50%">名称</th>
  723. <th width="10%">班级</th>
  724. <?php if(in_array(Yii::app()->session['session_duoxueke_subject_id'],array(3,6))){
  725. ?>
  726. <th width="10">错题文档</th>
  727. <?php
  728. }?>
  729. <th width="30%">操作</th>
  730. </tr>
  731. </thead>
  732. <tbody>
  733. <?php if (!empty($printList1)):foreach ($printList1 as $cl): ?>
  734. <tr>
  735. <td><?php echo $cl['print_name']; ?></td>
  736. <td><?php echo $cl['class_name']; ?></td>
  737. <?php if(in_array(Yii::app()->session['session_duoxueke_subject_id'],array(3,6))){
  738. ?>
  739. <td><span style="color: #15ae68;font-weight: bold">
  740. <?php if ($cl['is_topwb_html'] == 0 || $cl['is_topwb_html'] == 90) {
  741. echo '未生成';
  742. } elseif ($cl['is_topwb_html'] == 1 && $cl['is_topwb_pdf'] == 0) {
  743. echo "正在生成中";
  744. } elseif ($cl['is_topwb_pdf'] == 1) {
  745. echo '已生成';
  746. } elseif ($cl['is_topwb_pdf'] == 9){
  747. echo '已删除';
  748. };
  749. ?>
  750. </span>
  751. </td>
  752. <?php
  753. }?>
  754. <td>
  755. <?php if ($this->schoolManager->classExamHasPaperRs($cl['exam_id'], $cl['class_id'])): ?>
  756. <!-- <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"); */?>">
  757. <span class="fa fa-file-word-o click-sc addbx" style="padding:0.5px 9px" aria-hidden="true" title="导出Word(精简)"></span>
  758. </a>-->
  759. <a class="green setEduce" style="margin-left:4px;" href="#" exam_id ="<?php echo $cl['exam_id']?>" file_type="word">
  760. <span class="fa fa-file-word-o click-sc addbx" style="padding:0.5px 9px" aria-hidden="true" title="导出Word"></span>
  761. </a>
  762. <a class="green setEduce" style="margin-left:4px" href="#" exam_id ="<?php echo $cl['exam_id']?>" file_type="excel">
  763. <span class="fa fa-file-excel-o click-sc addbx" style="padding:0.5px 9px" aria-hidden="true" title="导出Excel"></span>
  764. </a>
  765. <?php if(in_array(Yii::app()->session['session_duoxueke_subject_id'],array(3,6))){
  766. ?>
  767. <?php if ($cl['is_topwb_pdf'] == 1) { ?>
  768. <a class="green" style="margin-left:4px" href="<?php echo Yii::app()->createUrl('export/download', array('exam_id' => $cl['exam_id'])); ?>">
  769. <span class="fa fa-file-pdf-o click-sc addbx" style="padding:0.5px 9px" aria-hidden="true" title="下载错题前十"></span>
  770. </a>
  771. <?php } ?>
  772. <a class="green" style="margin-left:4px" onclick="downpdf('<?php echo $cl['exam_id'] ?>', '<?php echo $cl['class_id'] ?>')" href="javascript:void(0);">
  773. <span class="fa fa-file-pdf-o click-sc addbx" style="padding:0.5px 9px" aria-hidden="true" title="下载教师讲案"></span>
  774. </a>
  775. <?php if(isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){ ?>
  776. <?php if($cl['is_academicr_pdf']=='1'&&$cl['academicr_pdf_path']!=""){ ?>
  777. <span class="iconfont click-sc addbx" aria-hidden="true" title="重新生成教师讲案" onclick="reloadAcademicr('<?php echo $cl['exam_id']; ?>',1,this)">&#xe6db;</span>
  778. <?php } ?>
  779. <span class="iconfont click-sc addbx" aria-hidden="true" title="重新生成错题前十" onclick="reloadAcademicr('<?php echo $cl['exam_id']; ?>',2,this)">&#xe6db;</span>
  780. <?php } }?>
  781. <?php else: ?>
  782. <a style="margin-left:10px">
  783. <span class="iconfont click-sc addbx" aria-hidden="true" title="数据异常">&#xe7e6;</span>
  784. </a>
  785. <?php endif; ?>
  786. </td>
  787. </tr>
  788. <?php endforeach;
  789. else: ?>
  790. <tr><td colspan="4">暂无数据!</td></tr>
  791. <?php endif; ?>
  792. </tbody>
  793. </table>
  794. <?php if (!empty($page_total1)): ?>
  795. <div class="row" style="padding-top:10px;">
  796. <div class="col-xs-7">
  797. &nbsp;
  798. </div>
  799. <div class="col-xs-5" style="font-size: 16px">
  800. <div class="dataTables_paginate paging_simple_numbers" style="vertical-align:sub;">
  801. <?php
  802. $this->widget('CLinkPager', array(
  803. 'header' => '',
  804. 'firstPageLabel' => '首页',
  805. 'lastPageLabel' => '末页',
  806. 'prevPageLabel' => '上一页',
  807. 'nextPageLabel' => '下一页',
  808. 'pages' => $pages1,
  809. 'maxButtonCount' => 5,
  810. ));
  811. echo '<span style="vertical-align:middle;">共:' . $page_total1 . '条</span>';
  812. ?>
  813. </div>
  814. </div>
  815. </div>
  816. <?php endif; ?>
  817. </div>
  818. <!-- PAGE CONTENT ENDS -->
  819. </div>
  820. </div>
  821. </div>
  822. </div>
  823. </div>
  824. <div class="loading-pop" style="display:none;">
  825. <div class="loading-pop-msg">正在生成中,请稍候···</div>
  826. </div>
  827. <style>
  828. *{padding:0px;margin:0px;font-family:微软雅黑}
  829. ul,li,ol{list-style-type:none;}
  830. .clearfix:after{clear:both;overflow:hidden;content:"";display:block;}
  831. input ,button{outline:none;}
  832. .position-r{position:relative}
  833. .fl{float:left;}
  834. .fr{float:right;}
  835. .mt5{margin-top:5px;}
  836. .mt10{margin-top:10px;}
  837. .mt20{margin-top:20px;}
  838. .ml15{margin-left:15px;}
  839. .mr15{margin-right:15px;}
  840. .font_bold{font-weight:bold;}
  841. .choseImg{cursor:pointer;}
  842. .ttd{background:url(/images/back-d.png) center repeat;width:100%;height:100%;position:fixed;top:0px;z-index:999}
  843. .s-state{width:380px;background:#fff;margin:12% auto 0 auto;}
  844. .hint_size{height:45px;width:90%;color:#333;line-height:45px;margin:0px auto;border-bottom:1px solid #ccc;}
  845. .mistake_character{text-align:left;color:#606060;font-size:14px;padding:0px 0px 28px 0px;width:90%;margin:0px auto;}
  846. .roger{width:100px;height:35px;border:1px solid #15ae68;background:#15ae68;color:#fff;font-size:16px;cursor:pointer;}
  847. .rogergb{background:#ccc;border:1px solid #ccc;}
  848. .allTeacher{width:164px;height:30px;border:1px solid #ccc;border-radius:6px;margin-top:10px;}
  849. button.wordBtn{background:#50d2c2;color:#fff;width:120px;height:30px;border:1px solid #50d2c2;cursor:pointer;border-radius:4px;margin-left: 15px;}
  850. </style>
  851. <div class="ttd" style="display: none;">
  852. <div class="s-state clearfix posirela">
  853. <div class="hint_size clearfix">
  854. <span class="fl ml15">下载的学情分析报告是否需要下列数据</span>
  855. </div>
  856. <div class="mistake_character clearfix" style="padding-top: 10px; padding-bottom: 0;">
  857. <label class="ml15 fl" style="line-height:37px"><input type="checkbox" name="student_card" style="margin-right: 5px;margin-top: 0; vertical-align: middle; width: 17px;height: 17px;">系统准考证号</label>
  858. </div>
  859. <div class="mistake_character clearfix" style="padding-top: 0; padding-bottom: 0px;">
  860. <label class="ml15 fl" style="line-height:37px"><input type="checkbox" name="school_student_card" style="margin-right: 5px;margin-top: 0; vertical-align: middle; width: 17px;height: 17px;">学校准考证号</label>
  861. </div>
  862. <div class="mistake_character clearfix" style="padding-top: 0; padding-bottom: 10px;">
  863. <label class="ml15 fl" style="line-height:37px"><input type="checkbox" name="is_outer" style="margin-right: 5px;margin-top: 0; vertical-align: middle;width: 17px;height: 17px;">是否只显示在籍生</label>
  864. </div>
  865. <div class="mistake_character clearfix">
  866. <div class="clearfix" style="width:300px;margin:0px auto;">
  867. <input type="hidden" name="exam_id" value="0">
  868. <input type="hidden" name="file_type" value="">
  869. <p class="fl"><button class="roger shut" id="btnSubmit">确定</button></p>
  870. <p class="fr"><button class="roger shut rogergb" id="btnClose">取消</button></p>
  871. </div>
  872. </div>
  873. </div>
  874. </div>
  875. <script type="text/javascript">
  876. function reloadAcademicr(examId,type,obj){
  877. $.get("<?php echo $this->createUrl("export/reload_academicr") ?>", {examId: examId, type: type}, function(data) {
  878. var m = JSON.parse(data);
  879. if (m.status == 0)
  880. {
  881. alert('重置成功');
  882. $(obj).hide()
  883. }
  884. });
  885. }
  886. function downpdf(examId, classId) {
  887. $(".loading-pop").show();
  888. $.get("<?php echo $this->createUrl("export/academicr") ?>", {examId: examId, classId: classId}, function(data) {
  889. var m = JSON.parse(data);
  890. if (m.status == 0)
  891. {
  892. if (m.is_create == 1) {
  893. setTimeout(function() {
  894. $(".loading-pop").hide();
  895. }, 500);
  896. } else {
  897. $(".loading-pop").hide();
  898. }
  899. location.href="<?php echo $this->createUrl("export/down_load")?>?examId="+examId;
  900. } else
  901. {
  902. setTimeout(function() {
  903. $(".loading-pop").hide();
  904. }, 500);
  905. layer.msg(m.error)
  906. // alert(m.error);
  907. }
  908. });
  909. }
  910. $(document).ready(function() {
  911. /*var str = '<div class="points"></div>';
  912. $(".sc-lis").each(function(){
  913. if($(this).find(".points").length>0){
  914. $(".sel-opt").append(str);
  915. }
  916. });*/
  917. $("#btnClose").click(function(){
  918. $(this).parents(".ttd").fadeOut();
  919. });
  920. $(".shut").click(function(){
  921. $("body").css({height :"100%",overflow:"auto"});
  922. });
  923. $(".setEduce").click(function(){
  924. var tp = $(".ttd");
  925. var lq = $(window).height();
  926. $("#btnSubmit").removeAttr('disabled');
  927. $("input[name=exam_id]").val($(this).attr('exam_id'));
  928. $("input[name=file_type]").val($(this).attr('file_type'));
  929. tp.fadeIn();
  930. $("body").css({height : lq+"px",overflow:"hidden"});
  931. });
  932. $(".sel-opt,.sel-cons").mouseover(function(){
  933. $(".sel-cons").show();
  934. }).mouseout(function(){
  935. $(".sel-cons").hide();
  936. });
  937. $(".sc-lis").click(function(){
  938. var data = {
  939. subjectId : $(this).attr('val')
  940. };
  941. $.post("<?php echo Yii::app()->createUrl('third/setSubjectId')?>",data,function(flags){
  942. if(flags)
  943. {
  944. var url = "/index.php/third/index?_tab="+$("input[name=_tab]").val();
  945. location.href = url;
  946. }else
  947. {
  948. alert('网络异常');
  949. }
  950. });
  951. $('.has-sel').text($(this).text());
  952. $(".sel-cons").hide();
  953. });
  954. $("body").delegate("#btnSubmit","click",function(){
  955. var student_card = 0;
  956. var is_outer = 0;
  957. var school_student_card = 0;
  958. var exam_id = "";
  959. var file_type = "";
  960. exam_id = $("input[name=exam_id]").val();
  961. file_type = $("input[name=file_type]").val();
  962. if(!exam_id || !file_type)
  963. {
  964. layer.msg('参数有误!');return false;
  965. }
  966. if($("input[name=student_card]").is(':checked'))
  967. {
  968. student_card = 1;
  969. }
  970. if($("input[name=school_student_card]").is(':checked'))
  971. {
  972. school_student_card = 1;
  973. }
  974. if($("input[name=is_outer]").is(':checked'))
  975. {
  976. is_outer = 1;
  977. }
  978. var data ={
  979. exam_id:''+exam_id+'',
  980. file_type:file_type,
  981. student_card:student_card,
  982. school_student_card:school_student_card,
  983. is_outer:is_outer
  984. };
  985. $("#btnSubmit").attr('disabled','disabled');
  986. $.post("<?php echo Yii::app()->createUrl('export/ajax_down') ?>", data, function(flags) {
  987. var m = JSON.parse(flags);
  988. if(m.status)
  989. {
  990. $("#btnClose").parents(".ttd").fadeOut();
  991. location.href = m.result;
  992. }else
  993. {
  994. layer.msg(m.result);
  995. $(this).parents(".ttd").fadeOut();
  996. return false;
  997. }
  998. })
  999. })
  1000. });
  1001. function ccc() {
  1002. layer.msg('敬请期待!', {
  1003. time: 0,
  1004. btn: ['确定', '取消'],
  1005. yes: function(index) {
  1006. layer.close(index);
  1007. return false;
  1008. }
  1009. });
  1010. }
  1011. $(function() {
  1012. $(".diy_select1").click(function() {
  1013. var grade = $(".diy_select1 input[class=diy_select_input1]").val();
  1014. if (grade == 0)
  1015. {
  1016. $(".diy_select input[class=diy_select_input]").val(0);
  1017. $(".diy_select_txt").text("请选择班级");
  1018. $(".diy_select_list li").text("请选择班级");
  1019. $(".diy_select_list li").attr("val", 0);
  1020. }
  1021. $.post("<?php echo $this->createUrl('classes/getclass'); ?>", {grade_id: grade}, function(data) {
  1022. var m = JSON.parse(data);
  1023. if (m.status == 0)
  1024. {
  1025. $(".diy_select input[class=diy_select_input]").val(0);
  1026. $(".diy_select_txt").text("请选择班级");
  1027. $(".diy_select_list").empty();
  1028. var html = '<li val="0">请选择班级</li>';
  1029. $(".diy_select_list").html(html);
  1030. } else {
  1031. $(".diy_select input[class=diy_select_input]").val(0);
  1032. $(".diy_select_txt").text("请选择班级");
  1033. $(".diy_select_list").empty();
  1034. var html = '<li val="0">请选择班级</li>';
  1035. $.each(m.result, function(i, n) {
  1036. html += '<li val="' + n.class_id + '">' + n.class_name + '</li>';
  1037. });
  1038. $(".diy_select_list").html(html);
  1039. }
  1040. });
  1041. });
  1042. });
  1043. </script>
  1044. <script src="/js/jquery.ajaxfileupload.js"></script>
  1045. <script type="text/javascript">
  1046. $(document).ready(function(){
  1047. $("#_third_shijuan").click(function(){
  1048. $(this).addClass('active');
  1049. $("#_baogao").removeClass('active');
  1050. $(".baogao").hide();
  1051. $(".third_shijuan").show();
  1052. $("input[name=_tab]").val(0);
  1053. });
  1054. $("#_baogao").click(function(){
  1055. $(this).addClass('active');
  1056. $("#_third_shijuan").removeClass('active');
  1057. $(".third_shijuan").hide();
  1058. $(".baogao").show();
  1059. $("input[name=_tab]").val(1);
  1060. });
  1061. $(".ruanyun").click(function(){
  1062. var exam_id = $(this).attr('exam_id');
  1063. layer.msg("确定发送吗?学生是否全部上传成绩", {
  1064. time: 0,
  1065. btn: ['确定', '取消'],
  1066. yes: function(index){
  1067. layer.close(index);
  1068. $.ajax({
  1069. url: "<?php echo $this->createUrl('print/send_ruanyun_pdf');?>",
  1070. type: "POST",
  1071. dataType: "json",
  1072. data:{ examId: exam_id
  1073. },
  1074. success: function (data){
  1075. if(data.status == 1){
  1076. layer.msg('发送成功',{
  1077. icon: 1
  1078. }, function(){
  1079. layer.closeAll();
  1080. location.reload();
  1081. });
  1082. }else if(data.status == 2){
  1083. layer.msg('发送失败,未上传成绩',{
  1084. icon: 5
  1085. }, function(){
  1086. layer.closeAll();
  1087. location.reload();
  1088. });
  1089. }else{
  1090. layer.msg('发送失败',{
  1091. icon: 5
  1092. }, function(){
  1093. layer.closeAll();
  1094. location.reload();
  1095. });
  1096. }
  1097. },
  1098. error: function (data, status, e){ //服务器响应失败处理函数
  1099. layer.msg('返回失败!',{
  1100. icon: 1
  1101. }, function(){
  1102. layer.closeAll();
  1103. });
  1104. }
  1105. });
  1106. }
  1107. });
  1108. });
  1109. $(".create_sheet").click(function(){
  1110. var exam_group_id = $(this).attr("exam_group_id");
  1111. var sheet_id = $(this).attr("sheet_id");
  1112. if(exam_group_id>0){
  1113. $.post("<?php echo Yii::app()->createUrl('third/set_new')?>",{exam_group_id:exam_group_id});
  1114. $.post("<?php echo Yii::app()->createUrl('third/verify_exam_rs')?>",{exam_group_id:exam_group_id},function(rs){
  1115. var m = JSON.parse(rs);
  1116. if(m.status==1)
  1117. {
  1118. layer.msg('已上传成绩,无法修改!',{
  1119. icon: 5
  1120. }, function(){
  1121. layer.closeAll();
  1122. location.reload();
  1123. });
  1124. }
  1125. if(m.status==3)
  1126. {
  1127. layer.msg('已发送标注,无法修改!',{
  1128. icon: 5
  1129. }, function(){
  1130. layer.closeAll();
  1131. location.reload();
  1132. });
  1133. }
  1134. if(m.status==2)
  1135. {
  1136. layer.msg('非法考试!',{
  1137. icon: 5
  1138. }, function(){
  1139. layer.closeAll();
  1140. location.reload();
  1141. });
  1142. }
  1143. if(m.status==0)
  1144. {
  1145. evaluationClient.createAnswerSheet(sheet_id+","+exam_group_id);
  1146. }
  1147. });
  1148. }
  1149. });
  1150. $(".create_sheet_subject").click(function(){
  1151. var exam_group_id = $(this).attr("exam_group_id");
  1152. var sheet_id = $(this).attr("sheet_id");
  1153. if(exam_group_id>0){
  1154. $.post("<?php echo Yii::app()->createUrl('third/set_new')?>",{exam_group_id:exam_group_id});
  1155. $.post("<?php echo Yii::app()->createUrl('third/verify_exam_rs')?>",{exam_group_id:exam_group_id},function(rs){
  1156. var m = JSON.parse(rs);
  1157. if(m.status==1)
  1158. {
  1159. layer.msg('已上传成绩,无法修改!',{
  1160. icon: 5
  1161. }, function(){
  1162. layer.closeAll();
  1163. location.reload();
  1164. });
  1165. }
  1166. if(m.status==3)
  1167. {
  1168. layer.msg('已发送标注,无法修改!',{
  1169. icon: 5
  1170. }, function(){
  1171. layer.closeAll();
  1172. location.reload();
  1173. });
  1174. }
  1175. if(m.status==2)
  1176. {
  1177. layer.msg('非法考试!',{
  1178. icon: 5
  1179. }, function(){
  1180. layer.closeAll();
  1181. location.reload();
  1182. });
  1183. }
  1184. if(m.status==0)
  1185. {
  1186. evaluationClient.createAnswerSheet(sheet_id+","+exam_group_id+",<?php echo Yii::app()->session['session_duoxueke_subject_id']?>");
  1187. }
  1188. });
  1189. }
  1190. });
  1191. });
  1192. function showError(str)
  1193. {
  1194. layer.msg(str,{
  1195. icon: 5
  1196. }, function(){
  1197. layer.closeAll();
  1198. location.reload();
  1199. });
  1200. }
  1201. function objToJson(obj){
  1202. var json = "{ ";
  1203. for(var item in obj){
  1204. json += "'"+item+"':'"+obj[item]+"',";
  1205. }
  1206. json += " }";
  1207. return json;
  1208. }
  1209. function ccc(){
  1210. layer.msg('敬请期待!', {
  1211. time: 0,
  1212. btn: ['确定', '取消'],
  1213. yes: function(index){
  1214. layer.close(index);
  1215. return false;
  1216. }
  1217. });
  1218. }
  1219. function delExam(odj){
  1220. if (!odj) return false;
  1221. var classId = odj.getAttribute("w_class_id");
  1222. var examId = odj.getAttribute("w_exam_id");
  1223. if (!classId || !examId) return false;
  1224. var msg = '您确定要删除此班的考试吗?';
  1225. layer.msg(msg, {
  1226. time: 0,
  1227. btn: ['确定', '取消'],
  1228. yes: function(index){
  1229. layer.close(index);
  1230. $.ajax({
  1231. url: "<?php echo $this->createUrl('print/delexam');?>",
  1232. type: "POST",
  1233. dataType: "json",
  1234. data: {
  1235. examId: examId,
  1236. classId:classId
  1237. },
  1238. success: function (data){
  1239. if(data.status == 1){
  1240. layer.msg('删除成功',{
  1241. icon: 1
  1242. }, function(){
  1243. layer.closeAll();
  1244. location.reload();
  1245. });
  1246. }else{
  1247. layer.msg('删除失败',{
  1248. icon: 5
  1249. }, function(){
  1250. layer.closeAll();
  1251. location.reload();
  1252. });
  1253. }
  1254. },
  1255. error: function (data, status, e){ //服务器响应失败处理函数
  1256. layer.msg('返回失败!',{
  1257. icon: 1
  1258. }, function(){
  1259. layer.closeAll();
  1260. });
  1261. }
  1262. });
  1263. }
  1264. });
  1265. }
  1266. // 确认上传成绩
  1267. function uploadConfirm(classId, examId,className,is_uploaded_count,students_count) {
  1268. //if (confirm('您确定已上传成绩了吗?')) {
  1269. 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>";
  1270. layer.msg(msg, {
  1271. time: 0,
  1272. btn: ['确定', '取消'],
  1273. yes: function(index, layerObj){
  1274. layer.close(index);
  1275. $.ajax({
  1276. url: "<?php echo $this->createUrl('print/uploadConfirm');?>",
  1277. type: "POST",
  1278. data: {
  1279. classId: classId,
  1280. examId: examId
  1281. },
  1282. beforeSend:function(){
  1283. // 发送请求显示打印中
  1284. layer.msg('确认中...', {time: 20000});
  1285. },
  1286. dataType: "JSON",
  1287. success: function(data) {
  1288. if (data.status == 1) {
  1289. layer.msg('确认成功!');
  1290. setTimeout(function(){location.reload();}, 1300);
  1291. } else {
  1292. layer.msg(data.error);
  1293. }
  1294. },
  1295. complete:function(){
  1296. },
  1297. error:function(){
  1298. }
  1299. });
  1300. }
  1301. });
  1302. //}
  1303. }
  1304. // 打印错题本
  1305. function printBook(cid,eid,type){
  1306. if (!cid || !eid || !type) {
  1307. layer.msg("打印参数有误");return;
  1308. }
  1309. var message = '';
  1310. var objUrl = '';
  1311. if (type == 1) {
  1312. message = "您确定要下载该班级纠错本吗?";
  1313. objUrl = "<?php echo $this->createUrl('print/downloadwrongtopic');?>";
  1314. divTitle = "下载错题本";
  1315. improveName = "错题本";
  1316. } else if (type == 2){
  1317. message = "您确定要下载该班级个性化学习方案吗?";
  1318. objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
  1319. divTitle = "下载个性化学习方案";
  1320. improveName = "个性化学习方案";
  1321. }else if (type == 3){
  1322. message = "您确定要下载该班级个性化学习宝吗?";
  1323. objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
  1324. divTitle = "下载个性化学习宝";
  1325. improveName = "个性化学习宝";
  1326. }
  1327. else{
  1328. layer.msg("打印参数有误");return;
  1329. }
  1330. html = ""+
  1331. '<div style="padding:20px 30px 0px 30px">'+
  1332. '<div style="padding:8px 0;">请复制下方链接下载'+improveName+'。</div>'+
  1333. '<div id="downloadUrl" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:455px;"></div>'+
  1334. '<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>'+
  1335. '</div>'+
  1336. '</div>'+
  1337. "";
  1338. layer.msg(message, {
  1339. time: 0,
  1340. btn: ['确定', '取消'],
  1341. yes: function(index){
  1342. layer.close(index);
  1343. msgIndex = layer.msg("下载中请稍后...", {"time": 3600000});
  1344. // 更试卷打印时间
  1345. $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {cid: cid, eid: eid,type:type } );
  1346. /*if(type == 1)
  1347. location.href = objUrl+"/cid/"+cid+"/eid/"+eid;
  1348. else
  1349. location.href = objUrl+"/cid/"+cid+"/eid/"+eid+"/type/"+type;*/
  1350. startTime = (new Date()).getTime();
  1351. showTip = true;
  1352. tipShowed = false;
  1353. toPromptTime = 3000;
  1354. window.interval = setInterval(function(){
  1355. execTime = (new Date()).getTime() - startTime;
  1356. if(execTime > toPromptTime && showTip && !tipShowed){
  1357. // msgIndex = layer.msg("该文件较大,请耐心等待...", {"time": 3600000});
  1358. // tipShowed = true;
  1359. }
  1360. }, 1000);
  1361. jQuery.get(
  1362. "<?php echo $this->createUrl("print/getImproveFile");?>",
  1363. {"examId": eid, "classId": cid, "type": type},
  1364. function(data){
  1365. data = JSON.parse(data);
  1366. if(data.success == 1||data.success == 2){
  1367. layer.open({
  1368. type: 1,
  1369. area: ['550px', '220px'],
  1370. title: divTitle,
  1371. content: html,
  1372. success: function(index, layerObj){
  1373. clearInterval(window.interval);
  1374. msgIndex = layer.msg(data.limitinfo, {"time": 3000});
  1375. clearInterval(window.interval);
  1376. layer.close(msgIndex);
  1377. 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>');
  1378. jQuery("#confirm, #cancel").on("click", function(){
  1379. layer.close(layerObj);
  1380. });
  1381. jQuery("#copy").on("click", function(){
  1382. jQuery("#url").select();
  1383. });
  1384. },
  1385. end: function(){
  1386. }
  1387. });
  1388. }
  1389. else if(data.success == 0){
  1390. clearInterval(window.interval);
  1391. msgIndex = layer.msg(data.message, {"time": 3000});
  1392. }
  1393. }
  1394. );
  1395. }
  1396. });
  1397. }
  1398. // 上传试卷模板
  1399. function uploadTemplate(eid,name){
  1400. if (!eid) {
  1401. layer.msg('操作失败!');
  1402. return false;
  1403. }
  1404. forCheckUrl = "<?php echo $this->createUrl('third/checkanswercard');?>";
  1405. $.post(forCheckUrl,{eid:eid},function(data){
  1406. var obj = JSON.parse(data);
  1407. if(obj.success==1)
  1408. {
  1409. var html ='<div class="layer_notice" style="padding:5px;">';
  1410. html +='<table class="table table-striped table-bordered table-hover ">';
  1411. html +='<thead class="thin-border-bottom">';
  1412. html +='<tr>';
  1413. html +='<th>试卷名称</th>';
  1414. html +='<th>操作</th>';
  1415. html +='</tr>';
  1416. html +='</thead>';
  1417. html +='<tbody class="content_tbody">';
  1418. html +='<td>'+name+'</td><td><input type="file" name="word_file" id="word_file" /></td></tr>';
  1419. html +='</tbody>';
  1420. html +='</table>';
  1421. html +='<span style="width:582px;display:inline-block;text-align:center;">';
  1422. html +='<button class="btn btn-success btn-sm" onclick="uploadWord()"><i class="ace-icon fa fa-check bigger-110"></i>确定</button>';
  1423. html +='</span>';
  1424. html +='<input type="hidden" id="mpEGid" value="'+eid+'">';
  1425. html +='</div>';
  1426. layer.open({
  1427. type: 1,
  1428. skin: 'layui-layer-rim', //加上边框
  1429. area: ['600px', '300px'], //宽高
  1430. content: html
  1431. });
  1432. }else
  1433. {
  1434. layer.msg(obj.message,{
  1435. icon: 5
  1436. }, function(){
  1437. layer.closeAll();
  1438. location.reload();
  1439. });
  1440. //layer.msg(obj.message);
  1441. }
  1442. });
  1443. }
  1444. function uploadWord() {
  1445. var paramEid = $('#mpEGid').val();
  1446. if (!paramEid) {
  1447. layer.msg('没找到考试ID!');
  1448. return false;
  1449. }
  1450. var obj_file = $("#word_file").val();
  1451. if (!obj_file) {
  1452. layer.msg('请选择上传文件');
  1453. return false;
  1454. }
  1455. var extStart = obj_file.lastIndexOf('.');
  1456. var extName = obj_file.substring(extStart,obj_file.length).toLowerCase();
  1457. if (extName != ".docx" && extName != ".dotx" && extName != ".dotm") {
  1458. layer.msg('模板格式有误,请上传dotx格式word!');
  1459. return false;
  1460. }
  1461. $.ajaxFileUpload({
  1462. url: "<?php echo $this->createUrl('third/uploadTpl');?>", //用于文件上传的服务器端请求地址
  1463. secureuri: false, //是否需要安全协议,一般设置为false
  1464. fileElementId: 'word_file', //文件上传域的ID
  1465. dataType: 'text', //返回值类型 一般设置为json
  1466. data:{"eid":paramEid},
  1467. success: function (data, status){
  1468. var obj = JSON.parse(data);
  1469. if (obj.success == 1) {
  1470. layer.msg(obj.message,{
  1471. icon: 1,
  1472. }, function(){
  1473. layer.closeAll();
  1474. location.reload();
  1475. });
  1476. $("#alreadUpload").html('<span style="color:red;">已上传</span>');
  1477. } else {
  1478. layer.msg(obj.message,{
  1479. icon: 1,
  1480. }, function(){
  1481. layer.closeAll();
  1482. location.reload();
  1483. });
  1484. }
  1485. },
  1486. error: function (data, status, e){ //服务器响应失败处理函数
  1487. layer.msg('返回失败!',{
  1488. icon: 1,
  1489. }, function(){
  1490. layer.closeAll();
  1491. location.reload();
  1492. });
  1493. }
  1494. });
  1495. return false;
  1496. }
  1497. // 搜索事件
  1498. $("#search").click(function(){
  1499. $("#form1").submit();
  1500. });
  1501. function print(cid,eid,tid,fg){
  1502. if (!cid || !eid) return false;
  1503. var msg = '';
  1504. if (tid == 0) {
  1505. if (fg == 1) {
  1506. msg = '打印答题卡';
  1507. } else {
  1508. msg = '您确定要打印该试卷嘛?';
  1509. }
  1510. } else if (tid == 1) {
  1511. msg = '您确定要打印该错题本嘛?';
  1512. } else if (tid == 2) {
  1513. msg = '您确定要打印该个性化学习宝吗?';
  1514. }
  1515. layer.msg(msg, {
  1516. time: 0,
  1517. btn: ['确定', '取消'],
  1518. yes: function(index){
  1519. layer.close(index);
  1520. ajaxPrint(cid, eid, tid);
  1521. }
  1522. });
  1523. }
  1524. function ajaxPrint(cid, eid, tid) {
  1525. $.ajax({
  1526. url:"<?php echo $this->createUrl('print/ajaxupdate');?>",
  1527. type:"post",
  1528. data:{cid:cid,eid:eid,tid:tid},
  1529. dataType: "json",
  1530. beforeSend:function(){
  1531. // 发送请求显示打印中
  1532. layer.msg('打印中', {icon: 16,time: 20000});
  1533. },
  1534. success:function(obj){
  1535. var index = layer.msg();
  1536. layer.close(index);
  1537. if (obj.success == 1) {
  1538. if (tid == 0) {//console.log(JSON.stringify(obj.message));
  1539. evaluationClient.printPaper(JSON.stringify(obj.message));
  1540. //alert('提交打印试卷成功!');
  1541. } else if (tid == 1) {
  1542. evaluationClient.printCTB(JSON.stringify(obj.message));
  1543. //alert('提交打印错题本成功!');
  1544. } else if (tid == 2) {
  1545. evaluationClient.printTFFA(JSON.stringify(obj.message));
  1546. //alert('提交打印提分册成功!');
  1547. } else {
  1548. layer.msg('操作错误!');
  1549. }
  1550. location.reload();
  1551. } else {//alert(obj.message);
  1552. layer.msg(obj.message);
  1553. }
  1554. },
  1555. complete:function(){
  1556. //layer.msg('打印失败!');
  1557. //var index = layer.msg();
  1558. //layer.close(index);
  1559. },
  1560. error:function(){
  1561. //var index = layer.msg();
  1562. //layer.close(index);
  1563. }
  1564. });
  1565. }
  1566. // 生成试卷模板
  1567. function createTemplate (exam_group_id){
  1568. if (!exam_group_id) {
  1569. layer.msg('未找到试卷ID');
  1570. }
  1571. var data={
  1572. exam_group_id:exam_group_id
  1573. }
  1574. $.post("<?php echo Yii::app()->createUrl("third/paper")?>",data,function(rs){
  1575. var m = JSON.parse(rs);
  1576. if(m.status==1)
  1577. {
  1578. evaluationClient.loadThirdParty(exam_group_id);
  1579. }else {
  1580. layer.msg('尚未创建答题卡,请创建');
  1581. }
  1582. });
  1583. }
  1584. // 生成试卷模板
  1585. function createTemplateSubject (exam_group_id,subject){
  1586. if (!exam_group_id||!subject) {
  1587. layer.msg('未找到试卷ID');
  1588. }
  1589. var data={
  1590. exam_group_id:exam_group_id
  1591. }
  1592. $.post("<?php echo Yii::app()->createUrl("third/paper")?>",data,function(rs){
  1593. var m = JSON.parse(rs);
  1594. if(m.status==1)
  1595. {
  1596. evaluationClient.loadThirdParty(exam_group_id+','+subject);
  1597. }else {
  1598. layer.msg('尚未创建答题卡,请创建');
  1599. }
  1600. });
  1601. }
  1602. function wb_html(odj){
  1603. if (!odj) return false;
  1604. var classId = odj.getAttribute("w_class_id");
  1605. var examId = odj.getAttribute("w_exam_id");
  1606. if (!classId || !examId) return false;
  1607. var msg = '您确定要生成该班级的错题本吗?';
  1608. layer.msg(msg, {
  1609. time: 0,
  1610. btn: ['确定', '取消'],
  1611. yes: function(index){
  1612. layer.close(index);
  1613. $.ajax({
  1614. url: "<?php echo $this->createUrl('client/wbhtml');?>",
  1615. type: "POST",
  1616. dataType: "json",
  1617. data: {
  1618. examId: examId,
  1619. classId:classId
  1620. },
  1621. success: function (data){
  1622. if(data > 0){
  1623. layer.msg('操作成功,重新生成错题本',{
  1624. icon: 1
  1625. }, function(){
  1626. layer.closeAll();
  1627. });
  1628. }else if(data==0){
  1629. layer.msg('操作失败,此班无错题本',{
  1630. icon: 1
  1631. }, function(){
  1632. layer.closeAll();
  1633. });
  1634. }
  1635. else{
  1636. layer.msg('操作失败,重新生成错题本',{
  1637. icon: 1
  1638. }, function(){
  1639. layer.closeAll();
  1640. });
  1641. }
  1642. },
  1643. error: function (data, status, e){ //服务器响应失败处理函数
  1644. layer.msg('返回失败!',{
  1645. icon: 1
  1646. }, function(){
  1647. layer.closeAll();
  1648. });
  1649. }
  1650. });
  1651. }
  1652. });
  1653. }
  1654. function isp2_html(odj){
  1655. if (!odj) return false;
  1656. var classId = odj.getAttribute("w_class_id");
  1657. var examId = odj.getAttribute("w_exam_id");
  1658. if (!classId || !examId) return false;
  1659. var msg = '您确定要生成该班级的二步提分方案吗?';
  1660. layer.msg(msg, {
  1661. time: 0,
  1662. btn: ['确定', '取消'],
  1663. yes: function(index){
  1664. layer.close(index);
  1665. $.ajax({
  1666. url: "<?php echo $this->createUrl('client/isp2html');?>",
  1667. type: "POST",
  1668. dataType: "json",
  1669. data: {
  1670. examId: examId,
  1671. classId:classId
  1672. },
  1673. success: function (data){
  1674. if(data > 0){
  1675. layer.msg('操作成功,重新生成提分方案',{
  1676. icon: 1
  1677. }, function(){
  1678. layer.closeAll();
  1679. });
  1680. }else if(data==0){
  1681. layer.msg('操作失败,此班无提分方案',{
  1682. icon: 1
  1683. }, function(){
  1684. layer.closeAll();
  1685. });
  1686. }
  1687. else{
  1688. layer.msg('操作失败,重新生成提分方案',{
  1689. icon: 1
  1690. }, function(){
  1691. layer.closeAll();
  1692. });
  1693. }
  1694. },
  1695. error: function (data, status, e){ //服务器响应失败处理函数
  1696. layer.msg('返回失败!',{
  1697. icon: 1
  1698. }, function(){
  1699. layer.closeAll();
  1700. });
  1701. }
  1702. });
  1703. }
  1704. });
  1705. }
  1706. function isp3_html(odj){
  1707. if (!odj) return false;
  1708. var classId = odj.getAttribute("w_class_id");
  1709. var examId = odj.getAttribute("w_exam_id");
  1710. if (!classId || !examId) return false;
  1711. var msg = '您确定要生成该班级的个性化学习宝吗?';
  1712. layer.msg(msg, {
  1713. time: 0,
  1714. btn: ['确定', '取消'],
  1715. yes: function(index){
  1716. layer.close(index);
  1717. $.ajax({
  1718. url: "<?php echo $this->createUrl('client/isp3html');?>",
  1719. type: "POST",
  1720. dataType: "json",
  1721. data: {
  1722. examId: examId,
  1723. classId:classId
  1724. },
  1725. success: function (data){
  1726. if(data > 0){
  1727. layer.msg('操作成功,重新生成提分方案',{
  1728. icon: 1
  1729. }, function(){
  1730. layer.closeAll();
  1731. });
  1732. }else if(data==0){
  1733. layer.msg('操作失败,此班无提分方案',{
  1734. icon: 1
  1735. }, function(){
  1736. layer.closeAll();
  1737. });
  1738. }
  1739. else{
  1740. layer.msg('操作失败,重新生成提分方案',{
  1741. icon: 1
  1742. }, function(){
  1743. layer.closeAll();
  1744. });
  1745. }
  1746. },
  1747. error: function (data, status, e){ //服务器响应失败处理函数
  1748. layer.msg('返回失败!',{
  1749. icon: 1
  1750. }, function(){
  1751. layer.closeAll();
  1752. });
  1753. }
  1754. });
  1755. }
  1756. });
  1757. }
  1758. // 隐藏试卷
  1759. function oprateExam(examGroupId,flag){
  1760. if (examGroupId) {
  1761. layer.msg('未找到周周练id',{
  1762. icon: 5
  1763. }, function(){
  1764. layer.closeAll();
  1765. });
  1766. }
  1767. var msg = '您确定要隐藏该试卷吗?';
  1768. if (flag == 0) {
  1769. msg = '您确定要恢复该试卷吗?';
  1770. }
  1771. layer.msg(msg, {
  1772. time: 0,
  1773. btn: ['确定', '取消'],
  1774. yes: function(index){
  1775. layer.close(index);
  1776. $.post('<?php echo $this->createUrl("third/oprateexam");?>',{exam_group_id:examGroupId,flag:flag},function(data){
  1777. var obj = JSON.parse(data);
  1778. if (obj.success == 1) {
  1779. location.reload();
  1780. } else {
  1781. layer.msg(obj.message,{
  1782. icon: 5
  1783. }, function(){
  1784. layer.closeAll();
  1785. });
  1786. // layer.msg(obj.message);
  1787. }
  1788. });
  1789. }
  1790. });
  1791. }
  1792. </script>