liveDetail.html 16 KB

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