| | |
| | | var year = null; |
| | | var month = null; |
| | | var day = null; |
| | | var hour = null; |
| | | var minute = null; |
| | | var second = null; |
| | | var week = null; |
| | | var year = '2020'; |
| | | var month = '05'; |
| | | var day = '01'; |
| | | var hour = '08'; |
| | | var minute = '00'; |
| | | var second = '00'; |
| | | var week = '星期一'; |
| | | |
| | | setInterval(function () { |
| | | getOther(); |
| | | setDate(); |
| | | initlinChart(); |
| | | initPieChart(); |
| | | }, 1000); |
| | | |
| | | function setDate() { |
| | |
| | | |
| | | } |
| | | |
| | | getDate(); |
| | | /** |
| | | * 获取其他数据 |
| | | */ |
| | | function getOther() { |
| | | http.get(baseUrl+"/monitor/other", {crnId: getUrlVal("crnId")}, function (res) { |
| | | if (res.code === 200){ |
| | | |
| | | $('#xDistance').text(res.data.xDistance); |
| | | $('#yDistance').text(res.data.yDistance); |
| | | $('#xDuration').text(res.data.xDuration); |
| | | $('#yDuration').text(res.data.yDuration); |
| | | |
| | | $('#xSpeed').text(res.data.xSpeed); |
| | | $('#ySpeed').text(res.data.ySpeed); |
| | | |
| | | // 计数动画 |
| | | $('.counter').countUp(); |
| | | } else if (res.code === 403){ |
| | | parent.location.href = baseUrl+"/login"; |
| | | } else { |
| | | layer.msg("连接服务器失败", {icon: 2}); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |