safesite/safesite/templates/main.html

413 lines
14 KiB
HTML

<div style="width:100%;height:300px;padding: 20px;">
<div id="map1div" style="width: 33%; height:100%;float:left;"></div>
<div id="map2div" style="width: 66%; height:100%;float:left;"></div>
</div>
<div style="width:100%">
<div style="width:100%;height:160px;">
<div style="width: 19.5%;
position: relative;
margin-left: 0.5%;
float: left;">
<div style="border-radius: 5px; display: block; margin: 10px; overflow:hidden;color: #FFFFFF; background-color: #27a9e3;">
<div style="width: 80px;
height: 50px;
display: block;
float: left;
padding-top: 10px;
padding-left: 5px;
margin-bottom: 18px;
font-size: 35px;
line-height: 35px;">
<img src="/static/safesite/mystatic/images/yhzs.png" style="width:80%;text-align: center;height:90%"
id="headimg" />
</div>
<div style=" position: absolute;
right: 10px;
padding-right: 15px;">
<div style="padding-top: 10px;
text-align: right;
font-size: 32px;
line-height: 36px;
letter-spacing: -1px;
margin-bottom: 0px;
font-weight: 300;" id="yhData">
</div>
<div style="text-align: right;
font-size: 15px;
padding-top: 5px;">
我的待处理隐患
</div>
</div>
<a url="troublehtml" value="listall" style="background-color: #208dbe; clear: both;
display: block;
padding: 5px 10px 5px 10px;
text-transform: uppercase;
font-weight: 300;
font-size: 11px;
color: #fff;
opacity: 0.7;height: 20px;cursor: pointer;" title="事故隐患" onclick="changehref(this)">
点击查看全部
<i style="background-position: -27px -10px;width: 14px;
height: 14px; vertical-align: top;background-repeat: no-repeat;margin-top: 4px;
float: right;background-image: url(/static/safesite/mystatic/images/syncfusion-icons-white.png);"></i>
</a>
</div>
</div>
<div style="width: 19.5%;
position: relative;
margin-left: 0.5%;
float: left;">
<div style="border-radius: 5px; display: block; margin: 10px; overflow:hidden;color: #FFFFFF; background-color: #28b779;">
<div style="width: 80px;
height: 50px;
display: block;
float: left;
padding-top: 10px;
padding-left: 10px;
margin-bottom: 18px;
font-size: 35px;
line-height: 35px;">
<img src="/static/safesite/mystatic/images/px.png" style="width:80%;text-align: center;height:90%"
id="headimg" />
</div>
<div style=" position: absolute;
right: 10px;
padding-right: 15px;">
<div style="padding-top: 10px;
text-align: right;
font-size: 32px;
line-height: 36px;
letter-spacing: -1px;
margin-bottom: 0px;
font-weight: 300;" id="pxData">
</div>
<div style="text-align: right;
font-size: 15px;
padding-top: 5px;">
本月线下培训
</div>
</div>
<a url="trainhtml" value="listall" style="background-color: #10a062; clear: both;
display: block;
padding: 5px 10px 5px 10px;
text-transform: uppercase;
font-weight: 300;
font-size: 11px;
color: #fff;
opacity: 0.7;height: 20px;cursor: pointer;" title="在线培训" onclick="changehref(this)">
点击查看全部
<i style="background-position: -27px -10px;width: 14px;
height: 14px; vertical-align: top;background-repeat: no-repeat;margin-top: 4px;
float: right;background-image: url(/static/safesite/mystatic/images/syncfusion-icons-white.png);"></i>
</a>
</div>
</div>
<div style="width: 19.5%;
position: relative;
margin-left: 0.5%;
float: left;">
<div style="border-radius: 5px; display: block; margin: 10px; overflow:hidden;color: #FFFFFF; background-color: #852b99;">
<div style="width: 80px;
height: 50px;
display: block;
float: left;
padding-top: 10px;
padding-left: 5px;
margin-bottom: 18px;
font-size: 35px;
line-height: 35px;">
<img src="/static/safesite/mystatic/images/yl.png" style="width:80%;text-align: center;height:90%"
id="headimg" />
</div>
<div style=" position: absolute;
right: 10px;
padding-right: 15px;">
<div style="padding-top: 10px;
text-align: right;
font-size: 32px;
line-height: 36px;
letter-spacing: -1px;
margin-bottom: 0px;
font-weight: 300;" id="ylData">
</div>
<div style="text-align: right;
font-size: 15px;
padding-top: 5px;">
本月应急演练
</div>
</div>
<a url="drillhtml" value="listall" style="background-color: #6e1881; clear: both;
display: block;
padding: 5px 10px 5px 10px;
text-transform: uppercase;
font-weight: 300;
font-size: 11px;
color: #fff;
opacity: 0.7;height: 20px;cursor: pointer;" title="应急演练" onclick="changehref(this)">
点击查看全部
<i style="background-position: -27px -10px;width: 14px;
height: 14px; vertical-align: top;background-repeat: no-repeat;margin-top: 4px;
float: right;background-image: url(/static/safesite/mystatic/images/syncfusion-icons-white.png);"></i>
</a>
</div>
</div>
<div style="width: 19.5%;
position: relative;
margin-left: 0.5%;
float: left;">
<div style="border-radius: 5px; display: block; margin: 10px; overflow:hidden;color: #FFFFFF; background-color: #ffb848;">
<div style="width: 80px;
height: 50px;
display: block;
float: left;
padding-top: 10px;
padding-left: 5px;
margin-bottom: 18px;
font-size: 35px;
line-height: 35px;">
<img src="/static/safesite/mystatic/images/xwgc.png" style="width:80%;text-align: center;height:90%"
id="headimg" />
</div>
<div style=" position: absolute;
right: 10px;
padding-right: 15px;">
<div style="padding-top: 10px;
text-align: right;
font-size: 32px;
line-height: 36px;
letter-spacing: -1px;
margin-bottom: 0px;
font-weight: 300;" id="xwData">
</div>
<div style="text-align: right;
font-size: 15px;
padding-top: 5px;">
本月行为观察
</div>
</div>
<a url="observehtml" value="listall" style="background-color: #cb871b; clear: both;
display: block;
padding: 5px 10px 5px 10px;
text-transform: uppercase;
font-weight: 300;
font-size: 11px;
color: #fff;
opacity: 0.7;height: 20px;cursor: pointer;" title="行为观察" onclick="changehref(this)">
点击查看全部
<i style="background-position: -27px -10px;width: 14px;
height: 14px; vertical-align: top;background-repeat: no-repeat;margin-top: 4px;
float: right;background-image: url(/static/safesite/mystatic/images/syncfusion-icons-white.png);"></i>
</a>
</div>
</div>
<div style="width: 19.5%;
position: relative;
margin-left: 0.5%;
float: left;">
<div style="border-radius: 5px; display: block; margin: 10px; overflow:hidden;color: #FFFFFF; background-color: #ec2a3b;">
<div style="width: 80px;
height: 50px;
display: block;
float: left;
padding-top: 10px;
padding-left: 10px;
margin-bottom: 18px;
font-size: 35px;
line-height: 35px;">
<img src="/static/safesite/mystatic/images/wssj.png" style="width:80%;text-align: center;height:90%"
id="headimg" />
</div>
<div style=" position: absolute;
right: 10px;
padding-right: 15px;">
<div style="padding-top: 10px;
text-align: right;
font-size: 32px;
line-height: 36px;
letter-spacing: -1px;
margin-bottom: 0px;
font-weight: 300;" id="wsData">
</div>
<div style="text-align: right;
font-size: 15px;
padding-top: 5px;">
本月未遂事件
</div>
</div>
<a url="misshtml" value="listall" style="background-color: #cb1b1b; clear: both;
display: block;
padding: 5px 10px 5px 10px;
text-transform: uppercase;
font-weight: 300;
font-size: 11px;
color: #fff;
opacity: 0.7;height: 20px;" title="未遂事件" onclick="changehref(this)">
点击查看全部
<i style="background-position: -27px -10px;width: 14px;
height: 14px; vertical-align: top;background-repeat: no-repeat;margin-top: 4px;
float: right;background-image: url(/static/safesite/mystatic/images/syncfusion-icons-white.png);"></i>
</a>
</div>
</div>
</div>
</div>
<div style="width:100%;height:600px">
<div style="width:70%;float:left;height:100%;margin-top: 10px;" align=center>
<div style="margin-left:10px;margin-right: 10px">
<div class="easyui-panel" title="各指标数量趋势" data-options="iconCls:'fa-bar-chart',closable:true,
collapsible:true,"
align=center style="height:100%">
<div id='gzbqst' style="width:90%;height:500px;"></div>
</div>
</div>
</div>
<div style="width:30%;float:left;">
<div style="margin-left:10px;margin-right: 10px;margin-top: 10px">
<div class='easyui-panel' title="通知公告" data-options="iconCls:'fa-list-ol',closable:true,
collapsible:true,">
<table name="" id="" class='easyui-datagrid' data-options="
rownumbers: true,
singleSelect: true,
striped: true,
fitColumns: true,
method: 'get',
border:false,
url: 'api/notice?a=listtodo',
onClickRow:function(index,row){
var url = 'html/notice/detail/' + row.id
opendg('查看详情',url)
}
"
style="height:500px;" border=false>
<thead>
<tr>
<th data-options="field:'id',hidden:true">ID</th>
<th data-options="field:'title',align:'right'" width=100>主题</th>
<th data-options="field:'reads',align:'right'" width=20>查阅数</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<!-- <div style="width:20%;float:left;">
<div class='easyui-panel' title="隐患发现人排名" data-options="iconCls:'fa-list-ol',closable:true,
collapsible:true,">
<table name="" id="fxrpmtable" class='easyui-datagrid' data-options="
rownumbers:true,
singleSelect:true,
striped: true,
method:'get',
url: 'fxhandle?a=yhfxpm',
toolbar:'#fxrpmbar'"
style="height:400px" border=false>
<thead>
<tr>
<th data-options="field:'fxr__userid',hidden:true">用户ID</th>
<th data-options="field:'fxr__name',align:'right'" width="30%">姓名</th>
<th data-options="field:'fxbm__partname',align:'right'" width="30%">所属部门</th>
<th data-options="field:'number',align:'right'" width="30%">填报隐患数目</th>
</tr>
</thead>
</table>
</div>
</div> -->
</div>
<div id = 'panelxdiv' style="width:98%;margin-left:1%;margin-right:1%;height:800px;" hidden=true>
<div id="panelx" class="easyui-panel" data-options="iconCls:'fa-bar-chart'" >
</div>
<script type="text/javascript">
//首页总数统计
$.ajax({
type: "get",
url: "api/main",
data: {},
dateType: "json",
async: false,
success: function (data) {
if (data.code == 1) {
document.getElementById("yhData").innerHTML = data.yhnum;
document.getElementById("pxData").innerHTML = data.monthpx;
document.getElementById("ylData").innerHTML = data.ylnum;
document.getElementById("xwData").innerHTML = data.xwnum;
document.getElementById("wsData").innerHTML = data.wsnum;
}
},
error: function () {
return false;
},
});
//获取相关参数并绘图
$.ajax({
type: "GET",
url: 'setup?a=setup',
datatype: 'json',
processData: false,
contentType: false,
beforeSend: function () { },
success: function (data) {
$.get('api/tool?a=servertime',function(res){
if(res.code==1){
bindmap1('map1div', data,res.year,res.month);
}
})
bindmap2('map2div', data);
},
});
</script>
{% load myfilter %}
{% if request|has_permission:'m_area' %}
<script>
$('#panelxdiv').show()
$('#panelx').panel({
href:'html/mapshow',
title:'地图展示'
})
</script>
{% endif %}
<script>
bindmap9('gzbqst')
$("#sfxbm").combotree({
url: 'parthandle?a=tree',
editable: false,
loadFilter: function (rows) {
return convert(rows);
},
formatter: function (node) {
var s = node.text;
if (node.children) {
s += '&nbsp;<span style=\'color:blue\'>(' + node.children.length + ')</span>';
}
return s;
},
onSelect: function (node) {
$('#sfxr').combobox({
url: 'getuser?partid=' + node.id + '&a=combobox',
editable: false,
});
}
});
</script>