details.html 22 KB

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