<!DOCTYPE html>
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
<head>
|
<th:block th:include="include :: header('所有隐患列表')"/>
|
</head>
|
<body class="gray-bg">
|
|
|
<div class="container-div">
|
<div class="row">
|
<div class="col-sm-12 search-collapse">
|
|
<form id="formId">
|
<div class="select-list">
|
<ul>
|
<li>
|
<label>搜索:</label>
|
<input type="text" name="hazardName" placeholder="请输入重大危险源名称"/>
|
</li>
|
<li>
|
<label>重大危险源级别:</label>
|
<select name="hazardRank">
|
<option value="">所有</option>
|
<option :value="1">1</option>
|
<option :value="2">2</option>
|
<option :value="3">3</option>
|
<option :value="4">4</option>
|
</select>
|
</li>
|
|
<li>
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
class="fa fa-search"></i> 搜索</a>
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
class="fa fa-refresh"></i> 重置</a>
|
</li>
|
</ul>
|
</div>
|
</form>
|
</div>
|
|
<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
|
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()">-->
|
<!-- <i class="fa fa-download"></i> 导出-->
|
<!-- </a>-->
|
<!-- </div>-->
|
|
|
<div class="col-sm-12 select-table table-striped">
|
<table id="bootstrap-table"></table>
|
</div>
|
</div>
|
</div>
|
<th:block th:include="include :: footer"/>
|
<script th:inline="javascript">
|
var prefix = ctx + "tr/selectRiskAndPeoplePage";
|
// var common = [[${common}]];//用户角色 是否在公司管理员
|
$(function () {
|
var options = {
|
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',
|
title: 'id'
|
},
|
{
|
field: 'areaCode',
|
title: '行政区划'
|
},
|
{
|
field: 'companyName',
|
title: '企业名称',
|
},
|
{
|
field: 'companyNatureName',
|
title: '企业类型'
|
},
|
{
|
field: 'hazardCode',
|
title: '危险源编码'
|
},
|
{
|
field: 'hazardName',
|
title: '危险源名称'
|
},
|
{
|
field: 'hazardRankName',
|
title: '危险级别'
|
},
|
{
|
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('');
|
}
|
}
|
]
|
};
|
$.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>
|