paperDetail.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. <!DOCTYPE html>
  2. <html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
  4. layout:decorator="base" xmlns:overflow="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <link rel="stylesheet" href="/static/css/applications.css" type="text/css"/>
  7. <!-- dataTables -->
  8. <link rel="stylesheet" type="text/css"
  9. href="/static/AdminLTE/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css"/>
  10. <!-- Font Awesome -->
  11. <link rel="stylesheet" href="/static/AdminLTE/bower_components/font-awesome/css/font-awesome.min.css"/>
  12. <!-- Ionicons -->
  13. <link rel="stylesheet" href="/static/AdminLTE/bower_components/Ionicons/css/ionicons.min.css"/>
  14. <!-- daterange picker -->
  15. <link rel="stylesheet" href="/static/AdminLTE/bower_components/bootstrap-daterangepicker/daterangepicker.css"/>
  16. <!-- bootstrap datepicker -->
  17. <link rel="stylesheet" href="/static/AdminLTE/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css"/>
  18. <!-- iCheck for checkboxes and radio inputs -->
  19. <link rel="stylesheet" href="/static/AdminLTE/plugins/iCheck/all.css"/>
  20. <!-- Bootstrap time Picker -->
  21. <link rel="stylesheet" href="/static/AdminLTE/plugins/timepicker/bootstrap-timepicker.min.css"/>
  22. <!-- Select2 -->
  23. <link rel="stylesheet" type="text/css" href="/static/AdminLTE/bower_components/select2/dist/css/select2.min.css"/>
  24. <!-- Theme style -->
  25. <link rel="stylesheet" href="/static/AdminLTE/dist/css/AdminLTE.min.css"/>
  26. <!-- AdminLTE Skins. Choose a skin from the css/skins
  27. folder instead of downloading all of them to reduce the load. -->
  28. <link rel="stylesheet" href="/static/AdminLTE/dist/css/skins/_all-skins.min.css"/>
  29. <style>
  30. body {
  31. padding-right: 0px !important;
  32. }
  33. *.modal-open {
  34. overflow-y: scroll;
  35. padding-right: 0 !important;
  36. }
  37. .content {
  38. padding-left: 45px;
  39. padding-right: 45px;
  40. }
  41. .box {
  42. margin-bottom: 50px;
  43. }
  44. .box-header button{
  45. margin-right: 5px;
  46. }
  47. .table tr td {
  48. padding-right: 10px;
  49. padding-left: 10px;
  50. border-top: 1px solid #f4f4f4;
  51. border-right: 1px solid #f4f4f4;
  52. }
  53. td .form-group {
  54. margin-bottom: 0px;
  55. }
  56. .callout-my {
  57. background: #a7eeff9c;
  58. border-left: 5px solid #0097bc;
  59. }
  60. .callout-my p{
  61. word-break: break-all;
  62. }
  63. .show-report-left{
  64. color: #2875b7;
  65. }
  66. </style>
  67. </head>
  68. <body>
  69. <div layout:fragment="mainbody">
  70. <aside class="main-sidebar">
  71. <section class="sidebar">
  72. <div class="user-panel">
  73. <div class="pull-left image">
  74. <img src="/static/images/avatar/avatar-admin.jpg" class="img-circle" alt="User Image" />
  75. </div>
  76. <div class="pull-left info">
  77. <p>Admin</p>
  78. <a href="#">
  79. <i class="fa fa-circle text-success"></i>
  80. Online
  81. </a>
  82. </div>
  83. </div>
  84. <!-- Search form -->
  85. <form action="#" method="get" class="sidebar-form">
  86. <div class="input-group">
  87. <input type="text" name="q" class="form-control" placeholder="Search..." />
  88. <span class="input-group-btn">
  89. <button type="submit" name="search" id="search-btn" class="btn btn-flat">
  90. <i class="fa fa-search"></i>
  91. </button>
  92. </span>
  93. </div>
  94. </form>
  95. <!-- Sidebar Menu -->
  96. <ul class="sidebar-menu tree" data-widget="tree">
  97. <li>
  98. <a href="/addPaper">
  99. <i class="glyphicon glyphicon-pencil"></i>
  100. <span>
  101. 新建试卷
  102. </span>
  103. </a>
  104. </li>
  105. <li>
  106. <a href="/papers">
  107. <i class="glyphicon glyphicon-tasks"></i>
  108. <span>
  109. 试卷列表
  110. </span>
  111. </a>
  112. </li>
  113. <li>
  114. <a href="/review/jobs">
  115. <i class="glyphicon glyphicon-tasks"></i>
  116. <span>
  117. JOB列表
  118. </span>
  119. </a>
  120. </li>
  121. </ul>
  122. </section>
  123. </aside>
  124. <div class="content-wrapper">
  125. <!-- Content Header (Page header) -->
  126. <section class="content-header">
  127. <h1>
  128. 查看众包审核试卷
  129. <small>众包审核</small>
  130. </h1>
  131. <ol class="breadcrumb">
  132. <li><a href="/home"><i class="fa fa-dashboard"></i> 主页</a></li>
  133. <li><a href="#">查看众包审核试卷</a></li>
  134. </ol>
  135. </section>
  136. <!-- Main content -->
  137. <section class="content" id="maincontent">
  138. <div id="leftPanel" class="col-md-10">
  139. <div class="box box-primary" >
  140. <div class="box-header with-border">
  141. <h3 class="box-title">基本信息</h3>
  142. <button onclick="deletePaper()" class="btn btn-danger pull-right" >
  143. 删除
  144. </button>
  145. <button onclick="changePaper()" class="btn btn-success pull-right" >
  146. 修改
  147. </button>
  148. <button onclick="addJobByThis()" class="btn btn-info pull-right">
  149. 使用该试卷出题
  150. </button>
  151. <button onclick="showyu()" class="btn btn-default pull-right" >
  152. 预览
  153. </button>
  154. </div>
  155. <!-- /.box-header -->
  156. <div class="box-body">
  157. <form class="form-horizontal">
  158. <!-- text input -->
  159. <div class="form-group">
  160. <label class="col-sm-2 control-label">名称</label>
  161. <div class="col-sm-10">
  162. <div th:text="${data.get('name')}" class="form-control"/>
  163. </div>
  164. </div>
  165. <!-- textarea -->
  166. <div class="form-group">
  167. <label class="col-sm-2 control-label">描述</label>
  168. <div class="col-sm-10">
  169. <div th:if="${!data.get('description').toString().equals('')}" class="control-label" style="text-align: left" th:text="${data.get('description')}" ></div>
  170. <div th:if="${data.get('description').toString().equals('')}" class="control-label" style="text-align: left" > 没有具体描述 </div>
  171. </div>
  172. </div>
  173. <!-- Date and time range -->
  174. <div class="form-group">
  175. <label class="col-sm-2 control-label" >创建时间</label>
  176. <div class=" col-sm-10">
  177. <!-- <div class="input-group-addon">-->
  178. <!-- <i class="fa fa-clock-o"></i>-->
  179. <!-- </div>-->
  180. <div disabled="disabled" id="createTime" type="text" th:text="${data.get('create_time')}" class="form-control pull-right" />
  181. </div>
  182. <!-- /.input group -->
  183. </div>
  184. <!-- select -->
  185. <div class="form-group">
  186. <label class="col-sm-2 control-label" >测试类型</label>
  187. <div class=" col-sm-10">
  188. <div class="form-control" id="testType" th:text="${data.get('type')}" >
  189. </div>
  190. </div>
  191. </div>
  192. <div class="form-group">
  193. <label class="col-sm-2 control-label">附件(可选)</label>
  194. <div class="col-sm-10">
  195. <a th:href="@{${data.get('application_url')}}" class="col-sm-2 " >下载附件</a>
  196. </div>
  197. </div>
  198. <div class="form-group">
  199. <label class="col-sm-2 control-label">测试需求</label>
  200. <div class="col-sm-10">
  201. <a th:href="@{${data.get('requirement_url')}}" class="col-sm-2 " >下载测试需求</a>
  202. </div>
  203. </div>
  204. <!-- text input -->
  205. <!-- <div class="form-group">-->
  206. <!-- <label class="col-sm-2 control-label">报告总数</label>-->
  207. <!-- <div class="col-sm-10">-->
  208. <!-- <input id="reportNum" th:value="${data.get('report_num')}" onchange="checkNum(event)" type="text" class="form-control" placeholder="请输入报告总数"/>-->
  209. <!-- </div>-->
  210. <!-- </div>-->
  211. <!-- textarea -->
  212. <div class="form-group">
  213. <label class="col-sm-2 control-label">报告信息</label>
  214. <div class="col-sm-10">
  215. <div class="nav-tabs-custom" style="cursor: move;">
  216. <!-- Tabs within a box -->
  217. <ul class="nav nav-tabs pull-right ui-sortable-handle">
  218. <li class="active">
  219. <a href="#showReport" data-toggle="tab" aria-expanded="true">视图</a>
  220. </li>
  221. <li class="">
  222. <a href="#editReport" data-toggle="tab" aria-expanded="false">查看</a>
  223. </li>
  224. <li class="pull-left header">
  225. <i class="fa fa-inbox">
  226. </i> 报告信息
  227. </li>
  228. </ul>
  229. <div class="tab-content no-padding">
  230. <!-- Morris chart - Sales -->
  231. <div class="chart tab-pane active" id="showReport" style="position: relative; height: 300px;
  232. -webkit-tap-highlight-color: rgba(0, 0, 0, 0); overflow:auto; " >
  233. </div>
  234. <div class="chart tab-pane" id="editReport" style="position: relative; height: 300px;">
  235. <textarea disabled="disabled" class="form-control" th:text="${data.get('report_list')}" id="reportInfo" onchange="checkNull(event)" rows="15" placeholder="请输入json格式的报告信息">
  236. </textarea>
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. <!-- textarea -->
  243. </form>
  244. </div>
  245. </div>
  246. <!-- Horizontal Form -->
  247. <!-- Horizontal Form -->
  248. <div class="box box-info rule" th:id="'rule'+${ruleStat.index}" th:each="rule,ruleStat : ${data.get('item_group_list')}">
  249. <div class="box-header with-border">
  250. <h3 class="box-title" th:text="'定制审查选项'+${ruleStat.index+1}"></h3>
  251. </div>
  252. <!-- /.box-header -->
  253. <!-- form start -->
  254. <div class="form-horizontal" >
  255. <div class="box-body">
  256. <div class="form-group">
  257. <label class="col-sm-2 control-label">适用报告列表</label>
  258. <div class="col-sm-10">
  259. <input th:onchange="'test(this,'+${ruleStat.index}+')'" th:value="${rule.get('origin_report_list')}" class="form-control" th:id="'fitlist'+${ruleStat.index}" placeholder="请输入编号并用;分割,可用~输入连续的试题名称" />
  260. </div>
  261. <label class="col-sm-2 control-label">已选报告列表</label>
  262. <div class="col-sm-10" th:id="'namelist'+${ruleStat.index}">
  263. <span th:each="i : ${rule.get('report_list')}" class="badge bg-green" th:text="${i}"></span>
  264. </div>
  265. </div>
  266. <div class="form-group">
  267. <label class="col-sm-2 control-label">审查项</label>
  268. <div class="col-sm-10 ">
  269. <table class="table" th:id="'table'+${ruleStat.index}">
  270. <tbody>
  271. <!-- <tr>-->
  272. <!-- <td>-->
  273. <!-- 示例-->
  274. <!-- </td>-->
  275. <!-- </tr>-->
  276. <th:block th:each="item : ${rule.get('item_list')}">
  277. <tr th:if="${item.get('type')=='File'}" type="file">
  278. <td>
  279. <div class="form-group">
  280. <label class="col-sm-3 control-label" th:text="${item.get('description')}"></label>
  281. <div class="col-sm-9">
  282. <input type="file"/>
  283. </div>
  284. </div>
  285. </td>
  286. </tr>
  287. <tr th:if="${item.get('type')=='Description'}" type="text">
  288. <td><div class="form-group">
  289. <label class="col-sm-3 control-label" th:text="${item.get('description')}"></label>
  290. <div class="col-sm-9">
  291. <input type="text" class="form-control" placeholder="请输入"/>
  292. </div>
  293. </div>
  294. </td>
  295. </tr>
  296. <tr th:if="${item.get('type')=='Single'}" type="ratio">
  297. <td>
  298. <div class="form-group">
  299. <label class="col-sm-3 control-label" th:text="${item.get('description')}">asd</label>
  300. <div class="col-sm-9">
  301. <div class="radio" th:each="da : ${item.get('options')}" >
  302. <label >
  303. <input type="radio" name="optionsRadios4" value="asd"/>
  304. <th:block th:text="${da}"> </th:block>
  305. </label>
  306. </div>
  307. </div>
  308. </div>
  309. </td>
  310. </tr>
  311. <tr th:if="${item.get('originType')=='multiple'}" type="check">
  312. <td>
  313. <div class="form-group">
  314. <label class="col-sm-3 control-label" th:text="${item.get('description')}"></label>
  315. <div class="col-sm-9">
  316. <div class="checkbox" th:each="da:${item.get('options')}">
  317. <label >
  318. <input type="checkbox"/>
  319. <th:block th:text="${da}"> </th:block>
  320. </label>
  321. </div>
  322. </div>
  323. </div>
  324. </td>
  325. </tr>
  326. <tr th:if="${item.get('originType')=='singleCheck'}" type="singleCheck">
  327. <td><div class="form-group">
  328. <label class="col-sm-3 control-label" th:text="${item.get('description')}"></label>
  329. <div class="col-sm-9">
  330. <div class="checkbox">
  331. <label>
  332. <input type="checkbox"/>
  333. <th:block th:text="${item.get('originData')}"></th:block>
  334. </label>
  335. </div>
  336. </div>
  337. </div>
  338. </td>
  339. </tr>
  340. </th:block>
  341. </tbody>
  342. </table>
  343. </div>
  344. </div>
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. <div id="rightPanel" class="col-md-2">
  350. <div class="box box-primary">
  351. <div class="box-header with-border">
  352. <h3 class="box-title">相关任务</h3>
  353. <div class="box-tools pull-right">
  354. <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
  355. </button>
  356. </div>
  357. </div>
  358. <!-- /.box-header -->
  359. <div class="box-body" style="">
  360. <ul class="products-list product-list-in-box">
  361. <li class="item" th:each="job:${jobs}">
  362. <div class=" ">
  363. <a th:href="@{'/review/jobDetail?id='+${job.get('id')}}" target="_blank" class="control-label" style="text-align: left" th:text="${job.get('name')}" ></a>
  364. <span class="product-description " th:text="${#dates.format(job.get('create_time'),'yyyy-MM-dd')} " ></span>
  365. <span class="product-description" th:text="${job.get('description')}">
  366. </span>
  367. </div>
  368. </li>
  369. <!-- /.item -->
  370. </ul>
  371. </div>
  372. </div>
  373. </div>
  374. <div style="clear:both"></div>
  375. </section>
  376. </div>
  377. <div class="modal fade" id="modal-default">
  378. <div class="modal-dialog">
  379. <div class="modal-content">
  380. <div class="modal-header">
  381. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  382. <span aria-hidden="true">&times;</span></button>
  383. <h4 class="modal-title">预览</h4>
  384. </div>
  385. <div class="modal-body" id="modalBody">
  386. <form class="form-horizontal" id="formBody">
  387. </form>
  388. </div>
  389. <div class="modal-footer">
  390. <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
  391. <!-- <button type="button" class="btn btn-primary"></button>-->
  392. </div>
  393. </div>
  394. <!-- /.modal-content -->
  395. </div>
  396. <!-- /.modal-dialog -->
  397. </div>
  398. <!-- /.modal -->
  399. <div class="modal fade" id="modal-alert">
  400. <div class="modal-dialog">
  401. <div class="modal-content">
  402. <div class="modal-header">
  403. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  404. <span aria-hidden="true">&times;</span></button>
  405. <h4 class="modal-title">预览</h4>
  406. </div>
  407. <div class="modal-body" id="modalAlertBody">
  408. <form class="form-horizontal" id="formAlertBody">
  409. </form>
  410. </div>
  411. <div class="modal-footer">
  412. <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
  413. <!-- <button type="button" class="btn btn-primary"></button>-->
  414. </div>
  415. </div>
  416. <!-- /.modal-content -->
  417. </div>
  418. <!-- /.modal-dialog -->
  419. </div>
  420. <!-- /.modal -->
  421. </div>
  422. </body>
  423. </html>
  424. <!-- jQuery 3 -->
  425. <!--<script src="/static/AdminLTE/bower_components/jquery/dist/jquery.min.js"></script>-->
  426. <!-- Bootstrap 3.3.7 -->
  427. <script src="/static/AdminLTE/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
  428. <script src="/static/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
  429. <script src="/static/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
  430. <script src="/static/AdminLTE/bower_components/select2/dist/js/select2.min.js"></script>
  431. <!-- InputMask -->
  432. <script src="/static/AdminLTE/plugins/input-mask/jquery.inputmask.js"></script>
  433. <script src="/static/AdminLTE/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
  434. <script src="/static/AdminLTE/plugins/input-mask/jquery.inputmask.extensions.js"></script>
  435. <!-- date-range-picker -->
  436. <script src="/static/AdminLTE/bower_components/moment/min/moment.min.js"></script>
  437. <script src="/static/AdminLTE/bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
  438. <!-- bootstrap datepicker -->
  439. <script src="/static/AdminLTE/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
  440. <!-- bootstrap time picker -->
  441. <script src="/static/AdminLTE/plugins/timepicker/bootstrap-timepicker.min.js"></script>
  442. <!-- SlimScroll -->
  443. <script src="/static/AdminLTE/bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
  444. <!-- iCheck 1.0.1 -->
  445. <script src="/static/AdminLTE/plugins/iCheck/icheck.min.js"></script>
  446. <!-- FastClick -->
  447. <script src="/static/AdminLTE/bower_components/fastclick/lib/fastclick.js"></script>
  448. <!-- AdminLTE App -->
  449. <!--<script src="/static/AdminLTE/dist/js/adminlte.min.js"></script>-->
  450. <!-- AdminLTE for demo purposes -->
  451. <script src="/static/AdminLTE/dist/js/demo.js"></script>
  452. <!-- change Paper js -->
  453. <script src="/static/js/changePaper.js"></script>
  454. <script src="/static/AdminLTE/bower_components/bootstrap-notify/dist/bootstrap-notify.min.js"></script>
  455. <!--阿里 oss 上传-->
  456. <script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"></script>
  457. <script type="text/javascript" xmlns:th="http://www.thymeleaf.org" th:inline="javascript">
  458. var ruleId ;
  459. var ratioIndex;
  460. /*<![CDATA[*/
  461. var urlParams = new URLSearchParams(window.location.search);
  462. var paperId = urlParams.get('id');
  463. var id = [[${data.get('paperId')}]];
  464. var reportHost = [[${reportHost}]]
  465. // ruleId = [[${ruleLength}]]
  466. var client = new OSS.Wrapper({
  467. region : 'oss-cn-shanghai',
  468. accessKeyId : 'IvS323TIcWUT57MG',
  469. accessKeySecret : 'dYml7rvT8stQkoSjMYlfRTxNj9dEsI',
  470. bucket : 'mooctest-site'
  471. });
  472. /*]]>*/
  473. $(document).ready(function(){
  474. $('[data-toggle="tooltip"]').tooltip();
  475. $('#reportInfo').val(getCleanStr($('#reportInfo').val()));
  476. setShowRule($('#reportInfo').val());
  477. //Initialize Select2 Elements
  478. $('.select2').select2()
  479. ratioIndex =0 ;
  480. // $('#testType').val(type)
  481. $('#testType').val($('#testType').attr('value'))
  482. //Date range picker with time picker
  483. // $('#reservationtime').daterangepicker({ timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A' })
  484. $('#reservationtime').daterangepicker({ timePicker: true, timePickerIncrement: 30, locale: { format: 'MM/DD/YYYY hh:mm A' }})
  485. var taskListTable = $('#task-list').DataTable({
  486. searching: true,
  487. pageLength: 25
  488. });
  489. });
  490. showYulan = function ( ) {
  491. window.open('http://'+reportHost+'/report/review/paper/'+ id);
  492. }
  493. changePaper = function ( ) {
  494. window.location.href = '/changePaper?id='+id;
  495. }
  496. delPaper = function ( ) {
  497. $.ajax({
  498. url: '/dpaper?id='+id,
  499. // data:{
  500. // 'id':id
  501. // },
  502. type: 'DELETE',
  503. success: function (result) {
  504. console.log(result);
  505. // var obj = eval('(' + result + ')');
  506. // element.parentNode.parentNode.remove();
  507. // success
  508. window.location.href = "/papers"
  509. }
  510. });
  511. }
  512. getCleanStr = function (str) {
  513. var obj = eval('(' + str + ')');
  514. var formattedStr = JSON.stringify(obj, null, 2);
  515. return formattedStr;
  516. };
  517. addJobByThis = function ( ) {
  518. window.location.href='/review/job?paperId='+id;
  519. }
  520. </script>