From 7be0d5b901b999d2347774df3cc1a64927838bb3 Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期二, 15 四月 2025 10:10:35 +0800 Subject: [PATCH] 优化每年专项数据获取 --- src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html | 49 +++++++++++++++++++++++++++---------------------- 1 files changed, 27 insertions(+), 22 deletions(-) diff --git a/src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html b/src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html index 5bd4f76..ec8d27f 100644 --- a/src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html +++ b/src/main/resources/templates/tr/selectOldRiskInfoPage/selectOldRiskInfoPage.html @@ -82,18 +82,19 @@ </div> <th:block th:include="include :: footer"/> <script th:inline="javascript"> - var prefix = ctx + "info"; + var prefix = ctx + "tr/selectOldRiskInfoPage"; // var common = [[${common}]];//用户角色 是否在公司管理员 - console.log(ctx,prefix,'prefix') $(function () { var options = { - url: prefix + "/selectOldRiskInfoPage", - createUrl: prefix + "/add", - updateUrl: prefix + "/edit/{id}", - removeUrl: prefix + "/removeDangerLedger", - exportUrl: prefix + "/export", - detailUrl: prefix + "/detail/{id}", + url: prefix + "/list", + // createUrl: prefix + "/add", + // updateUrl: prefix + "/edit/{id}", + // removeUrl: prefix + "/removeDangerLedger", + // exportUrl: prefix + "/export", + // detailUrl: prefix + "/detail/{id}", modalName: "隐患列表", + detailView: true, + detailFormatter: detailFormatter, columns: [ { field: 'id', @@ -106,19 +107,6 @@ { field: 'riskDep', title: '隐患所在部门', - // formatter: function (value, row, index) { - // if (row.dangerSources == "2") { - // return "隐患上报"; - // } else { - // if (value == "1") { - // return "基础清单排查"; - // } else if (value == "2") { - // return "选择风险单元清单排查"; - // } else { - // return "选择风险单元清单排查"; - // } - // } - // } }, { field: 'findPeople', @@ -143,10 +131,27 @@ { field: 'findTime', title: '隐患发现时间' - }] + } + ] }; $.table.init(options); }); + function detailFormatter(index, row) { + var html = []; + html.push('<p><b>id:</b> ' + row.id + '</p>'); + html.push('<p><b>级别:</b> ' + row.riskLevel + '</p>'); + html.push('<p><b>隐患所在部门:</b> ' + row.riskDep + '</p>'); + html.push('<p><b>发现人:</b> ' + row.findPeople + '</p>'); + html.push('<p><b>上报人:</b> ' + row.reportPeople + '</p>'); + html.push('<p><b>负责人:</b> ' + row.liabilityPeople + '</p>'); + html.push('<p><b>验收人:</b> ' + row.acceptPeople + '</p>'); + html.push('<p><b>隐患内容:</b> ' + row.riskDesc + '</p>'); + html.push('<p><b>隐患发现时间:</b> ' + row.findTime + '</p>'); + // $.each(row, function(key, value) { + // html.push('<p><b>' + key + ':</b> ' + value + '</p>'); + // }); + return html.join(''); + } </script> </body> </html> \ No newline at end of file -- Gitblit v1.9.2