You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
204 lines
5.4 KiB
204 lines
5.4 KiB
<#include "../../_include/_t.ftl"/>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title></title>
|
|
<#include "../../_include/_h.ftl"/>
|
|
<#include "../../_include/_l.ftl"/>
|
|
<#include "../../_include/_j.ftl"/>
|
|
<#include "../../_include/_z.ftl"/>
|
|
<#include "../../_include/_e.ftl"/>
|
|
<#include "../../_include/bdata/_c.ftl"/>
|
|
<style type="text/css">
|
|
.aes-yellow{
|
|
color:#333333 !important;
|
|
background-color:#F4D26F !important;
|
|
}
|
|
.aes-red{
|
|
color:#ffffff !important;
|
|
background-color:red !important;
|
|
}
|
|
.td_class{
|
|
border:solid 1px #bce8f1;
|
|
font-size:18px;
|
|
font-weight:bold;
|
|
text-align:center;
|
|
height:40px;
|
|
line-height:40px;
|
|
vertical-align:middle;
|
|
background-color:#337ab7;
|
|
color:#fff;
|
|
}
|
|
|
|
.tr_class{
|
|
border:solid 1px #bce8f1;
|
|
font-size:18px;
|
|
text-align:center;
|
|
height:40px;
|
|
line-height:40px;
|
|
vertical-align:middle;
|
|
background-color:#f9f9f9;
|
|
color:#333;
|
|
}
|
|
._tr_class{
|
|
border:solid 1px #bce8f1;
|
|
font-size:18px;
|
|
text-align:center;
|
|
height:40px;
|
|
line-height:40px;
|
|
vertical-align:middle;
|
|
background-color:#fff;
|
|
color:#333;
|
|
}
|
|
.clear{
|
|
clear: both;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="layui-layout-body">
|
|
<div class="layui-layout layui-layout-admin">
|
|
<!-- 内容主体区域 -->
|
|
<div class="layui-body" style="top:0;">
|
|
<div class="page_content" style="margin-left: 0px;width: 100%;">
|
|
<div style="min-height: 80vh;padding:30px 50px;">
|
|
<h1 style="text-align:center;margin-bottom:20px;">单位按月隐患统计</h1>
|
|
<div class="page_tools">
|
|
<div class="layui-inline" style="width:90px;">
|
|
<input class="layui-input" type="text" id="data_1_01_beginDate" value="${.now?string('yyyy')}-01" autocomplete="off" style="font-size:16px;padding-top:4px;cursor:pointer;letter-spacing:1px;"/>
|
|
</div>
|
|
<div class="layui-inline">到</div>
|
|
<div class="layui-inline" style="width:90px;">
|
|
<input class="layui-input" type="text" id="data_1_01_endDate" value="${.now?string('yyyy-MM')}" autocomplete="off" style="font-size:16px;padding-top:4px;cursor:pointer;letter-spacing:1px;"/>
|
|
</div>
|
|
<button id="data_1_01_div_queryBtn" class="layui-btn layui-btn-normal"><i class="layui-icon"></i>查询</button>
|
|
</div>
|
|
<div id="data_1_01_div_echars" style="height:500px;width: 90%;margin:10px auto;margin-bottom: 66px;">
|
|
</div>
|
|
<table width="90%" style="border:solid 1px #bce8f1;margin:10px auto;border:solid 1px rgb(221, 221, 221);border-radius:5px;">
|
|
<thead>
|
|
<th class="td_class">时间</th>
|
|
<th class="td_class">隐患数</th>
|
|
<th class="td_class">时间</th>
|
|
<th class="td_class">隐患数</th>
|
|
<th class="td_class">时间</th>
|
|
<th class="td_class">隐患数</th>
|
|
</thead>
|
|
<tbody id="table_data">
|
|
<tr>
|
|
<td colspan="6" class="_tr_class">暂无数据</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
layuiplus.on_w_1(function(){
|
|
layuiplus.init(1);
|
|
$.ajax({
|
|
type:"get",
|
|
url:"${ctx}/bdata/data1/load/1",
|
|
data:{
|
|
baseId:"${manager_user['baseId']}",
|
|
begin:$("#data_1_01_beginDate").val(),
|
|
end:$("#data_1_01_endDate").val()
|
|
},
|
|
dataType:"json",
|
|
success:function(data){
|
|
//解析data.lis
|
|
var tArr = new Array();
|
|
var dArr = new Array();
|
|
var _strHtml = "<tr>";
|
|
for(var i = 0;i < data.lis.length;i++){
|
|
if((i+1)%3 == 0){
|
|
_strHtml += '<td class="_tr_class">'+data.lis[i].ttym+'</td><td class="_tr_class">'+data.lis[i].cs+'</td></tr></tr>';
|
|
}else{
|
|
_strHtml += '<td class="_tr_class">'+data.lis[i].ttym+'</td><td class="_tr_class">'+data.lis[i].cs+'</td>';
|
|
}
|
|
tArr.push(data.lis[i].ttym);
|
|
dArr.push(data.lis[i].cs);
|
|
}
|
|
$("#table_data").html(_strHtml);
|
|
bdataEchars("1","data_1_01_div_echars",tArr,dArr);
|
|
}
|
|
});
|
|
//单位消防隐患统计的查询按钮
|
|
$("#data_1_01_div_queryBtn").click(function(){
|
|
$.ajax({
|
|
type:"get",
|
|
url:"${ctx}/bdata/data1/load/1",
|
|
data:{
|
|
baseId:"${manager_user['baseId']}",
|
|
begin:$("#data_1_01_beginDate").val(),
|
|
end:$("#data_1_01_endDate").val()
|
|
},
|
|
dataType:"json",
|
|
success:function(data){
|
|
//解析data.lis
|
|
var tArr = new Array();
|
|
var dArr = new Array();
|
|
var _strHtml = "<tr>";
|
|
for(var i = 0;i < data.lis.length;i++){
|
|
if((i+1)%3 == 0){
|
|
_strHtml += '<td class="_tr_class">'+data.lis[i].ttym+'</td><td class="_tr_class">'+data.lis[i].cs+'</td></tr></tr>';
|
|
}else{
|
|
_strHtml += '<td class="_tr_class">'+data.lis[i].ttym+'</td><td class="_tr_class">'+data.lis[i].cs+'</td>';
|
|
}
|
|
tArr.push(data.lis[i].ttym);
|
|
dArr.push(data.lis[i].cs);
|
|
}
|
|
$("#table_data").html(_strHtml);
|
|
bdataEchars("1","data_1_01_div_echars",tArr,dArr);
|
|
}
|
|
});
|
|
});
|
|
//日期input
|
|
ldate.render({
|
|
elem:"#data_1_01_beginDate",
|
|
type:"month",
|
|
max:"#data_1_01_endDate"
|
|
});
|
|
ldate.render({
|
|
elem:"#data_1_01_endDate",
|
|
type:"month",
|
|
max:"nowTime"
|
|
});
|
|
});
|
|
var bdataEchars = function(t,pdiv){
|
|
var option = {
|
|
tooltip:{
|
|
trigger:"axis"
|
|
},
|
|
grid:{
|
|
left:"3%",
|
|
right:"4%",
|
|
bottom:"3%",
|
|
containLabel:true
|
|
},
|
|
xAxis:{
|
|
type:"category",
|
|
boundaryGap:false,
|
|
data:arguments[2]
|
|
},
|
|
yAxis:{
|
|
type:"value",
|
|
minInterval:1
|
|
},
|
|
series:[
|
|
{
|
|
name:"隐患数量",
|
|
type:"line",
|
|
data:arguments[3]
|
|
}
|
|
]
|
|
};
|
|
|
|
echarts.init($("#"+pdiv).get(0)).setOption(option);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|