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.
507 lines
13 KiB
507 lines
13 KiB
//获取系统时间
|
|
var newDate = '';
|
|
getLangDate();
|
|
//值小于10时,在前面补0
|
|
function dateFilter(date){
|
|
if(date < 10){return "0"+date;}
|
|
return date;
|
|
}
|
|
function getLangDate(){
|
|
var dateObj = new Date(); //表示当前系统时间的Date对象
|
|
var year = dateObj.getFullYear(); //当前系统时间的完整年份值
|
|
var month = dateObj.getMonth()+1; //当前系统时间的月份值
|
|
var date = dateObj.getDate(); //当前系统时间的月份中的日
|
|
var day = dateObj.getDay(); //当前系统时间中的星期值
|
|
var weeks = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
|
|
var week = weeks[day]; //根据星期值,从数组中获取对应的星期字符串
|
|
var hour = dateObj.getHours(); //当前系统时间的小时值
|
|
var minute = dateObj.getMinutes(); //当前系统时间的分钟值
|
|
var second = dateObj.getSeconds(); //当前系统时间的秒钟值
|
|
var timeValue = "" +((hour >= 12) ? (hour >= 18) ? "晚上" : "下午" : "上午" ); //当前时间属于上午、晚上还是下午
|
|
newDate = dateFilter(year)+"年"+dateFilter(month)+"月"+dateFilter(date)+"日 "+" "+dateFilter(hour)+":"+dateFilter(minute)+":"+dateFilter(second);
|
|
document.getElementById("nowTime").innerHTML = timeValue+"好! 欢迎使用管理系统。当前时间为: "+newDate+" "+week;
|
|
setTimeout("getLangDate()",1000);
|
|
}
|
|
|
|
var OrgId = JSON.parse(window.sessionStorage.getItem("userInfo")).OrgID;
|
|
|
|
//top统计数
|
|
countAll();
|
|
function countAll() {
|
|
$.post("../../ashx/CommonHandler.ashx", {
|
|
Action: "GetHomeCount",
|
|
ORG_ID: OrgId,
|
|
random: new Date().getTime() //随机参数
|
|
}, function (res) {
|
|
var data = res.Data;
|
|
for(var i=0;i<data.length;i++){
|
|
if("PERSON" == data[i].BC ){
|
|
if(0 == data[i].TY){
|
|
$("#per1").html(data[i].COUNT);//人员在岗数量
|
|
}
|
|
else if(3 == data[i].TY){
|
|
$("#per2").html(data[i].COUNT);//人员请假数量
|
|
}
|
|
}
|
|
else if("CAR0" == data[i].BC ){
|
|
if(0 == data[i].TY){
|
|
$("#car1").html(data[i].COUNT);//公务车可用数量
|
|
}
|
|
else if(1 == data[i].TY){
|
|
$("#car2").html(data[i].COUNT);//公务车外勤数量
|
|
}
|
|
}
|
|
else if("CAR1" == data[i].BC ){
|
|
if(0 == data[i].TY){
|
|
$("#car4").html(data[i].COUNT);//执勤车可用数量
|
|
}
|
|
else if(1 == data[i].TY){
|
|
$("#car5").html(data[i].COUNT);//执勤车外勤数量
|
|
}
|
|
}
|
|
else if("CAMERA" == data[i].BC ){
|
|
if(0 == data[i].TY){
|
|
$("#cam1").html(data[i].COUNT);//摄像头数量
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
//周界报警
|
|
getZAlarmWeek();
|
|
function getZAlarmWeek() {
|
|
$.post("http://47.104.11.54:8073/ashx/ZYAlarmdataHandler.ashx", {
|
|
Action: "GetAlarmWeek",
|
|
ORG_ID: OrgId,
|
|
TYPE: 0,
|
|
random: new Date().getTime() //随机参数
|
|
}, function (res) {
|
|
var data = JSON.parse(res).data;
|
|
var RIQI = [],SL = [];
|
|
for(var i=0;i<data.length;i++){
|
|
RIQI.push(data[i].RIQI);
|
|
SL.push(data[i].SL);
|
|
}
|
|
zjbjqstC(RIQI,SL)
|
|
});
|
|
}
|
|
|
|
//访客
|
|
getVisitorWeek();
|
|
function getVisitorWeek() {
|
|
$.post("../../ashx/VisitorHandler.ashx", {
|
|
Action: "GetVisitorWeek",
|
|
ORG_ID: OrgId,
|
|
random: new Date().getTime() //随机参数
|
|
}, function (res) {
|
|
var data = JSON.parse(res).data;
|
|
var RIQI = [],SL = [];
|
|
for(var i=0;i<data.length;i++){
|
|
RIQI.push(data[i].RIQI);
|
|
SL.push(data[i].SL);
|
|
}
|
|
fkslqsfxC(RIQI,SL)
|
|
});
|
|
}
|
|
|
|
//车辆
|
|
getCarWeek();
|
|
function getCarWeek() {
|
|
$.post("../../ashx/CarHandler.ashx", {
|
|
Action: "GetCarWeek",
|
|
ORG_ID: OrgId,
|
|
random: new Date().getTime() //随机参数
|
|
}, function (res) {
|
|
var data = JSON.parse(res).data;
|
|
var RIQI = [],SL = [];
|
|
for(var i=0;i<data.length;i++){
|
|
RIQI.push(data[i].RIQI);
|
|
SL.push(data[i].SL);
|
|
}
|
|
cljctjxxC(RIQI,SL)
|
|
});
|
|
}
|
|
|
|
//聚集报警
|
|
getRAlarmWeek();
|
|
function getRAlarmWeek() {
|
|
$.post("http://47.104.11.54:8073/ashx/ZYAlarmdataHandler.ashx", {
|
|
Action: "GetAlarmWeek",
|
|
ORG_ID: OrgId,
|
|
TYPE: 1,
|
|
random: new Date().getTime() //随机参数
|
|
}, function (res) {
|
|
var data = JSON.parse(res).data;
|
|
var RIQI = [],SL = [];
|
|
for(var i=0;i<data.length;i++){
|
|
RIQI.push(data[i].RIQI);
|
|
SL.push(data[i].SL);
|
|
}
|
|
ryjjbjqsC(RIQI,SL)
|
|
});
|
|
}
|
|
|
|
|
|
/*----------------------------------周界报警趋势图-------------------------------------------*/
|
|
function zjbjqstC(RIQI,SL) {
|
|
// 基于准备好的dom,初始化echarts实例
|
|
var myChart = echarts.init(document.getElementById('zjbjqst'));
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
axisPointer: {
|
|
lineStyle: {
|
|
color: '#3dcdf9'
|
|
}
|
|
}
|
|
},
|
|
grid: {
|
|
left: '1%',
|
|
right: '4%',
|
|
bottom: '1%',
|
|
top: '6%',
|
|
containLabel: true
|
|
},
|
|
xAxis: [{
|
|
type: 'category',
|
|
boundaryGap: false,
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#294c8d'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
margin: 10,
|
|
textStyle: {
|
|
fontSize: 14,
|
|
color: '#eeeffe'
|
|
}
|
|
},
|
|
data: RIQI
|
|
}],
|
|
yAxis: [{
|
|
type: 'value',
|
|
axisTick: {
|
|
show: false
|
|
},
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#294c8d'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
margin: 10,
|
|
textStyle: {
|
|
fontSize: 14,
|
|
color: '#eeeffe'
|
|
}
|
|
},
|
|
splitLine: {
|
|
show: false
|
|
}
|
|
}],
|
|
series: [{
|
|
name: '报警数',
|
|
type: 'line',
|
|
smooth: true,
|
|
symbol: 'circle',
|
|
symbolSize: 5,
|
|
showSymbol: false,
|
|
lineStyle: {
|
|
normal: {
|
|
width: 1
|
|
}
|
|
},
|
|
areaStyle: {
|
|
normal: {
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
offset: 0,
|
|
color: 'rgba(61, 205, 249, 0.9)'
|
|
}, {
|
|
offset: 0.8,
|
|
color: 'rgba(61, 205, 249, 0.1)'
|
|
}], false),
|
|
shadowColor: 'rgba(0, 0, 0, 0.1)',
|
|
shadowBlur: 10
|
|
}
|
|
},
|
|
itemStyle: {
|
|
normal: {
|
|
color: 'rgb(61, 205, 249)',
|
|
borderColor: 'rgba(61, 205, 249,0.27)',
|
|
borderWidth: 12
|
|
|
|
}
|
|
},
|
|
data: SL
|
|
}]
|
|
};
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
myChart.setOption(option);
|
|
}
|
|
|
|
/*----------------------------------访客数量趋势分析------------------------------------------*/
|
|
function fkslqsfxC(RIQI,SL) {
|
|
// 基于准备好的dom,初始化echarts实例
|
|
var myChart = echarts.init(document.getElementById('fkslqsfx'));
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
axisPointer: {
|
|
lineStyle: {
|
|
color: '#3dcdf9'
|
|
}
|
|
}
|
|
},
|
|
grid: {
|
|
left: '1%',
|
|
right: '4%',
|
|
bottom: '1%',
|
|
top: '6%',
|
|
containLabel: true
|
|
},
|
|
xAxis: [{
|
|
type: 'category',
|
|
boundaryGap: false,
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#294c8d'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
margin: 10,
|
|
textStyle: {
|
|
fontSize: 14,
|
|
color: '#eeeffe'
|
|
}
|
|
},
|
|
data: RIQI
|
|
}],
|
|
yAxis: [{
|
|
type: 'value',
|
|
axisTick: {
|
|
show: false
|
|
},
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#294c8d'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
margin: 10,
|
|
textStyle: {
|
|
fontSize: 14,
|
|
color: '#eeeffe'
|
|
}
|
|
},
|
|
splitLine: {
|
|
show: false
|
|
}
|
|
}],
|
|
series: [{
|
|
name: '访客数量',
|
|
type: 'line',
|
|
symbolSize: 5,
|
|
data: SL,
|
|
areaStyle: {
|
|
normal: {
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
offset: 0,
|
|
color: 'rgba(61, 205, 249, 0.9)'
|
|
}, {
|
|
offset: 0.8,
|
|
color: 'rgba(61, 205, 249, 0.1)'
|
|
}], false),
|
|
shadowColor: 'rgba(0, 0, 0, 0.1)',
|
|
shadowBlur: 10
|
|
}
|
|
},
|
|
itemStyle: {
|
|
normal: {
|
|
color: 'rgb(61, 205, 249)',
|
|
borderWidth: 1
|
|
}
|
|
},
|
|
}]
|
|
};
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
myChart.setOption(option);
|
|
}
|
|
|
|
/*----------------------------------车辆进出统计信息------------------------------------------*/
|
|
function cljctjxxC(RIQI,SL) {
|
|
// 基于准备好的dom,初始化echarts实例
|
|
var myChart = echarts.init(document.getElementById('cljctjxx'));
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
color: ['#3398DB'],
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
|
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
}
|
|
},
|
|
grid: {
|
|
left: '1%',
|
|
right: '1%',
|
|
bottom: '1%',
|
|
top: '6%',
|
|
containLabel: true
|
|
},
|
|
xAxis: [{
|
|
type: 'category',
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#294c8d'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
margin: 10,
|
|
textStyle: {
|
|
fontSize: 14,
|
|
color: '#eeeffe'
|
|
}
|
|
},
|
|
data: RIQI,
|
|
axisTick: {
|
|
alignWithLabel: true
|
|
}
|
|
}],
|
|
yAxis: [{
|
|
type: 'value',
|
|
axisTick: {
|
|
show: false
|
|
},
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#294c8d'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
margin: 10,
|
|
textStyle: {
|
|
fontSize: 14,
|
|
color: '#eeeffe'
|
|
}
|
|
},
|
|
splitLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: '#0b2556'
|
|
|
|
}
|
|
}
|
|
}],
|
|
series: [{
|
|
name: '车辆进出',
|
|
type: 'bar',
|
|
barWidth: '32%',
|
|
data: SL
|
|
}]
|
|
};
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
myChart.setOption(option);
|
|
}
|
|
|
|
/*----------------------------------人员聚集报警趋势分析图-------------------------------------*/
|
|
function ryjjbjqsC(RIQI,SL) {
|
|
// 基于准备好的dom,初始化echarts实例
|
|
var myChart = echarts.init(document.getElementById('ryjjbjqs'));
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
axisPointer: {
|
|
lineStyle: {
|
|
color: '#3dcdf9'
|
|
}
|
|
}
|
|
},
|
|
grid: {
|
|
left: '1%',
|
|
right: '4%',
|
|
bottom: '1%',
|
|
top: '6%',
|
|
containLabel: true
|
|
},
|
|
xAxis: [{
|
|
type: 'category',
|
|
boundaryGap: false,
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#294c8d'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
margin: 10,
|
|
textStyle: {
|
|
fontSize: 14,
|
|
color: '#eeeffe'
|
|
}
|
|
},
|
|
data: RIQI
|
|
}],
|
|
yAxis: [{
|
|
type: 'value',
|
|
axisTick: {
|
|
show: false
|
|
},
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#294c8d'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
margin: 10,
|
|
textStyle: {
|
|
fontSize: 14,
|
|
color: '#eeeffe'
|
|
}
|
|
},
|
|
splitLine: {
|
|
show: false
|
|
}
|
|
}],
|
|
series: [{
|
|
name: '报警数',
|
|
type: 'line',
|
|
smooth: true,
|
|
symbol: 'circle',
|
|
symbolSize: 5,
|
|
showSymbol: false,
|
|
lineStyle: {
|
|
normal: {
|
|
width: 1
|
|
}
|
|
},
|
|
areaStyle: {
|
|
normal: {
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
offset: 0,
|
|
color: 'rgba(61, 205, 249, 0.9)'
|
|
}, {
|
|
offset: 0.8,
|
|
color: 'rgba(61, 205, 249, 0.1)'
|
|
}], false),
|
|
shadowColor: 'rgba(0, 0, 0, 0.1)',
|
|
shadowBlur: 10
|
|
}
|
|
},
|
|
itemStyle: {
|
|
normal: {
|
|
color: 'rgb(61, 205, 249)',
|
|
borderColor: 'rgba(61, 205, 249,0.27)',
|
|
borderWidth: 12
|
|
|
|
}
|
|
},
|
|
data: SL
|
|
}]
|
|
};
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
myChart.setOption(option);
|
|
}
|
|
|