diff --git a/Bootstrap.Admin/Views/Admin/Healths.cshtml b/Bootstrap.Admin/Views/Admin/Healths.cshtml
index 6975c250..817e185b 100644
--- a/Bootstrap.Admin/Views/Admin/Healths.cshtml
+++ b/Bootstrap.Admin/Views/Admin/Healths.cshtml
@@ -10,8 +10,11 @@
}
@@ -26,12 +29,33 @@
}
+@section modal {
+
+}
diff --git a/Bootstrap.Admin/wwwroot/js/healths.js b/Bootstrap.Admin/wwwroot/js/healths.js
index 08a2c8b9..441fb996 100644
--- a/Bootstrap.Admin/wwwroot/js/healths.js
+++ b/Bootstrap.Admin/wwwroot/js/healths.js
@@ -9,7 +9,7 @@
return cate[value];
};
- var $table = $('table').smartTable({
+ var $table = $('#tbCheck').smartTable({
sidePagination: "client",
showToggle: false,
showRefresh: false,
@@ -22,21 +22,18 @@
{ title: "检查结果", field: "Status", formatter: StatusFormatter },
{
title: "明细数据", field: "Data", formatter: function (value, row, index) {
- return '明细';
+ return '';
},
events: {
'click .detail': function (e, value, row, index) {
if ($.isEmptyObject(row.Data)) return;
- var $button = $(e.currentTarget);
- if (!$button.data($.fn.popover.Constructor.DATA_KEY)) {
- var content = $.map(row.Data, function (v, name) {
- return $.format("{0} | {1} |
", name, v);
- }).join("");
- content = $.format('', content);
- $button.popover({ title: cate[row.Name], html: true, content: content, placement: $(window).width() < 768 ? "bottom" : "left" });
- }
- $button.popover('show');
+ var content = $.map(row.Data, function (v, name) {
+ return { name: name, value: v };
+ });
+ // 弹出 modal 健康检查明细窗口
+ $checkDetail.bootstrapTable('load', content);
+ $('#dialogNew').modal('show');
}
}
}
@@ -57,4 +54,16 @@
$.footer();
}
});
+
+ // init detail Table
+ var $checkDetail = $('#checkDetail').smartTable({
+ sidePagination: "client",
+ showToggle: false,
+ showRefresh: false,
+ showColumns: false,
+ columns: [
+ { title: "检查项", field: "name" },
+ { title: "值", field: "value" }
+ ]
+ });
});
\ No newline at end of file