baseDetail.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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" id="itemTable" lay-filter="itemTable">
  108. </table>
  109. <!--<table class="layui-table">-->
  110. <!--<colgroup>-->
  111. <!--<col width="80">-->
  112. <!--<col width="200">-->
  113. <!--<col width="200">-->
  114. <!--<col>-->
  115. <!--<col>-->
  116. <!--<col>-->
  117. <!--</colgroup>-->
  118. <!--<thead>-->
  119. <!--<tr>-->
  120. <!--<th>序号</th>-->
  121. <!--<th>执行部门</th>-->
  122. <!--<th>执行岗位</th>-->
  123. <!--<th>执行人</th>-->
  124. <!--<th>任务状态</th>-->
  125. <!--<th>开始时间</th>-->
  126. <!--<th>完成时间</th>-->
  127. <!--<th>操作</th>-->
  128. <!--</tr>-->
  129. <!--</thead>-->
  130. <!--<tbody id="subTask">-->
  131. <!--</tbody>-->
  132. <!--</table>-->
  133. </div>
  134. </div>
  135. </div>
  136. <!--</div>-->
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. <!-- js部分 -->
  145. <script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
  146. <script type="text/javascript" src="../../../assets/js/common.js?v=312"></script>
  147. <script>
  148. layui.use(['layer', 'form', 'table', 'util', 'zTree', 'admin', 'uParas', 'treetable'], function () {
  149. var $ = layui.jquery;
  150. var layer = layui.layer;
  151. var form = layui.form;
  152. var util = layui.util;
  153. var admin = layui.admin;
  154. var uParas = layui.uParas;
  155. var treetable = layui.treetable;
  156. //debugger;
  157. var scheduleId = uParas.getUrlParam("scheduleId");
  158. var bizCheckDefId = "";
  159. admin.req(uParas.baseUrl + '/ent/riskCheckedSchdule/myDetail/' + scheduleId, null, function (res) {
  160. if (res.code == 1) {
  161. var schduleDto = res.data.schduleDto;
  162. if (schduleDto != null) {
  163. $("#riskCheckDefTitle").text(schduleDto.riskCheckDefTitle);
  164. if (schduleDto.checkMode == '1') {
  165. $("#checkMode").text("现场检查");
  166. } else {
  167. $("#checkMode").text("基础检查");
  168. }
  169. $("#groupName").text(schduleDto.groupName);
  170. $("#positionName").text(schduleDto.riskCheckPositionName);
  171. //检查频率
  172. var checkCycle = "";
  173. if (schduleDto.checkType == 'random') {
  174. checkCycle = "临时性检查,无固定频率";
  175. } else {
  176. if (schduleDto.scheduleFrequency == 'year') {
  177. checkCycle = schduleDto.scheduleCount + "次/年";
  178. } else if (schduleDto.scheduleFrequency == 'half_year') {
  179. checkCycle = schduleDto.scheduleCount + "次/半年";
  180. } else if (schduleDto.scheduleFrequency == 'quarter') {
  181. checkCycle = schduleDto.scheduleCount + "次/季度";
  182. } else if (schduleDto.scheduleFrequency == 'month') {
  183. checkCycle = schduleDto.scheduleCount + "次/月";
  184. } else if (schduleDto.scheduleFrequency == 'week') {
  185. checkCycle = schduleDto.scheduleCount + "次/周";
  186. } else if (schduleDto.scheduleFrequency == 'day') {
  187. checkCycle = schduleDto.scheduleCount + "次/天";
  188. }
  189. }
  190. $("#checkType").text(checkCycle);
  191. //任务状态
  192. var statusStr = "";
  193. if (schduleDto.status === 2) {
  194. statusStr = "已检查";
  195. } else if (schduleDto.status === 1) {
  196. statusStr = "进行中";
  197. } else if (schduleDto.status === 0) {
  198. statusStr = "未检查";
  199. if (schduleDto.checkType === "random") {
  200. var curTime = new Date();
  201. var endtime = new Date(schduleDto.endTime);
  202. if (curTime >= endtime) {
  203. statusStr = "已逾期";
  204. }
  205. }
  206. } else if (schduleDto.status === 3) {
  207. statusStr = "已逾期";
  208. } else {
  209. statusStr = "未知"
  210. }
  211. $("#status").text(statusStr);
  212. $("#startTime").text(schduleDto.startTime);
  213. $("#endTime").text(schduleDto.endTime);
  214. if (schduleDto.executeTime != null) {
  215. $("#executeTime").text(schduleDto.executeTime);
  216. } else {
  217. $("#executeTime").text("-");
  218. }
  219. if (schduleDto.finishTime != null) {
  220. $("#finishTime").text(schduleDto.finishTime);
  221. } else {
  222. $("#finishTime").text("-");
  223. }
  224. //$("#finishTime").text(schduleDto.finishTime);
  225. $("#riskCheckParticipantName").text(schduleDto.riskCheckParticipantName);
  226. $("#riskCheckTypeName").text(schduleDto.riskCheckTypeName);
  227. $("#riskCheckDefDesc").text(schduleDto.riskCheckDefDesc);
  228. bizCheckDefId = schduleDto.bizCheckDefId;
  229. renderTable();
  230. //var subList = schduleDto.subList;
  231. /*if (subList != null && subList.length > 0){
  232. var html = "";
  233. $.each(subList,function (i, item) {
  234. html += "<tr>";
  235. html += "<td>" + (i+1) + "</td>";
  236. html += "<td>" + item.groupName + "</td>";
  237. html += "<td>" + item.riskCheckPositionName + "</td>";
  238. html += "<td>" + item.executorName + "</td>";
  239. var subStatus = "";
  240. if (item.status == 0 ){
  241. subStatus = "未检查";
  242. }else if (item.status == 1 ){
  243. subStatus = "进行中";
  244. }else if (item.status == 2 ){
  245. subStatus = "已检查";
  246. }
  247. html += "<td>" + subStatus + "</td>";
  248. if (item.executeTime != null){
  249. html += "<td>" + item.executeTime + "</td>";
  250. }else{
  251. html += "<td>-</td>";
  252. }
  253. if (item.finishTime != null){
  254. html += "<td>" + item.finishTime + "</td>";
  255. }else{
  256. html += "<td>-</td>";
  257. }
  258. html += "<td>" + "<a href=''>检查记录</a>" + "</td>";
  259. html += "</tr>";
  260. });
  261. $('#subTask ').html(html);
  262. }*/
  263. }
  264. }
  265. }, 'get');
  266. // 渲染检查项表格
  267. function renderTable() {
  268. var url = uParas.baseUrl + '/ent/schduleChecked/getSchduleCheckedItems';
  269. layer.load();
  270. treetable.render({
  271. elem: '#itemTable',
  272. treeColIndex: 0,//树形图标显示在第几列
  273. treeSpid: 0,//最上级的父级id
  274. page: false,
  275. totalRow: false,
  276. treeIdName: 'checkItemDefId',
  277. treePidName: 'parentId',
  278. url: url,
  279. where: {
  280. "checkDefId": bizCheckDefId,
  281. "scheduleId": scheduleId
  282. },
  283. cellMinWidth: 100,
  284. cols: [[
  285. {type: 'numbers', title: '#'},
  286. // {field :'checkItemDefId' ,title :'选择',width:58,align :'center',
  287. // templet: function (d) {
  288. // if(d.parentId != 0 && d.checkResult === CHECK_RESULT_WJC){
  289. // return "<input type='checkbox' lay-skin='primary' name='layTableCheckbox' value='" + d.checkItemDefId + "'>";
  290. // }else{
  291. // return '';
  292. // }
  293. // }
  294. // },
  295. {field: 'checkItemDefName', title: '检查项 / 检查内容名称', align: 'left', width: 250, minWidth: 120},
  296. {field: 'checkItemDefDesc', title: '具体检查内容', align: 'left'},
  297. {field: 'checkItemDefMethod', title: '检查方法', align: 'left'},
  298. {field: 'checkItemDefRule', title: '检查依据', align: 'left'},
  299. {field: 'punishItemDefRule', title: '处罚依据', align: 'left'},
  300. /*{field: 'checkResult', align: 'center',sort: false, title: '检查结果', width: 100,
  301. templet: function (d) {return setCheckResult(d);}
  302. },
  303. {title:'操作', width: 250,
  304. templet: function (d) {return setOperation(d.checkResult,d.parentId);}
  305. }*/
  306. ]],
  307. done: function () {
  308. layer.closeAll('loading');
  309. }
  310. });
  311. }
  312. });
  313. </script>
  314. </body>
  315. </html>