baseDetail.html 17 KB

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