details.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  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. /*table th{*/
  16. /*color: #ffb800;*/
  17. /*}*/
  18. </style>
  19. <!-- 加载动画 -->
  20. <div class="page-loading">
  21. <div class="ball-loader">
  22. <span></span><span></span><span></span><span></span>
  23. </div>
  24. </div>
  25. <!-- 正文开始 -->
  26. <div class="layui-fluid">
  27. <div class="layui-card">
  28. <div class="layui-card-body">
  29. <div class="layui-card-header">
  30. 隐患详情
  31. <div class="layui-inline pull-right">
  32. <button onclick="history.back()" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal">
  33. 返回
  34. </button>
  35. </div>
  36. <div class="layui-inline pull-right">
  37. <button id="handleBtn" style="display: none"
  38. class="layui-btn layui-btn-sm layui-btn-radius layui-btn-warm">关闭隐患
  39. </button>
  40. </div>
  41. </div>
  42. <div class="layui-card-body">
  43. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  44. <div class="layui-tab-content" style="height: auto;">
  45. <div class="layui-tab-item layui-show">
  46. <fieldset class="layui-elem-field layui-field-title">
  47. <legend>基本信息</legend>
  48. </fieldset>
  49. <div class="layui-row">
  50. <!--<script type="text/html">-->
  51. <div class="layui-col-xs12">
  52. <div class="layui-form">
  53. <table class="layui-table">
  54. <!--<colgroup>-->
  55. <!--<col width="150">-->
  56. <!--<col width="150">-->
  57. <!--<col width="200">-->
  58. <!--<col>-->
  59. <!--</colgroup>-->
  60. <thead>
  61. </thead>
  62. <tbody>
  63. <tr>
  64. <th width="150">隐患名称</th>
  65. <td id="hdangerTitle"></td>
  66. <th width="150">隐患等级</th>
  67. <td id="hdangerLevelName"></td>
  68. </tr>
  69. <tr>
  70. <th width="150">检查对象</th>
  71. <td id="acceptCheckname"></td>
  72. <th width="150">整改状态</th>
  73. <td id="hdangerStatus"></td>
  74. </tr>
  75. <tr>
  76. <th width="150">检查名称</th>
  77. <td id="checkName"></td>
  78. <th width="150">检查内容</th>
  79. <td id="checkContent"></td>
  80. </tr>
  81. <tr>
  82. <th width="150">提交人</th>
  83. <td id="createName"></td>
  84. <th width="150">参与人员</th>
  85. <td id="checkPerson"></td>
  86. </tr>
  87. <tr>
  88. <!-- <th width="150">整改期限</th>-->
  89. <!-- <td id="hdangerRetifyDeadline"></td>-->
  90. <th width="150">创建日期</th>
  91. <td id="createdTime" colspan="3"></td>
  92. </tr>
  93. <!-- <tr>-->
  94. <!-- <th width="150">企业整改状态</th>-->
  95. <!-- <td id="status" colspan="3"></td>-->
  96. <!-- </tr>-->
  97. <tr>
  98. <th width="150">现场描述</th>
  99. <td id="hdangerDesc" colspan="3"></td>
  100. </tr>
  101. <tr class="hidden-danger-img display-none">
  102. <th colspan="4" style="border-bottom: 0px">隐患现场照片
  103. <p id="hdangerAtt" class="m-top10px"></p>
  104. </th>
  105. </tr>
  106. <tr class="hidden-danger-video display-none">
  107. <th colspan="4" style="border-bottom: 0px">隐患现场视频
  108. <p id="hdangerVideo" class="m-top10px"></p>
  109. <!--<div id="video" style="width: 300px;height: 200px;"></div>-->
  110. </th>
  111. </tr>
  112. <tr style="border-left: 0px;border-right: 0px;">
  113. <td style="border-left: 0px;border-right: 0px;" colspan="4"></td>
  114. </tr>
  115. </tbody>
  116. </table>
  117. </div>
  118. </div>
  119. <!--// </script>-->
  120. </div>
  121. <div class="getAcceptRecord display-none">
  122. <fieldset class="layui-elem-field layui-field-title">
  123. <legend>验收记录</legend>
  124. </fieldset>
  125. <div class="layui-row">
  126. <div class="layui-col-xs12">
  127. <div class="layui-form">
  128. <table class="layui-table">
  129. <colgroup>
  130. <col width="80">
  131. <col width="200">
  132. <col width="200">
  133. <col>
  134. <col>
  135. <col>
  136. </colgroup>
  137. <thead>
  138. <tr>
  139. <th>序号</th>
  140. <th>时间</th>
  141. <th>部门</th>
  142. <th>处理人员</th>
  143. <th>处理结果</th>
  144. <th>说明</th>
  145. </tr>
  146. </thead>
  147. <tbody id="acceptRecord">
  148. </tbody>
  149. </table>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <div class="getRetifyRecord display-none">
  155. <fieldset class="layui-elem-field layui-field-title">
  156. <legend>整改记录</legend>
  157. </fieldset>
  158. <div class="layui-row">
  159. <div class="layui-col-xs12">
  160. <div class="layui-form">
  161. <table class="layui-table">
  162. <colgroup>
  163. <col width="80">
  164. <col width="200">
  165. <col width="200">
  166. <col>
  167. <col>
  168. <col>
  169. <col>
  170. <col>
  171. <col>
  172. </colgroup>
  173. <thead>
  174. <tr>
  175. <th>序号</th>
  176. <th>时间</th>
  177. <th>部门</th>
  178. <th>处理人员</th>
  179. <th>类型</th>
  180. <th>整改协助单位</th>
  181. <th>整改费用(元)</th>
  182. <th>原因分析</th>
  183. <th>整改措施</th>
  184. </tr>
  185. </thead>
  186. <tbody id="retifyRecord">
  187. </tbody>
  188. </table>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. <!-- js部分 -->
  201. <script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
  202. <script type="text/javascript" src="../../../assets/js/common.js?v=312"></script>
  203. <script type="text/javascript" src="../../../assets/libs/ckplayer/ckplayer.js"></script>
  204. <script>
  205. var hdangerId;
  206. layui.use(['layer', 'form', 'table', 'util', 'zTree', 'admin', 'uParas', 'element', 'laytpl'], function () {
  207. var $ = layui.jquery;
  208. var layer = layui.layer;
  209. var form = layui.form;
  210. var util = layui.util;
  211. var admin = layui.admin;
  212. var uParas = layui.uParas;
  213. var element = layui.element, laytpl = layui.laytpl;
  214. var hdangerId = uParas.getUrlParam("hdangerId");
  215. var hdangerStatus = uParas.getUrlParam("hdangerStatus");
  216. if (hdangerStatus != null && hdangerStatus != '2') {
  217. $("#handleBtn").show();
  218. }
  219. $("#handleBtn").click(function () {
  220. $.ajax({
  221. url: uParas.baseUrl + "/org/hiddenDanger/updateStatus/" + hdangerId,
  222. dataType: "json",
  223. success: function (resp) {
  224. if (resp.code == 1) {
  225. location.href = "./index.html";
  226. } else {
  227. layer.msg(resp.msg);
  228. }
  229. }
  230. });
  231. });
  232. admin.req(uParas.baseUrl + '/org/hiddenDanger/details?hdangerId=' + hdangerId, null, function (res) {
  233. if (res.code == 1) {
  234. var hd = res.data;
  235. if (hd != null) {
  236. $("#hdangerTitle").text(hd.hdangerTitle);
  237. $("#hdangerLevelName").text(setHdangerLevel(hd.hdangerLevel));
  238. $("#acceptCheckname").text(hd.acceptCheckname);
  239. var hdangerStatusStr = "";
  240. if (hd.hdangerStatus == "0") {
  241. hdangerStatusStr = "待整改";
  242. } else if (hd.hdangerStatus == "1") {
  243. hdangerStatusStr = "企业完成整改";
  244. } else {
  245. hdangerStatusStr = "已关闭";
  246. }
  247. $("#hdangerStatus").text(hdangerStatusStr);
  248. $("#checkName").text(hd.checkName);
  249. $("#checkContent").text(hd.checkContent);
  250. $("#createName").text(hd.createName);
  251. $("#checkPerson").text(hd.checkPerson);
  252. $("#hdangerDesc").text(hd.hdangerDesc);
  253. $("#hdangerRetifyDeadline").text(hd.hdangerRetifyDeadline);
  254. $("#status").text(setStatus(hd.status));
  255. $("#createdTime").text(hd.createdTime);
  256. var hiddendangerAtt = hd.attachList;
  257. if (hiddendangerAtt.length > 0) {
  258. var htmlImg = '';
  259. var htmlVideo = '';
  260. for (var i = 0; i < hiddendangerAtt.length; i++) {
  261. var att = hiddendangerAtt[i];
  262. if (att.fileType == "image") {
  263. /*图片*/
  264. htmlImg += '<a target ="_blank" href="' + att.filePath + '" style="margin-right: 10px;">';
  265. htmlImg += '<img style="width: 60px;height: 80px;" src="' + att.filePath + '">';
  266. htmlImg += '</a>';
  267. } else if (att.fileType == "video") {
  268. /*视频*/
  269. htmlVideo += '<a onclick="videoPlayer(\'' + att.filePath + '\');" >';
  270. htmlVideo += '<div style="margin-right: 10px;width: 80px;height: 60px;">点击播放';
  271. htmlVideo += '</div>';
  272. htmlVideo += '</a>';
  273. }
  274. }
  275. if (htmlImg != '') {
  276. $('.hidden-danger-img').show();
  277. $('#hdangerAtt').html(htmlImg);
  278. }
  279. if (htmlVideo != '') {
  280. $('.hidden-danger-video').show();
  281. $('#hdangerVideo ').html(htmlVideo);
  282. }
  283. }
  284. var retifyList = hd.retifyList;
  285. if (retifyList != null && retifyList.length > 0) {
  286. retifyData(retifyList);
  287. }
  288. var acceptList = hd.acceptList;
  289. if (acceptList != null && acceptList.length > 0) {
  290. acceptData(acceptList);
  291. }
  292. }
  293. }
  294. }, 'get');
  295. //企业隐患状态
  296. function setStatus(status) {
  297. var val = status;
  298. if (val == '0') {
  299. return '不存在隐患'
  300. } else if (val == '1') {
  301. return '待评审'
  302. } else if (val == '2') {
  303. return '待整改';
  304. } else if (val == '3') {
  305. return '待验收';
  306. } else if (val == '4') {
  307. return '验收通过';
  308. } else if (val == '5') {
  309. return '验收不通过';
  310. } else if (val == '6') {
  311. return '已撤消';
  312. } else if (val == '7') {
  313. return '已删除';
  314. } else {
  315. return '待整改';
  316. }
  317. }
  318. function setHdangerLevel(hdangerLevel) {
  319. var title = '';
  320. if (hdangerLevel == 1) {
  321. title = '重大';
  322. } else if (hdangerLevel == 2) {
  323. title = '较大';
  324. } else if (hdangerLevel == 3) {
  325. title = '一般';
  326. } else if (hdangerLevel == 4) {
  327. title = '较低';
  328. } else {
  329. return '未知';
  330. }
  331. return title;
  332. }
  333. //整改记录数据
  334. function retifyData(records) {
  335. $('.getRetifyRecord').show();
  336. $("#hdangerRetifyAmountspent").text((records[0].hdangerRetifyAmountspent) != null ? (records[0].hdangerRetifyAmountspent + ' 元') : '-');
  337. $("#hdangerRetifyTypeName").text((records[0].hdangerRetifyTypeName) != null ? (records[0].hdangerRetifyTypeName) : '-');
  338. $("#hdangerRetifyMeasures").text((records[0].hdangerRetifyMeasures) != null ? (records[0].hdangerRetifyMeasures) : '-');
  339. $("#hdangerRetifyReasons").text(((records[0].hdangerRetifyReasons) != null && (records[0].hdangerRetifyReasons) != '') ? (records[0].hdangerRetifyReasons) : '-');
  340. $("#hdangerRetifycreatedTime").text((records[0].createdTime) != null ? (records[0].createdTime) : '-');
  341. $("#hdangerRetifyAssistingunit").text((records[0].hdangerRetifyAssistingunit) != null ? (records[0].hdangerRetifyAssistingunit) : '-');
  342. var retifyAtt = records[0].attachList;
  343. if (retifyAtt.length > 0) {
  344. $('#retifyAtt ').html('');
  345. $('.retify-img').show();
  346. var atthtml = '';
  347. for (var i = 0; i < retifyAtt.length; i++) {
  348. var att = retifyAtt[i];
  349. if (att.attachType == "image") {
  350. atthtml += '<a target ="_blank" href="' + att.attachPath + '" style="margin-right: 10px;">';
  351. atthtml += '<img style="width: 60px;height: 80px;" src="' + att.attachPath + '">';
  352. atthtml += '</a>';
  353. }
  354. }
  355. $('#retifyAtt ').html(atthtml);
  356. }
  357. $('.getRetifyRecord').show();
  358. var html = "";
  359. for (var i = 0; i < records.length; i++) {
  360. html += "<tr>";
  361. var record = records[i];
  362. html += "<td>" + (i + 1) + "</td>";
  363. html += "<td>" + record.createdTime + "</td>";
  364. html += "<td>" + record.hdangerRetifyGroupName + "</td>";
  365. html += "<td>" + record.hdangerRetifyByName + "</td>";
  366. html += "<td>" + record.hdangerRetifyTypeName + "</td>";
  367. html += "<td>" + record.hdangerRetifyAssistingunit + "</td>";
  368. html += "<td>" + record.hdangerRetifyAmountspent + "</td>";
  369. html += "<td>" + record.hdangerRetifyReasons + "</td>";
  370. html += "<td>" + record.hdangerRetifyMeasures + "</td>";
  371. html += "</tr>";
  372. }
  373. $('#retifyRecord ').html(html);
  374. }
  375. //验收记录
  376. function acceptData(records) {
  377. $('.getAcceptRecord').show();
  378. $("#hdangerAcceptedResult").text((records[0].hdangerAcceptedResult) != null ? (records[0].hdangerAcceptedResult) : '-');
  379. $("#hdangerAcceptedRemark").text((records[0].hdangerAcceptedRemark) != null ? (records[0].hdangerAcceptedRemark) : '-');
  380. $("#hdangerAcceptedTime").text((records[0].hdangerAcceptedTime) != null ? (records[0].hdangerAcceptedTime) : '-');
  381. var acceptAtt = records[0].attachList;
  382. if (acceptAtt.length > 0) {
  383. $('#acceptAtt ').html('');
  384. $('.accept-img').show();
  385. var atthtml = '';
  386. for (var i = 0; i < acceptAtt.length; i++) {
  387. var att = acceptAtt[i];
  388. if (att.attachType == "image") {
  389. atthtml += '<a target ="_blank" href="' + att.attachPath + '" style="margin-right: 10px;">';
  390. atthtml += '<img style="width: 60px;height: 80px;" src="' + att.attachPath + '">';
  391. atthtml += '</a>';
  392. }
  393. }
  394. $('#acceptAtt ').html(atthtml);
  395. }
  396. $('.getAcceptRecord').show();
  397. var html = "";
  398. for (var i = 0; i < records.length; i++) {
  399. html += "<tr>";
  400. var record = records[i];
  401. html += "<td>" + (i + 1) + "</td>";
  402. html += "<td>" + record.createdTime + "</td>";
  403. html += "<td>" + record.groupName + "</td>";
  404. html += "<td>" + record.hdangerAcceptedByName + "</td>";
  405. html += "<td>" + record.hdangerAcceptedResult + "</td>";
  406. html += "<td>" + record.hdangerAcceptedRemark + "</td>";
  407. html += "</tr>";
  408. }
  409. $('#acceptRecord ').html(html);
  410. }
  411. });
  412. function videoPlayer(url) {
  413. layer.open({
  414. type: 2,
  415. zIndex: 1000,
  416. title: "视频播放",
  417. shadeClose: true,
  418. area: ['650px', '530px'],
  419. content: "./videoPlayer.html?ipCameraUrl=" + url,
  420. fixed: false
  421. });
  422. }
  423. </script>
  424. </body>
  425. </html>