group_list.php 96 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230
  1. <script type="text/javascript">
  2. function in_array(search, array) {
  3. for (var i in array) {
  4. if (array[i] == search) {
  5. return true;
  6. }
  7. }
  8. return false;
  9. }
  10. testFlag = "<?php echo $this->testFlag;?>";
  11. customTplsIds = new Array();
  12. var i = 0;
  13. <?php foreach(Yii::app()->params["custom_tpls_ids"] as $tplId){?>
  14. customTplsIds[i] = "<?php echo $tplId;?>";
  15. i++;
  16. <?php }?>
  17. jQuery(document).ready(function () {
  18. // 打印答案解析
  19. $(".answerAnalysis").click(function () {
  20. var element = this;
  21. layer.msg('您确定下载答案解析嘛?', {
  22. time: 0,
  23. btn: ['确定', '取消'],
  24. yes: function (index) {
  25. layer.close(index);
  26. var wpCode = jQuery(element).attr("examId");
  27. if (!wpCode) {
  28. layer.msg('周周练id有误!');
  29. return false;
  30. }
  31. jQuery.post(
  32. '<?php echo $this->createUrl('print/createtempelate');?>',
  33. {"eid": wpCode, "flag": 0},
  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. //发送/取消/重新发送标注
  49. var flag = true;
  50. $(".sendLabelTask").bind("click", function () {
  51. var productSwitch=<?php echo $productSwitch?>;
  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. var type = jQuery(this).attr("type");
  57. var status = jQuery(this).attr("status");
  58. var _this = jQuery(this);
  59. var isTagging=$(this).attr('isTagging');
  60. var sub_id = $('input[name="subject_id"]').val();
  61. var textbook_set=0;
  62. <?php
  63. if(Yii::app()->params['school_textbook_setting'] ){
  64. foreach (Yii::app()->params['school_textbook_setting'] as $val){
  65. $textbookArr[$val['grade']]=1;
  66. }
  67. if(isset($textbookArr[1]) && isset($textbookArr[2])){
  68. echo 'textbook_set=1;';
  69. }
  70. }
  71. ?>
  72. if(textbook_set==0 && type!='cancel' && isTagging==0 && (subjectId==3 || subjectId==6 || subjectId==51)){
  73. layer.msg('请先在教材管理模块设置高一、高二的教材版本');
  74. return false;
  75. }
  76. if(productSwitch==3 && type!='cancel' && (subjectId==3 || subjectId==6 || subjectId==51) && isTagging!=1){
  77. sendLabelForSelectType(examId,examName,subjectId,createTime,type,status);
  78. return false;
  79. }
  80. if (type=='cancel') {
  81. //取消标注
  82. layer.msg('本次考试不需要老师标注吗?', {
  83. time: 0,
  84. btn: ['确定', '取消'],
  85. yes: function (index) {
  86. _this.removeClass('sendlabeltask');
  87. _this.unbind();
  88. layer.close(index);
  89. if (flag){
  90. flag = false;
  91. jQuery.post(
  92. "<?php echo $this->createUrl("print/sendlabeltask");?>",
  93. {"examId": examId, "examName": examName, "createTime": createTime, 'type': type,'status':status,'isTagging':isTagging},
  94. function (data) {
  95. data = JSON.parse(data);
  96. if (data.success == 1) {
  97. layer.alert('取消成功', {'icon': 1,'closeBtn':0}, function () {
  98. location.reload();
  99. });
  100. }else if (data.success == 2){
  101. layer.alert(data.message, {'icon': 1,'closeBtn':0}, function () {
  102. location.reload();
  103. });
  104. }
  105. else {
  106. flag = true;
  107. layer.msg(data.message);
  108. }
  109. }
  110. );
  111. }
  112. }
  113. });
  114. }else{
  115. if (sub_id == 3 || sub_id == 6 || sub_id==12 || (sub_id==8 && isTagging==1)) {
  116. str=$('#label_win');
  117. $('.label_remark').val('');
  118. layer.open({
  119. title: '发送标注',
  120. type: 1,
  121. skin: 'layui-layer-rim', //加上边框
  122. area: '450px',
  123. content: str,
  124. shade: 0.6, //不显示遮罩
  125. offset: 'auto',
  126. btn: ['确定', '取消'],
  127. yes:function(){
  128. estimate=$('.estimate').val();
  129. remark=$('.label_remark').val();
  130. if(estimate==''){
  131. layer.msg('请选择期望完成时间');
  132. return false;
  133. }
  134. if(remark.length>100){
  135. layer.msg('备注内容不大于100个字符');
  136. return false;
  137. }
  138. if (flag){
  139. flag = false;
  140. indexSend=layer.msg('正在发送,请稍候......',{time:0});
  141. jQuery.post(
  142. "<?php echo $this->createUrl("print/sendlabeltask");?>",
  143. {"examId": examId, "examName": examName, "createTime": createTime,'type': type,'status':status,'isTagging':isTagging,remark:remark,estimate:estimate},
  144. function (data) {
  145. layer.close(indexSend);
  146. data = JSON.parse(data);
  147. if (data.success == 1) {
  148. layer.msg('发送成功');
  149. setTimeout(function () {
  150. location.reload();
  151. }, 2000);
  152. }else if (data.success == 2){
  153. layer.alert(data.message, {'icon': 1,'closeBtn':0}, function () {
  154. location.reload();
  155. });
  156. }
  157. else {
  158. flag = true;
  159. layer.msg(data.message);
  160. }
  161. }
  162. );
  163. }
  164. }
  165. });
  166. }else{
  167. sendLabel(examId,examName,createTime,type,status,isTagging);
  168. }
  169. return false;
  170. }
  171. });
  172. //发送标注到题库
  173. function sendLabel(examId,examName,createTime,type,status,isTagging) {
  174. if (flag){
  175. flag = false;
  176. indexSend=layer.msg('正在发送,请稍候......',{time:0});
  177. jQuery.post(
  178. "<?php echo $this->createUrl("print/sendlabeltask");?>",
  179. {"examId": examId, "examName": examName, "createTime": createTime,'type': type,'status':status,remark:$(".label-remark").val(),'isTagging':isTagging},
  180. function (data) {
  181. layer.close(indexSend);
  182. data = JSON.parse(data);
  183. if (data.success == 1) {
  184. layer.msg('发送成功');
  185. setTimeout(function () {
  186. location.reload();
  187. }, 2000);
  188. }else if (data.success == 2){
  189. layer.alert(data.message, {'icon': 1,'closeBtn':0}, function () {
  190. location.reload();
  191. });
  192. }
  193. else {
  194. flag = true;
  195. layer.msg(data.message);
  196. }
  197. }
  198. );
  199. }
  200. }
  201. //发送标注到教师端
  202. function sendLabelToTeacher(examId,type,status) {
  203. if (flag){
  204. flag = false;
  205. indexSend=layer.msg('正在发送,请稍候......',{time:0});
  206. jQuery.post(
  207. "<?php echo $this->createUrl("print/sendLabelToTeacher");?>",
  208. {"examId": examId,'type': type,'status':status},
  209. function (data) {
  210. layer.close(indexSend);
  211. data = JSON.parse(data);
  212. if (data.success == 1) {
  213. layer.msg('发送成功');
  214. setTimeout(function () {
  215. location.reload();
  216. }, 2000);
  217. }else if (data.success == 2){
  218. layer.alert(data.message, {'icon': 1,'closeBtn':0}, function () {
  219. location.reload();
  220. });
  221. }
  222. else {
  223. flag = true;
  224. layer.msg(data.message);
  225. }
  226. }
  227. );
  228. }
  229. }
  230. //选择发送发注类型
  231. function sendLabelForSelectType(examId,examName,subjectId,createTime,type,status){
  232. var str = '<div id="hgc_editor" style="padding:20px 35px;">\
  233. <p>选择标注类型</p>\
  234. <span class="selectSendType selected">题库后台标注</span>\
  235. <span class="selectSendType">学校自主标注</span>\
  236. <input type="hidden" name="sendType" value="1">\
  237. </div>';
  238. layer.open({
  239. title:'选择标注类型'
  240. ,area:'740px'
  241. ,type: 1
  242. ,offset: 'auto'
  243. ,content: str
  244. ,btn: ['确定','取消']
  245. ,btnAlign: 'c' //按钮居中
  246. ,shade: 0.6 //不显示遮罩
  247. ,yes:function(){
  248. //确定回调
  249. var sendType=$('input[name=sendType]').val();
  250. if(sendType==undefined){
  251. layer.msg('请选择标注类型')
  252. }else if(sendType==1){
  253. var sub_id = $('input[name="subject_id"]').val();
  254. if (sub_id == 3 || sub_id == 6) {
  255. var str = '<div id="hgc_editor" style="padding:20px 35px;">\
  256. <p>请慎重填写该份试卷的备注(可不写)。例如,该年级头几次使用需重视,马上放假需要快速标记等。</p>\
  257. <textarea style="width:100%;height:200px;resize:vertical;" placeholder="请输入该份试卷的标注要求" class="label-remark"></textarea>\
  258. </div>';
  259. layer.open({
  260. title:'发送标注'
  261. ,area:'740px'
  262. ,type: 1
  263. ,offset: 'auto'
  264. ,content: str
  265. ,btn: ['确定','取消']
  266. ,btnAlign: 'c' //按钮居中
  267. ,shade: 0.6 //不显示遮罩
  268. ,yes:function(){
  269. //确定回调
  270. sendLabel(examId,examName,createTime,type,status);
  271. }
  272. });
  273. }else{
  274. sendLabel(examId,examName,createTime,type,status);
  275. }
  276. }else if(sendType==2){
  277. sendLabelToTeacher(examId,type,status)
  278. }
  279. }
  280. });
  281. }
  282. jQuery(".enterStudentsList1").click(function () {
  283. layer.msg("请先发送标注任务");
  284. });
  285. jQuery(".paperType").click(function () {
  286. var is_show = jQuery(this).attr("is_show");
  287. if (is_show > 0) {
  288. return false;
  289. }
  290. var _display = '';
  291. var examId = jQuery(this).attr("examId");
  292. var tpl_index = jQuery(this).attr("tpl_index");
  293. if (in_array(jQuery(this).attr("tpl_index"), customTplsIds)) {
  294. if (in_array(jQuery(this).attr("tpl_index"), [1010, 1009, 10, 1011, 7, 2011, 3011, 11, 3007, 4007])) {
  295. var style = "width:200px;color:gray; ";
  296. var state = "disabled";
  297. } else {
  298. _display = '';
  299. var style = "width:200px;";
  300. var state = "enabled";
  301. }
  302. }
  303. else {
  304. _display = '';
  305. var style = "width:200px;color:gray;";
  306. var state = "disabled";
  307. }
  308. var mar = 'margin:10px auto;';
  309. html = "" +
  310. '<div style="padding:10px 30px">' +
  311. '<div style="margin:5px 0; float: left;' + _display + '">选择纸张:</div>' +
  312. '<div style="float: left"><select id="paperSize" style="' + style + '" ' + state + ' >' +
  313. '<option value="A3" ';
  314. if (jQuery(this).attr("paper_size") == 'A3') {
  315. html = html + 'selected';
  316. }
  317. html = html + '>A3</option>' +
  318. '<option value="A4" ';
  319. if (jQuery(this).attr("paper_size") == 'A4') {
  320. html = html + 'selected';
  321. }
  322. html = html + '>A4</option>' +
  323. '<option value="8K" ';
  324. if (jQuery(this).attr("paper_size") == '8K') {
  325. html = html + 'selected';
  326. }
  327. html = html + '>8K</option>' +
  328. '<option value="16K" ';
  329. if (jQuery(this).attr("paper_size") == '16K') {
  330. html = html + 'selected';
  331. }
  332. html = html + '>16K</option>' +
  333. '</select></div>' +
  334. '<div style="padding-top:10px;clear: left"></div>';
  335. html = html + '<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>' +
  336. '<button id="cancel" class="label-primary-s bth-s" style="border:gray;background:gray;padding:4px 12px;margin:20px 0 0 25px">取消</button></div>' +
  337. '<div>注意:<br/>切换完答题卡纸张类型后请记住使用切换后的答题卡类型打印复印</div>' +
  338. '</div>' +
  339. "";
  340. layer.open({
  341. type: 1,
  342. area: ['350px', '250px'],
  343. title: "更改试卷",
  344. content: html,
  345. success: function (index, layerObj) {
  346. jQuery("#cancel").on("click", function () {
  347. layer.closeAll();
  348. });
  349. jQuery("#confirm").on("click", function () {
  350. var paperSize = jQuery("#paperSize").val();
  351. jQuery.post(
  352. "<?php echo $this->createUrl("print/setpapersize");?>",
  353. {"examId": examId, "paperSize": paperSize, "tpl_index": tpl_index},
  354. function (data) {
  355. data = JSON.parse(data);
  356. layer.msg(data.message);
  357. if (data.success == 1) {
  358. setTimeout(function () {
  359. location.reload();
  360. }, 1300);
  361. }
  362. }
  363. );
  364. layer.closeAll();
  365. });
  366. },
  367. end: function () {
  368. }
  369. });
  370. });
  371. jQuery(".maskType").click(function () {
  372. var is_show = jQuery(this).attr("is_show");
  373. if (is_show > 0) {
  374. return false;
  375. }
  376. var _display = '';
  377. var exam_group_id = jQuery(this).attr("examId");
  378. var tpl_index = jQuery(this).attr("tpl_index");
  379. var marking_papers=$(this).attr('marking_papers');
  380. var online_card=$(this).attr('online');
  381. var mar = 'margin:30px auto;';
  382. html = "" +
  383. '<div style="padding:10px 30px">' +
  384. '<div style="padding-top:10px;clear: left"></div>' +
  385. '<div style="margin:5px 0; float: left;';
  386. html = html + '">阅卷方式:</div>' +
  387. '<div style="float: left"><select id="mark_type" style="width:200px;';
  388. html = html + '">' +
  389. '<option value="0" ';
  390. if (jQuery(this).attr("mark_type") == '0') {
  391. html = html + 'selected';
  392. }
  393. html = html + '>线下阅卷</option>';
  394. html = html + ' <option value="3" ';
  395. if (jQuery(this).attr("mark_type") == '3') {
  396. html = html + 'selected';
  397. }
  398. html = html + '>班级混合阅卷</option> ';
  399. html = html + ' <option value="4" ';
  400. if (jQuery(this).attr("mark_type") == '4') {
  401. html = html + 'selected';
  402. }
  403. html = html + '>班级单独阅卷</option> ' +
  404. '</select></div>' +
  405. '<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>' +
  406. '<button id="cancel" class="label-primary-s bth-s" style="border:gray;background:gray;padding:4px 12px;margin:20px 0 0 25px">取消</button></div>' +
  407. '</div>' +
  408. "";
  409. layer.open({
  410. type: 1,
  411. area: ['350px', '300px'],
  412. title: "更改试卷",
  413. content: html,
  414. success: function (index, layerObj) {
  415. jQuery("#cancel").on("click", function () {
  416. layer.closeAll();
  417. });
  418. jQuery("#confirm").on("click", function () {
  419. var mark_type = jQuery("#mark_type").val();
  420. console.log('markpapers:'+marking_papers+',marktyp:'+mark_type+',online:'+online_card);
  421. if(online_card==1 && marking_papers==2 && mark_type==0){
  422. layer.msg("当前在线答题卡的评阅方式为网阅,不支持修改为线下阅卷,请进入在线答题卡修改评阅方式为手批后再更改阅卷方式!", {
  423. time: 0,
  424. btn: ['我已知晓'],
  425. yes: function (index) {
  426. layer.closeAll();
  427. }
  428. })
  429. }else{
  430. jQuery.post(
  431. "<?php echo $this->createUrl("print/Setmasktype");?>",
  432. {"exam_group_id": exam_group_id, "mark_type": mark_type, "tpl_index": tpl_index},
  433. function (data) {
  434. data = JSON.parse(data);
  435. if (data.success == 1) {
  436. layer.msg(data.message);
  437. setTimeout(function () {
  438. location.reload();
  439. }, 1300);
  440. }else{
  441. layer.msg(data.message,{time:10000});
  442. }
  443. }
  444. );
  445. }
  446. // layer.closeAll();
  447. });
  448. },
  449. end: function () {
  450. }
  451. });
  452. });
  453. // 根据年级筛选班级
  454. jQuery("#grade").change(function () {
  455. var grade = $(this).val();
  456. if (!grade) return false;
  457. jQuery.post(
  458. '<?php echo $this->createUrl("print/getGradeClass");?>', {"grade": grade}, function (data) {
  459. data = JSON.parse(data);
  460. if (data.success == 1) {
  461. var classObj = $("#class");
  462. var html = "<option value=''>全部班级</option>";
  463. classObj.empty();
  464. $.each(data.message, function (i, n) {
  465. html += "<option value='" + n.class_id + "'>" + n.class_name + "</option>";
  466. });
  467. classObj.append(html);
  468. }
  469. }
  470. );
  471. });
  472. jQuery(".studentCard").click(function () {
  473. var is_show = jQuery(this).attr("is_show");
  474. var cardStatus=jQuery(this).attr("cardStatus");
  475. var cardLength=jQuery(this).attr("cardLength");
  476. if (is_show > 0) {
  477. return false;
  478. }
  479. var _display = '';
  480. var exam_group_id = jQuery(this).attr("examId");
  481. var mar = 'margin:30px auto;';
  482. html = "" +
  483. '<div style="padding:10px 30px">' +
  484. '<div style="padding-top:10px;clear: left"></div>' +
  485. '<div style="margin:5px 0; float: left;';
  486. html = html + '">考号类型:</div>' +
  487. '<div style="float: left"><select id="schoolCard" style="width:200px;';
  488. html = html + '">' +
  489. '<option value="1" ';
  490. if (jQuery(this).attr("school_card_status") == '1') {
  491. html = html + 'selected';
  492. }
  493. html = html + '>学校准考证</option>';
  494. html = html + ' <option value="0" ';
  495. if (jQuery(this).attr("school_card_status") == '0') {
  496. html = html + 'selected';
  497. }
  498. html = html + '>系统准考证</option> '+
  499. '</select></div>';
  500. html+='<div style="margin:5px 0; float: left;">考号位数:</div>';
  501. html+='<div style="margin:5px 0; float: left"><input type="text" id="schoolCardLength" length="'+cardLength+'" name="schoolCardLength" value="'+cardLength+'"></div>'+
  502. '<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>' +
  503. '<button id="cancel" class="label-primary-s bth-s" style="border:gray;background:gray;padding:4px 12px;margin:20px 0 0 25px">取消</button></div>' +
  504. '</div>' +
  505. "";
  506. layer.open({
  507. type: 1,
  508. area: ['350px', '300px'],
  509. title: "更改考号类型",
  510. content: html,
  511. success: function (index, layerObj) {
  512. jQuery("#cancel").on("click", function () {
  513. layer.closeAll();
  514. });
  515. jQuery("#confirm").on("click", function () {
  516. var schoolCard = jQuery("#schoolCard").val();
  517. var schoolCardLength = parseInt(jQuery("#schoolCardLength").val());
  518. if(schoolCard==1 && schoolCardLength==0){
  519. layer.msg('请输入准考证位数');
  520. return false;
  521. }else if(schoolCard==1 && (jQuery("#schoolCardLength").val()%1 !== 0 || schoolCardLength>14)){
  522. layer.msg('准考证位数不正确');
  523. return false;
  524. }
  525. jQuery.post(
  526. "<?php echo $this->createUrl("print/changeStudentCardType");?>",
  527. {"examGroupId": exam_group_id, "schoolCard": schoolCard, "schoolCardLength": schoolCardLength},
  528. function (data) {
  529. data = JSON.parse(data);
  530. layer.msg(data.message);
  531. if (data.success == 1) {
  532. setTimeout(function () {
  533. location.reload();
  534. }, 1300);
  535. }
  536. }
  537. );
  538. layer.closeAll();
  539. });
  540. },
  541. end: function () {
  542. }
  543. });
  544. });
  545. $('body').on('change','#schoolCard',function(){
  546. console.log($(this).val());
  547. studentCard= $('#schoolCardLength').attr('length');
  548. if($(this).val()==0){
  549. $('#schoolCardLength').val('');
  550. $('#schoolCardLength').attr('disabled',true);
  551. }else{
  552. $('#schoolCardLength').val(studentCard);
  553. $('#schoolCardLength').attr('disabled',false);
  554. }
  555. })
  556. });
  557. </script>
  558. <style>
  559. /*切换选择*/
  560. .tab-con {
  561. position: relative;
  562. height: 30px;
  563. width: 200px;
  564. background: #F2F2F2;
  565. border: 1px solid #01B677;
  566. border-radius: 15px;
  567. }
  568. .has-sel {
  569. background: #0155fe;
  570. color: #fff;
  571. width: 50%;
  572. height: 30px;
  573. border-top-left-radius: 15px;
  574. border-bottom-left-radius: 15px;
  575. text-align: center;
  576. line-height: 30px;
  577. }
  578. .sel-opt {
  579. width: 50%;
  580. position: relative;
  581. color: #01B677;
  582. line-height: 30px;
  583. text-indent: 6px;
  584. cursor: pointer;
  585. }
  586. .sel-opt:after {
  587. content: '';
  588. border-left: 6px solid transparent;
  589. border-right: 6px solid transparent;
  590. border-top: 8px solid #01B677;
  591. position: absolute;
  592. right: 12px;
  593. top: 12px;
  594. }
  595. /
  596. /
  597. .sel-opt select {
  598. / / width: 100 %;
  599. / / height: 30 px;
  600. / / background: #F2F2F2;
  601. / / color: #01B677;
  602. / / text-indent: 6 px;
  603. / / font-size: inherit;
  604. / / border-top-right-radius: 15 px;
  605. / / border-bottom-right-radius: 15 px;
  606. / / cursor: pointer;
  607. / /
  608. }
  609. /
  610. /
  611. .sel-opt select option {
  612. / / position: relative;
  613. / /
  614. }
  615. .points {
  616. position: absolute;
  617. top: -2px;
  618. right: 0;
  619. width: 10px;
  620. height: 10px;
  621. background: #F01516;
  622. border-radius: 50%;
  623. }
  624. .sel-cons {
  625. border: 1px solid #01B677;
  626. width: 50%;
  627. position: absolute;
  628. right: 0;
  629. top: 30px;
  630. text-indent: 10px;
  631. display: none;
  632. }
  633. .sc-lis {
  634. line-height: 30px;
  635. cursor: pointer;
  636. }
  637. .sc-lis span {
  638. position: relative;
  639. }
  640. .sc-lis .points {
  641. top: 2px;
  642. right: -16px;
  643. }
  644. .ellipsis { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
  645. .class_btn{text-align: center}
  646. .table-hover>tbody>tr:hover {
  647. background-color: #E6F1EC
  648. }
  649. .selectSendType{width:180px;height:100px;border:1px solid #ccc;display: inline-block;text-align: center;line-height: 100px;cursor:pointer;border-radius:5px;}
  650. .selected{background:#aaa; }
  651. /* Tooltip 容器 */
  652. .tooltipclass {
  653. display: inline-block;
  654. }
  655. /* Tooltip 文本 */
  656. .tooltipclass .tooltiptext {
  657. visibility: hidden;
  658. width: 160px;
  659. background-color: #555;
  660. color: #fff;
  661. padding: 5px;
  662. border-radius: 6px;
  663. font-size:11px;
  664. text-align: left;
  665. /* 定位 */
  666. position: absolute;
  667. z-index: 1;
  668. }
  669. /* 鼠标移动上去后显示提示框 */
  670. .tooltipclass:hover .tooltiptext {
  671. visibility: visible;
  672. }
  673. .sendLabelTask{margin-left:10px;}
  674. </style>
  675. <link rel="stylesheet" href="/fonts/fpdf/iconfont.css"/>
  676. <link rel="stylesheet" href="/css/alert.css"/>
  677. <?php include(Yii::app()->basePath.'/views/layouts/parse_label.php');?>
  678. <div class="main-content-inner">
  679. <!-- 导航栏开始-->
  680. <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
  681. <!-- 导航栏结束-->
  682. <div class="page-content">
  683. <div class="row" style="margin:0px;">
  684. <div class="col-xs-12">
  685. <!-- PAGE CONTENT BEGINS -->
  686. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  687. <div class="row">
  688. <form method="get" id="form1" action="<?php echo $this->createUrl("print/index"); ?>">
  689. <div class="col-xs-12">
  690. <div class="dataTables_length margin-zy">
  691. <input type="hidden" name="subject_id" value="<?php echo $sub_id;?>">
  692. <input type="checkbox" name="display"
  693. style="margin: -1px 2px 0 0;display:inline-block;vertical-align: middle;width:15px;height:15px;"
  694. value="1" <?php if ($display === '1') echo "checked"; ?>>显示隐藏试卷
  695. <!--
  696. <?php if($sub_id != 8 && Yii::app()->params['section']!=3):?>
  697. <select class="form-control" id="labelled" name="labelled">
  698. <option value="-1">标注状态</option>
  699. <option value="0" <?php if ($labelled === '0') echo "selected"; ?> >未发送</option>
  700. <option value="2" <?php if ($labelled == 2) echo "selected"; ?> >已发送未开始</option>
  701. <option value="1" <?php if ($labelled == 1) echo "selected"; ?>>已标注</option>
  702. <option value="3" <?php if ($labelled == 3) echo "selected"; ?> >标注中</option>
  703. <option value="4" <?php if ($labelled == 4) echo "selected"; ?> >已取消</option>
  704. <option value="5" <?php if ($labelled == 5) echo "selected"; ?>>补题中</option>
  705. </select>
  706. <?php endif;?>
  707. -->
  708. <select class="form-control" id="grade" name="grade">
  709. <option value="0">年级</option>
  710. <?php
  711. if(Yii::app()->params['grade_config']){
  712. foreach (Yii::app()->params['grade_config'] as $val){
  713. if($grade==$val['id']){
  714. echo ' <option value="'.$val['id'].'" selected >'.$val['grade_name'].'</option>';
  715. }else{
  716. echo ' <option value="'.$val['id'].'" >'.$val['grade_name'].'</option>';
  717. }
  718. }
  719. }
  720. ?>
  721. </select>
  722. <!-- 命卷人
  723. <select class="form-control" id="teacher_id" name="teacher_id">
  724. <option value="0">全部</option>
  725. <?php
  726. if($teacherNames){
  727. foreach ($teacherNames as $key =>$val){
  728. if($teacherId==$key){
  729. echo '<option value="'.$key.'" selected >'.$val.'</option>';
  730. }else{
  731. echo '<option value="'.$key.'" >'.$val.'</option>';
  732. }
  733. }
  734. }
  735. ?>
  736. </select>
  737. -->
  738. <input type="text" class="form-control input-sm" placeholder="请输入打印任务/命卷人名称" name="name"
  739. value="<?php echo $printName; ?>">
  740. <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索
  741. </button>
  742. <?php
  743. if(in_array(Yii::app()->session['session_subject_id'],Yii::app()->params['mathSubjectId']) || Yii::app()->session['session_subject_id']==12):?>
  744. <button class="label-primary-s bth-s" id="changeScan" style="padding:4px 12px;">切换扫描方式</button>
  745. <?php endif;?>
  746. </div>
  747. </div>
  748. </form>
  749. </div>
  750. <table id="dynamic-table"
  751. class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
  752. style="font-size:12px">
  753. <thead>
  754. <tr>
  755. <th>名称</th>
  756. <th>命卷人</th>
  757. <th>答题卡类型</th>
  758. <th>考号类型</th>
  759. <th>阅卷方式</th>
  760. <th>年级</th>
  761. <th>申请日期</th>
  762. <th>考试日期</th>
  763. <th>打印班级(word答题卡)</th>
  764. <th>打印班级(在线答题卡)</th>
  765. <!--<th>
  766. 标注状态
  767. <div class="tooltipclass">&nbsp;<img src="/images/icon-warning-red.png"><span class="tooltiptext">标注状态栏,“老”代表数学老题库,个性化学习宝系列产品发送标注时,请点击对应按钮。“新”代表全学科题库,方法宝产品发送标注时,请点击对应按钮。仅适用于高中数学学科。</span></div>
  768. </th>-->
  769. <th>操作</th>
  770. </tr>
  771. </thead>
  772. <tbody>
  773. <?php if (!empty($printList)):foreach ($printList as $cl): ?>
  774. <tr>
  775. <td style="max-width:260px"><?php
  776. if ($cl['is_new'] == 0) {
  777. echo "<span style='color: #ff0000;font-weight: bold;'>【New】</span>";
  778. }
  779. $wp = '';
  780. if ($cl["paper_size"] == '8K') {
  781. if (isset($exam_use_wp) && $exam_use_wp > 0) {
  782. $wp = '/纸张大小(270*390)';
  783. } else {
  784. $wp = '/纸张大小(260*370)';
  785. }
  786. }
  787. $imgSrc = "";
  788. if ($cl["mark_type"] > 0) {
  789. $imgTitle = "线上阅卷" . $wp;
  790. $imgSrc .= "/images/online/";
  791. } else {
  792. $imgTitle = "线下阅卷" . $wp;
  793. $imgSrc .= "/images/offline/";
  794. }
  795. $imgSrc .= "{$cl["paper_size"]}.png";
  796. $cursor = "pointer";
  797. 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['upload_status'] . "' style='cursor:pointer;width:22px;height:22px;margin-right:5px;' title='{$imgTitle}' src='{$imgSrc}'/>";
  798. if($cl['homework']==1)
  799. {
  800. echo "<span style='color: #fff;font-weight: bold;display:inline-block;background: #337ab7;padding:0 5px;'> 作业 </span>";
  801. }
  802. if($cl['qxk_paper_id']){
  803. ?>
  804. <a href="<?php echo Yii::app()->createUrl('allSubject/index', array('eid' => $cl['exam_id'])) ?>"><?php echo $cl['print_name']; ?></a>
  805. <?php
  806. }else{
  807. ?>
  808. <a href="<?php echo Yii::app()->createUrl('paper/index', array('eid' => $cl['exam_id'])) ?>"><?php echo $cl['print_name']; ?></a>
  809. <?php
  810. }
  811. ?>
  812. </td>
  813. <td><?php echo $cl['teacher_name']?></td>
  814. <td>
  815. <?php
  816. if(!$cl['qxk_paper_id']){
  817. $txt='';
  818. if($cl['online_card']==1){
  819. $txt='在线';
  820. }else{
  821. $txt='word';
  822. }
  823. $attr=array();
  824. if(!$cl['is_custom_tpl']){
  825. $attr[]='固定模板';
  826. }else{
  827. if($cl['paper_tpl_type']==1 || $cl['paper_tpl_type']==3){
  828. $attr[]='题卡合一';
  829. }else{
  830. if($cl["subject_id"]!=8){
  831. $txt='在线';
  832. }
  833. $attr[]='题卡分离';
  834. }
  835. }
  836. if($cl['is_qrcode_online']==1 || $cl['qrcode'] ){
  837. $attr[]='含二维码';
  838. }
  839. echo $txt.'('.implode(',',$attr).')';
  840. }else{
  841. if($cl['online_card']==1){
  842. echo '在线';
  843. }elseif($cl['third_card']){
  844. echo '第三方';
  845. }
  846. }
  847. ?>
  848. </td>
  849. <td>
  850. <?php
  851. if($cl['school_card_status']==1){
  852. if ($cl['upload_status'] > 0 || $cl['homework']==1) {
  853. echo '学校';
  854. }else{
  855. echo '<a href="javascript::void()" class="studentCard" cardStatus="'.$cl['school_card_status'].'" cardLength="'.$cl['school_card_length'].'" is_show="' . $cl['upload_status'] . '" examId="' . $cl["exam_group_id"] . '" >学校</a>';
  856. }
  857. }else{
  858. if ($cl['upload_status'] > 0 || $cl['homework']==1) {
  859. echo '系统';
  860. }else{
  861. echo '<a href="javascript::void()" class="studentCard" cardStatus="'.$cl['school_card_status'].'" cardLength="'.$cl['school_card_length'].'" is_show="' . $cl['upload_status'] . '" examId="' . $cl["exam_group_id"] . '" >系统</a>';
  862. }
  863. }
  864. ?>
  865. </td>
  866. <td >
  867. <?php
  868. $txt='';
  869. if($cl['import_score_type']>0){
  870. $txt='导入成绩';
  871. }elseif ($cl['mark_type'] == 0) {
  872. $txt='线下阅卷';
  873. }elseif($cl['mark_type'] == 4){
  874. $txt='班级单独阅卷';
  875. }elseif($cl['mark_type']==3){
  876. $txt='混合阅卷';
  877. }
  878. if ($cl['upload_status'] > 0 || $cl['homework']==1 || $cl['import_score_type']>0) {
  879. echo $txt;
  880. }else{
  881. echo '<a href="javascript::void()" class="maskType" online="'.$cl['online_card'].'" marking_papers="'.$cl['marking_papers'].'" is_show="' . $cl['upload_status'] . '" examId="' . $cl["exam_group_id"] . '" tpl_index="' . $cl["tpl_index"] . '" mark_type="' . $cl["mark_type"] . '" >'.$txt.'</a>';
  882. }
  883. ?></td>
  884. <td>
  885. <?php
  886. if (isset($class_grade[$cl['class_id']])) {
  887. switch ($class_grade[$cl['class_id']]) {
  888. case 1:
  889. echo '高一';
  890. break;
  891. case 2:
  892. echo '高二';
  893. break;
  894. case 3:
  895. echo '高三';
  896. break;
  897. }
  898. }
  899. ?>
  900. </td>
  901. <td><?php if (!empty($cl['create_time'])) {
  902. echo date('Y-m-d H:i', $cl['create_time']);
  903. } ?></td>
  904. <td><?php if (!empty($cl['exam_time'])) {
  905. echo date('Y-m-d', $cl['exam_time']);
  906. } ?></td>
  907. <td>
  908. <?php
  909. if (isset($printer['word'][$cl['exam_group_id']])) {
  910. echo count($printer['word'][$cl['exam_group_id']]);
  911. } else {
  912. echo 0;
  913. }
  914. ?>/<?php
  915. if (isset($exam_class[$cl['exam_group_id']])) {
  916. echo count($exam_class[$cl['exam_group_id']]);
  917. } else {
  918. echo 0;
  919. }
  920. ?>
  921. </td>
  922. <td>
  923. <?php
  924. if (isset($printer['online'][$cl['exam_group_id']])) {
  925. echo count($printer['online'][$cl['exam_group_id']]);
  926. } else {
  927. echo 0;
  928. }
  929. ?>/<?php
  930. if (isset($exam_class[$cl['exam_group_id']])) {
  931. echo count($exam_class[$cl['exam_group_id']]);
  932. } else {
  933. echo 0;
  934. }
  935. ?>
  936. </td>
  937. <!--<td>
  938. <?php
  939. if(in_array(Yii::app()->session['session_duoxueke_subject_id'],Yii::app()->params['mathSubjectId'])){
  940. require 'operate/status_3.php';
  941. }elseif(Yii::app()->session['session_duoxueke_subject_id']==8){
  942. require 'operate/status_8.php';
  943. }elseif(Yii::app()->session['session_duoxueke_subject_id']==12 || Yii::app()->session['session_duoxueke_subject_id']==41){
  944. require 'operate/status_12.php';
  945. }else{
  946. require 'operate/status_other.php';
  947. }
  948. ?>
  949. </td>-->
  950. <td style="width: 250px;">
  951. <?php
  952. $_num = '';
  953. $use_version = '';
  954. if (isset(Yii::app()->session['coachInfo']->use_version)) {
  955. $use_version = Yii::app()->session['coachInfo']->use_version;
  956. } else {
  957. $use_version = Yii::app()->session['coachInfo']['use_version'];
  958. }
  959. if (!$use_version) {
  960. $use_version = 100;
  961. }
  962. $version_number = implode('', explode('.', $use_version));
  963. if (strlen($version_number) < 7) {
  964. for ($i = 0; $i < 7 - strlen($version_number); $i++) {
  965. $_num .= '0';
  966. }
  967. }
  968. $version_number = (int)$version_number . $_num;
  969. ?>
  970. <span class=" click-sc addbx" aria-hidden="true" title="查看考试班级"
  971. onclick="javascript:location.href='<?php echo $this->createUrl('print/class_exam', array('exam_group_id' => $cl['exam_group_id'],'branch'=>$cl['branch'],'grade'=>$class_grade[$cl['class_id']],'upload_status'=>$cl['upload_status'])); ?>'">班</span>
  972. <?php if($cl['is_scan_changed'] == 1):?>
  973. <a class="iconfont click-sc addbx create_sheet" qxk="<?php if($cl['qxk_paper_id']){echo 1;}else{echo 0;}?>" 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>
  974. <span class="iconfont click-sc addbx" aria-hidden="true" title="扫描答题卡" onclick="createTemplateScan('<?php echo $cl['exam_group_id'];?>',<?php echo $cl['import_score_type']?>)">扫</span>
  975. <?php endif; ?>
  976. <a href="<?php echo $this->createUrl("print/modifyThirdExam",array('exam_group_id'=>$cl['exam_group_id']));?>" class="iconfont click-sc addbx" aria-hidden="true" title="编辑考试信息" >编</a>
  977. <!-- 隐藏试卷操作 -->
  978. <?php if ($cl['is_display'] == 1): ?>
  979. <span class="iconfont click-sc click-tc addbx" aria-hidden="true" title="恢复试卷"
  980. onclick="oprateExam('<?php echo $cl['exam_group_id']; ?>',0)">&#xe68f;</span>
  981. <?php else: ?>
  982. <span class="iconfont click-sc click-delete addbx" aria-hidden="true"
  983. title="隐藏试卷"
  984. onclick="oprateExam('<?php echo $cl['exam_group_id']; ?>',1)">&#xe68b;</span>
  985. <?php endif; ?>
  986. <?php //if($version_number>=1990000):?>
  987. <?php
  988. if((in_array($cl['subject_id'],$this->mathSubjectId) || in_array($cl['subject_id'],array(8,9,12,13,14,15,16,17))) && $cl['is_scan_changed'] != 1 && $cl['homework']==0 ):?>
  989. <span class="iconfont addbx" aria-hidden="true" title="扫描在线答题卡" onclick="createTemplateScanOnline('<?php echo $cl['exam_group_id'];?>',this,'<?php echo $cl['print_name']; ?>',<?php echo $cl['import_score_type']?>)"><img src="/images/online_scan.svg"></span>
  990. <?php endif;?>
  991. <?php //endif;?>
  992. <!-- 发送标注按钮 -->
  993. <?php if (isset($paper[$cl['exam_group_id']])):?>
  994. <?php if($cl['is_united']==1):?>
  995. <?php if($cl['upload_status']==0):?>
  996. <span class="add_class click-sc addbx" grade="<?php echo $class_grade[$cl['class_id']];?>" branch="<?php echo $cl['branch']; ?>" eid="<?php echo $cl['exam_group_id']?>" aria-hidden="true" title="考试班级" >+</span>
  997. <?php endif; ?>
  998. <?php endif; ?>
  999. <?php endif;?>
  1000. <?php if(Yii::app()->params['section']==1 && $cl["create_time"]>strtotime('2022-9-1 21:00:00')):?>
  1001. <a href="/vue/index.html#/ExamProcess/ExamProcessList?examGroupId=<?php echo $cl['exam_group_id'] ?>" class="iconfont click-sc addbx" aria-hidden="true" title="查看考试流程" >轨</a>
  1002. <?php endif;?>
  1003. <?php if($exportExam && $cl['is_feedback']==1):?>
  1004. <span class="iconfont click-sc addbx exam_export" eid="<?php echo $cl['exam_group_id'] ?>" aria-hidden="true" title="导出考试数据" >导出</span>
  1005. <?php endif;?>
  1006. </td>
  1007. </tr>
  1008. <?php endforeach; else: ?>
  1009. <tr>
  1010. <td colspan="8">暂无数据!</td>
  1011. </tr>
  1012. <?php endif; ?>
  1013. </tbody>
  1014. </table>
  1015. <?php if (!empty($page_total)): ?>
  1016. <div class="row">
  1017. <div class="col-xs-6">
  1018. &nbsp;
  1019. </div>
  1020. <div class="col-xs-6">
  1021. <div class="dataTables_paginate paging_simple_numbers">
  1022. <?php
  1023. $this->widget('CLinkPager', array(
  1024. 'header' => '',
  1025. 'firstPageLabel' => '首页',
  1026. 'lastPageLabel' => '末页',
  1027. 'prevPageLabel' => '上一页',
  1028. 'nextPageLabel' => '下一页',
  1029. 'pages' => $pages,
  1030. 'maxButtonCount' => 5,
  1031. ));
  1032. echo '共:' . $page_total . '条';
  1033. ?>
  1034. </div>
  1035. </div>
  1036. </div>
  1037. <?php endif; ?>
  1038. </div>
  1039. <!--上传模板弹窗-->
  1040. <!-- PAGE CONTENT ENDS -->
  1041. </div>
  1042. </div>
  1043. </div>
  1044. </div>
  1045. <!--弹窗-->
  1046. <!-- 弹窗 -->
  1047. <div class="confirmbox-mask" style="display: none" id="fieldModal">
  1048. <div class="class-modal">
  1049. <i class="icon close_1 icon-close"></i>
  1050. <div class="class-modal-head">添加考试班级</div>
  1051. <form id="examSelect">
  1052. <div class="class-modal-body">
  1053. <p class="title">年级:高一 分科:文科</p>
  1054. <div class="class_area">
  1055. <div class="class_left">
  1056. <p>A层班级</p>
  1057. <input type="checkbox" class="checkAll">全选
  1058. </div>
  1059. <ul class="class_right area_1">
  1060. </ul>
  1061. <div class="clear"></div>
  1062. <div class="class_left">
  1063. <p>B层班级</p>
  1064. <input type="checkbox" class="checkAll">全选
  1065. </div>
  1066. <ul class="class_right area_2">
  1067. </ul>
  1068. <div class="clear"></div>
  1069. <div class="class_left">
  1070. <p>C层班级</p>
  1071. <input type="checkbox" class="checkAll">全选
  1072. </div>
  1073. <ul class="class_right area_3">
  1074. </ul>
  1075. </div>
  1076. </div>
  1077. <p class="class_btn">
  1078. <input type="hidden" name="exam_gruop_id" value="0">
  1079. <button type="button" class="setting_sumbit">确定</button>
  1080. </p>
  1081. </form>
  1082. </div>
  1083. </div>
  1084. <script src="/js/jquery.ajaxfileupload.js"></script>
  1085. <script type="text/javascript">
  1086. $(document).ready(function () {
  1087. var gradeArr=[],branchArr=[];
  1088. gradeArr[1]='高一';
  1089. gradeArr[2]='高二';
  1090. gradeArr[3]='高三';
  1091. branchArr[0]='不分科';
  1092. branchArr[1]='文科';
  1093. branchArr[2]='理科';
  1094. $('.add_class').click(function(){
  1095. var branch=$(this).attr('branch');
  1096. var eid=$(this).attr('eid');
  1097. var grade=$(this).attr('grade');
  1098. var title="年级:"+gradeArr[grade]+"  分科:"+branchArr[branch];
  1099. $('.area_1').html('');
  1100. $('.area_2').html('');
  1101. $('.area_3').html('');
  1102. $('.checkAll').prop('checked',false);
  1103. $('.class-modal-body .title').html(title);
  1104. $.ajax({
  1105. url:'<?php echo $this->createUrl('print/loadclass')?>',
  1106. type:'POST',
  1107. dataType:'json',
  1108. data:{'branch':branch,'eid':eid,'grade':grade},
  1109. success:function(res){
  1110. if(res.status==1){
  1111. class_data=res.classData;
  1112. $('input[name=exam_gruop_id]').val(eid);
  1113. if(class_data[1]!=undefined){
  1114. area_1_html='';
  1115. for(var i=0;i<class_data[1].length;i++){
  1116. if(class_data[1][i]['is_used']==1){
  1117. $('.checkAll').eq(0).prop('checked',true);
  1118. area_1_html+="<li class='ellipsis' title='"+class_data[1][i]['class_name']+"'><input type='checkbox' class='choose_class' checked value='"+class_data[1][i]['class_id']+"'>"+class_data[1][i]['class_name']+"</li>";
  1119. }else{
  1120. area_1_html+="<li class='ellipsis' title='"+class_data[1][i]['class_name']+"'><input type='checkbox' class='choose_class' title='"+class_data[1][i]['class_name']+"' value='"+class_data[1][i]['class_id']+"'>"+class_data[1][i]['class_name']+"</li>";
  1121. }
  1122. }
  1123. $('.area_1').html(area_1_html);
  1124. }
  1125. if(class_data[2]!=undefined){
  1126. area_2_html='';
  1127. for(var i=0;i<class_data[2].length;i++){
  1128. if(class_data[2][i]['is_used']==1){
  1129. $('.checkAll').eq(1).prop('checked',true);
  1130. area_2_html+="<li class='ellipsis' title='"+class_data[2][i]['class_name']+"'><input type='checkbox' class='choose_class' checked value='"+class_data[2][i]['class_id']+"'>"+class_data[2][i]['class_name']+"</li>";
  1131. }else{
  1132. area_2_html+="<li class='ellipsis' title='"+class_data[2][i]['class_name']+"'><input type='checkbox' class='choose_class' value='"+class_data[2][i]['class_id']+"'>"+class_data[2][i]['class_name']+"</li>";
  1133. }
  1134. }
  1135. $('.area_2').html(area_2_html);
  1136. }
  1137. if(class_data[3]!=undefined){
  1138. area_3_html='';
  1139. for(var i=0;i<class_data[3].length;i++){
  1140. if(class_data[3][i]['is_used']==1){
  1141. $('.checkAll').eq(2).prop('checked',true);
  1142. area_3_html+="<li class='ellipsis' title='"+class_data[3][i]['class_name']+"'><input type='checkbox' class='choose_class' title='"+class_data[3][i]['class_name']+"' checked value='"+class_data[3][i]['class_id']+"'>"+class_data[3][i]['class_name']+"</li>";
  1143. }else{
  1144. area_3_html+="<li class='ellipsis' title='"+class_data[3][i]['class_name']+"'><input type='checkbox' class='choose_class' title='"+class_data[3][i]['class_name']+"' value='"+class_data[3][i]['class_id']+"'>"+class_data[3][i]['class_name']+"</li>";
  1145. }
  1146. }
  1147. $('.area_3').html(area_3_html);
  1148. }
  1149. $('#fieldModal').show();
  1150. }
  1151. }
  1152. });
  1153. });
  1154. $('.icon-close').click(function () {
  1155. $('#fieldModal').hide();
  1156. });
  1157. $('body').on('click','.selectSendType',function(){
  1158. $('.selectSendType').removeClass('selected');
  1159. $('input[name=sendType]').val($(this).index());
  1160. $(this).addClass('selected');
  1161. })
  1162. //全选
  1163. $('.checkAll').click(function(){
  1164. var index=$('.checkAll').index(this)+1;
  1165. if($(this).is(':checked')) {
  1166. $('.area_'+index).find('input').prop("checked", true);
  1167. }else {
  1168. $('.area_'+index).find('input').prop("checked", false);
  1169. }
  1170. });
  1171. //保存班级加减操作
  1172. $('.setting_sumbit').click(function(){
  1173. var class_id=[];
  1174. // console.log($('.choose_class').length);
  1175. for(var i=0;i<$('.choose_class').length;i++){
  1176. if($('.choose_class').eq(i).is(':checked')){
  1177. class_id.push($('.choose_class').eq(i).val());
  1178. }
  1179. }
  1180. var eid=$('input[name=exam_gruop_id]').val();
  1181. console.log(class_id);
  1182. if(class_id.length==0){
  1183. layer.msg('请选择考试班级');
  1184. return false;
  1185. }else{
  1186. $.ajax({
  1187. url:'<?php echo $this->createUrl('print/saveexamclass')?>',
  1188. type:'POST',
  1189. dataType:'json',
  1190. data:{'eid':eid,'classId':class_id},
  1191. success:function(res){
  1192. if(res.status==1){
  1193. layer.msg('修改成功');
  1194. $('#fieldModal').hide();
  1195. }
  1196. }
  1197. });
  1198. }
  1199. });
  1200. $(".sel-opt,.sel-cons").mouseover(function () {
  1201. $(".sel-cons").show();
  1202. }).mouseout(function () {
  1203. $(".sel-cons").hide();
  1204. });
  1205. $(".sc-lis").click(function () {
  1206. var data = {
  1207. subjectId: $(this).attr('val')
  1208. };
  1209. $.post("<?php echo Yii::app()->createUrl('print/setSubjectId')?>", data, function (flags) {
  1210. if (flags) {
  1211. location.reload();
  1212. } else {
  1213. alert('网络异常');
  1214. }
  1215. });
  1216. $('.has-sel').text($(this).text());
  1217. $(".sel-cons").hide();
  1218. });
  1219. $(".ruanyun").click(function () {
  1220. var exam_id = $(this).attr('exam_id');
  1221. layer.msg("确定发送吗?学生是否全部上传成绩", {
  1222. time: 0,
  1223. btn: ['确定', '取消'],
  1224. yes: function (index) {
  1225. layer.close(index);
  1226. $.ajax({
  1227. url: "<?php echo $this->createUrl('print/send_ruanyun_pdf');?>",
  1228. type: "POST",
  1229. dataType: "json",
  1230. data: {
  1231. examId: exam_id
  1232. },
  1233. success: function (data) {
  1234. if (data.status == 1) {
  1235. layer.msg('发送成功', {
  1236. icon: 1
  1237. }, function () {
  1238. layer.closeAll();
  1239. location.reload();
  1240. });
  1241. } else if (data.status == 2) {
  1242. layer.msg('发送失败,未上传成绩', {
  1243. icon: 5
  1244. }, function () {
  1245. layer.closeAll();
  1246. location.reload();
  1247. });
  1248. } else {
  1249. layer.msg('发送失败', {
  1250. icon: 5
  1251. }, function () {
  1252. layer.closeAll();
  1253. location.reload();
  1254. });
  1255. }
  1256. },
  1257. error: function (data, status, e) { //服务器响应失败处理函数
  1258. layer.msg('返回失败!', {
  1259. icon: 5
  1260. }, function () {
  1261. layer.closeAll();
  1262. });
  1263. }
  1264. });
  1265. }
  1266. });
  1267. });
  1268. });
  1269. function objToJson(obj) {
  1270. var json = "{ ";
  1271. for (var item in obj) {
  1272. json += "'" + item + "':'" + obj[item] + "',";
  1273. }
  1274. json += " }";
  1275. return json;
  1276. }
  1277. function ccc() {
  1278. layer.msg('敬请期待!', {
  1279. time: 0,
  1280. btn: ['确定', '取消'],
  1281. yes: function (index) {
  1282. layer.close(index);
  1283. return false;
  1284. }
  1285. });
  1286. }
  1287. function delExam(odj) {
  1288. if (!odj) return false;
  1289. var classId = odj.getAttribute("w_class_id");
  1290. var examId = odj.getAttribute("w_exam_id");
  1291. if (!classId || !examId) return false;
  1292. var msg = '您确定要删除此班的考试吗?';
  1293. layer.msg(msg, {
  1294. time: 0,
  1295. btn: ['确定', '取消'],
  1296. yes: function (index) {
  1297. layer.close(index);
  1298. $.ajax({
  1299. url: "<?php echo $this->createUrl('print/delexam');?>",
  1300. type: "POST",
  1301. dataType: "json",
  1302. data: {
  1303. examId: examId,
  1304. classId: classId
  1305. },
  1306. success: function (data) {
  1307. if (data.status == 1) {
  1308. layer.msg('删除成功', {
  1309. icon: 1
  1310. }, function () {
  1311. layer.closeAll();
  1312. location.reload();
  1313. });
  1314. } else {
  1315. layer.msg('删除失败', {
  1316. icon: 5
  1317. }, function () {
  1318. layer.closeAll();
  1319. location.reload();
  1320. });
  1321. }
  1322. },
  1323. error: function (data, status, e) { //服务器响应失败处理函数
  1324. layer.msg('返回失败!', {
  1325. icon: 5
  1326. }, function () {
  1327. layer.closeAll();
  1328. });
  1329. }
  1330. });
  1331. }
  1332. });
  1333. }
  1334. // 确认上传成绩
  1335. function uploadConfirm(classId, examId, className, is_uploaded_count, students_count) {
  1336. //if (confirm('您确定已上传成绩了吗?')) {
  1337. 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>";
  1338. layer.msg(msg, {
  1339. time: 0,
  1340. btn: ['确定', '取消'],
  1341. yes: function (index, layerObj) {
  1342. layer.close(index);
  1343. $.ajax({
  1344. url: "<?php echo $this->createUrl('print/uploadConfirm');?>",
  1345. type: "POST",
  1346. data: {
  1347. classId: classId,
  1348. examId: examId
  1349. },
  1350. beforeSend: function () {
  1351. // 发送请求显示打印中
  1352. layer.msg('确认中...', {time: 20000});
  1353. },
  1354. dataType: "JSON",
  1355. success: function (data) {
  1356. if (data.status == 1) {
  1357. layer.msg('确认成功!');
  1358. setTimeout(function () {
  1359. location.reload();
  1360. }, 1300);
  1361. } else {
  1362. layer.msg(data.error);
  1363. }
  1364. },
  1365. complete: function () {
  1366. },
  1367. error: function () {
  1368. }
  1369. });
  1370. }
  1371. });
  1372. //}
  1373. }
  1374. // 打印错题本
  1375. function printBook(cid, eid, type) {
  1376. if (!cid || !eid || !type) {
  1377. layer.msg("打印参数有误");
  1378. return;
  1379. }
  1380. var message = '';
  1381. var objUrl = '';
  1382. if (type == 1) {
  1383. message = "您确定要下载该班级纠错本吗?";
  1384. objUrl = "<?php echo $this->createUrl('print/downloadwrongtopic');?>";
  1385. divTitle = "下载错题本";
  1386. improveName = "错题本";
  1387. } else if (type == 2) {
  1388. message = "您确定要下载该班级个性化学习方案吗?";
  1389. objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
  1390. divTitle = "下载个性化学习方案";
  1391. improveName = "个性化学习方案";
  1392. } else if (type == 3) {
  1393. message = "您确定要下载该班级个性化学习宝吗?";
  1394. objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
  1395. divTitle = "下载个性化学习宝";
  1396. improveName = "个性化学习宝";
  1397. }
  1398. else {
  1399. layer.msg("打印参数有误");
  1400. return;
  1401. }
  1402. html = "" +
  1403. '<div style="padding:20px 30px 0px 30px">' +
  1404. '<div style="padding:8px 0;">请复制下方链接下载' + improveName + '。</div>' +
  1405. '<div id="downloadUrl" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:455px;"></div>' +
  1406. '<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>' +
  1407. '</div>' +
  1408. '</div>' +
  1409. "";
  1410. layer.msg(message, {
  1411. time: 0,
  1412. btn: ['确定', '取消'],
  1413. yes: function (index) {
  1414. layer.close(index);
  1415. msgIndex = layer.msg("下载中请稍后...", {"time": 3600000});
  1416. // 更试卷打印时间
  1417. $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {
  1418. cid: cid,
  1419. eid: eid,
  1420. type: type
  1421. });
  1422. /*if(type == 1)
  1423. location.href = objUrl+"/cid/"+cid+"/eid/"+eid;
  1424. else
  1425. location.href = objUrl+"/cid/"+cid+"/eid/"+eid+"/type/"+type;*/
  1426. startTime = (new Date()).getTime();
  1427. showTip = true;
  1428. tipShowed = false;
  1429. toPromptTime = 3000;
  1430. window.interval = setInterval(function () {
  1431. execTime = (new Date()).getTime() - startTime;
  1432. if (execTime > toPromptTime && showTip && !tipShowed) {
  1433. // msgIndex = layer.msg("该文件较大,请耐心等待...", {"time": 3600000});
  1434. // tipShowed = true;
  1435. }
  1436. }, 1000);
  1437. jQuery.get(
  1438. "<?php echo $this->createUrl("print/getImproveFile");?>",
  1439. {"examId": eid, "classId": cid, "type": type},
  1440. function (data) {
  1441. data = JSON.parse(data);
  1442. if (data.success == 1 || data.success == 2) {
  1443. layer.open({
  1444. type: 1,
  1445. area: ['550px', '220px'],
  1446. title: divTitle,
  1447. content: html,
  1448. success: function (index, layerObj) {
  1449. clearInterval(window.interval);
  1450. msgIndex = layer.msg(data.limitinfo, {"time": 3000});
  1451. clearInterval(window.interval);
  1452. layer.close(msgIndex);
  1453. 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>');
  1454. jQuery("#confirm, #cancel").on("click", function () {
  1455. layer.close(layerObj);
  1456. });
  1457. jQuery("#copy").on("click", function () {
  1458. jQuery("#url").select();
  1459. });
  1460. },
  1461. end: function () {
  1462. }
  1463. });
  1464. }
  1465. else if (data.success == 0) {
  1466. clearInterval(window.interval);
  1467. msgIndex = layer.msg(data.message, {"time": 3000});
  1468. }
  1469. }
  1470. );
  1471. }
  1472. });
  1473. }
  1474. // 上传试卷模板
  1475. function uploadTemplate(eid, name, type) {
  1476. if (!eid) {
  1477. layer.msg('操作失败!');
  1478. return false;
  1479. }
  1480. if (type == 1)
  1481. forCheckUrl = "<?php echo $this->createUrl('print/verifyTpl');?>";
  1482. else
  1483. forCheckUrl = "<?php echo $this->createUrl('print/checkanswercard');?>";
  1484. $.post(forCheckUrl, {eid: eid}, function (data) {
  1485. var obj = JSON.parse(data);
  1486. var html = '<div class="layer_notice" style="padding:5px;">';
  1487. html += '<table class="table table-striped table-bordered table-hover ">';
  1488. html += '<thead class="thin-border-bottom">';
  1489. html += '<tr>';
  1490. html += '<th>试卷名称</th>';
  1491. html += '<th>是否上传</th>';
  1492. html += '<th>操作</th>';
  1493. html += '</tr>';
  1494. html += '</thead>';
  1495. html += '<tbody class="content_tbody">';
  1496. if (obj.success == 1) {
  1497. html += '<td>' + name + '</td><td><span style="color:red;">已上传</span></td><td><input type="file" name="word_file" id="word_file" /></td></tr>';
  1498. } else {
  1499. html += '<td>' + name + '</td><td id="alreadUpload">未上传</td><td><input type="file" name="word_file" id="word_file" /></td></tr>';
  1500. }
  1501. html += '</tbody>';
  1502. html += '</table>';
  1503. html += '<span style="width:582px;display:inline-block;text-align:center;">';
  1504. html += '<button class="btn btn-success btn-sm" onclick="uploadWord(' + type + ')"><i class="ace-icon fa fa-check bigger-110"></i>确定</button>';
  1505. html += '</span>';
  1506. html += '<input type="hidden" id="mpEid" value="' + eid + '">';
  1507. html += '</div>';
  1508. layer.open({
  1509. type: 1,
  1510. skin: 'layui-layer-rim', //加上边框
  1511. area: ['600px', '300px'], //宽高
  1512. content: html
  1513. });
  1514. });
  1515. }
  1516. function uploadWord(type) {
  1517. var paramEid = $('#mpEid').val();
  1518. if (!paramEid) {
  1519. layer.msg('没找到周周练ID!');
  1520. return false;
  1521. }
  1522. var obj_file = $("#word_file").val();
  1523. if (!obj_file) {
  1524. layer.msg('请选择上传文件');
  1525. return false;
  1526. }
  1527. var extStart = obj_file.lastIndexOf('.');
  1528. var extName = obj_file.substring(extStart, obj_file.length).toLowerCase();
  1529. if (extName != ".dotx" && extName != ".dotm") {
  1530. layer.msg('模板格式有误,请上传dotx格式word!');
  1531. return false;
  1532. }
  1533. $.ajaxFileUpload({
  1534. url: "<?php echo $this->createUrl('print/uploadTpl');?>", //用于文件上传的服务器端请求地址
  1535. secureuri: false, //是否需要安全协议,一般设置为false
  1536. fileElementId: 'word_file', //文件上传域的ID
  1537. dataType: 'text', //返回值类型 一般设置为json
  1538. data: {"eid": paramEid, "type": type},
  1539. success: function (data, status) {
  1540. var obj = JSON.parse(data);
  1541. if (obj.success == 1) {
  1542. layer.msg(obj.message, {
  1543. icon: 1,
  1544. }, function () {
  1545. layer.closeAll();
  1546. });
  1547. $("#alreadUpload").html('<span style="color:red;">已上传</span>');
  1548. } else {
  1549. layer.msg(obj.message, {
  1550. icon: 5,
  1551. }, function () {
  1552. layer.closeAll();
  1553. });
  1554. }
  1555. },
  1556. error: function (data, status, e) { //服务器响应失败处理函数
  1557. layer.msg('返回失败!', {
  1558. icon: 5,
  1559. }, function () {
  1560. layer.closeAll();
  1561. });
  1562. }
  1563. });
  1564. return false;
  1565. }
  1566. // 搜索事件
  1567. $("#search").click(function () {
  1568. $("#form1").submit();
  1569. });
  1570. //切换扫描方式
  1571. $('#changeScan').click(function(){
  1572. window.location.href="<?php echo $this->createUrl('print/changeScan')?>";
  1573. return false;
  1574. });
  1575. function print(cid, eid, tid, fg) {
  1576. if (!cid || !eid) return false;
  1577. var msg = '';
  1578. if (tid == 0) {
  1579. if (fg == 1) {
  1580. msg = '打印答题卡';
  1581. } else {
  1582. msg = '您确定要打印该试卷嘛?';
  1583. }
  1584. } else if (tid == 1) {
  1585. msg = '您确定要打印该错题本嘛?';
  1586. } else if (tid == 2) {
  1587. msg = '您确定要打印该个性化学习宝吗?';
  1588. }
  1589. layer.msg(msg, {
  1590. time: 0,
  1591. btn: ['确定', '取消'],
  1592. yes: function (index) {
  1593. layer.close(index);
  1594. ajaxPrint(cid, eid, tid);
  1595. }
  1596. });
  1597. }
  1598. function ajaxPrint(cid, eid, tid) {
  1599. $.ajax({
  1600. url: "<?php echo $this->createUrl('print/ajaxupdate');?>",
  1601. type: "post",
  1602. data: {cid: cid, eid: eid, tid: tid},
  1603. dataType: "json",
  1604. beforeSend: function () {
  1605. // 发送请求显示打印中
  1606. layer.msg('打印中', {icon: 16, time: 20000});
  1607. },
  1608. success: function (obj) {
  1609. var index = layer.msg();
  1610. layer.close(index);
  1611. if (obj.success == 1) {
  1612. if (tid == 0) {//console.log(JSON.stringify(obj.message));
  1613. evaluationClient.printPaper(JSON.stringify(obj.message));
  1614. //alert('提交打印试卷成功!');
  1615. } else if (tid == 1) {
  1616. evaluationClient.printCTB(JSON.stringify(obj.message));
  1617. //alert('提交打印错题本成功!');
  1618. } else if (tid == 2) {
  1619. evaluationClient.printTFFA(JSON.stringify(obj.message));
  1620. //alert('提交打印提分册成功!');
  1621. } else {
  1622. layer.msg('操作错误!');
  1623. }
  1624. location.reload();
  1625. } else {//alert(obj.message);
  1626. layer.msg(obj.message);
  1627. }
  1628. },
  1629. complete: function () {
  1630. //layer.msg('打印失败!');
  1631. //var index = layer.msg();
  1632. //layer.close(index);
  1633. },
  1634. error: function () {
  1635. //var index = layer.msg();
  1636. //layer.close(index);
  1637. }
  1638. });
  1639. }
  1640. // 生成试卷模板
  1641. function createTemplate(eid, flag) {
  1642. if (!eid) {
  1643. layer.msg('未找到周周练id');
  1644. }
  1645. var msg = '';
  1646. if (flag == 2) {
  1647. msg = '您确定要下载试卷嘛?';
  1648. } else if (flag == 1) {
  1649. msg = '您确定要生成模板嘛?';
  1650. }
  1651. else if (flag == 3) {
  1652. msg = "<div style='text-align:left;'>编辑答题卡注意事项:<br/>1、试卷的名字最多支持2行,字体的大小和字体种类保持原有格式不变<br/>2、选择题和填空题的答题区域中里面的内容和识别点不许更改<br/>3、整套试卷中所有的识别点不许更改<br/><br/>点击确定下载</div>";
  1653. } else if (flag == 4) {
  1654. msg = "<div style='text-align:left;'>编辑题卡合一注意事项:<br/>1、试卷的名字最多支持2行,字体的大小和字体种类保持原有格式不变<br/>2、选择题和填空题的答题区域中里面的内容和识别点不许更改<br/>3、整套试卷中所有的识别点不许更改<br/><br/>点击确定下载</div>";
  1655. } else {
  1656. layer.msg("参数错误");
  1657. }
  1658. layer.msg(msg, {
  1659. time: 0,
  1660. btn: ['确定', '取消'],
  1661. yes: function (index) {
  1662. layer.close(index);
  1663. $.post('<?php echo $this->createUrl('print/createtempelate');?>', {
  1664. "eid": eid,
  1665. "flag": flag
  1666. }, function (data) {
  1667. var obj = JSON.parse(data);
  1668. if (obj.success == 1) {
  1669. if (flag == 2) {
  1670. evaluationClient.CreatePaperTiGan(JSON.stringify(obj.object));
  1671. } else if (flag == 1) {
  1672. evaluationClient.createPaper(JSON.stringify(obj.object));
  1673. }
  1674. else if (flag == 3) {
  1675. evaluationClient.CreatePaperDaTiKa(JSON.stringify(obj.object));
  1676. } else if (flag == 4) {
  1677. evaluationClient.CreatePaperDaTiKa(JSON.stringify(obj.object));
  1678. } else {
  1679. layer.msg("参数错误");
  1680. }
  1681. } else {
  1682. layer.msg(obj.message);
  1683. }
  1684. });
  1685. }
  1686. });
  1687. }
  1688. function wb_html(odj) {
  1689. if (!odj) return false;
  1690. var classId = odj.getAttribute("w_class_id");
  1691. var examId = odj.getAttribute("w_exam_id");
  1692. if (!classId || !examId) return false;
  1693. var msg = '您确定要生成该班级的错题本吗?';
  1694. layer.msg(msg, {
  1695. time: 0,
  1696. btn: ['确定', '取消'],
  1697. yes: function (index) {
  1698. layer.close(index);
  1699. $.ajax({
  1700. url: "<?php echo $this->createUrl('client/wbhtml');?>",
  1701. type: "POST",
  1702. dataType: "json",
  1703. data: {
  1704. examId: examId,
  1705. classId: classId
  1706. },
  1707. success: function (data) {
  1708. if (data > 0) {
  1709. layer.msg('操作成功,重新生成错题本', {
  1710. icon: 1
  1711. }, function () {
  1712. layer.closeAll();
  1713. });
  1714. } else if (data == 0) {
  1715. layer.msg('操作失败,此班无错题本', {
  1716. icon: 5
  1717. }, function () {
  1718. layer.closeAll();
  1719. });
  1720. }
  1721. else {
  1722. layer.msg('操作失败,重新生成错题本', {
  1723. icon: 5
  1724. }, function () {
  1725. layer.closeAll();
  1726. });
  1727. }
  1728. },
  1729. error: function (data, status, e) { //服务器响应失败处理函数
  1730. layer.msg('返回失败!', {
  1731. icon: 5
  1732. }, function () {
  1733. layer.closeAll();
  1734. });
  1735. }
  1736. });
  1737. }
  1738. });
  1739. }
  1740. function isp2_html(odj) {
  1741. if (!odj) return false;
  1742. var classId = odj.getAttribute("w_class_id");
  1743. var examId = odj.getAttribute("w_exam_id");
  1744. if (!classId || !examId) return false;
  1745. var msg = '您确定要生成该班级的二步提分方案吗?';
  1746. layer.msg(msg, {
  1747. time: 0,
  1748. btn: ['确定', '取消'],
  1749. yes: function (index) {
  1750. layer.close(index);
  1751. $.ajax({
  1752. url: "<?php echo $this->createUrl('client/isp2html');?>",
  1753. type: "POST",
  1754. dataType: "json",
  1755. data: {
  1756. examId: examId,
  1757. classId: classId
  1758. },
  1759. success: function (data) {
  1760. if (data > 0) {
  1761. layer.msg('操作成功,重新生成提分方案', {
  1762. icon: 1
  1763. }, function () {
  1764. layer.closeAll();
  1765. });
  1766. } else if (data == 0) {
  1767. layer.msg('操作失败,此班无提分方案', {
  1768. icon: 5
  1769. }, function () {
  1770. layer.closeAll();
  1771. });
  1772. }
  1773. else {
  1774. layer.msg('操作失败,重新生成提分方案', {
  1775. icon: 5
  1776. }, function () {
  1777. layer.closeAll();
  1778. });
  1779. }
  1780. },
  1781. error: function (data, status, e) { //服务器响应失败处理函数
  1782. layer.msg('返回失败!', {
  1783. icon: 5
  1784. }, function () {
  1785. layer.closeAll();
  1786. });
  1787. }
  1788. });
  1789. }
  1790. });
  1791. }
  1792. function isp3_html(odj) {
  1793. if (!odj) return false;
  1794. var classId = odj.getAttribute("w_class_id");
  1795. var examId = odj.getAttribute("w_exam_id");
  1796. if (!classId || !examId) return false;
  1797. var msg = '您确定要生成该班级的个性化学习宝吗?';
  1798. layer.msg(msg, {
  1799. time: 0,
  1800. btn: ['确定', '取消'],
  1801. yes: function (index) {
  1802. layer.close(index);
  1803. $.ajax({
  1804. url: "<?php echo $this->createUrl('client/isp3html');?>",
  1805. type: "POST",
  1806. dataType: "json",
  1807. data: {
  1808. examId: examId,
  1809. classId: classId
  1810. },
  1811. success: function (data) {
  1812. if (data > 0) {
  1813. layer.msg('操作成功,重新生成提分方案', {
  1814. icon: 1
  1815. }, function () {
  1816. layer.closeAll();
  1817. });
  1818. } else if (data == 0) {
  1819. layer.msg('操作失败,此班无提分方案', {
  1820. icon: 5
  1821. }, function () {
  1822. layer.closeAll();
  1823. });
  1824. }
  1825. else {
  1826. layer.msg('操作失败,重新生成提分方案', {
  1827. icon: 5
  1828. }, function () {
  1829. layer.closeAll();
  1830. });
  1831. }
  1832. },
  1833. error: function (data, status, e) { //服务器响应失败处理函数
  1834. layer.msg('返回失败!', {
  1835. icon: 5
  1836. }, function () {
  1837. layer.closeAll();
  1838. });
  1839. }
  1840. });
  1841. }
  1842. });
  1843. }
  1844. function show_version() {
  1845. layer.msg('你的客户端版本太低,请升最新版本');
  1846. }
  1847. // 隐藏试卷
  1848. function oprateExam(exam_groupId, flag) {
  1849. if (exam_groupId) {
  1850. layer.msg('未找到周周练id');
  1851. }
  1852. var msg = '您确定要隐藏该试卷吗?';
  1853. if (flag == 0) {
  1854. msg = '您确定要恢复该试卷吗?';
  1855. }
  1856. layer.msg(msg, {
  1857. time: 0,
  1858. btn: ['确定', '取消'],
  1859. yes: function (index) {
  1860. layer.close(index);
  1861. $.post('<?php echo $this->createUrl("print/oprateexam");?>', {
  1862. exam_groupId: exam_groupId,
  1863. flag: flag
  1864. }, function (data) {
  1865. var obj = JSON.parse(data);
  1866. if (obj.success == 1) {
  1867. location.reload();
  1868. } else {
  1869. layer.msg(obj.message);
  1870. }
  1871. });
  1872. }
  1873. });
  1874. }
  1875. $(".create_sheet").click(function(){
  1876. var exam_group_id = $(this).attr("exam_group_id");
  1877. var sheet_id = $(this).attr("sheet_id");
  1878. var qxk = $(this).attr("qxk");
  1879. if(exam_group_id>0){
  1880. $.post("<?php echo Yii::app()->createUrl('third/set_new')?>",{exam_group_id:exam_group_id});
  1881. if(qxk==1){
  1882. evaluationClient.CreateWholeDisciplineAnswerSheet(sheet_id+","+exam_group_id);
  1883. }else{
  1884. evaluationClient.CreateAnswerSheetShuxuebaoliu(sheet_id+","+exam_group_id);
  1885. }
  1886. }
  1887. });
  1888. //扫描答题卡
  1889. function createTemplateScan (exam_group_id,importType){
  1890. if (!exam_group_id) {
  1891. layer.msg('未找到试卷ID');
  1892. }
  1893. var data={
  1894. exam_group_id:exam_group_id
  1895. }
  1896. $.post("<?php echo Yii::app()->createUrl("third/paper")?>",data,function(rs){
  1897. var m = JSON.parse(rs);
  1898. if(m.status==1)
  1899. {
  1900. if(importType>0){
  1901. evaluationClient.ImportLoadThirdParty(exam_group_id);
  1902. }else{
  1903. evaluationClient.loadThirdParty(exam_group_id);
  1904. }
  1905. }else {
  1906. layer.msg('尚未创建答题卡,请创建');
  1907. }
  1908. });
  1909. }
  1910. //扫描在线答题卡
  1911. function createTemplateScanOnline(exam_group_id,obj,exam_name,import_type){
  1912. if (!exam_group_id) {
  1913. layer.msg('未找到试卷ID');
  1914. }
  1915. if($(obj).hasClass('disabled')){
  1916. return false;
  1917. }
  1918. var data={
  1919. exam_group_id:exam_group_id
  1920. }
  1921. $.post("<?php echo Yii::app()->createUrl("print/getOnlineCard")?>",data,function(rs){
  1922. var m = JSON.parse(rs);
  1923. if(m.status==1)
  1924. {
  1925. $(obj).addClass('disabled');
  1926. if(m.qxk_paper_id!=undefined && m.qxk_paper_id!=0){
  1927. if(import_type>0){
  1928. evaluationClient.ImportLoadThirdParty_OnLineAnswerCard_M(exam_group_id+","+exam_name+","+<?php echo Yii::app()->session['session_subject_id']?>);
  1929. }else{
  1930. evaluationClient.loadThirdParty_OnLineAnswerCard_M(exam_group_id+","+exam_name+","+<?php echo Yii::app()->session['session_subject_id']?>);
  1931. }
  1932. }else{
  1933. if(import_type>0){
  1934. evaluationClient.ImportNewScan(exam_group_id+","+exam_name);
  1935. }else{
  1936. evaluationClient.NewScan(exam_group_id+","+exam_name);
  1937. }
  1938. }
  1939. }else if(m.status==-1) {
  1940. layer.msg('尚未创建在线答题卡,请创建');
  1941. }else if(m.status==-2){
  1942. layer.msg('客观题答案未设置不可进行扫描,<br>' +
  1943. '\n' +
  1944. '请前往试卷详情页设置完整答案', {
  1945. time: 0,
  1946. btn: ['好的']
  1947. ,yes: function(index, layero){
  1948. layer.closeAll();
  1949. }
  1950. });
  1951. }
  1952. });
  1953. }
  1954. //导入成绩扫描
  1955. function createImportScanOnline(exam_group_id,obj,exam_name){
  1956. if (!exam_group_id) {
  1957. layer.msg('未找到试卷ID');
  1958. }
  1959. if($(obj).hasClass('disabled')){
  1960. return false;
  1961. }
  1962. var data={
  1963. exam_group_id:exam_group_id
  1964. }
  1965. evaluationClient.ImportByLoadThirdParty(exam_group_id+","+exam_name);
  1966. }
  1967. $('.exam_export').click(function(){
  1968. eid=$(this).attr('eid');
  1969. data={examGroupId:eid}
  1970. $.post("<?php echo Yii::app()->createUrl('print/exportExamData')?>",data,function(flags){
  1971. var m = JSON.parse(flags);
  1972. if(m.status==1)
  1973. {
  1974. var html = ""+
  1975. '<div style="padding:20px 30px 0px 30px">'+
  1976. '<div style="padding:8px 0;">请复制下方链接打印包。</div>'+
  1977. '<div id="downloadUrl" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:455px;"></div>'+
  1978. '<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>'+
  1979. '</div>'+
  1980. '</div>'+
  1981. "";
  1982. //
  1983. layer.open({
  1984. type: 1,
  1985. area: ['550px', '220px'],
  1986. title: '下载',
  1987. content: html,
  1988. success: function(index, layerObj){
  1989. $(".loading-pop").hide();
  1990. jQuery("#downloadUrl").html('下载地址:<span style=""><input id="url" type="text" size="40" readonly value="'+m.data+'" /></span><button id="copy" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;">全选</button>');
  1991. jQuery("#confirm, #cancel").on("click", function(){
  1992. layer.close(layerObj);
  1993. });
  1994. jQuery("#copy").on("click", function(){
  1995. jQuery("#url").select();
  1996. });
  1997. },
  1998. end: function(){
  1999. }
  2000. });
  2001. return;
  2002. }else if(m.status==2) {
  2003. layer.msg('数据正在生成中,请稍侯点击导出下载');
  2004. }else{
  2005. layer.msg(m.result);
  2006. }
  2007. });
  2008. });
  2009. </script>