@ -5,6 +5,30 @@
< th:block th:include = "include :: layout-latest-css" / >
< th:block th:include = "include :: ztree-css" / >
< / head >
< style >
.echart{
width: 100%;
height: 43%;
background-color: white;
margin-top: 80px;
border-radius: 10px;
box-shadow: 1px 1px 3px rgba(0, 0, 0, .2);
display: flex;
justify-content: space-between;
overflow: hidden;
}
.children_echarts{
width: 49%;
height: 100%;
}
.left_echarts{
}
.right_echarts{
}
< / style >
< body class = "gray-bg" >
< div class = "ui-layout-center" id = "app" >
< div class = "container-div" >
@ -45,13 +69,15 @@
< / div >
< / form >
< / div >
< div class = "btn-group-sm" id = "toolbar" role = "group" >
<!-- <a class="btn btn - warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:usernum:export"> -->
<!-- <i class="fa fa - download"></i> 导出 -->
<!-- </a> -->
< / div >
< div class = "col-sm-12 select-table table-striped" >
< div class = "echart" >
< div class = "children_echarts left_echarts" >
< div id = "leftMain" style = "width: 600px;height:330px" > < / div >
< / div >
< div class = "children_echarts right_echarts" >
< div id = "rightMain" style = "width: 600px;height:330px" > < / div >
< / div >
< / div >
< div class = "col-sm-12 select-table table-striped" style = "min-height: 44%;" >
< table id = "bootstrap-table" > < / table >
< / div >
< / div >
@ -61,6 +87,7 @@
< th:block th:include = "include :: footer" / >
< th:block th:include = "include :: layout-latest-js" / >
< th:block th:include = "include :: ztree-js" / >
< th:block th:include = "include :: echarts-js" / >
< script th:inline = "javascript" >
var detailFlag = [[${@permission.hasPermi('system:usernum:detail')}]];
var politics = [[${@dict.getType('sys_user_politics')}]];
@ -203,7 +230,59 @@
var url = prefix + '/print/' + deptId;
$.modal.openTab("打印界面", url);
}
var myChart = echarts.init(document.getElementById('leftMain'));
axios.post(prefix + '/countSm').then(response => {
if (response.data.code == web_status.SUCCESS){
myChart.setOption({
title: {
text: '人员涉密程度统计'
},
tooltip: {},
legend: {
data:['人数']
},
xAxis: {
data: response.data.data.xAxisData
},
yAxis: {
},
series: [
{
name: '人数',
type: 'bar',
data: response.data.data.yAxisData,
itemStyle: {
color: '#5470C6'
}
}
]
});
console.log(response.data.data)
}
})
var rightMain = echarts.init(document.getElementById('rightMain'));
axios.post(prefix + '/countUser').then(response => {
if (response.data.code == web_status.SUCCESS){
rightMain.setOption({
title: {
text: '人员状态统计'
},
tooltip: {},
legend: {
orient: 'vertical',
x: 'right',
data: ['已登记', '已申报', '已审核', '已离职']
},
series: [
{
type: 'pie',
data: response.data.data
}
]
});
}
})
< / script >
< / body >
< / html >