软测单独项目
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.
 
 
 
 
 
 

150 lines
5.2 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>人员在岗统计</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
<link rel="stylesheet" href="../../css/public.css" media="all" />
<style>
html, body {
height: 100%;
width: 100%;
overflow: hidden;
}
.header {
width: 100%;
height: 10%;
}
.content {
width: 100%;
height: 90%;
}
</style>
</head>
<body>
<div class="header">
<form class="layui-form"></form>
</div>
<div class="content" id="echartid">
</div>
<script src="../../js/jquery-2.1.3.min.js"></script>
<script src="../../js/jq_extend.js"></script>
<script type="text/javascript" src="../../layui/layui.js"></script>
<script src="../../js/echarts.min.js"></script>
<script type="text/javascript">
layui.use(['form', 'layer', 'table'], function () {
var form = layui.form,
layer = parent.layer === undefined ? layui.layer : top.layer,
table = layui.table;
var OrgId = JSON.parse(window.sessionStorage.getItem("userInfo")).OrgID;
var myChart = echarts.init(document.getElementById('echartid'));
option = {
title: {
text: '人员在岗统计',
left: 150
},
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
toolbox: {
feature: {
saveAsImage: {}
}
, right: 50
},
legend: {
data: ['人员在岗统计']
},
xAxis: {
type: 'category',
data: ['在岗', '借用', '休假', '请假', '学习', '培训', '帮工', '住院', '出差', '出国', '滞留部队', '其他']
},
yAxis: {
name: "人数",
type: 'value',
minInterval: 1
},
series: [{
name: '人员在岗统计',
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: 'bar',
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#1fa1f3'
}, {
offset: 1,
color: '#7eccfd'
}]),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10,
barBorderRadius: [50, 50, 0, 0],
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#1fa1f3',
fontSize: 24
}
}
}
}
}]
};
myChart.setOption(option);
window.onresize = function () {
myChart.resize();
};
function personSta() {
var data = [];
$.post("../../ashx/SysEmpHandler.ashx", {
Action: "personSta",
Org_Id: OrgId,
random: new Date().getTime()//随机参数
}, function (res) {
if (res.code == 1) {
var num = res.data[0];
data.push(num.ZG);
data.push(num.JY);
data.push(num.XJ);
data.push(num.QJ);
data.push(num.XX);
data.push(num.PX);
data.push(num.BG);
data.push(num.ZY);
data.push(num.CC);
data.push(num.CG);
data.push(num.ZLBD);
data.push(num.QT);
option.series[0].data = data;
myChart.setOption(option);
} else {
}
}, "JSON");
}
personSta();
})
</script>
</body>
</html>