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

2315 lines
145 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="home/css/style.css" rel="stylesheet" media="all">
<script src="home/js/jquery-1.js"></script>
<script src="home/js/echarts.min.js"></script>
<link href="../layui/css/layui.css" rel="stylesheet" />
<link rel="stylesheet" href="../../../css/public.css" media="all" />
<!-- 数字计数器 -->
<link type="text/css" href="home/css/globle.css" rel="stylesheet" />
<script type="text/javascript" src="home/js/num.js"></script>
<script type="text/javascript" src="../layui/layui.js"></script>
<style>
.zongshu {
margin-left: 0px;
}
.danwei {
margin-left: 50%;
}
.content {
width: 100%;
height: 96%;
padding: 0 20px 20px 20px;
}
.content-con {
padding: 10px;
}
.crumb1 {
width: 50%;
height: 5%;
float: left;
background: url(home/img/crumbbg1.png) no-repeat;
clip-path: polygon(0px 0px, 350px 0px, 370px 20px, 350px 40px, 0px 40px, 0px 0px);
}
.crumb2 {
width: 50%;
height: 5%;
float: left;
background: url(home/img/crumbbg2.png) no-repeat;
clip-path: polygon(0px 0px, 525px 0px, 545px 20px, 525px 40px, 0px 40px, 0px 0px);
}
.crumb3 {
width: 50%;
height: 5%;
float: left;
background: url(home/img/crumbbg3.png) no-repeat;
}
.topcontentorg {
width: 19%;
height: 40px;
float: left;
text-align: center;
font-size: 16px;
font-family: Source Han Sans CN;
line-height: 40px;
cursor: pointer;
}
.topcontentorg select {
border: 0px solid #86262600;
background: transparent;
color: #fff;
font-size: 16px;
font-family: Source Han Sans CN;
width: 150px;
overflow: hidden;
text-overflow: ellipsis;
line-height: 40px;
height: 40px;
outline: 0;
}
.topcontentorg select option {
color: #fff;
background: #084c7c;
font-size: 14px;
left: -25px;
border: 0px;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 7px;
background: #128ca9;
}
</style>
</head>
<body>
<div class="content clearfix">
<div id="crumb" class="crumb1">
<div class="topcontentorg selectContent0">西藏消防总队</div>
<div class="topcontentorg selectContent1">
</div>
<div class="topcontentorg selectContent2">
</div>
<div class="topcontentorg selectContent3">
</div>
</div>
<div class="con-left fl">
<!-- 人员管理 -->
<div class="content-div fl">
<div class="content-div-tit">人员信息</div>
<div class="content-con">
<div class="yqgl-nums">
<div class="zongshu fl">今日人员总数</div>
<div id="dataNumsa"> </div>
<div id="dataNums2"> </div>
<div class="danwei fl">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
</div>
<div id="ryxx" style="width: 100%; height: calc(100% - 48px);"></div>
</div>
</div>
<!-- 用车请假统计 -->
<div class="content-div fl" style=" margin-left: 20px; width: calc(33.33% - 40px); ">
<div class="content-div-tit">请假、用车统计</div>
<div class="content-con">
<div id="qjyctj" style="width: 100%; height: 100%;"></div>
</div>
</div>
<!-- 今日考勤 -->
<div id="conjrkqSta" class="content-div fr" style="margin-right: 0; margin-left: 20px;">
<div class="content-div-tit">今日考勤统计</div>
<div class="content-con">
<div style="width:100%;height:20%;text-align:center;">
<div style="font-size: 16px; font-weight: 900; color: #4CF8FF; float:left;">实到/应到</div>
<div style="font-size: 26px; font-weight: 900; color: #ffffff; padding-left: 47px; float: left; cursor:pointer;" id="divYdSd">0/0</div>
<select id="is_TimeTypeHome" class="layui-btn" lay-filter="is_TimeTypeHome" lay-search="">
<option value="1">上午上班打卡</option>
<option value="2">上午下班打卡</option>
<option value="3">下午上班打卡</option>
<option value="4">下午下班打卡</option>
</select>
<!--<div id="xwSta" style="font-size: 14px; font-weight: 900; color: #4CF8FF; float: right; cursor: pointer; margin: 0 5px 0 5px;">下午</div>
<div style=" background-color: #4CF8FF; float: right; width: 1px; height: 20px;"></div>
<div id="swSta" style="font-size: 14px; font-weight: 900; color: #4CF8FF; float: right; cursor: pointer; margin: 0 5px 0 5px; ">上午</div>-->
</div>
<div id="jrkq" style="width: 100%; height: 80%;"></div>
</div>
</div>
<!-- 报警信息 -->
<div id="conbjxxSta" class="content-div fr" style="margin-right: 0; margin-left: 20px; display: none;">
<div class="content-div-tit">一周报警信息</div>
<div class="content-con">
<div id="bjxx" style="width: 100%; height: 100%;"></div>
</div>
</div>
<!-- 车辆管理 -->
<div class="content-div fl" style="margin-top: 18px; margin-bottom: 0;">
<div class="content-div-tit">车辆信息</div>
<div class="content-con">
<div class="yqgl-nums">
<div class="zongshu fl">今日车辆总数</div>
<div id="dataNumSaCar"> </div>
<div id="dataNums2"> </div>
<div class="danwei fl">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
</div>
<div id="clxx" style="width: 100%; height: calc(100% - 48px);"></div>
</div>
</div>
<!-- 今日出操 -->
<div id="conjrccSta" class="content-div fl" style="width: calc(33.33% - 40px); margin-left: 20px; margin-top: 18px; margin-bottom: 0;">
<div class="content-div-tit">今日出操统计</div>
<div class="content-con">
<div id="jrccSta" style="width: 100%; height: 100%;"></div>
</div>
</div>
<!-- 巡查巡检 -->
<div id="conxjxcSta" class="content-div fl" style="width: calc(33.33% - 40px); margin-left: 20px; margin-top: 18px; margin-bottom: 0; display: none;">
<div class="content-div-tit">巡查巡检统计</div>
<div class="content-con">
<div id="xjxcSta" style="width: 100%; height: 100%;"></div>
</div>
</div>
<!--查铺统计-->
<div class="content-div fl" style="margin-left: 20px; margin-right: 0;margin-top: 18px; margin-bottom: 0;">
<div class="content-div-tit">查铺查哨完成率</div>
<div class="content-con">
<div id="cpsdl" style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
<!-- 人员记录 -->
<div class="content-div fr" id="ryjl" style="width: calc(25.53% - 40px);margin-right: 0; margin-left: 40px; margin-bottom: 0; background: url(home/img/under-divbg.png) no-repeat;background-size: 100% 100%;">
<div class="content-div-tit">人员记录</div>
<div id="faceDoorInOut" style="font-size: 14px; font-weight: 900; color: #4CF8FF; float: right; cursor: pointer; margin: 0 15px 0 5px;">门禁</div>
<div style=" background-color: #4CF8FF; float: right; width: 1px; height: 20px;"></div>
<div id="faceDoorAttendance" style="font-size: 14px; font-weight: 900; color: #4CF8FF; float: right; cursor: pointer; margin: 0 5px 0 5px; ">考勤</div>
<img src="home/img/Dblue.png" style="margin-left: 90px; font-family: auto; width: 241px; color: aquamarine; height: 27px; margin-block: 16px; " />
<p id="ryjlp" style="position: relative; margin-top: -39px; margin-left: 236px; color: aqua; font-size: 17px"></p>
<p style="position: relative; margin-top: -21px;float:left; margin-left: 166px; font-size: 15px">识别次数:</p>
<div class="rcgl-con2" style="overflow-y:auto;height:256px">
<div class=" crjl" style="margin-top: 10px">
</div>
</div>
</div>
<!-- 车辆记录 -->
<div class="content-div fr" id="cljl" style="width: calc(25.53% - 40px); margin-right: 0; margin-left: 40px; margin-bottom: 0; margin-top: 33px; background: url(home/img/under-divbg.png) no-repeat; background-size: 100% 100%;">
<div class="content-div-tit">车辆记录</div>
<img src="home/img/Dblue.png" style="margin-left: 90px; width: 241px; height: 27px; margin-block:16px ;" />
<p style="position: relative; margin-top: -39px; margin-left: 108px; font-size: 15px">车辆进入:</p>
<p style="position: relative; margin-top: -20px; margin-left: 236px; font-size: 15px">车辆出去:</p>
<p id="carIn" style="position: relative; margin-top: -19px; margin-left: 181px; color: aqua; font-size: 17px"></p>
<p id="carOut" style="position: relative; margin-top: -19px; margin-left: 305px; color: aqua; font-size: 17px"></p>
<div class="rcgl-con2" style="overflow-y:auto;height:256px">
<div class=" cljl" style="margin-top:10px">
</div>
</div>
</div>
<div class="content-div fr" id="xjxfjgzqll" style="width: calc(25.53% - 40px); height: 100%; margin-right: 0; margin-left: 40px; margin-bottom: 0;background: url(home /img/under-divbg.png) no-repeat;background-size: 100% 100%;">
<div class="content-div-tit">机构执勤力量</div>
<div class="content-con">
<div class="personnum">
<ul>
<li>
<div class="personnum-img"><img src="home/img/personnum1.png"></div>
<div id="Subordinate_per_sum" class="personnum-num">0</div>
<div class="personnum-tit">人员总数</div>
</li>
<li>
<div class="personnum-img"><img src="home/img/personnum2.png"></div>
<div id="Subordinate_per_zg" class="personnum-num">0</div>
<div class="personnum-tit">在岗数</div>
</li>
<li>
<div class="personnum-img"><img src="home/img/personnum3.png"></div>
<div id="Subordinate_per_lg" class="personnum-num">0</div>
<div class="personnum-tit">离岗数</div>
</li>
</ul>
</div>
<div class="personnum" style="margin-top: 30px;">
<ul>
<li style="width: 25%;">
<div class="personnum-img"><img src="home/img/carnum1.png"></div>
<div id="Subordinate_car_sum" class="personnum-num">0</div>
<div class="personnum-tit">车辆总数</div>
</li>
<li style="width: 25%;">
<div class="personnum-img"><img src="home/img/carnum3.png"></div>
<div id="Subordinate_car_gw" class="personnum-num">0</div>
<div class="personnum-tit">公务车</div>
</li>
<li style="width: 25%;">
<div class="personnum-img"><img src="home/img/carnum2.png"></div>
<div id="Subordinate_car_zq" class="personnum-num">0</div>
<div class="personnum-tit">执勤车</div>
</li>
<li style="width: 25%;">
<div class="personnum-img"><img src="home/img/carnum4.png"></div>
<div id="Subordinate_car_sj" class="personnum-num">0</div>
<div class="personnum-tit">地方车</div>
</li>
</ul>
</div>
<div class="under-list">
<table cellpadding="0" cellspacing="0" border="0">
<tr class="tou">
<th>单位名称</th>
<th>人员总数</th>
<th>车辆总数</th>
</tr>
<tbody id="Subordinate_list">
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
layui.use(['form', 'layer', 'table', 'laytpl'], function () {
var form = layui.form,
layer = layui.layer,
$ = layui.jquery,
laytpl = layui.laytpl,
table = layui.table;
var isHaveChildrenOrgFlag = true; //存在下级机构
var OrgId = "";
if (window.sessionStorage.getItem("userInfo") != null) {
userInfo = window.sessionStorage.getItem("userInfo");
} else {
var kn_root_c_cookie = $.cookie("kn_root_cookie");
var kn_root_c_cookie_json = "";
if (kn_root_c_cookie != undefined) {
kn_root_c_cookie_json = JSON.parse(kn_root_c_cookie)
}
if (kn_root_c_cookie != "" && kn_root_c_cookie != null && typeof kn_root_c_cookie == 'string') {
$.ajax({
type: "post",
url: "../ashx/SysUserHandler.ashx",
data: {
Action: "UserInfo2",
UsersUid: kn_root_c_cookie_json.usersUid,
random: new Date().getTime()//随机参数
},
async: false,
dataType: "json",
success: function (res) {
if (res.code == 1) {
userInfo = JSON.stringify(res.data);
window.sessionStorage.setItem("userInfo", JSON.stringify(res.data));
} else {
alert(res.msg);
}
}
})
} else {
alert("您未登录或登录超时请登录后使用");
window.close();
}
}
OrgId = JSON.parse(window.sessionStorage.getItem("userInfo")).OrgID;
OrgName = JSON.parse(window.sessionStorage.getItem("userInfo")).OrgName;
$(".selectContent0").html(OrgName);
//获取子级机构
function GetOrgChilds(OrgId, selectIndex) {
var selectHtml = "";
$.post("../ashx/FireOrgHandler.ashx", {
Action: "GetOrgChilds",
OrgId: OrgId,
random: new Date().getTime()//随机参数
}, function (res) {
if (res.code == "1") {
var data = res.data;
selectHtml += '<select>';
selectHtml += '<option value="" selectIndex="' + (Number(selectIndex) + 1) + '"> 请选择下级单位 </option>';
data.forEach(function (value, index) {
selectHtml += '<option value="' + value.ORG_ID + '"selectIndex="' + (Number(selectIndex) + 1) + '"> ' + value.EXTENDCODE3 + ' </option>';
});
selectHtml += '</select>';
$(".selectContent" + (Number(selectIndex) + 1)).html(selectHtml);
$(".topcontentorg select").unbind();
$(".topcontentorg select").change(function (e) {
var optionValue = $(this).val();
var selectIndexNext = $(this).find("option:selected").attr("selectIndex");
//执行面包屑更新 、 样式修改
GetOrgChilds(optionValue, selectIndexNext);
if (selectIndexNext == "0") {
$("#crumb").removeAttr("class");
$("#crumb").addClass("crumb1");
} else if (selectIndexNext == "1") {
$("#crumb").removeAttr("class");
$("#crumb").addClass("crumb2");
} else if (selectIndexNext == "2") {
$("#crumb").removeAttr("class");
$("#crumb").addClass("crumb3");
} else {
}
//判断执行页面数据方法执行更新
if (optionValue != "") {
runAllFunction(optionValue);
}
});
if (selectIndex == 0) {
$(".selectContent2").html("");
$(".selectContent3").html("");
} else if (selectIndex == 1) {
$(".selectContent3").html("");
}
}
}, "json")
}
//默认执行方法
GetOrgChilds(OrgId, 0);
//一级机构点击事件
$(".selectContent0").click(function () {
GetOrgChilds(OrgId, 0);
$("#crumb").removeAttr("class");
$("#crumb").addClass("crumb1");
runAllFunction(OrgId);
});
function runAllFunction(orgid) {
isHaveChildrenOrg(orgid) //判断是否有下级机构
homeCarSta(orgid); //车辆统计
personSta(orgid);//人员统计
homeleaveAndCarSta(orgid); //请假用车统计
homeInspectStaSta(orgid); //查铺统计
if (isHaveChildrenOrgFlag) { //存在下级机构
homeAlarmSta(orgid);//一周报警统计
homePatrol(orgid);//巡查巡检统计
getSubordinateData(orgid); //下级实力统计
}
else { //不存在下级机构
homeExerciseSta(orgid);//今日出操统计
homeAttendance(orgid);//今日考勤统计
LoadStaffListPer(orgid); //人员出入
LoadStaffList(orgid); //车辆出入
}
}
//默认渲染页面数据
runAllFunction(OrgId);
//车辆统计
function homeCarSta(orgid) {
$.post("../ashx/CarHandler.ashx", {
Action: "homeCarStaAll",
Org_Id: orgid,
random: new Date().getTime()//随机参数
}, function (res) {
if (res.code == 1) {
var num = res.data[0];
var numtotal = num.ALLNUM;
var zynum = num.ZY;
var lynum = num.LY;
$("#dataNumSaCar").rollNumDaq({
deVal: numtotal
});
// 基于准备好的dom,初始化echarts实例
var myChartCLXX = echarts.init(document.getElementById('clxx'));
var res = [{
"label": "在营",
"value": zynum
},
{
"label": "离营",
"value": lynum
}
]
var border =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUEAAAFBCAYAAADpDh0xAAA7h0lEQVR42u2dCZwdVZX/K4rs+xp2kH0nQIDIFiAkdPdbOoFG9oQtQKAhnaTfq+0lD8K+hhCSoOI46vyBjA4yOhFIv7qvE0BFBsUN9D/jOKj//18UZ1gclUX+59yqdLo72723ql6/5ff9fOqTpNOvql7dqlPn3HvO71gWAHHoWvbJIf+2V+1gFcXNlhPMtezgAdoeo+1/WY54irZn5L8H4/QdTj9/WW6uWGU51ZW0PWvZ4hv0s8dp84f8fs8zO1rFShvt53hr1rN70/E3xSAAANKj/PEnLGfl4VaxmiWDNJOM28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VqZCwPJQ1C39NEdLxGMBmwlt5Ymr75jAl592f6Opg2hUFoNaMIkGIsbJxVZIRQijymhxhg/j+qErqT9Qa9AIMXVN4fdVSKEtemZms8SPJJKloklioM1OKEoDmNoacKpVNyBhKFR0q/0ty4YTr5VkYeLWcvy3KGLZGpSwlhr68RvFZ3JjYvjPS+3swIQNYkKIJoPU8w6TmjzncTvoF6la65XMTGsOvQL260Sg8v03Y7U2uAL+bmPLLxDlbyfytpPpWZEqQOmrtN/UnovLJJKpRlshk+SQ75fFzM6BTGCzFeDUKvLLliFei/L/fUs/WMcl4fzT/kkjzIrlieHrN+1OA+oXDWV7syHkPJ5BoTbXI5V2Te55oAdER3w8bxIP6Z9aze9OA/Vvkwr9O236JvK3zXja+5BIpuGTdC6yuni0wUGCdTCrvKIUb4mYZcE5p1kOP4pZEiqCKb5Pr/r1EaoDDfK/Z
var man =
'home/img/ondutycar.png';
var woman =
'home/img/leavecar.png';
var color = ['#00FFFF', 'rgba(196,36,255,1)'];
var data = [];
for (var i = 0; i < res.length; i++) {
data.push({
value: res[i].value,
name: res[i].label,
itemStyle: {
normal: {
borderWidth: 5,
shadowBlur: 20,
borderColor: color[i],
shadowColor: color[i]
}
}
}, {
value: res[0].value / 10,
name: '',
itemStyle: {
normal: {
label: {
show: false
},
labelLine: {
show: false
},
color: 'rgba(0, 0, 0, 0)',
borderColor: 'rgba(0, 0, 0, 0)',
borderWidth: 0
}
}
});
}
optionCLXX = {
color,
graphic: {
elements: [{
type: 'image',
z: 3,
style: {
image: border,
width: 150,
height: 150
},
left: 'center',
top: 'center',
position: [100, 100]
},
{
type: 'image',
z: 3,
style: {
image: man,
width: 56,
height: 56
},
left: '38%',
top: 'center'
},
{
type: 'image',
z: 3,
style: {
image: woman,
width: 56,
height: 56
},
right: '38%',
top: 'center'
}
]
},
tooltip: {
show: false
},
toolbox: {
show: false
},
series: [{
name: '',
type: 'pie',
clockWise: false,
radius: [70, 75],
hoverAnimation: false,
itemStyle: {
normal: {
label: {
show: true,
fontSize: 16,
formatter(params) {
return params.name ?
params.name + '\n' + params.value + '辆' :
'';
}
},
labelLine: {
width: 10,
length: 30,
length2: 30,
show: true,
color: '#00ffff'
}
}
},
data
}]
};
// 使用刚指定的配置项和数据显示图表。
myChartCLXX.setOption(optionCLXX);
$(window).resize(myChartCLXX.resize); //echarts自适应屏幕
myChartCLXX.off("dblclick");
myChartCLXX.on('dblclick', function (params) {
goItemCLXX(orgid)
})
} else {
}
}, "JSON");
function goItemCLXX(orgid) {
var clientWidth = parseInt(document.body.clientWidth * 0.8) + 'px';
var clientHeight = parseInt(document.body.clientHeight * 0.90) + 'px';
layui.layer.open({
title: "车辆离营记录",
type: 2,
resize: false,
area: [clientWidth, clientHeight],
maxmin: true,
content: "pages/CarLatestOutList.html?ORG_ID=" + orgid + '&is_content=' + (isHaveChildrenOrgFlag ? 1 : 0),
success: function (layero, index) {
var body = layui.layer.getChildFrame('body', index);
//body.find("#allNum").html(leaveNum + carNum);
//body.find("#leaveNum").html(leaveNum);
//body.find("#carNum").html(carNum);
}
})
}
}
//人员统计
function personSta(orgid) {
$.post("../ashx/SysEmpHandler.ashx", {
Action: "personStaAll",
Org_Id: orgid,
random: new Date().getTime()//随机参数
}, function (res) {
if (res.code == 1) {
var num = res.data[0];
var numtotal = num.ZS;
var zgnum = num.ZG;
var lgnum = numtotal - num.ZG;
$("#dataNumsa").rollNumDaq({
deVal: numtotal
});
// 基于准备好的dom,初始化echarts实例
var myChartPer = echarts.init(document.getElementById('ryxx'));
var res = [{
"label": "在岗",
"value": zgnum
},
{
"label": "未在岗",
"value": lgnum
}
]
var border =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUEAAAFBCAYAAADpDh0xAAA7h0lEQVR42u2dCZwdVZX/K4rs+xp2kH0nQIDIFiAkdPdbOoFG9oQtQKAhnaTfq+0lD8K+hhCSoOI46vyBjA4yOhFIv7qvE0BFBsUN9D/jOKj//18UZ1gclUX+59yqdLo72723ql6/5ff9fOqTp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hv8G6r0zsx8fPlRb9i5XQMXKshc6jEj2n7s2xnmahXQMoivCiR7AMwX+raYWW3ceA2BTk/l/jcIUcAXF6YJnZlInmGeNE2PbY40HIryTXBzhW2oTD1ikRre7lWuNPlMGUUBqxBkTJnDnXIkx31kloAe4SMYT6VqZCwPJQ1C39NEdLxGMBmwlt5Ymr75jAl592f6Opg2hUFoNaMIkGIsbJxVZIRQijymhxhg/j+qErqT9Qa9AIMXVN4fdVSKEtemZms8SPJJKloklioM1OKEoDmNoacKpVNyBhKFR0q/0ty4YTr5VkYeLWcvy3KGLZGpSwlhr68RvFZ3JjYvjPS+3swIQNYkKIJoPU8w6TmjzncTvoF6la65XMTGsOvQL260Sg8v03Y7U2uAL+bmPLLxDlbyfytpPpWZEqQOmrtN/UnovLJJKpRlshk+SQ75fFzM6BTGCzFeDUKvLLliFei/L/fUs/WMcl4fzT/kkjzIrlieHrN+1OA+oXDWV7syHkPJ5BoTbXI5V2Te55oAdER3w8bxIP6Z9aze9OA/Vvkwr9O236JvK3zXja+5BIpuGTdC6yuni0wUGCdTCrvKIUb4mYZcE5p1kOP4pZEiqCKb5Pr/r1EaoDDfK/Z
var man =
'home/img/onduty.png';
var woman =
'home/img/leave.png';
var color = ['#00FFFF', 'rgba(196,36,255,1)'];
var data = [];
for (var i = 0; i < res.length; i++) {
data.push({
value: res[i].value,
name: res[i].label,
itemStyle: {
normal: {
borderWidth: 5,
shadowBlur: 20,
borderColor: color[i],
shadowColor: color[i]
}
}
}, {
value: res[0].value / 10,
name: '',
itemStyle: {
normal: {
label: {
show: false
},
labelLine: {
show: false
},
color: 'rgba(0, 0, 0, 0)',
borderColor: 'rgba(0, 0, 0, 0)',
borderWidth: 0
}
}
});
}
optionPer = {
color,
graphic: {
elements: [{
type: 'image',
z: 3,
style: {
image: border,
width: 150,
height: 150
},
left: 'center',
top: 'center',
position: [100, 100]
},
{
type: 'image',
z: 3,
style: {
image: man,
width: 56,
height: 56
},
left: '38%',
top: 'center'
},
{
type: 'image',
z: 3,
style: {
image: woman,
width: 56,
height: 56
},
right: '38%',
top: 'center'
}
]
},
tooltip: {
show: false
},
toolbox: {
show: false
},
series: [{
name: '',
type: 'pie',
clockWise: false,
radius: [70, 75],
hoverAnimation: false,
itemStyle: {
normal: {
label: {
show: true,
fontSize: 16,
formatter(params) {
return params.name ?
params.name + '\n' + params.value + '人' :
'';
}
},
labelLine: {
width: 10,
length: 30,
length2: 30,
show: true,
color: '#00ffff'
}
}
},
data
}]
};
// 使用刚指定的配置项和数据显示图表。
myChartPer.setOption(optionPer);
$(window).resize(myChartPer.resize); //echarts自适应屏幕
myChartPer.off("dblclick")
myChartPer.on('dblclick', function (params) {
goItemPer(orgid)
})
} else {
}
}, "JSON");
//跳转详情页
goItemPer = function (orgid) {
var clientWidth = parseInt(document.body.clientWidth * 0.8) + 'px';
var clientHeight = parseInt(document.body.clientHeight * 0.90) + 'px';
layui.layer.open({
title: "离岗人员详情",
type: 2,
resize: false,
area: [clientWidth, clientHeight],
maxmin: true,
content: "pages/LeaveTolerance.html?ORG_ID=" + orgid + '&is_content=' + (isHaveChildrenOrgFlag ? 1 : 0),
success: function (layero, index) {
var body = layui.layer.getChildFrame('body', index);
//body.find("#allNum").text(echartsData.totalData[0]);
}
})
}
}
//一周报警统计
function homeAlarmSta(orgid) {
var data = [];
$.post("../ashx/AlarmDataHandler.ashx", {
Action: "homeAlarmStaAll",
Org_Id: orgid,
random: new Date().getTime()//随机参数
}, function (res) {
if (res.code == 1) {
var data = res.data[0];
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('bjxx'));
var category = [{
name: "人员不假外出",
value: data.PFFWC
},
{
name: "人员超期未归",
value: data.PCQWG
},
{
name: "车辆违规外出",
value: data.CBJWC
},
{
name: "车辆超时未归",
value: data.CCQWG
},
{
name: "车辆超速报警",
value: data.CCS
}
];
var compare = function (prop) {
return function (obj1, obj2) {
var val1 = obj1[prop];
var val2 = obj2[prop];
if (!isNaN(Number(val1)) && !isNaN(Number(val2))) {
val1 = Number(val1);
val2 = Number(val2);
}
if (val1 < val2) {
return -1;
} else if (val1 > val2) {
return 1;
} else {
return 0;
}
}
}
category.sort(compare("value"));
var total = category[0].value + category[1].value + category[2].value + category[3].value + category[4].value;
var datas = [];
category.forEach(value => {
datas.push(value.value);
});
option = {
xAxis: {
max: total,
splitLine: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
show: false
},
axisTick: {
show: false
}
},
grid: {
left: 40,
top: 20, // 设置条形图的边距
right: 60,
bottom: 20
},
yAxis: [{
type: "category",
inverse: true,
data: category,
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
show: false
}
}],
series: [{
// 内
type: "bar",
barWidth: 14,
legendHoverLink: false,
silent: true,
itemStyle: {
normal: {
color: function (params) {
var color;
if (params.dataIndex == 19) {
color = {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 0,
colorStops: [{
offset: 0,
color: "#EB5118" // 0% 处的颜色
},
{
offset: 1,
color: "#F21F02" // 100% 处的颜色
}
]
}
} else if (params.dataIndex == 18) {
color = {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 0,
colorStops: [{
offset: 0,
color: "#FFA048" // 0% 处的颜色
},
{
offset: 1,
color: "#B25E14" // 100% 处的颜色
}
]
}
} else if (params.dataIndex == 17) {
color = {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 0,
colorStops: [{
offset: 0,
color: "#F8E972" // 0% 处的颜色
},
{
offset: 1,
color: "#E5C206" // 100% 处的颜色
}
]
}
} else {
color = {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 0,
colorStops: [{
offset: 0,
color: "#147e9d" // 0% 处的颜色
},
{
offset: 1,
color: "#03eefd" // 100% 处的颜色
}
]
}
}
return color;
},
}
},
label: {
normal: {
show: true,
position: [0, -24],
formatter: "{b}",
textStyle: {
color: "#fff",
fontSize: 14
}
}
},
data: category,
z: 1,
animationEasing: "elasticOut"
},
{
// 分隔
type: "pictorialBar",
itemStyle: {
normal: {
color: "#061348"
}
},
symbolRepeat: "fixed",
symbolMargin: 6,
symbol: "rect",
symbolClip: true,
symbolSize: [1, 17],
symbolPosition: "start",
symbolOffset: [1, -1],
symbolBoundingData: this.total,
data: category,
z: 2,
animationEasing: "elasticOut"
},
{
// 外边框
type: "pictorialBar",
symbol: "rect",
symbolBoundingData: total,
itemStyle: {
normal: {
color: "none"
}
},
label: {
normal: {
formatter: (params) => {
var text;
if (params.dataIndex == 1) {
text = '{f| ' + params.data + '}';
} else if (params.dataIndex == 2) {
text = '{f| ' + params.data + '}';
} else if (params.dataIndex == 3) {
text = '{f| ' + params.data + '}';
} else {
text = '{f| ' + params.data + '}';
}
return text;
},
rich: {
f: {
color: "#03eefd",
fontSize: 14
}
},
position: 'right',
distance: 0, // 向右偏移位置
show: true
}
},
data: datas,
z: 0,
animationEasing: "elasticOut"
},
{
name: "外框",
type: "bar",
barGap: "-120%", // 设置外框粗细
data: [total, total, total, total, total, total, total, total, total, total, total, total, total, total,
total,
total, total, total, total, total
],
barWidth: 20,
itemStyle: {
normal: {
color: "transparent", // 填充色
barBorderColor: "#1C4B8E", // 边框色
barBorderWidth: 1, // 边框宽度
// barBorderRadius: 0, //圆角半径
label: {
// 标签显示位置
show: false,
position: "top" // insideTop 或者横向的 insideLeft
}
}
},
z: 0
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
$(window).resize(myChart.resize); //echarts自适应屏幕
} else {
}
}, "JSON");
}
//请假用车统计
function homeleaveAndCarSta(orgid) {
var leaveNum = 0, carNum = 0;
var myChartLeaveCar = echarts.init(document.getElementById('qjyctj'));
var optionLeaveCar = {
grid: {
left: "3%",
right: "5%",
bottom: "2%",
top: "14%",
containLabel: true
},
tooltip: {
trigger: 'axis',
extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3)',
textStyle: {
color: '#fff',
},
axisPointer: {
type: 'shadow'
}
},
legend: {
top: '0%',
left: '35%',
itemWidth: 12,
itemHeight: 4,
data: ['请假次数', '用车次数'],
textStyle: {
color: '#fff',
}
},
xAxis: {
type: "category",
boundaryGap: true,
show: true,
axisLabel: {
interval: 0,
// show: true,
textStyle: {
color: "#0bbad0",
fontSize: 12
},
rotate: 20
},
axisLine: {
lineStyle: {
color: '#4a646f',
}
},
axisTick: {
show: true,
alignWithLabel: true,
},
},
yAxis: {
type: 'value',
name: '次数',
splitNumber: 5,
axisLabel: {
textStyle: {
color: '#0bbad0',
fontSize: 12
}
},
axisLine: {
lineStyle: {
color: '#4a646f',
}
},
splitLine: {
show: true,
lineStyle: {
color: '#4a646f',
type: "dashed"
}
}
},
series: [{
name: '请假次数',
type: 'bar',
// smooth: true,
/*stack: '使用情况',*/
itemStyle: {
normal: {
color: "rgba(3,238,253,0.9)"
},
},
}, {
name: '用车次数',
type: 'bar',
// smooth: true,
/*stack: '使用情况',*/
itemStyle: {
normal: {
color: "rgba(41,138,231,0.9)"
},
},
}]
};
myChartLeaveCar.setOption(optionLeaveCar);
$(window).resize(myChartLeaveCar.resize); //echarts自适应屏幕
myChartLeaveCar.off("dblclick");
myChartLeaveCar.on('dblclick', function (params) {
goItemLeaveCar(orgid, leaveNum, carNum)
})
//请假
var xdata = [], y1data = [], y2data = [];
$.post("../ashx/OaLeaveHandler.ashx", {
Action: "homeLeaveStaAll",
Org_Id: orgid,
random: new Date().getTime()//随机参数
}, function (res) {
if (res.code == 1) {
leaveNum = 0;
res.data.forEach(function (value, index, array) {
xdata.push(value.RIQI);
y1data.push(value.NUM);
leaveNum += value.NUM;
});
optionLeaveCar.xAxis.data = xdata;
optionLeaveCar.series[0].data = y1data;
myChartLeaveCar.setOption(optionLeaveCar);
} else {
}
}, "JSON");
//用车
var data = [];
$.post("../ashx/CarApplyHandler.ashx", {
Action: "homeApplyStaAll",
Org_Id: orgid,
random: new Date().getTime()//随机参数
}, function (res) {
if (res.code == 1) {
carNum = 0;
res.data.forEach(function (value, index, array) {
y2data.push(value.NUM);
carNum += value.NUM;
});
optionLeaveCar.series[1].data = y2data;
myChartLeaveCar.setOption(optionLeaveCar);
} else {
}
}, "JSON");
function goItemLeaveCar(orgid, leaveNum, carNum) {
var datetime = new Date();
var year = datetime.getFullYear();
var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
var clientWidth = parseInt(document.body.clientWidth * 0.8) + 'px';
var clientHeight = parseInt(document.body.clientHeight * 0.90) + 'px';
layui.layer.open({
title: "七天请假、用车详情",
type: 2,
resize: false,
area: [clientWidth, clientHeight],
maxmin: true,
content: "pages/LeaveCar.html?nowDay=" + year + "-" + month + "-" + date + '&advanceDays=7&ORG_ID=' + orgid + '&is_content=' + (isHaveChildrenOrgFlag ? 1 : 0),
success: function (layero, index) {
var body = layui.layer.getChildFrame('body', index);
body.find("#allNum").html(leaveNum + carNum);
body.find("#leaveNum").html(leaveNum);
body.find("#carNum").html(carNum);
}
})
}
}
//查铺统计
function homeInspectStaSta(orgid) {
var myChartInspect = echarts.init(document.getElementById('cpsdl'));
var optionInspect = {
tooltip: {
formatter: '{b}<br />{a}:{c}%',
trigger: 'axis',
},
grid: {
left: "3%",
right: "5%",
bottom: "2%",
top: "14%",
containLabel: true
},
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'none',
height: '5%',
bottom: '2%',
start: 0, //数据窗口范围的起始百分比,表示30%
end: 100, //数据窗口范围的结束百分比,表示70%
}
],
xAxis: [
{
type: "category",
boundaryGap: true,
show: true,
axisLabel: {
interval: 0,
// show: true,
textStyle: {
color: "#0bbad0",
fontSize: 12
},
rotate: 20
},
axisLine: {
lineStyle: {
color: '#4a646f',
}
},
axisTick: {
show: true,
alignWithLabel: true,
},
data: [""],
},
],
yAxis: [
{
type: 'value',
name: '完成率',
splitNumber: 5,
minInterval: 1,
axisLine: {
lineStyle: {
color: '#4a646f',
}
},
splitLine: {
show: true,
lineStyle: {
color: '#4a646f',
type: "dashed"
}
},
axisTick: { show: false },
},
],
series: [
{
name: "完成率",
type: "line",
smooth: true, //是否平滑曲线显示
lineStyle: {
normal: {
color: "#3deaff", // 线条颜色
},
},
areaStyle: {
//区域填充样式
normal: {
//线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[
{ offset: 0, color: "rgba(61,234,255, 0.9)" },
{ offset: 0.7, color: "rgba(61,234,255, 0)" },
],
false
),
shadowColor: "rgba(53,142,215, 0.9)", //阴影颜色
shadowBlur: 20, //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
},
},
itemStyle: {
normal: {
label: {
show: true,
position: 'top'
},
color: "rgba(27,227,255,1)"
},
},
label: {
normal: {
show: true,
position: 'top',
textStyle: {
color: "rgba(27,227,255,1)"
},
formatter: function (params) {//核心部分 formatter 可以为字符串也可以是回调
if (params.value) {//如果当前值存在则拼接
return params.value + '%'
} else {//否则返回个空
return '';
}
}
},
},
data: [0],
},
],
};
myChartInspect.setOption(optionInspect);
$(window).resize(myChartInspect.resize); //echarts自适应屏幕
$.post("../ashx/OaPatrolSentryTaskHandler.ashx", {
Action: "GetCPCSStaDataHome",
OrgId: orgid,
/*day:"2023-01-27",*/
random: new Date().getTime()//随机参数
}, function (res) {
console.log("查铺统计");
console.log(res);
if (res.code == 1) {
console.log(res);
var end = 100;
res.dataNum.length > 10 ? end = 50 : "";
optionInspect.dataZoom[0].end = end
optionInspect.series[0].data = res.dataNum;
optionInspect.xAxis[0].data = res.dataOrg.split(",");
myChartInspect.setOption(optionInspect);
} else {
}
}, "JSON");
}
//下级实力统计
function getSubordinateData(orgid) {
$.post("../ashx/CarHandler.ashx", {
Action: "getSubordinateDataAll",
Org_Id: orgid,
random: new Date().getTime()//随机参数
}, function (res) {
var perData = res.perData;
var lgsum = perData[0].ZS;
$("#Subordinate_per_sum").html(lgsum);
$("#Subordinate_per_zg").html(perData[0].ZG);
$("#Subordinate_per_lg").html(lgsum - perData[0].ZG);
var carData = res.carData;
$("#Subordinate_car_sum").html(Number(carData[0].GW) + Number(carData[0].ZQ) + Number(carData[0].SJ));
$("#Subordinate_car_gw").html(carData[0].GW);
$("#Subordinate_car_zq").html(carData[0].ZQ);
$("#Subordinate_car_sj").html(carData[0].SJ);
var listData = res.listData;
var tableHtml = "";
listData.forEach(item => {
tableHtml += "<tr><td>" + item.ORGNAME + "</td><td>" + item.PERNUM + "</td><td>" + item.CARNUM + "</td></tr>";
});
$("#Subordinate_list").html(tableHtml);
}, "JSON");
//$.post("../../../ashx/CarHandler.ashx", {
// Action: 'AccountManagement',
// ORG_ID: orgid,
//}, function (res) {
// res = JSON.parse(res);
// if (res == 1) {
// $("#xjxfjgzqll").show();
// }
// else {
// $("#xjxfjgzqll").css('display', 'none');
// }
//});
}
//当前选定机构ID
var setOrgId = '';
//是否考勤:0、否;1、是
var IS_Attendance = 0;
//人员出入考勤查询
$("#faceDoorAttendance").on('click', function (e) {
IS_Attendance = 1;
LoadStaffListPer(setOrgId);
});
//人员出入门禁查询
$("#faceDoorInOut").on('click', function (e) {
IS_Attendance = 0;
LoadStaffListPer(setOrgId);
});
//人员出入
function LoadStaffListPer(orgid) {
if ((orgid + "").length < 1) {
orgid = OrgId;
setOrgId = OrgId;
} else {
setOrgId = orgid;
}
$.post("../../../ashx/DoorAttendance.ashx", {
Action: 'HomeList',
OrgId: orgid,
IS_Attendance: IS_Attendance,
random: new Date().getTime()//随机参数
}, function (res) {
res = JSON.parse(res);
if (res.data != undefined && res.data != null && res.data.length > 0) {
$("#ryjlp").html(res.count);
LoadStaffInfoPer(res);
}
else {
$("#ryjlp").html(res.count);
$(".crjl").html("<span style='margin-left:45%;'>未查询到数据!</span>");
}
});
}
//人脸识别列表
function LoadStaffInfoPer(res) {
var htmlstr = '<ul>';
res.data.forEach(function (obj, index, arr) {
htmlstr += ' <li>';
htmlstr += ' <div class="crjl-img fl" style="margin: 10px 0;"><img style="margin-left: 25px;float:left;width:100px;height:125px" src="' + obj.CLOSEUP_PIC_URL + '" />';
htmlstr += ' <div class="crjl-con" style="line-height: 2;height:70px;margin-left: 25px;width:110px;margin-top:136px">';
htmlstr += ' <p style="height:20px;width:100px;overflow:hidden" title="' + obj.NAME + '"><span style="color:auto">姓名:</span>' + obj.NAME + '</p>';
htmlstr += ' <p style="height:20px;width:100px;overflow:hidden" title="' + obj.START_TIME + '"><span>时间:</span>' + obj.START_TIME.substr(obj.START_TIME.indexOf(' ')) + '</p>';
htmlstr += ' <p style="height:20px;width:100px;overflow:hidden" title="' + obj.ADDR + '"><span>地址:</span>' + obj.ADDR.replace('总队机关', '') + '</p>';
htmlstr += ' </div>';
htmlstr += ' </li>';
});
htmlstr += "</ul>";
if (res.count > 0) {
$(".crjl").html(htmlstr);
}
else {
$(".crjl").html("<span style='margin-left:45%;'>未查询到数据!</span>");
InitPage(0);
}
}
//车辆出入
function LoadStaffList(orgid) {
$.post("../../../ashx/CarHandler.ashx", {
Action: 'GetHomeCarAccessList',
OrgId: orgid,
random: new Date().getTime()//随机参数
}, function (res) {
res = JSON.parse(res);
$("#carIn").html(res.countIn);
$("#carOut").html(res.countOut);
if (res.data != undefined && res.data != null && res.data.length > 0) {
LoadStaffInfoCar(res);
}
else {
$(".cljl").html("<span style='margin-left:45%;'>未查询到数据!</span>");
}
});
}
//初始化报警列表
function LoadStaffInfoCar(res) {
var htmlstr = '<ul>';
res.data.forEach(function (obj, index, arr) {
htmlstr += ' <li>';
htmlstr += ' <div class="cljl-img fl" style="margin: 10px 0;"><img style="margin-left: 18px;float:left;width:111px;height:93px;margin-top:-3px" src="' + obj.PICTURE + '" />';
htmlstr += ' <img src="' + obj.EXTEND2 + '" style=" margin-left: -116px; width: 120px; height: 100px ;margin-top:-7px">';
htmlstr += ' <div class="cljl-con" style="line-height:2;height:40px;margin-left: 18px;margin-top:8px;width:110px;">';
htmlstr += ' <p style="height:20px;width:120px;overflow:hidden" title="' + obj.CAR_PLATE + '"><span>车牌号:</span>' + obj.CAR_PLATE + '</p>';
htmlstr += ' <p style="height:20px;width:120px;overflow:hidden" title="' + obj.START_TIME + '"><span>时间:</span>' + obj.START_TIME.substr(obj.START_TIME.indexOf(' ')) + '</p>';
htmlstr += ' </div>';
htmlstr += ' </li>';
});
htmlstr += "</ul>";
//$(".cljl").html(htmlstr);
if (res.count > 0) {
$(".cljl").html(htmlstr);
}
else {
$(".cljl").html("<span style='margin-left:45%;'>未查询到数据!</span>");
}
}
//判断是否存在下级机构
function isHaveChildrenOrg(orgid) {
$.ajaxSettings.async = false;
$.post("../../../ashx/CarHandler.ashx", {
Action: 'AccountManagement',
ORG_ID: orgid,
}, function (res) {
if (res == 1) {
isHaveChildrenOrgFlag = true;
$("#xjxfjgzqll").show();
$("#conxjxcSta").show();
$("#conbjxxSta").show();
$("#conjrccSta").css('display', 'none');
$("#conjrkqSta").css('display', 'none');
$("#ryjl").css('display', 'none');
$("#cljl").css('display', 'none');
$(window).trigger('resize');
}
else {
isHaveChildrenOrgFlag = false;
$("#xjxfjgzqll").css('display', 'none');
$("#conxjxcSta").css('display', 'none');
$("#conbjxxSta").css('display', 'none');
$("#conjrccSta").show();
$("#conjrkqSta").show();
$("#ryjl").show();
$("#cljl").show();
$(window).trigger('resize');
}
});
$.ajaxSettings.async = true;
}
//出操统计
function homeExerciseSta(orgid) {
$.ajax({
type: "get",
url: "../ashx/FaceStatisticsHandler.ashx",
data: {
Action: "getExerciseSta",
orgId: orgid
},
dataType: "json",
success: function (result) {
switch (result.code) {
case "200":
initEcharts_fun(result.echartsData);
break;
case "-1":
layer.msg(result.msg);
console.log("error:" + result.error);
break;
default:
console.log("msg:" + result.msg);
console.log("error:" + result.error);
break;
}
}
});
var initEcharts_fun = function (echartsData) {
// 基于准备好的dom,初始化echarts实例
var myChartjrccSta = echarts.init(document.getElementById('jrccSta'));
// 指定图表的配置项和数据
optionjrccSta = {
title: {
text: ''
},
color: ['#00ffff', '#3ec73b', '#cdd530', '#c52fd6', '#4b8fd1', '#00FFFF', '#009688'],
tooltip: { trigger: 'axis' },
legend: {
data: ['应到', '实到', '迟到', '请假', '公差', '未出操', '站岗值班'],
textStyle: {
color: '#fff', //坐标的字体颜色
},
},
grid: {
left: '10%',
right: '10%',
top: '30%',
bottom: '10%'
},
xAxis: {
data: echartsData.xAxisData,
axisLabel: {
interval: 0,
// show: true,
textStyle: {
color: "#0bbad0",
fontSize: 12
}
},
axisLine: {
lineStyle: {
color: '#4a646f',
}
},
axisTick: {
show: true,
alignWithLabel: true,
},
},
yAxis: {
name: '单位:人',
axisLabel: {
textStyle: {
color: '#0bbad0',
fontSize: 12
}
},
axisLine: {
lineStyle: {
color: '#4a646f',
}
}
,
splitLine: {
show: true,
lineStyle: {
color: '#4a646f',
type: "dashed"
}
}
},
series: [
//折线图
{
name: '应到',
data: echartsData.totalData,
type: 'line',
lineStyle: {
normal: {
color: '#00ffff'
}
},
itemStyle: { //上方显示数值
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#0bbad0',
fontSize: 16
}
}
}
}
}, {
name: '实到',
type: 'bar',
data: echartsData.arriveData,
barWidth: '10%',
itemStyle: {
color: '#3ec73b',
barBorderRadius: [50, 50, 0, 0],
},
itemStyle: { //上方显示数值
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#0bbad0',
fontSize: 16
}
}
}
}
}, {
name: '迟到',
type: 'bar',
data: echartsData.lateData,
barWidth: '10%',
itemStyle: {
color: '#cdd530',
barBorderRadius: [50, 50, 0, 0],
},
itemStyle: { //上方显示数值
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#0bbad0',
fontSize: 16
}
}
}
}
}, {
name: '请假',
type: 'bar',
data: echartsData.leaveData,
barWidth: '10%',
itemStyle: {
color: '#c52fd6',
barBorderRadius: [50, 50, 0, 0],
},
itemStyle: { //上方显示数值
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#0bbad0',
fontSize: 16
}
}
}
}
}, {
name: '公差',
type: 'bar',
data: echartsData.toleranceData,
barWidth: '10%',
itemStyle: {
color: '#4b8fd1',
barBorderRadius: [50, 50, 0, 0],
},
itemStyle: { //上方显示数值
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#0bbad0',
fontSize: 16
}
}
}
}
}, {
name: '未出操',
type: 'bar',
data: echartsData.noArriveData,
barWidth: '10%',
itemStyle: {
color: '#00FFFF',
barBorderRadius: [50, 50, 0, 0],
},
itemStyle: { //上方显示数值
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#0bbad0',
fontSize: 16
}
}
}
}
}, {
name: '站岗值班',
type: 'bar',
data: echartsData.dutyData,
barWidth: '10%',
itemStyle: {
color: '#009688',
barBorderRadius: [50, 50, 0, 0],
},
itemStyle: { //上方显示数值
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#0bbad0',
fontSize: 16
}
}
}
}
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChartjrccSta.setOption(optionjrccSta);
window.onresize = function () {
myChartjrccSta.resize();
}
myChartjrccSta.off("dblclick") //取消echarts 点击事件
myChartjrccSta.on('dblclick', function (params) {
goItemExercise(echartsData, orgid)
})
}
//跳转详情页
goItemExercise = function (echartsData, orgid) {
var datetime = new Date();
var year = datetime.getFullYear();
var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
var clientWidth = parseInt(document.body.clientWidth * 0.8) + 'px';
var clientHeight = parseInt(document.body.clientHeight * 0.90) + 'px';
layui.layer.open({
title: "今日出操详情",
type: 2,
resize: false,
area: [clientWidth, clientHeight],
maxmin: true,
content: "../OA/Exercise/Plan/ExerciseStatisticsItem.html",
success: function (layero, index) {
var body = layui.layer.getChildFrame('body', index);
body.find(".orgId").val(orgid);
body.find(".findDate").val(year + "-" + month + "-" + date);
body.find(".timeType").val("1");
body.find("#allNum").text(echartsData.totalData[0]);
body.find("#total").text(echartsData.totalData[0]);
body.find("#late").text(echartsData.lateData[0]);
body.find("#leave").text(echartsData.leaveData[0]);
body.find("#tolerance").text(echartsData.toleranceData[0]);
body.find("#arrive").text(echartsData.arriveData[0]);
body.find("#arriveRate").text(echartsData.totalData[0] == 0 ? '0%' : ((echartsData.arriveData[0] / echartsData.totalData[0]) * 100).toFixed(2) + "%");
body.find("#noArrive").text(echartsData.noArriveData[0]);
body.find("#duty").text(echartsData.dutyData[0]);
body.find("#noArriveSum").text(echartsData.lateData[0] + echartsData.leaveData[0] + echartsData.toleranceData[0] + echartsData.noArriveData[0] + echartsData.dutyData[0]);
}
})
}
};
//今日考勤
function homeAttendance(orgid) {
$.ajax({
type: "get",
url: "../../../ashx/FaceStatisticsHandler.ashx",
data: {
Action: "getAttendanceStaDoorForDeptForHome",
orgId: orgid
},
dataType: "json",
success: function (result) {
console.log(result);
switch (result.code) {
case "200":
initEcharts_fun(result.data, orgid);
break;
case "-1":
layer.msg(result.msg);
console.log("error:" + result.error);
break;
default:
console.log("msg:" + result.msg);
console.log("error:" + result.error);
break;
}
}
});
var initEcharts_fun = function (result, orgid) {
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('jrkq'));
// 指定图表的配置项和数据
//实到饼图
var option = {
title: [
{
text: "百分比",
x: "center",
top: "55%",
textStyle: {
color: "#FFFFFF",
fontSize: 12,
fontWeight: "100",
},
},
{
text: "75%",
x: "center",
y: "center",
textStyle: {
fontSize: "20",
color: "#FFFFFF",
fontFamily: "DINAlternate-Bold, DINAlternate",
foontWeight: "600",
},
},
],
polar: {
radius: ["42%", "52%"],
center: ["50%", "50%"],
},
angleAxis: {
max: 100,
show: false,
},
radiusAxis: {
type: "category",
show: true,
axisLabel: {
show: false,
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
},
series: [
{
name: "",
type: "bar",
roundCap: true,
barWidth: 30,
showBackground: true,
backgroundStyle: {
color: "rgba(66, 66, 66, .3)",
},
data: [10],
coordinateSystem: "polar",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "#16CEB9",
},
{
offset: 1,
color: "#6648FF",
},
]),
},
},
},
{
name: "",
type: "pie",
startAngle: 80,
radius: ["56%"],
hoverAnimation: false,
center: ["50%", "50%"],
itemStyle: {
color: "rgba(66, 66, 66, .1)",
borderWidth: 1,
borderColor: "#5269EE",
},
data: [100],
},
{
name: "",
type: "pie",
startAngle: 80,
radius: ["38%"],
hoverAnimation: false,
center: ["50%", "50%"],
itemStyle: {
color: "rgba(66, 66, 66, .1)",
borderWidth: 1,
borderColor: "#5269EE",
},
data: [100],
},
],
};
var resultData = result.filter(item => item.orgId == orgid)
//上午上班
allNumSw = Number(resultData[0].mornTotal);
allZCSw = Number(resultData[0].mornArrive);
rateDataSw = ((allZCSw / (allNumSw == 0 ? 1 : allNumSw)) * 100).toFixed(2);
//上午下班
allNumSwDown = Number(resultData[0].mornTotalDown);
allZCSwDown = Number(resultData[0].mornArriveDown);
rateDataSwDown = ((allZCSwDown / (allNumSwDown == 0 ? 1 : allNumSwDown)) * 100).toFixed(2);
//下午上班
allNumXwUp = Number(resultData[0].nightTotalUp);
allZCXwUp = Number(resultData[0].nightArriveUp);
rateDataXwUp = ((allZCXwUp / (allNumXwUp == 0 ? 1 : allNumXwUp)) * 100).toFixed(2);
//下午下班
allNumXw = Number(resultData[0].nightTotal);
allZCXw = Number(resultData[0].nightArrive);
rateDataXw = ((allZCXw / (allNumXw == 0 ? 1 : allNumXw)) * 100).toFixed(2);
//实到总数信息设置
option.title[1].text = rateDataSw + "%";
option.series[0].data = [rateDataSw];
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
$(window).resize(myChart.resize); //echarts自适应屏幕
$("#divYdSd").html(allZCSw + "/" + allNumSw);
myChart.off("click") //取消echarts 点击事件
myChart.on('click', function (params) {
goItemAttendance(resultData, orgid)
})
$("#divYdSd").unbind();
$("#divYdSd").on('click', function (e) {
goItemAttendance(resultData, orgid);
});
$("#swSta").unbind();
$("#swSta").on('click', function (e) {
option.title[1].text = rateDataSw + "%";
option.series[0].data = [rateDataSw];
myChart.setOption(option);
$("#divYdSd").html(allZCSw + "/" + allNumSw);
});
$("#xwSta").unbind()
$("#xwSta").on('click', function (e) {
option.title[1].text = rateDataXw + "%";
option.series[0].data = [rateDataXw];
myChart.setOption(option);
$("#divYdSd").html(allZCXw + "/" + allNumXw);
});
$("#is_TimeTypeHome").change(function () {
debugger;
var type = $("#is_TimeTypeHome").val();
switch (type) {
case "1": //上午上班
option.title[1].text = rateDataSw + "%";
option.series[0].data = [rateDataSw];
myChart.setOption(option);
$("#divYdSd").html(allZCSw + "/" + allNumSw);
break;
case "2": //上午下班
option.title[1].text = rateDataSwDown + "%";
option.series[0].data = [rateDataSwDown];
myChart.setOption(option);
$("#divYdSd").html(allZCSwDown + "/" + allNumSwDown);
break;
case "3": //下午上班
option.title[1].text = rateDataXwUp + "%";
option.series[0].data = [rateDataXwUp];
myChart.setOption(option);
$("#divYdSd").html(allZCXwUp + "/" + allNumXwUp);
break;
case "4": //下午下班
option.title[1].text = rateDataXw + "%";
option.series[0].data = [rateDataXw];
myChart.setOption(option);
$("#divYdSd").html(allZCXw + "/" + allNumXw);
break;
}
});
}
//跳转详情页
goItemAttendance = function (echartsData, orgid) {
var datetime = new Date();
var year = datetime.getFullYear();
var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
var clientWidth = parseInt(document.body.clientWidth * 0.7) + 'px';
var clientHeight = parseInt(document.body.clientHeight * 0.90) + 'px';
layui.layer.open({
title: "今日考勤详情",
type: 2,
resize: false,
area: [clientWidth, clientHeight],
maxmin: true,
content: "../OA/Attendance/Plan/AttendanceStatisticsItemDoorTab.html",
success: function (layero, index) {
var body = layui.layer.getChildFrame('body', index);
var a = JSON.stringify(echartsData)
body.find(".staDate").val(JSON.stringify(echartsData[0]));
}
})
}
}
//巡检巡查统计
function homePatrol(orgid) {
var optionPatrol = {
tooltip: {
formatter: '{b}<br />{a}:{c}%',
trigger: 'axis',
},
grid: {
left: "3%",
right: "5%",
bottom: "2%",
top: "14%",
containLabel: true
},
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'none',
height: '5%',
bottom: '2%',
start: 0, //数据窗口范围的起始百分比,表示30%
end: 100, //数据窗口范围的结束百分比,表示70%
}
],
xAxis: [
{
type: "category",
boundaryGap: true,
show: true,
axisLabel: {
interval: 0,
// show: true,
textStyle: {
color: "#0bbad0",
fontSize: 12
},
rotate: 20
},
axisLine: {
lineStyle: {
color: '#4a646f',
}
},
axisTick: {
show: true,
alignWithLabel: true,
},
data: [""],
},
],
yAxis: [
{
type: 'value',
name: '完成率',
splitNumber: 5,
minInterval: 1,
axisLine: {
lineStyle: {
color: '#4a646f',
}
},
splitLine: {
show: true,
lineStyle: {
color: '#4a646f',
type: "dashed"
}
},
axisTick: { show: false },
},
],
series: [
{
name: "完成率",
type: "line",
smooth: true, //是否平滑曲线显示
lineStyle: {
normal: {
color: "#3deaff", // 线条颜色
},
},
areaStyle: {
//区域填充样式
normal: {
//线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[
{ offset: 0, color: "rgba(61,234,255, 0.9)" },
{ offset: 0.7, color: "rgba(61,234,255, 0)" },
],
false
),
shadowColor: "rgba(53,142,215, 0.9)", //阴影颜色
shadowBlur: 20, //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
},
},
itemStyle: {
normal: {
label: {
show: true,
position: 'top'
},
color: "rgba(27,227,255,1)"
},
},
label: {
normal: {
show: true,
position: 'top',
textStyle: {
color: "rgba(27,227,255,1)"
},
formatter: function (params) {//核心部分 formatter 可以为字符串也可以是回调
if (params.value) {//如果当前值存在则拼接
return params.value + '%'
} else {//否则返回个空
return '';
}
}
},
},
data: [0],
},
],
};
var myChartPatrol = echarts.init(document.getElementById('xjxcSta'));
myChartPatrol.setOption(optionPatrol);
$(window).resize(myChartPatrol.resize); //echarts自适应屏幕
$.post("../ashx/OaPatrolTaskHandler.ashx", {
Action: "getTaskCountStaHome",
orgId: orgid,
random: new Date().getTime()//随机参数
}, function (res) {
if (res.code == 1) {
var end = 100;
res.data.xData.length > 10 ? end = 40 : "";
optionPatrol.dataZoom[0].end = end
optionPatrol.series[0].data = res.data.completeRate;
optionPatrol.xAxis[0].data = res.data.xData;
myChartPatrol.setOption(optionPatrol);
} else {
}
}, "JSON");
}
})
</script>
<link rel="stylesheet" href="../css/right-list.css" media="all" />
<link rel="stylesheet" href="../css/bulletframebg.css" media="all" />
</body>
</html>