liveDetail.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  7. <title>任务详情</title>
  8. <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
  9. <link rel="stylesheet" href="../../../assets/module/formSelects/formSelects-v4.css"/>
  10. <link rel="stylesheet" href="../../../assets/module/admin.css?v=312"/>
  11. <link rel="stylesheet" href="../../../assets/module/uParas.css?v=312"/>
  12. </head>
  13. <body>
  14. <style type="text/css">
  15. </style>
  16. <!-- 加载动画 -->
  17. <div class="page-loading">
  18. <div class="ball-loader">
  19. <span></span><span></span><span></span><span></span>
  20. </div>
  21. </div>
  22. <!-- 正文开始 -->
  23. <div class="layui-fluid">
  24. <div class="layui-card">
  25. <div class="layui-card-body">
  26. <div class="layui-card-header">
  27. 任务详情
  28. <div class="layui-inline pull-right">
  29. <button onclick="history.back()" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal"><i
  30. class="layui-icon">&#xe65c;</i>返回
  31. </button>
  32. </div>
  33. </div>
  34. <div class="layui-card-body">
  35. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  36. <div class="layui-tab-content" style="height: auto;">
  37. <div class="layui-tab-item layui-show">
  38. <fieldset class="layui-elem-field layui-field-title">
  39. <legend>任务基本信息</legend>
  40. </fieldset>
  41. <div class="layui-row">
  42. <div class="layui-col-xs12">
  43. <div class="layui-form">
  44. <table class="layui-table">
  45. <!--<colgroup>-->
  46. <!--<col width="150">-->
  47. <!--<col width="150">-->
  48. <!--<col width="200">-->
  49. <!--<col>-->
  50. <!--</colgroup>-->
  51. <thead>
  52. </thead>
  53. <tbody>
  54. <tr>
  55. <th width="150">任务名称</th>
  56. <td id="riskCheckDefTitle"></td>
  57. <th width="150">检查类型</th>
  58. <td id="checkMode">
  59. </td>
  60. </tr>
  61. <tr>
  62. <th width="150">执行部门</th>
  63. <td id="groupName"></td>
  64. <th width="150">执行岗位</th>
  65. <td id="positionName"></td>
  66. </tr>
  67. <tr>
  68. <th width="150">检查频率</th>
  69. <td id="checkType"></td>
  70. <th width="150">任务状态</th>
  71. <td id="status"></td>
  72. </tr>
  73. <tr>
  74. <th width="150">开始时间</th>
  75. <td id="startTime"></td>
  76. <th width="150">截至时间</th>
  77. <td id="endTime"></td>
  78. </tr>
  79. <tr>
  80. <th width="150">检查时间</th>
  81. <td id="executeTime"></td>
  82. <th width="150">完成时间</th>
  83. <td id="finishTime"></td>
  84. </tr>
  85. <tr>
  86. <th width="150">参与人员</th>
  87. <td id="riskCheckParticipantName"></td>
  88. <th width="150">检查类型</th>
  89. <td id="riskCheckTypeName"></td>
  90. </tr>
  91. <tr>
  92. <th width="150">描述</th>
  93. <td id="riskCheckDefDesc" colspan="3"></td>
  94. </tr>
  95. </tbody>
  96. </table>
  97. </div>
  98. </div>
  99. </div>
  100. <!--<div class="getAcceptRecord display-none">-->
  101. <fieldset class="layui-elem-field layui-field-title">
  102. <legend>子任务</legend>
  103. </fieldset>
  104. <div class="layui-row">
  105. <div class="layui-col-xs12">
  106. <div class="layui-form">
  107. <table class="layui-table">
  108. <colgroup>
  109. <col width="80">
  110. <col width="200">
  111. <col width="200">
  112. <col>
  113. <col>
  114. <col>
  115. </colgroup>
  116. <thead>
  117. <tr>
  118. <th>序号</th>
  119. <th>执行部门</th>
  120. <th>执行岗位</th>
  121. <th>执行人</th>
  122. <th>任务状态</th>
  123. <th>开始时间</th>
  124. <th>完成时间</th>
  125. <th>操作</th>
  126. </tr>
  127. </thead>
  128. <tbody id="subTask">
  129. </tbody>
  130. </table>
  131. </div>
  132. </div>
  133. </div>
  134. <!--</div>-->
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. <!-- js部分 -->
  143. <script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
  144. <script type="text/javascript" src="../../../assets/js/common.js?v=312"></script>
  145. <script>
  146. layui.use(['layer', 'form', 'table', 'util', 'zTree', 'admin', 'uParas'], function () {
  147. var $ = layui.jquery;
  148. var layer = layui.layer;
  149. var form = layui.form;
  150. var util = layui.util;
  151. var admin = layui.admin;
  152. var uParas = layui.uParas;
  153. //debugger;
  154. var scheduleId = uParas.getUrlParam("scheduleId");
  155. admin.req(uParas.baseUrl + '/ent/riskCheckedSchdule/myDetail/' + scheduleId, null, function (res) {
  156. if (res.code == 1) {
  157. var schduleDto = res.data.schduleDto;
  158. if (schduleDto != null) {
  159. $("#riskCheckDefTitle").text(schduleDto.riskCheckDefTitle);
  160. if (schduleDto.checkMode == '1') {
  161. $("#checkMode").text("现场检查");
  162. } else {
  163. $("#checkMode").text("基础检查");
  164. }
  165. $("#groupName").text(schduleDto.groupName);
  166. $("#positionName").text(schduleDto.riskCheckPositionName);
  167. //检查频率
  168. var checkCycle = "";
  169. if (schduleDto.checkType == 'random') {
  170. checkCycle = "临时性检查,无固定频率";
  171. } else {
  172. if (schduleDto.scheduleFrequency == 'year') {
  173. checkCycle = schduleDto.scheduleCount + "次/年";
  174. } else if (schduleDto.scheduleFrequency == 'half_year') {
  175. checkCycle = schduleDto.scheduleCount + "次/半年";
  176. } else if (schduleDto.scheduleFrequency == 'quarter') {
  177. checkCycle = schduleDto.scheduleCount + "次/季度";
  178. } else if (schduleDto.scheduleFrequency == 'month') {
  179. checkCycle = schduleDto.scheduleCount + "次/月";
  180. } else if (schduleDto.scheduleFrequency == 'week') {
  181. checkCycle = schduleDto.scheduleCount + "次/周";
  182. } else if (schduleDto.scheduleFrequency == 'day') {
  183. checkCycle = schduleDto.scheduleCount + "次/天";
  184. }
  185. }
  186. $("#checkType").text(checkCycle);
  187. //任务状态
  188. var statusStr = "";
  189. if (schduleDto.status === 2) {
  190. statusStr = "已检查";
  191. } else if (schduleDto.status === 1) {
  192. statusStr = "进行中";
  193. } else if (schduleDto.status === 0) {
  194. statusStr = "未检查";
  195. if (schduleDto.checkType === "random") {
  196. var curTime = new Date();
  197. var endtime = new Date(schduleDto.endTime);
  198. if (curTime >= endtime) {
  199. statusStr = "已逾期";
  200. }
  201. }
  202. } else if (schduleDto.status === 3) {
  203. statusStr = "已逾期";
  204. } else {
  205. statusStr = "未知"
  206. }
  207. $("#status").text(statusStr);
  208. $("#startTime").text(schduleDto.startTime);
  209. $("#endTime").text(schduleDto.endTime);
  210. if (schduleDto.executeTime != null) {
  211. $("#executeTime").text(schduleDto.executeTime);
  212. } else {
  213. $("#executeTime").text("-");
  214. }
  215. if (schduleDto.finishTime != null) {
  216. $("#finishTime").text(schduleDto.finishTime);
  217. } else {
  218. $("#finishTime").text("-");
  219. }
  220. //$("#finishTime").text(schduleDto.finishTime);
  221. $("#riskCheckParticipantName").text(schduleDto.riskCheckParticipantName);
  222. $("#riskCheckTypeName").text(schduleDto.riskCheckTypeName);
  223. $("#riskCheckDefDesc").text(schduleDto.riskCheckDefDesc);
  224. var subList = res.data.subList;
  225. if (subList != null && subList.length > 0) {
  226. var html = "";
  227. $.each(subList, function (i, item) {
  228. html += "<tr>";
  229. html += "<td>" + (i + 1) + "</td>";
  230. html += "<td>" + item.groupName + "</td>";
  231. html += "<td>" + item.riskCheckPositionName + "</td>";
  232. html += "<td>" + item.executorName + "</td>";
  233. var subStatus = "";
  234. if (item.status == 0) {
  235. subStatus = "未检查";
  236. } else if (item.status == 1) {
  237. subStatus = "进行中";
  238. } else if (item.status == 2) {
  239. subStatus = "已检查";
  240. }
  241. html += "<td>" + subStatus + "</td>";
  242. if (item.executeTime != null) {
  243. html += "<td>" + item.executeTime + "</td>";
  244. } else {
  245. html += "<td>-</td>";
  246. }
  247. if (item.finishTime != null) {
  248. html += "<td>" + item.finishTime + "</td>";
  249. } else {
  250. html += "<td>-</td>";
  251. }
  252. html += "<td>" + "<a href=''>检查记录</a>" + "</td>";
  253. html += "</tr>";
  254. });
  255. $('#subTask ').html(html);
  256. }
  257. }
  258. }
  259. }, 'get');
  260. /*验收记录*/
  261. /*admin.req(uParas.baseUrl + '/ent/hiddenDanger/getAcceptRecord?hdangerId=' + hdangerId, null, function (res) {
  262. if (res.code == 1) {
  263. var records = res.data;
  264. if (records.length > 0) {
  265. $("#hdangerAcceptedResult").text((records[0].hdangerAcceptedResult) != null ? (records[0].hdangerAcceptedResult):'-');
  266. $("#hdangerAcceptedRemark").text((records[0].hdangerAcceptedRemark) != null ? (records[0].hdangerAcceptedRemark):'-');
  267. $("#hdangerAcceptedTime").text((records[0].hdangerAcceptedTime) != null ? (records[0].hdangerAcceptedTime):'-');
  268. var acceptAtt = records[0].attachList;
  269. if(acceptAtt.length > 0){
  270. $('#acceptAtt ').html('');
  271. $('.accept-img').show();
  272. var atthtml = '';
  273. for (var i = 0; i < acceptAtt.length; i++) {
  274. var att = acceptAtt[i];
  275. if(att.attachType == "image"){
  276. atthtml += '<a target ="_blank" href="'+att.attachPath+'" style="margin-right: 10px;">';
  277. atthtml += '<img style="width: 60px;height: 80px;" src="'+att.attachPath+'">';
  278. atthtml += '</a>';
  279. }
  280. }
  281. $('#acceptAtt ').html(atthtml);
  282. }
  283. $('.getAcceptRecord').show();
  284. var html = "";
  285. for (var i = 0; i < records.length; i++) {
  286. html += "<tr>";
  287. var record = records[i];
  288. html += "<td>" + (i+1) + "</td>";
  289. html += "<td>" + record.createdTime + "</td>";
  290. html += "<td>" + record.groupName + "</td>";
  291. html += "<td>" + record.hdangerAcceptedByName + "</td>";
  292. html += "<td>" + record.hdangerAcceptedResult + "</td>";
  293. html += "<td>" + record.hdangerAcceptedRemark + "</td>";
  294. html += "</tr>";
  295. }
  296. $('#acceptRecord ').html(html);
  297. }
  298. }
  299. }, 'get');*/
  300. });
  301. </script>
  302. </body>
  303. </html>