动态首页调整:流量单位提取到y轴顶端;数字加单位;输出加单位;
This commit is contained in:
@@ -101,8 +101,7 @@ public class DynamicIndexController extends BaseController {
|
|||||||
|
|
||||||
if (hour == null || hour <= 0) {
|
if (hour == null || hour <= 0) {
|
||||||
hour = 2;
|
hour = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
Date start = new Date(now.getTime()-(hour*60*60*1000)-(5*60*1000));
|
Date start = new Date(now.getTime()-(hour*60*60*1000)-(5*60*1000));
|
||||||
now = new Date(now.getTime()-5*60*1000);
|
now = new Date(now.getTime()-5*60*1000);
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/data_text.css">
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/data_text.css">
|
||||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/dashboard.css">
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/dashboard.css">
|
||||||
<script src="${pageContext.request.contextPath}/static/pages/scripts/dashboard.js"></script>
|
<script src="${pageContext.request.contextPath}/static/pages/scripts/dashboard.js"></script>
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="js/html5shiv.min.js"></script>
|
<script src="js/html5shiv.min.js"></script>
|
||||||
<script src="js/respond.min.js"></script>
|
<script src="js/respond.min.js"></script>
|
||||||
@@ -270,7 +269,7 @@
|
|||||||
color:#ffffff;
|
color:#ffffff;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 2.2%;
|
top: 2.2%;
|
||||||
left: 43%;
|
left: 35%;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
/* #dataNumsStr span{
|
/* #dataNumsStr span{
|
||||||
@@ -1246,31 +1245,31 @@
|
|||||||
function animalNum(dropNum){
|
function animalNum(dropNum){
|
||||||
var unitStr = "";
|
var unitStr = "";
|
||||||
if (dropNum > 1000 && dropNum <= 1000000) {
|
if (dropNum > 1000 && dropNum <= 1000000) {
|
||||||
//dropNum = Math.round(dropNum/1000);//K取整
|
dropNum = Math.round(dropNum/1000);//K取整
|
||||||
(dropNum/1000).toFixed(1);
|
//dropNum = (dropNum/1000).toFixed(1);alert(dropNum);
|
||||||
unitStr = "K";
|
unitStr = "K";
|
||||||
}
|
}
|
||||||
if (dropNum > 1000000 && dropNum <= 1000000000) {
|
if (dropNum > 1000000 && dropNum <= 1000000000) {
|
||||||
//dropNum = Math.round(dropNum/1000000);//M
|
dropNum = Math.round(dropNum/1000000);//M
|
||||||
(dropNum/1000000).toFixed(1);
|
//dropNum = (dropNum/1000000).toFixed(1);
|
||||||
unitStr = "M";
|
unitStr = "M";
|
||||||
}
|
}
|
||||||
if (dropNum > 1000000000 && dropNum <= 1000000000000) {
|
if (dropNum > 1000000000 && dropNum <= 1000000000000) {
|
||||||
//dropNum = Math.round(dropNum/1000000000);//G
|
dropNum = Math.round(dropNum/1000000000);//G
|
||||||
(dropNum/1000000000).toFixed(1);
|
//dropNum = (dropNum/1000000000).toFixed(1);
|
||||||
unitStr = "G";
|
unitStr = "G";
|
||||||
}
|
}
|
||||||
if (dropNum > 1000000000000 && dropNum <= 1000000000000000) {
|
if (dropNum > 1000000000000 && dropNum <= 1000000000000000) {
|
||||||
//dropNum = Math.round(dropNum/1000000000000);//T
|
dropNum = Math.round(dropNum/1000000000000);//T
|
||||||
(dropNum/1000000000000).toFixed(1);
|
//dropNum = (dropNum/1000000000000).toFixed(1);
|
||||||
unitStr = "T";
|
unitStr = "T";
|
||||||
}
|
}
|
||||||
if (dropNum > 1000000000000000) {
|
if (dropNum > 1000000000000000) {
|
||||||
//dropNum = Math.round(dropNum/1000000000000000);//P
|
dropNum = Math.round(dropNum/1000000000000000);//P
|
||||||
(dropNum/1000000000000000).toFixed(1);
|
//dropNum = (dropNum/1000000000000000).toFixed(1);
|
||||||
unitStr = "P";
|
unitStr = "P";
|
||||||
}
|
}
|
||||||
//dropNum = rand(1000,99999);
|
//dropNum = rand(100,999);
|
||||||
//dropNum= dropNum+"M";
|
//dropNum= dropNum+"M";
|
||||||
$("#dataNums").empty();
|
$("#dataNums").empty();
|
||||||
$("#dataNums").rollNum({
|
$("#dataNums").rollNum({
|
||||||
|
|||||||
Reference in New Issue
Block a user