changePaper.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  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="/changeAuditTask">编辑众审任务</a></li>
  134. </ol>
  135. </section>
  136. <!-- Main content -->
  137. <section class="content" id="maincontent">
  138. <div class="box box-primary" >
  139. <div class="box-header with-border">
  140. <h3 class="box-title">基本信息</h3>
  141. <button onclick="savePaper()" class="btn btn-success pull-right" >
  142. 保存
  143. </button>
  144. <button onclick="showyu()" class="btn btn-default pull-right" >
  145. 预览
  146. </button>
  147. <button class="btn btn-default pull-right" onclick="addNewOption()">
  148. 新建审查项
  149. </button>
  150. </div>
  151. <!-- /.box-header -->
  152. <div class="box-body">
  153. <form class="form-horizontal">
  154. <!-- text input -->
  155. <div class="form-group">
  156. <label class="col-sm-2 control-label">名称</label>
  157. <div class="col-sm-10">
  158. <input onchange="checkNull(event)" th:value="${data.get('name')}" class="form-control" id="name" placeholder="请输入任务名称"/>
  159. </div>
  160. </div>
  161. <!-- textarea -->
  162. <div class="form-group">
  163. <label class="col-sm-2 control-label">描述</label>
  164. <div class="col-sm-10">
  165. <textarea onchange="checkNull(event)" th:text="${data.get('description')}" id="description" class="form-control" rows="3" placeholder="请输入描述信息"></textarea>
  166. </div>
  167. </div>
  168. <!-- Date and time range -->
  169. <div class="form-group">
  170. <label class="col-sm-2 control-label" >创建时间</label>
  171. <div class=" col-sm-10">
  172. <!-- <div class="input-group-addon">-->
  173. <!-- <i class="fa fa-clock-o"></i>-->
  174. <!-- </div>-->
  175. <input disabled="disabled" id="createTime" type="text" th:value="${data.get('create_time')}" class="form-control pull-right" />
  176. </div>
  177. <!-- /.input group -->
  178. </div>
  179. <!-- select -->
  180. <div class="form-group">
  181. <label class="col-sm-2 control-label" >测试类型</label>
  182. <div class=" col-sm-10">
  183. <select class="form-control" id="testType" th:value="${data.get('type')}" >
  184. <option>漏洞扫描分析</option>
  185. <option>App自动扫描</option>
  186. <option>Java自动化扫描</option>
  187. <option>Web自动化扫描</option>
  188. <option>众包测试</option>
  189. </select>
  190. </div>
  191. </div>
  192. <div class="form-group">
  193. <label for="testApplication" 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. <input th:attr="value=${data.get('application_url')}" onchange="uploadFile('testApplication')" type="file" id="testApplication"/>
  197. <!-- <p class="help-block">Example block-level help text here.</p>-->
  198. </div>
  199. </div>
  200. <div class="form-group">
  201. <label for="testRequirement" class="col-sm-2 control-label">测试需求</label>
  202. <div class="col-sm-10">
  203. <a th:href="@{${data.get('requirement_url')}}" class="col-sm-2 " >原始测试需求</a>
  204. <input th:attr="value=${data.get('requirement_url')}" onchange="uploadFile('testRequirement')" type="file" id="testRequirement"/>
  205. <!-- <p class="help-block">Example block-level help text here.</p>-->
  206. </div>
  207. </div>
  208. <!-- text input -->
  209. <!-- <div class="form-group">-->
  210. <!-- <label class="col-sm-2 control-label">报告总数</label>-->
  211. <!-- <div class="col-sm-10">-->
  212. <!-- <input id="reportNum" th:value="${data.get('report_num')}" onchange="checkNum(event)" type="text" class="form-control" placeholder="请输入报告总数"/>-->
  213. <!-- </div>-->
  214. <!-- </div>-->
  215. <!-- textarea -->
  216. <div class="form-group">
  217. <label class="col-sm-2 control-label">报告信息</label>
  218. <div class="col-sm-10">
  219. <div class="nav-tabs-custom" style="cursor: move;">
  220. <!-- Tabs within a box -->
  221. <ul class="nav nav-tabs pull-right ui-sortable-handle">
  222. <li class="active">
  223. <a href="#showReport" data-toggle="tab" aria-expanded="true">视图</a>
  224. </li>
  225. <li class="">
  226. <a href="#editReport" data-toggle="tab" aria-expanded="false">编辑</a>
  227. </li>
  228. <li class="pull-left header">
  229. <i class="fa fa-inbox">
  230. </i> 报告信息
  231. </li>
  232. </ul>
  233. <div class="tab-content no-padding">
  234. <!-- Morris chart - Sales -->
  235. <div class="chart tab-pane active" id="showReport" style="position: relative; height: 300px;
  236. -webkit-tap-highlight-color: rgba(0, 0, 0, 0); overflow:auto; " >
  237. </div>
  238. <div class="chart tab-pane" id="editReport" style="position: relative; height: 300px;">
  239. <textarea class="form-control" th:text="${data.get('report_list')}" id="reportInfo" onchange="checkNull(event)" rows="14" placeholder="请输入json格式的报告信息">
  240. </textarea>
  241. </div>
  242. </div>
  243. </div>
  244. </div>
  245. </div>
  246. <!-- textarea -->
  247. </form>
  248. </div>
  249. </div>
  250. <!-- Horizontal Form -->
  251. <!-- Horizontal Form -->
  252. <div class="box box-info rule" th:id="'rule'+${ruleStat.index}" th:each="rule,ruleStat : ${data.get('item_group_list')}">
  253. <div class="box-header with-border">
  254. <h3 class="box-title">定制审查选项</h3>
  255. <button type="submit" th:onclick="'addCheck('+${ruleStat.index}+')'" class="btn btn-success pull-right">新建多选框</button>
  256. <button type="submit" th:onclick="'addRatio('+${ruleStat.index}+')'" class="btn btn-success pull-right">新建单选框</button>
  257. <button type="submit" th:onclick="'addSingleCheck('+${ruleStat.index}+')'" class="btn btn-success pull-right">新建单复选框</button>
  258. <button type="submit" th:onclick="'addText('+${ruleStat.index}+')'" class="btn btn-success pull-right">新建文本框</button>
  259. <button type="submit" th:onclick="'addUpload('+${ruleStat.index}+')'" class="btn btn-success pull-right">新建文件上传</button>
  260. </div>
  261. <!-- /.box-header -->
  262. <!-- form start -->
  263. <div class="form-horizontal" >
  264. <div class="box-body">
  265. <div class="form-group">
  266. <label class="col-sm-2 control-label">适用报告列表</label>
  267. <div class="col-sm-10">
  268. <input th:onchange="'test(this,'+${ruleStat.index}+')'" th:value="${rule.get('origin_report_list')}" class="form-control" th:id="'fitlist'+${ruleStat.index}" placeholder="请输入编号并用;分割,可用~输入连续的试题名称" />
  269. </div>
  270. <label class="col-sm-2 control-label">已选报告列表</label>
  271. <div class="col-sm-10" th:id="'namelist'+${ruleStat.index}">
  272. <span th:each="i : ${rule.get('report_list')}" class="badge bg-green" th:text="${i}"></span>
  273. </div>
  274. </div>
  275. <div class="form-group">
  276. <label class="col-sm-2 control-label">审查项</label>
  277. <div class="col-sm-10 ">
  278. <table class="table" th:id="'table'+${ruleStat.index}">
  279. <tbody>
  280. <tr>
  281. <td>
  282. 示例
  283. </td>
  284. <td>
  285. 标签
  286. </td>
  287. <td>
  288. 数据说明
  289. </td>
  290. <td>
  291. 操作
  292. </td>
  293. </tr>
  294. <th:block th:each="item : ${rule.get('item_list')}">
  295. <tr th:if="${item.get('type')=='File'}" type="file">
  296. <td>
  297. <div class="form-group">
  298. <label class="col-sm-3 control-label" th:text="${item.get('description')}"></label>
  299. <div class="col-sm-9">
  300. <input type="file"/>
  301. </div>
  302. </div></td>
  303. <td>
  304. <input onchange="showExampleFile(this)" th:value="${item.get('originData')}" type="text" class="form-control" placeholder="请输入说明文字"/>
  305. </td>
  306. <td>
  307. </td>
  308. <td>
  309. <button onclick="upTr(this)" class="btn btn-default">上移</button>
  310. <button th:onclick="'downTr(this,'+${ruleStat.index}+')'" class="btn btn-default">下移</button>
  311. <button onclick="deleteTr(this)" class="btn btn-warning">删除</button>
  312. </td>
  313. </tr>
  314. <tr th:if="${item.get('type')=='Description'}" type="text">
  315. <td><div class="form-group">
  316. <label class="col-sm-3 control-label" th:text="${item.get('description')}"></label>
  317. <div class="col-sm-9">
  318. <input type="text" class="form-control" placeholder="请输入"/>
  319. </div>
  320. </div></td>
  321. <td>
  322. <input onchange="showExampleText(this)" th:value="${item.get('originData')}" type="text" class="form-control" placeholder="选项数据"/>
  323. </td>
  324. <td>
  325. </td>
  326. <td>
  327. <button onclick="upTr(this)" class="btn btn-default">上移</button>
  328. <button th:onclick="'downTr(this,'+${ruleStat.index}+')'" class="btn btn-default">下移</button>
  329. <button onclick="deleteTr(this)" class="btn btn-warning">删除</button>
  330. </td>
  331. </tr>
  332. <tr th:if="${item.get('type')=='Single'}" type="ratio">
  333. <td>
  334. <div class="form-group">
  335. <label class="col-sm-3 control-label" th:text="${item.get('description')}">asd</label>
  336. <div class="col-sm-9">
  337. <div class="radio" th:each="da : ${item.get('options')}" >
  338. <label >
  339. <input type="radio" name="optionsRadios4" value="asd"/>
  340. <th:block th:text="${da}"> </th:block>
  341. </label>
  342. </div>
  343. </div>
  344. </div>
  345. </td>
  346. <td>
  347. <input onchange="showExampleRatioByLabel(this)" th:value="${item.get('originTip')}" type="text" class="form-control" placeholder="选项说明"/>
  348. </td>
  349. <td>
  350. <input onchange="showExampleRatio(this)" type="text" th:value="${item.get('originData')}" class="form-control" placeholder="选项数据 请用;将选项分隔"/>
  351. </td>
  352. <td>
  353. <button onclick="upTr(this)" class="btn btn-default">上移</button>
  354. <button th:onclick="'downTr(this,'+${ruleStat.index}+')'" class="btn btn-default">下移</button>
  355. <button onclick="deleteTr(this)" class="btn btn-warning">删除</button>
  356. </td>
  357. </tr>
  358. <tr th:if="${item.get('originType')=='multiple'}" type="check">
  359. <td>
  360. <div class="form-group">
  361. <label class="col-sm-3 control-label" th:text="${item.get('description')}"></label>
  362. <div class="col-sm-9">
  363. <div class="checkbox" th:each="da:${item.get('options')}">
  364. <label >
  365. <input type="checkbox"/>
  366. <th:block th:text="${da}"> </th:block>
  367. </label>
  368. </div>
  369. </div>
  370. </div>
  371. </td>
  372. <td>
  373. <input onchange="showExampleCheckByLabel(this)" th:value="${item.get('originTip')}" type="text" class="form-control" placeholder="选项说明"/>
  374. </td>
  375. <td>
  376. <input onchange="showExampleCheck(this)" th:value="${item.get('originData')}" type="text" class="form-control" placeholder="选项数据 请用;将选项分隔"/>
  377. </td>
  378. <td>
  379. <button onclick="upTr(this)" class="btn btn-default">上移</button>
  380. <button th:onclick="'downTr(this,'+${ruleStat.index}+')'" class="btn btn-default">下移</button>
  381. <button onclick="deleteTr(this)" class="btn btn-warning">删除</button>
  382. </td>
  383. </tr>
  384. <tr th:if="${item.get('originType')=='singleCheck'}" type="singleCheck">
  385. <td><div class="form-group">
  386. <label class="col-sm-3 control-label" th:text="${item.get('description')}"></label>
  387. <div class="col-sm-9">
  388. <div class="checkbox">
  389. <label>
  390. <input type="checkbox"/>
  391. <th:block th:text="${item.get('originData')}"></th:block>
  392. </label>
  393. </div>
  394. </div>
  395. </div></td>
  396. <td>
  397. <input onchange="showExampleSingleByLabel(this)" type="text" class="form-control" placeholder="选项说明"/>
  398. </td>
  399. <td>
  400. <input onchange="showExampleSingle(this)" type="text" class="form-control" placeholder="选项数据"/>
  401. </td>
  402. <td>
  403. <button onclick="upTr(this)" class="btn btn-default">上移</button>
  404. <button onclick="downTr(this,0)" class="btn btn-default">下移</button>
  405. <button onclick="deleteTr(this)" class="btn btn-warning">删除</button>
  406. </td>
  407. </tr>
  408. </th:block>
  409. </tbody>
  410. </table>
  411. </div>
  412. </div>
  413. </div>
  414. <div class="box-footer">
  415. <button type="button" onclick="deleteRule(0)" class="btn btn-default">删除</button>
  416. <button type="button" class="btn btn-default" onclick="showModal(0)">
  417. 本地预览
  418. </button>
  419. <button type="button" onclick="addNewOption()" class="btn btn-info pull-right">继续添加</button>
  420. </div>
  421. </div>
  422. </div>
  423. </section>
  424. </div>
  425. <div class="modal fade" id="modal-default">
  426. <div class="modal-dialog">
  427. <div class="modal-content">
  428. <div class="modal-header">
  429. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  430. <span aria-hidden="true">&times;</span></button>
  431. <h4 class="modal-title">预览</h4>
  432. </div>
  433. <div class="modal-body" id="modalBody">
  434. <form class="form-horizontal" id="formBody">
  435. </form>
  436. </div>
  437. <div class="modal-footer">
  438. <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
  439. <!-- <button type="button" class="btn btn-primary"></button>-->
  440. </div>
  441. </div>
  442. <!-- /.modal-content -->
  443. </div>
  444. <!-- /.modal-dialog -->
  445. </div>
  446. <!-- /.modal -->
  447. <div class="modal fade" id="modal-alert">
  448. <div class="modal-dialog">
  449. <div class="modal-content">
  450. <div class="modal-header">
  451. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  452. <span aria-hidden="true">&times;</span></button>
  453. <h4 class="modal-title">预览</h4>
  454. </div>
  455. <div class="modal-body" id="modalAlertBody">
  456. <form class="form-horizontal" id="formAlertBody">
  457. </form>
  458. </div>
  459. <div class="modal-footer">
  460. <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
  461. <!-- <button type="button" class="btn btn-primary"></button>-->
  462. </div>
  463. </div>
  464. <!-- /.modal-content -->
  465. </div>
  466. <!-- /.modal-dialog -->
  467. </div>
  468. <!-- /.modal -->
  469. </div>
  470. </body>
  471. </html>
  472. <!-- jQuery 3 -->
  473. <!--<script src="/static/AdminLTE/bower_components/jquery/dist/jquery.min.js"></script>-->
  474. <!-- Bootstrap 3.3.7 -->
  475. <script src="/static/AdminLTE/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
  476. <script src="/static/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
  477. <script src="/static/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
  478. <script src="/static/AdminLTE/bower_components/select2/dist/js/select2.min.js"></script>
  479. <!-- InputMask -->
  480. <script src="/static/AdminLTE/plugins/input-mask/jquery.inputmask.js"></script>
  481. <script src="/static/AdminLTE/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
  482. <script src="/static/AdminLTE/plugins/input-mask/jquery.inputmask.extensions.js"></script>
  483. <!-- date-range-picker -->
  484. <script src="/static/AdminLTE/bower_components/moment/min/moment.min.js"></script>
  485. <script src="/static/AdminLTE/bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
  486. <!-- bootstrap datepicker -->
  487. <script src="/static/AdminLTE/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
  488. <!-- bootstrap time picker -->
  489. <script src="/static/AdminLTE/plugins/timepicker/bootstrap-timepicker.min.js"></script>
  490. <!-- SlimScroll -->
  491. <script src="/static/AdminLTE/bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
  492. <!-- iCheck 1.0.1 -->
  493. <script src="/static/AdminLTE/plugins/iCheck/icheck.min.js"></script>
  494. <!-- FastClick -->
  495. <script src="/static/AdminLTE/bower_components/fastclick/lib/fastclick.js"></script>
  496. <!-- AdminLTE App -->
  497. <!--<script src="/static/AdminLTE/dist/js/adminlte.min.js"></script>-->
  498. <!-- AdminLTE for demo purposes -->
  499. <script src="/static/AdminLTE/dist/js/demo.js"></script>
  500. <!-- change Paper js -->
  501. <script src="/static/js/changePaper.js"></script>
  502. <script src="/static/AdminLTE/bower_components/bootstrap-notify/dist/bootstrap-notify.min.js"></script>
  503. <!--阿里 oss 上传-->
  504. <script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"></script>
  505. <script type="text/javascript" xmlns:th="http://www.thymeleaf.org" th:inline="javascript">
  506. var ruleId ;
  507. var ratioIndex;
  508. /*<![CDATA[*/
  509. var urlParams = new URLSearchParams(window.location.search);
  510. var paperId = urlParams.get('id');
  511. var id = [[${data.get('paperId')}]];
  512. var reportHost = [[${reportHost}]]
  513. ruleId = [[${ruleLength}]]
  514. var client = new OSS.Wrapper({
  515. region : 'oss-cn-shanghai',
  516. accessKeyId : 'IvS323TIcWUT57MG',
  517. accessKeySecret : 'dYml7rvT8stQkoSjMYlfRTxNj9dEsI',
  518. bucket : 'mooctest-site'
  519. });
  520. /*]]>*/
  521. $(document).ready(function(){
  522. $('[data-toggle="tooltip"]').tooltip();
  523. $('#reportInfo').val(getCleanStr($('#reportInfo').val()));
  524. setShowRule($('#reportInfo').val());
  525. //Initialize Select2 Elements
  526. $('.select2').select2()
  527. ratioIndex =0 ;
  528. // $('#testType').val(type)
  529. $('#testType').val($('#testType').attr('value'))
  530. //Date range picker with time picker
  531. // $('#reservationtime').daterangepicker({ timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A' })
  532. $('#reservationtime').daterangepicker({ timePicker: true, timePickerIncrement: 30, locale: { format: 'MM/DD/YYYY hh:mm A' }})
  533. var taskListTable = $('#task-list').DataTable({
  534. searching: true,
  535. pageLength: 25
  536. });
  537. });
  538. </script>