assist.php 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128
  1. <link rel="stylesheet" href="/css/reset.css">
  2. <link rel="stylesheet" href="/js/layui/css/layui.css">
  3. <link href="/css/mission-details.css " rel="stylesheet">
  4. <div class="main-content-inner">
  5. <!-- 导航栏开始-->
  6. <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
  7. <!-- 导航栏结束-->
  8. <style>
  9. p{
  10. word-wrap: break-word;
  11. word-break: break-all;
  12. overflow: hidden;
  13. }
  14. </style>
  15. <div class="mission-details">
  16. <div class="mission-head">
  17. <h3>后台协助任务详情
  18. <span class="highlight-err">
  19. <i class="layui-icon layui-icon-tips"></i>
  20. <?php
  21. if(isset($task) && ($task['answer_sheet_task']==3 || $task['paper_task']==3 || $task['parse_task']==3)) {
  22. ?>
  23. 注:后台处理完成后,请您务必检查确认,任何由后台模板制作造成的不良后果,请自行承担!
  24. <?php
  25. }
  26. ?>
  27. </span>
  28. <a href="javascript:history.back(-1)" class="fr" style="font-size: 14px">返回</a>
  29. </h3>
  30. <p>考试名称:<?php echo $exam_name?></p>
  31. <p>
  32. <span>考试学科:<?php echo $subject?></span>
  33. <span>考试时间:<?php echo $tpl_data['examDate']?></span>
  34. <input type="hidden" name="exam_group_id" value="<?php echo $exam_group_id?>">
  35. </p>
  36. </div>
  37. <hr class="layui-bg-gray">
  38. <div class="mission-card-box">
  39. <div class="card">
  40. <div class="card-title">
  41. <p>
  42. <span class="oblique-line">//////</span>
  43. <span class="card-name">答题卡</span>
  44. <span class="oblique-line">//////</span>
  45. </p>
  46. <?php
  47. if(isset($task) && $task['answer_sheet_task']>0){
  48. if($task['answer_sheet_task']==1){
  49. echo ''; //排队中
  50. }elseif($task['answer_sheet_task']==2){
  51. echo '<img class="processing-status" src="/images/img-acceptance.png" alt="受理中">';
  52. }elseif($task['answer_sheet_task']==3){
  53. echo '<img class="processing-status" src="/images/img-complete.png" alt="已完成">';
  54. }
  55. }
  56. ?>
  57. </div>
  58. <div class="card-content">
  59. <form action="<?php $this->createUrl('third/sendtask')?>" method="post" enctype="multipart/form-data" id="answer_card_form">
  60. <div class="card-item">
  61. <div class="card-item-title">
  62. <i class="start-green"></i>
  63. <span class="must">*</span>
  64. <span class="card-item-title-name">答题卡图片</span>
  65. <i class="layui-icon layui-icon-about open-tips" tipstext="请按顺序上传答题卡图片"></i>
  66. <label class="up-data">
  67. <?php
  68. if(!isset($task['answer_sheet_task']) || $task['answer_sheet_task']==4 || $task['answer_sheet_task']==0){
  69. ?>
  70. <span>点击上传</span>
  71. <input type="file" id="fileImg" name="img" accept="image/*"
  72. style="display: none;" />
  73. <?php }?>
  74. </label>
  75. </div>
  76. <div class="card-item-content">
  77. <div class="up-img-look-box" id="imgPreview">
  78. <?php
  79. if(!isset($task['answer_sheet_task']) || $task['answer_sheet_task']==4 || $task['answer_sheet_task']==0){
  80. echo ' <p class="msg1">请上传答题卡图片</p>';
  81. }
  82. if(isset($task['answer_card_img'])){
  83. $imgArr=explode(',',$task['answer_card_img']);
  84. foreach ($imgArr as $key => $img){
  85. if($task['answer_sheet_task']==4 || $task['answer_sheet_task']==0){
  86. echo '<span class="img-wrap"><i class="layui-icon layui-icon-close btn-del-img"></i><img src="'.$img.'" id="a_'.($key+1).'"></span>';
  87. }else{
  88. echo '<span class="img-wrap"><img src="'.$img.'" id="a_'.($key+1).'"></span>';
  89. }
  90. }
  91. }
  92. ?>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="card-item">
  97. <div class="card-item-title">
  98. <i class="start-green"></i>
  99. <span class="must">*</span>
  100. <span class="card-item-title-name">试卷文件</span>
  101. <i class="layui-icon layui-icon-about open-tips"
  102. tipstext="请上传考试试卷文件,后台工作人员需要以此作为模板制作的参考依据"></i>
  103. <label class="up-data">
  104. <?php
  105. if(!isset($task['answer_sheet_task']) || $task['answer_sheet_task']==4 || $task['answer_sheet_task']==0){
  106. ?>
  107. <span>点击上传</span>
  108. <input type="file" id="fileDoc" name="doc" style="display: none;" />
  109. <?php } ?>
  110. </label>
  111. </div>
  112. <div class="card-item-title" style="margin-left: 24px">
  113. <span class="must"> *</span>
  114. <span class="">试卷文件中,需体现出</span>
  115. <span class="highlight-green">题型信息</span><br />
  116. <span class="highlight-green">(单选/多选/填空/解答/选做等)、分值信息、选项答案</span>
  117. </div>
  118. <?php
  119. if(isset($task['paper_file_img'])){
  120. if($task['paper_file_title']){
  121. $paperFileName=$task['paper_file_title'];
  122. }else{
  123. preg_match('/\/([^\/]+\.[a-z]+)[^\/]*$/',$task['paper_file_img'],$match);
  124. $paperFileName=$match[1];
  125. }
  126. echo '<input type="hidden" name="paperDoc" value="'.$task['paper_file_img'].'">';
  127. echo '<input type="hidden" name="paperDocTitle" value="'.$task['paper_file_title'].'">';
  128. echo '<div class="card-item-content paperFileLink"><a href="'.$task['paper_file_img'].'" id="docName">试卷:'.$paperFileName.'</a></div>';
  129. }else{
  130. echo '<input type="hidden" name="paperDoc" value="">';
  131. echo '<input type="hidden" name="paperDocTitle" value="">';
  132. echo '<div class="card-item-content paperFileLink"><a href="#">试卷:考试试卷文件名称.后缀名</a></div>';
  133. }
  134. ?>
  135. </div>
  136. <div class="card-item">
  137. <div class="card-item-title">
  138. <i class="start-green"></i>
  139. <span class="must">*</span>
  140. <span class="card-item-title-name">考号类型</span>
  141. <i class="layui-icon layui-icon-about open-tips" tipstext="请选择您当前需要使用的考号类型"></i>
  142. </div>
  143. <div class="card-item-content">
  144. <?php
  145. $check[1]='';
  146. $check[2]='';
  147. if($task['number_type']){
  148. if($task['number_type']==1){
  149. $check[1]='checked';
  150. }elseif($task['number_type']==2){
  151. $check[2]='checked';
  152. }elseif($task['number_type']==3){
  153. $check[1]='checked';
  154. $check[2]='checked';
  155. }
  156. }
  157. ?>
  158. <label><input type="checkbox" class="card_type" name="testNumberType" <?php echo $check[1]?> value="1" />填涂考号</label>
  159. <label><input type="checkbox" class="card_type" name="testNumberType" <?php echo $check[2]?> value="2" />条形码</label>
  160. </div>
  161. </div>
  162. <div class="card-item">
  163. <div class="card-item-title">
  164. <i class="start-green"></i>
  165. <span class="card-item-title-name">备注(选填)</span>
  166. <i class="layui-icon layui-icon-about open-tips" tipstext="可选择性填写对当前协助任务的说明"></i>
  167. </div>
  168. <div class="card-item-content">
  169. <textarea name="answer_card_remark" id="answer_card_remark" cols="60" rows="4"><?php echo $task['answer_card_mark']?></textarea>
  170. </div>
  171. </div>
  172. <div class="card-item">
  173. <div class="card-item-title">
  174. <i class="start-green"></i>
  175. <span class="card-item-title-name">动态详情</span>
  176. <i class="layui-icon layui-icon-about open-tips" tipstext="跟踪当前任务的处理进展情况"></i>
  177. <?php
  178. if($task['answer_sheet_task']){
  179. if($task['answer_sheet_task']==3){
  180. echo '<span class="highlight-err" style="margin-left: 138px">提示:请去确认答题卡切割是否正确</span>';
  181. }
  182. }
  183. ?>
  184. </div>
  185. <div class="card-item-content">
  186. <?php
  187. if($task['answer_sheet_task']){
  188. $status='未发送';
  189. switch ($task['answer_sheet_task']){
  190. case 1:
  191. $status='排队中';
  192. break;
  193. case 2:
  194. $status='受理中';
  195. break;
  196. case 3:
  197. $status='已完成';
  198. break;
  199. case 4:
  200. $status='已撤消';
  201. break;
  202. }
  203. echo '<p class="state-details">';
  204. echo '<span class="">状态:'.$status.'</span>';
  205. echo '<span class="">发送时间:'.date('Y-m-d H:i:s',$task['ast_create_time']).'</span>';
  206. echo '</p>';
  207. echo '<p class="state-details">';
  208. echo '<span>任务耗时:'.$task['AstConsuming'].'</span>';
  209. if(isset($task['user'])){
  210. echo '<span>受理专家:'.$task['user']['real_name'].'</span>';
  211. }else{
  212. echo '<span>受理专家:--</span>';
  213. }
  214. echo '</p>';
  215. }else{
  216. echo '<p class="state-details">';
  217. echo '<span class="">状态:未发送</span>';
  218. echo '<span class="">发送时间:--</span>';
  219. echo '</p>';
  220. echo '<p class="state-details">';
  221. echo '<span>任务耗时:--</span>';
  222. echo '<span>受理专家:--</span>';
  223. echo '</p>';
  224. }
  225. ?>
  226. </div>
  227. </div>
  228. <div class="btn-box">
  229. <?php
  230. if($task['answer_sheet_task']){
  231. if($task['answer_sheet_task']==4 || $task['answer_sheet_task']==3){
  232. echo '<button type="button" class="layui-btn layui-btn-radius layui-btn-primary confirm-up-answer-card">重新发送后台</button>';
  233. }else{
  234. echo '<button type="button" sendType="1" class="layui-btn layui-btn-radius layui-btn-danger recall-form">撤销后台协助</button> ';
  235. }
  236. }else{
  237. echo '<button type="button" class="layui-btn layui-btn-radius layui-btn-primary confirm-up-answer-card">发送后台协助</button>';
  238. }
  239. ?>
  240. </div>
  241. </form>
  242. </div>
  243. </div>
  244. <?php
  245. $allowSubject=array(8);
  246. $allowSubject=array_merge(Yii::app()->params['mathSubjectId'],$allowSubject);
  247. if(!in_array(Yii::app()->session['session_duoxueke_subject_id'],$allowSubject)){
  248. ?>
  249. <div class="card">
  250. <div class="card-title">
  251. <p>
  252. <span class="oblique-line">//////</span>
  253. <span class="card-name">试卷</span>
  254. <span class="oblique-line">//////</span>
  255. </p>
  256. <!-- <img class="processing-status" src="./img/img-acceptance.png" alt="受理中"> -->
  257. <!-- <img class="processing-status" src="./img/img-complete.png" alt="已完成"> -->
  258. <?php
  259. if(isset($task) && $task['paper_task']>0){
  260. if($task['paper_task']==1){
  261. echo ''; //排队中
  262. }elseif($task['paper_task']==2){
  263. echo '<img class="processing-status" src="/images/img-acceptance.png" alt="受理中">';
  264. }elseif($task['paper_task']==3){
  265. echo '<img class="processing-status" src="/images/img-complete.png" alt="已完成">';
  266. }
  267. }
  268. ?>
  269. </div>
  270. <div class="card-content">
  271. <form>
  272. <div class="card-item">
  273. <div class="card-item-title">
  274. <i class="start-green"></i>
  275. <span class="must">*</span>
  276. <span class="card-item-title-name">试卷图片</span>
  277. <i class="layui-icon layui-icon-about open-tips" tipstext="请按顺序上传试卷图片"></i>
  278. <label class="up-data">
  279. <?php
  280. if(!isset($task['paper_task']) || $task['paper_task']==4 || $task['paper_task']==0){
  281. ?>
  282. <span>点击上传</span>
  283. <input type="file" id="testImg" name="img" accept="image/*"
  284. style="display: none;" />
  285. <?php }?>
  286. </label>
  287. </div>
  288. <div class="card-item-content">
  289. <div class="up-img-look-box" id="testImgImgPreview">
  290. <?php
  291. if(!isset($task['paper_task']) || $task['paper_task']==4 || $task['paper_task']==0){
  292. echo ' <p class="msg1">请上传试卷图片</p>';
  293. }
  294. if(isset($task['paper_img'])){
  295. $imgArr=explode(',',$task['paper_img']);
  296. foreach ($imgArr as $key => $img){
  297. if($task['paper_task']==4 || $task['paper_task']==0){
  298. echo '<span class="img-wrap"><i class="layui-icon layui-icon-close btn-del-img"></i><img src="'.$img.'" ></span>';
  299. }else{
  300. echo '<span class="img-wrap"><img src="'.$img.'" ></span>';
  301. }
  302. }
  303. }
  304. ?>
  305. </div>
  306. </div>
  307. </div>
  308. <div class="card-item">
  309. <div class="card-item-title">
  310. <i class="start-green"></i>
  311. <span class="must">*</span>
  312. <span class="card-item-title-name">试卷结构</span>
  313. <i class="layui-icon layui-icon-about open-tips" tipstext="确认答题卡切割后的试题结构"></i>
  314. </div>
  315. <div class="card-item-content">
  316. <?php
  317. if(isset($tpl_data['items']) && !empty($tpl_data['items'])){
  318. if(isset($tpl_data['items'][1]) && $tpl_data['items'][1]['no']){
  319. echo '<p>单选题:'.implode(',',$tpl_data['items'][1]['no']).'</p>';
  320. }
  321. if(isset($tpl_data['items'][11]) && $tpl_data['items'][11]['no']){
  322. echo '<p>多选题:'.implode(',',$tpl_data['items'][11]['no']).'</p>';
  323. }
  324. if(isset($tpl_data['items'][4]) && $tpl_data['items'][4]['no']){
  325. echo '<p>判断题:'.implode(',',$tpl_data['items'][4]['no']).'</p>';
  326. }
  327. if(isset($tpl_data['items'][5]) && $tpl_data['items'][5]['no']){
  328. echo '<p>填空题:'.implode(',',$tpl_data['items'][5]['no']).'</p>';
  329. }
  330. if(isset($tpl_data['items'][7]) && $tpl_data['items'][7]['no']){
  331. echo '<p>解答题:'.implode(',',$tpl_data['items'][7]['no']).'</p>';
  332. }
  333. if(isset($tpl_data['items'][17]) && $tpl_data['items'][17]['no']){
  334. echo '<p>选做题:'.implode(',',$tpl_data['items'][17]['no']).'</p>';
  335. }
  336. }else{
  337. echo '<p>答题卡设置未完成,无试题结构</p>';
  338. }
  339. ?>
  340. </div>
  341. </div>
  342. <div class="card-item">
  343. <div class="card-item-title">
  344. <i class="start-green"></i>
  345. <span class="card-item-title-name">备注(选填)</span>
  346. <i class="layui-icon layui-icon-about open-tips" tipstext="可选择性填写对当前协助任务的说明"></i>
  347. </div>
  348. <div class="card-item-content">
  349. <textarea name="paper_remark" id="paper_remark" cols="60" rows="4"><?php echo $task['paper_mark']?></textarea>
  350. </div>
  351. </div>
  352. <div class="card-item">
  353. <div class="card-item-title">
  354. <i class="start-green"></i>
  355. <span class="card-item-title-name">动态详情</span>
  356. <i class="layui-icon layui-icon-about open-tips" tipstext="跟踪当前任务的处理进展情况"></i>
  357. <?php
  358. if($task['paper_task']){
  359. if($task['paper_task']==3){
  360. echo '<span class="highlight-err" style="margin-left: 138px">提示:请去确认试卷切割是否正确</span>';
  361. }
  362. }
  363. ?>
  364. <!-- <span class="highlight-err" style="margin-left: 138px">提示:请去确认试卷切割是否正确</span> -->
  365. </div>
  366. <div class="card-item-content">
  367. <?php
  368. if($task['paper_task']){
  369. $status='未发送';
  370. switch ($task['paper_task']){
  371. case 1:
  372. $status='排队中';
  373. break;
  374. case 2:
  375. $status='受理中';
  376. break;
  377. case 3:
  378. $status='已完成';
  379. break;
  380. case 4:
  381. $status='已撤消';
  382. break;
  383. }
  384. echo '<p class="state-details">';
  385. echo '<span class="">状态:'.$status.'</span>';
  386. echo '<span class="">发送时间:'.date('Y-m-d H:i:s',$task['ppt_create_time']).'</span>';
  387. echo '</p>';
  388. echo '<p class="state-details">';
  389. echo '<span>任务耗时:'.$task['PptConsuming'].'</span>';
  390. if(isset($task['user'])){
  391. echo '<span>受理专家:'.$task['user']['real_name'].'</span>';
  392. }else{
  393. echo '<span>受理专家:--</span>';
  394. }
  395. echo '</p>';
  396. }else{
  397. echo '<p class="state-details">';
  398. echo '<span class="">状态:未发送</span>';
  399. echo '<span class="">发送时间:--</span>';
  400. echo '</p>';
  401. echo '<p class="state-details">';
  402. echo '<span>任务耗时:--</span>';
  403. echo '<span>受理专家:--</span>';
  404. echo '</p>';
  405. }
  406. ?>
  407. </div>
  408. </div>
  409. <div class="btn-box">
  410. <?php
  411. if($task['paper_task']){
  412. if($task['paper_task']==4 || $task['paper_task']==3){
  413. echo '<button type="button" class="layui-btn layui-btn-radius layui-btn-primary confirm-up-test-paper">重新发送后台</button>';
  414. }else{
  415. echo '<button type="button" sendType="2" class="layui-btn layui-btn-radius layui-btn-danger recall-form">撤销后台协助</button> ';
  416. }
  417. }else{
  418. echo '<button type="button" class="layui-btn layui-btn-radius layui-btn-primary confirm-up-test-paper">发送后台协助</button>';
  419. }
  420. ?>
  421. </div>
  422. </form>
  423. </div>
  424. </div>
  425. <div class="card">
  426. <div class="card-title">
  427. <p>
  428. <span class="oblique-line">//////</span>
  429. <span class="card-name">答案解析</span>
  430. <span class="oblique-line">//////</span>
  431. <?php
  432. if(isset($task) && $task['parse_task']>0){
  433. if($task['parse_task']==1){
  434. echo ''; //排队中
  435. }elseif($task['parse_task']==2){
  436. echo '<img class="processing-status" src="/images/img-acceptance.png" alt="受理中">';
  437. }elseif($task['parse_task']==3){
  438. echo '<img class="processing-status" src="/images/img-complete.png" alt="已完成">';
  439. }
  440. }
  441. ?>
  442. </p>
  443. </div>
  444. <div class="card-content">
  445. <form>
  446. <div class="card-item">
  447. <div class="card-item-title">
  448. <i class="start-green"></i>
  449. <span class="must">*</span>
  450. <span class="card-item-title-name">答案解析图片</span>
  451. <i class="layui-icon layui-icon-about open-tips" tipstext="请按顺序上传答案解析图片"></i>
  452. <label class="up-data" >
  453. <?php
  454. if(!isset($task['parse_task']) || $task['parse_task']==4 || $task['parse_task']==0){
  455. ?>
  456. <span>点击上传</span>
  457. <input type="file" id="AnswerImg" name="img" accept="image/*"
  458. style="display: none;" />
  459. <?php }?>
  460. </label>
  461. </div>
  462. <div class="card-item-content">
  463. <div class="up-img-look-box" id="AnswerImgImgPreview">
  464. <?php
  465. if(!isset($task['parse_task']) || $task['parse_task']==4 || $task['parse_task']==0){
  466. echo ' <p class="msg1">请上传答案解析图片</p>';
  467. }
  468. if(isset($task['parse_img'])){
  469. $imgArr=explode(',',$task['parse_img']);
  470. foreach ($imgArr as $key => $img){
  471. if(!isset($task['parse_task']) || $task['parse_task']==4 || $task['parse_task']==0){
  472. echo '<span class="img-wrap"><i class="layui-icon layui-icon-close btn-del-img"></i><img src="'.$img.'" ></span>';
  473. }else{
  474. echo '<span class="img-wrap"><img src="'.$img.'" ></span>';
  475. }
  476. }
  477. }
  478. ?>
  479. </div>
  480. </div>
  481. </div>
  482. <div class="card-item">
  483. <div class="card-item-title">
  484. <i class="start-green"></i>
  485. <span class="must">*</span>
  486. <span class="card-item-title-name">试卷结构</span>
  487. <i class="layui-icon layui-icon-about open-tips" tipstext="确认答题卡切割后的试题结构"></i>
  488. </div>
  489. <div class="card-item-content">
  490. <?php
  491. if(isset($tpl_data['items']) && !empty($tpl_data['items'])){
  492. if(isset($tpl_data['items'][1]) && $tpl_data['items'][1]['no']){
  493. echo '<p>单选题:'.implode(',',$tpl_data['items'][1]['no']).'</p>';
  494. }
  495. if(isset($tpl_data['items'][11]) && $tpl_data['items'][11]['no']){
  496. echo '<p>多选题:'.implode(',',$tpl_data['items'][11]['no']).'</p>';
  497. }
  498. if(isset($tpl_data['items'][4]) && $tpl_data['items'][4]['no']){
  499. echo '<p>判断题:'.implode(',',$tpl_data['items'][4]['no']).'</p>';
  500. }
  501. if(isset($tpl_data['items'][5]) && $tpl_data['items'][5]['no']){
  502. echo '<p>填空题:'.implode(',',$tpl_data['items'][5]['no']).'</p>';
  503. }
  504. if(isset($tpl_data['items'][7]) && $tpl_data['items'][7]['no']){
  505. echo '<p>解答题:'.implode(',',$tpl_data['items'][7]['no']).'</p>';
  506. }
  507. if(isset($tpl_data['items'][17]) && $tpl_data['items'][17]['no']){
  508. echo '<p>选做题:'.implode(',',$tpl_data['items'][17]['no']).'</p>';
  509. }
  510. }else{
  511. echo '<p>答题卡设置未完成,无试题结构</p>';
  512. }
  513. ?>
  514. </div>
  515. </div>
  516. <div class="card-item">
  517. <div class="card-item-title">
  518. <i class="start-green"></i>
  519. <span class="card-item-title-name">备注(选填)</span>
  520. <i class="layui-icon layui-icon-about open-tips" tipstext="可选择性填写对当前协助任务的说明"></i>
  521. </div>
  522. <div class="card-item-content">
  523. <textarea name="parse_remark" id="parse_remark" cols="60" rows="4"><?php echo $task['parse_mark']?></textarea>
  524. </div>
  525. </div>
  526. <div class="card-item">
  527. <div class="card-item-title">
  528. <i class="start-green"></i>
  529. <span class="card-item-title-name">动态详情</span>
  530. <i class="layui-icon layui-icon-about open-tips" tipstext="跟踪当前任务的处理进展情况"></i>
  531. <?php
  532. if($task['parse_task']){
  533. if($task['parse_task']==3){
  534. echo '<span class="highlight-err" style="margin-left: 138px">提示:请去确认答案解析切割是否正确</span>';
  535. }
  536. }
  537. ?>
  538. </div>
  539. <div class="card-item-content">
  540. <?php
  541. if($task['parse_task']){
  542. $status='未发送';
  543. switch ($task['parse_task']){
  544. case 1:
  545. $status='排队中';
  546. break;
  547. case 2:
  548. $status='受理中';
  549. break;
  550. case 3:
  551. $status='已完成';
  552. break;
  553. case 4:
  554. $status='已撤消';
  555. break;
  556. }
  557. echo '<p class="state-details">';
  558. echo '<span class="">状态:'.$status.'</span>';
  559. echo '<span class="">发送时间:'.date('Y-m-d H:i:s',$task['pat_create_time']).'</span>';
  560. echo '</p>';
  561. echo '<p class="state-details">';
  562. echo '<span>任务耗时:'.$task['PatConsuming'].'</span>';
  563. if(isset($task['user'])){
  564. echo '<span>受理专家:'.$task['user']['real_name'].'</span>';
  565. }else{
  566. echo '<span>受理专家:--</span>';
  567. }
  568. echo '</p>';
  569. }else{
  570. echo '<p class="state-details">';
  571. echo '<span class="">状态:未发送</span>';
  572. echo '<span class="">发送时间:--</span>';
  573. echo '</p>';
  574. echo '<p class="state-details">';
  575. echo '<span>任务耗时:--</span>';
  576. echo '<span>受理专家:--</span>';
  577. echo '</p>';
  578. }
  579. ?>
  580. </div>
  581. </div>
  582. <div class="btn-box">
  583. <!-- <button type="button" class="layui-btn layui-btn-radius layui-btn-primary confirm-up-analysis">发送后台协助</button> -->
  584. <!-- <button type="button" class="layui-btn layui-btn-radius layui-btn-danger recall-form">撤销后台协助</button>
  585. <button type="button" class="layui-btn layui-btn-radius layui-btn-primary confirm-up-analysis">重新发送后台</button>-->
  586. <?php
  587. if($task['parse_task']){
  588. if($task['parse_task']==4 || $task['parse_task']==3){
  589. echo '<button type="button" class="layui-btn layui-btn-radius layui-btn-primary confirm-up-analysis">重新发送后台</button>';
  590. }else{
  591. echo '<button type="button" sendType="3" class="layui-btn layui-btn-radius layui-btn-danger recall-form">撤销后台协助</button> ';
  592. }
  593. }else{
  594. echo '<button type="button" class="layui-btn layui-btn-radius layui-btn-primary confirm-up-analysis">发送后台协助</button>';
  595. }
  596. ?>
  597. </div>
  598. </form>
  599. </div>
  600. </div>
  601. <?php }?>
  602. </div>
  603. </div>
  604. <div class="dialog-layer dialog-confirm-up-answer-card">
  605. <div class="dialog-title">
  606. <span>发送后台协助-答题卡</span>
  607. <img src="/images/icon-close.svg" alt="" class="btn-colse fr">
  608. </div>
  609. <div class="dialog-main">
  610. <p>亲爱的学管:</p>
  611. <p class="ti">您当前正在发起后台协助任务,发送成功后,该场考试的<span
  612. class="highlight-green">答题卡</span>模板将转交由后台专家处理。受理时间将根据后台总工作量为依据。请保持手机畅通,以便后台工作人员及时联系,谢谢!</p>
  613. <p class="mgt">发送至后台前,请完成以下工作:</p>
  614. <ul>
  615. <li>
  616. <span class="number-box">
  617. <i class="start-green"></i>
  618. <span class="number">1</span>
  619. </span>
  620. <span>请确认答题卡空白模板的图片是否正确且完整!</span>
  621. </li>
  622. <li>
  623. <span class="number-box">
  624. <i class="start-green"></i>
  625. <span class="number">2</span>
  626. </span>
  627. <span>请确认试卷附件中,能体现<span class="highlight-green">题型信息(单选/多选/填空/解答/选做等)、分值信息、选项答案!</span></span>
  628. </li>
  629. <li>
  630. <span class="number-box">
  631. <i class="start-green"></i>
  632. <span class="number">3</span>
  633. </span>
  634. <span>请确认考号您需要的考号类型是否正确</span>
  635. </li>
  636. </ul>
  637. <p class="highlight-err mgt"><i
  638. class="layui-icon layui-icon-tips"></i>注:后台处理完成后,请您务必检查确认,任何由后台模板制作造成的不良后果,请自行承担!</p>
  639. </div>
  640. <div class="dialog-btn-box">
  641. <span class="btn-save up-form send_answer_card">发送</span>
  642. <span class="btn-colse">取消</span>
  643. </div>
  644. </div>
  645. <div class="dialog-layer dialog-confirm-up-test-paper">
  646. <div class="dialog-title">
  647. <span>发送后台协助-试卷</span>
  648. <img src="/images/icon-close.svg" alt="" class="btn-colse fr">
  649. </div>
  650. <div class="dialog-main">
  651. <p>亲爱的学管:</p>
  652. <p class="ti">您当前正在发起后台协助任务,发送成功后,该场考试的<span
  653. class="highlight-green">试卷</span>将转交由后台专家处理。受理时间将根据后台总工作量为依据。请保持手机畅通,以便后台工作人员及时联系,谢谢!</p>
  654. <p class="mgt">发送至后台前,请完成以下工作:</p>
  655. <ul>
  656. <li>
  657. <span class="number-box">
  658. <i class="start-green"></i>
  659. <span class="number">1</span>
  660. </span>
  661. <span>请确认试卷的图片是否正确且完整!</span>
  662. </li>
  663. <li>
  664. <span class="number-box">
  665. <i class="start-green"></i>
  666. <span class="number">2</span>
  667. </span>
  668. <span>请确保对应的答题卡中,试卷结构(题型、题号、分值、选项答案等)设置无误!</span></span>
  669. </li>
  670. </ul>
  671. <p class="highlight-err mgt"><i
  672. class="layui-icon layui-icon-tips"></i>注:后台处理完成后,请您务必检查确认,任何由后台模板制作造成的不良后果,请自行承担!</p>
  673. </div>
  674. <div class="dialog-btn-box">
  675. <span class="btn-save up-form send_paper">发送</span>
  676. <span class="btn-colse">取消</span>
  677. </div>
  678. </div>
  679. <div class="dialog-layer dialog-confirm-up-analysis">
  680. <div class="dialog-title">
  681. <span>发送后台协助-答案解析</span>
  682. <img src="/images/icon-close.svg" alt="" class="btn-colse fr">
  683. </div>
  684. <div class="dialog-main">
  685. <p>亲爱的学管:</p>
  686. <p class="ti">您当前正在发起后台协助任务,发送成功后,该场考试的<span
  687. class="highlight-green">答案解析</span>将转交由后台专家处理。受理时间将根据后台总工作量为依据。请保持手机畅通,以便后台工作人员及时联系,谢谢!</p>
  688. <p class="mgt">发送至后台前,请完成以下工作:</p>
  689. <ul>
  690. <li>
  691. <span class="number-box">
  692. <i class="start-green"></i>
  693. <span class="number">1</span>
  694. </span>
  695. <span>请确认答案解析的图片是否正确且完整!</span>
  696. </li>
  697. <li>
  698. <span class="number-box">
  699. <i class="start-green"></i>
  700. <span class="number">2</span>
  701. </span>
  702. <span>请确保对应的答题卡中,试卷结构(题型、题号、分值、选项答案等)设置无误!</span></span>
  703. </li>
  704. </ul>
  705. <p class="highlight-err mgt"><i
  706. class="layui-icon layui-icon-tips"></i>注:后台处理完成后,请您务必检查确认,任何由后台模板制作造成的不良后果,请自行承担!</p>
  707. </div>
  708. <div class="dialog-btn-box">
  709. <span class="btn-save up-form send_parse">发送</span>
  710. <span class="btn-colse">取消</span>
  711. </div>
  712. </div>
  713. </div>
  714. <script src="/js/layui/layui.js"></script>
  715. <script>
  716. $(document).ready(function () {
  717. var _card = '';
  718. //是否已完成答题卡模板设置
  719. var isAnswerCard = '<?php echo $isAnswerCard?>';
  720. //按需加载layui模块、layui事件监听开始
  721. layui.use(['layer'], function () {
  722. var layer = layui.layer;
  723. //弹出确认上传答题卡
  724. $(".confirm-up-answer-card").on("click", function () {
  725. _card = this;
  726. layer.open({
  727. title: false,
  728. closeBtn: 0,
  729. type: 1,
  730. area: ['860px', '436px'],
  731. content: $(".dialog-confirm-up-answer-card")
  732. });
  733. });
  734. //弹出确认上传试卷
  735. $(".confirm-up-test-paper").on("click", function () {
  736. _card = this;
  737. if(isAnswerCard==='0'){
  738. layer.alert(' 在发送 试卷/答案解析 的后台协助任务前,请先完成答题卡模板设置,或提交给后台协助设置!')
  739. }else{
  740. layer.open({
  741. title: false,
  742. closeBtn: 0,
  743. type: 1,
  744. area: ['860px', '436px'],
  745. content: $(".dialog-confirm-up-test-paper")
  746. });
  747. }
  748. });
  749. //弹出确认上传答案解析
  750. $(".confirm-up-analysis").on("click", function () {
  751. _card = this;
  752. if(isAnswerCard==='0'){
  753. layer.alert(' 在发送 试卷/答案解析 的后台协助任务前,请先完成答题卡模板设置,或提交给后台协助设置!')
  754. }else{
  755. layer.open({
  756. title: false,
  757. closeBtn: 0,
  758. type: 1,
  759. area: ['860px', '436px'],
  760. content: $(".dialog-confirm-up-analysis")
  761. });
  762. }
  763. });
  764. });
  765. //layui事件监听结束
  766. //发送答题卡任务确认
  767. $('.send_answer_card').click(function(){
  768. var imgArr = [];
  769. $('#imgPreview img').each(function () {
  770. imgArr.push($(this).attr('src'));
  771. });
  772. if (imgArr.length <= 0) {
  773. layer.msg('请上传答题卡图片');
  774. return false;
  775. }
  776. var paperDoc=$('input[name=paperDoc]').val(),
  777. paperTitle=$('input[name=paperDocTitle]').val(),
  778. answer_card_remark=$('#answer_card_remark').val(),
  779. card_type=0;
  780. $('input[name="testNumberType"]:checked').each(function(){
  781. card_type+=parseInt($(this).val());
  782. });
  783. if(card_type==0){
  784. layer.msg('请选择考号类型');
  785. return false;
  786. }
  787. if(paperDoc==''){
  788. layer.msg('请上传试卷文件');
  789. return false;
  790. }
  791. if(answer_card_remark.length>100){
  792. layer.msg('备注内容不能超过100字');
  793. return false;
  794. }
  795. var examGroupId=$('input[name=exam_group_id]').val();
  796. //console.log(imgArr);
  797. $.ajax({
  798. url:'<?php echo $this->createUrl('third/SendTask')?>',
  799. type:'POST',
  800. dataType:'json',
  801. data:{imgArr:imgArr,paperDoc:paperDoc,paperDocTitle:paperTitle,cardType:card_type,answerCardRemark:answer_card_remark,examGroupId:examGroupId,sendType:1},
  802. success:function(res){
  803. if(res.success==1){
  804. layer.msg('发送成功');
  805. layer.closeAll();
  806. window.location.reload()
  807. }else{
  808. if(res.message!=undefined){
  809. layer.msg(res.message);
  810. }else{
  811. layer.msg('发送失败');
  812. }
  813. }
  814. }
  815. });
  816. });
  817. //发送试卷任务确认
  818. $('.send_paper').click(function(){
  819. var imgArr = [];
  820. $('#testImgImgPreview img').each(function () {
  821. imgArr.push($(this).attr('src'));
  822. });
  823. if (imgArr.length <= 0) {
  824. layer.msg('请上传试卷图片');
  825. return false;
  826. }
  827. var paper_remarks=$('#paper_remark').val();
  828. var examGroupId=$('input[name=exam_group_id]').val();
  829. //console.log(imgArr);
  830. if(paper_remarks.length>100){
  831. layer.msg('备注内容不能超过100字');
  832. return false;
  833. }
  834. $.ajax({
  835. url:'<?php echo $this->createUrl('third/SendTask')?>',
  836. type:'POST',
  837. dataType:'json',
  838. data:{imgArr:imgArr,paperRemark:paper_remarks,examGroupId:examGroupId,sendType:2},
  839. success:function(res){
  840. if(res.success==1){
  841. layer.msg('发送成功');
  842. layer.closeAll();
  843. window.location.reload()
  844. }else{
  845. if(res.message!=undefined){
  846. layer.msg(res.message);
  847. }else{
  848. layer.msg('发送失败');
  849. }
  850. }
  851. }
  852. });
  853. });
  854. //发送答案解析任务确认
  855. $('.send_parse').click(function(){
  856. var imgArr = [];
  857. $('#AnswerImgImgPreview img').each(function () {
  858. imgArr.push($(this).attr('src'));
  859. });
  860. if (imgArr.length <= 0) {
  861. layer.msg('请上传答案解析图片');
  862. return false;
  863. }
  864. var parse_remarks=$('#parse_remark').val();
  865. var examGroupId=$('input[name=exam_group_id]').val();
  866. //console.log(imgArr);
  867. if(parse_remarks.length>100){
  868. layer.msg('备注内容不能超过100字');
  869. return false;
  870. }
  871. $.ajax({
  872. url:'<?php echo $this->createUrl('third/SendTask')?>',
  873. type:'POST',
  874. dataType:'json',
  875. data:{imgArr:imgArr,parseRemark:parse_remarks,examGroupId:examGroupId,sendType:3},
  876. success:function(res){
  877. if(res.success==1){
  878. layer.msg('发送成功');
  879. layer.closeAll();
  880. window.location.reload()
  881. }else{
  882. if(res.message!=undefined){
  883. layer.msg(res.message);
  884. }else{
  885. layer.msg('发送失败');
  886. }
  887. }
  888. }
  889. });
  890. });
  891. // tips
  892. $(".open-tips").on("mouseenter", function () {
  893. var tips_text = $(this).attr("tipstext");
  894. layer.tips(tips_text, this, {
  895. tips: [1, '#14AE68'] //还可配置颜色
  896. });
  897. });
  898. //关闭弹窗
  899. $(".btn-colse").on("click", function () {
  900. // layer.close(layer.index);
  901. layer.closeAll();
  902. });
  903. //上传图片-答题卡
  904. $("#fileImg").on("change", function () {
  905. var file = this.files[0];
  906. var imgArr = [];
  907. $('#imgPreview img').each(function () {
  908. imgArr.push($(this).attr('src'));
  909. });
  910. //提交图片
  911. layer.msg('正在上传,请稍侯......',{time:0})
  912. var formData = new FormData();
  913. filedata= document.getElementById("fileImg").files[0];
  914. formData.append("paperFile",filedata);
  915. $.ajax({
  916. url:'<?php echo $this->createUrl('third/upload')?>',
  917. type:'POST',
  918. dataType:'json',
  919. contentType: false,
  920. processData: false,
  921. data:formData,
  922. success:function(res){
  923. if(res.success==1){
  924. layer.msg('上传成功')
  925. $("#imgPreview>.msg").text('');
  926. $("#imgPreview").append('<span class="img-wrap"><i class="layui-icon layui-icon-close btn-del-img"></i><img src="' + res.src + '" id="a_'+(imgArr.length+1)+'" alt=""></span>');
  927. }else{
  928. layer.msg('上传失败');
  929. }
  930. }
  931. });
  932. return false;
  933. });
  934. //上传试卷
  935. $("#fileDoc").on("change", function () {
  936. var file = this.files[0];
  937. $('#docName').text(file.name);
  938. //提交图片
  939. //提交图片
  940. layer.msg('正在上传,请稍侯......',{time:0})
  941. var formData = new FormData();
  942. filedata= document.getElementById("fileDoc").files[0];
  943. formData.append("paperFile",filedata);
  944. disabled();
  945. $.ajax({
  946. url:'<?php echo $this->createUrl('third/upload')?>',
  947. type:'POST',
  948. dataType:'json',
  949. contentType: false,
  950. processData: false,
  951. data:formData,
  952. success:function(res){
  953. if(res.success==1){
  954. layer.msg('上传成功')
  955. $('input[name=paperDoc]').val(res.src);
  956. $('input[name=paperDocTitle]').val(res.name);
  957. $('.paperFileLink').html('<a href="'+res.src+'">试卷:'+res.name+'</a>');
  958. }else{
  959. layer.msg('上传失败');
  960. }
  961. }
  962. });
  963. return false;
  964. });
  965. //上传图片-答题卡
  966. $("#testImg").on("change", function () {
  967. var imgArr = [];
  968. $('#testImgImgPreview img').each(function () {
  969. imgArr.push($(this).attr('src'));
  970. });
  971. layer.msg('正在上传,请稍侯......',{time:0})
  972. var formData = new FormData();
  973. filedata= document.getElementById("testImg").files[0];
  974. formData.append("paperFile",filedata);
  975. disabled();
  976. $.ajax({
  977. url:'<?php echo $this->createUrl('third/upload')?>',
  978. type:'POST',
  979. dataType:'json',
  980. contentType: false,
  981. processData: false,
  982. data:formData,
  983. success:function(res){
  984. if(res.success==1){
  985. layer.msg('上传成功')
  986. $("#testImgImgPreview").append('<span class="img-wrap"><i class="layui-icon layui-icon-close btn-del-img"></i><img src="' + res.src + '" id="b_'+(imgArr.length+1)+'" alt=""></span>');
  987. }else{
  988. layer.msg('上传失败');
  989. }
  990. }
  991. });
  992. // console.log(file);
  993. return false;
  994. });
  995. //上传图片-答案解析
  996. $("#AnswerImg").on("change", function () {
  997. var imgArr = [];
  998. $('#AnswerImgImgPreview img').each(function () {
  999. imgArr.push($(this).attr('src'));
  1000. });
  1001. layer.msg('正在上传,请稍侯......',{time:0});
  1002. var formData = new FormData();
  1003. filedata= document.getElementById("AnswerImg").files[0];
  1004. formData.append("paperFile",filedata);
  1005. disabled();
  1006. $.ajax({
  1007. url:'<?php echo $this->createUrl('third/upload')?>',
  1008. type:'POST',
  1009. dataType:'json',
  1010. contentType: false,
  1011. processData: false,
  1012. data:formData,
  1013. success:function(res){
  1014. if(res.success==1){
  1015. layer.msg('上传成功')
  1016. $("#AnswerImgImgPreview").append('<span class="img-wrap"><i class="layui-icon layui-icon-close btn-del-img"></i><img src="' + res.src + '" id="a_'+(imgArr.length+1)+'" alt=""></span>');
  1017. }else{
  1018. layer.msg('上传失败');
  1019. }
  1020. }
  1021. });
  1022. // console.log(file);
  1023. return false;
  1024. });
  1025. // 撤回协助
  1026. $('.recall-form').on('click', function () {
  1027. //console.log('撤回协助');
  1028. var examGroupId=$('input[name=exam_group_id]').val(),
  1029. sendType=$(this).attr('sendType');
  1030. $(this).prop('disabled', true);
  1031. $.ajax({
  1032. url:'<?php echo $this->createUrl('third/undo')?>',
  1033. type:'POST',
  1034. dataType:'json',
  1035. data:{examGroupId:examGroupId,sendType:sendType},
  1036. success:function(res){
  1037. if(res.success==1){
  1038. layer.msg('撤消成功');
  1039. window.location.reload();
  1040. }else{
  1041. if(res.message!=undefined){
  1042. layer.msg(res.message);
  1043. }else{
  1044. layer.msg('撤消失败');
  1045. }
  1046. }
  1047. }
  1048. });
  1049. });
  1050. function disabled(){
  1051. $(_card).parents('.card').find('.up-data').hide();
  1052. $(_card).parents('.card').find('input[name="testNumberType"]').prop('disabled', true);
  1053. $(_card).parents('.card').find('textarea[name="remarks"]').prop('disabled', true);
  1054. }
  1055. $('body').on('click','.btn-del-img',function(){
  1056. $(this).parents('.card-item').find('input[name="img"]').val('');
  1057. $(this).parents('.img-wrap').remove();
  1058. })
  1059. $('.mission-details')
  1060. .on('click','.delImg',function(){
  1061. id=$(this).attr('rel');
  1062. console.log(id);
  1063. $('#'+id).remove();
  1064. $(this).remove();
  1065. })
  1066. });
  1067. </script>