From 6522a12bd74cf6bf8d96c87e3d46412314ea6500 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 28 四月 2023 15:30:13 +0800
Subject: [PATCH] 添加包保责任制查看

---
 src/main/resources/templates/tr/riskAndPeopleInfo/riskAndPeopleInfo.html |   45 ++++++++++++++++++---------------------------
 1 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/src/main/resources/templates/tr/riskAndPeopleInfo/riskAndPeopleInfo.html b/src/main/resources/templates/tr/riskAndPeopleInfo/riskAndPeopleInfo.html
index 56eed5b..246c0a3 100644
--- a/src/main/resources/templates/tr/riskAndPeopleInfo/riskAndPeopleInfo.html
+++ b/src/main/resources/templates/tr/riskAndPeopleInfo/riskAndPeopleInfo.html
@@ -73,7 +73,7 @@
 </div>
 <th:block th:include="include :: footer"/>
 <script th:inline="javascript">
-    var prefix = ctx + "tr/selectRiskAndPeoplePage";
+    var prefix = ctx + "tr/riskAndPeopleInfo";
 
     $(function () {
         $("#count").text([[${count}]]);
@@ -99,9 +99,15 @@
             // exportUrl: prefix + "/export",
             detailUrl: prefix + "/detailRiskAndPeopleInfo/{id}",
             modalName: "包保责任制",
-            detailView: true,
-            detailFormatter: detailFormatter,
             columns: [
+                {
+                    field: 'id',
+                    title: 'id',
+                },
+                {
+                    field: 'areaCode',
+                    title: '行政区划',
+                },
                 {
                     field: 'companyName',
                     title: '企业名称',
@@ -126,34 +132,19 @@
                     field: 'parkName',
                     title: '所在园区'
                 },
-                // {
-                //     title: '操作',
-                //     align: 'center',
-                //     formatter: function (value, row, index) {
-                //         var actions = [];
-                //         actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></i>查看</a> ');
-                //         return actions.join('');
-                //     }
-                // }
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function (value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></i>查看</a> ');
+                        return actions.join('');
+                    }
+                }
             ]
         };
         $.table.init(options);
     });
-    function detailFormatter(index, row) {
-        var html = [];
-        html.push('<p><b>id:</b> ' + row.id + '</p>');
-        html.push('<p><b>行政区划:</b> ' + row.areaCode + '</p>');
-        html.push('<p><b>企业名称:</b> ' + row.companyName + '</p>');
-        html.push('<p><b>企业类型:</b> ' + row.companyNatureName + '</p>');
-        html.push('<p><b>危险源编码:</b> ' + row.hazardCode + '</p>');
-        html.push('<p><b>危险源名称:</b> ' + row.hazardName + '</p>');
-        html.push('<p><b>危险级别:</b> ' + row.hazardRankName + '</p>');
-        html.push('<p><b>所在园区:</b> ' + row.parkName + '</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