动态首页调整:流量单位提取到y轴顶端;数字加单位;输出加单位;

This commit is contained in:
dongxiaoyan
2018-12-26 18:52:29 +08:00
parent 9b9b76172f
commit c3131b47ee
2 changed files with 13 additions and 15 deletions

View File

@@ -101,8 +101,7 @@ public class DynamicIndexController extends BaseController {
if (hour == null || hour <= 0) {
hour = 2;
}
}
Date now = new Date();
Date start = new Date(now.getTime()-(hour*60*60*1000)-(5*60*1000));
now = new Date(now.getTime()-5*60*1000);

View File

@@ -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/dashboard.css">
<script src="${pageContext.request.contextPath}/static/pages/scripts/dashboard.js"></script>
<!--[if lt IE 9]>
<script src="js/html5shiv.min.js"></script>
<script src="js/respond.min.js"></script>
@@ -270,7 +269,7 @@
color:#ffffff;
position: relative;
top: 2.2%;
left: 43%;
left: 35%;
font-size: 24px;
}
/* #dataNumsStr span{
@@ -1246,31 +1245,31 @@
function animalNum(dropNum){
var unitStr = "";
if (dropNum > 1000 && dropNum <= 1000000) {
//dropNum = Math.round(dropNum/1000);//K取整
(dropNum/1000).toFixed(1);
dropNum = Math.round(dropNum/1000);//K取整
//dropNum = (dropNum/1000).toFixed(1);alert(dropNum);
unitStr = "K";
}
if (dropNum > 1000000 && dropNum <= 1000000000) {
//dropNum = Math.round(dropNum/1000000);//M
(dropNum/1000000).toFixed(1);
dropNum = Math.round(dropNum/1000000);//M
//dropNum = (dropNum/1000000).toFixed(1);
unitStr = "M";
}
if (dropNum > 1000000000 && dropNum <= 1000000000000) {
//dropNum = Math.round(dropNum/1000000000);//G
(dropNum/1000000000).toFixed(1);
dropNum = Math.round(dropNum/1000000000);//G
//dropNum = (dropNum/1000000000).toFixed(1);
unitStr = "G";
}
if (dropNum > 1000000000000 && dropNum <= 1000000000000000) {
//dropNum = Math.round(dropNum/1000000000000);//T
(dropNum/1000000000000).toFixed(1);
dropNum = Math.round(dropNum/1000000000000);//T
//dropNum = (dropNum/1000000000000).toFixed(1);
unitStr = "T";
}
if (dropNum > 1000000000000000) {
//dropNum = Math.round(dropNum/1000000000000000);//P
(dropNum/1000000000000000).toFixed(1);
dropNum = Math.round(dropNum/1000000000000000);//P
//dropNum = (dropNum/1000000000000000).toFixed(1);
unitStr = "P";
}
//dropNum = rand(1000,99999);
//dropNum = rand(100,999);
//dropNum= dropNum+"M";
$("#dataNums").empty();
$("#dataNums").rollNum({