| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.*; |
| | |
| | | * 获取其他信息 |
| | | */ |
| | | @GetMapping("/other") |
| | | public R monitorOther() { |
| | | public R monitorOther(@RequestParam("crnId") Integer crnId) { |
| | | |
| | | |
| | | |
| | | return R.ok( |
| | | // Cools.add("year", calendar.get(Calendar.YEAR)) |
| | | ); |
| | | ).add(crnId); |
| | | } |
| | | |
| | | /** |
| | |
| | | return http |
| | | }) : "object" == typeof module && module.exports ? module.exports = http : n.http = http |
| | | }(this); |
| | | |
| | | /** |
| | | * 获取url键值对 |
| | | */ |
| | | function getUrlVal(key) { |
| | | var reg = new RegExp('(^|&)' + key + '=([^&]*)(&|$)', 'i'); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) { |
| | | return unescape(r[2]); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | var week = '星期一'; |
| | | |
| | | setInterval(function () { |
| | | getOther(); |
| | | setDate(); |
| | | initlinChart(); |
| | | initPieChart(); |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取其他数据 |
| | | */ |
| | | function getOther() { |
| | | http.get(baseUrl+"/monitor/other", {crnId: getUrlVal("crnId")}, function (res) { |
| | | if (res.code === 200){ |
| | | |
| | | console.log(res); |
| | | } else if (res.code === 403){ |
| | | parent.location.href = baseUrl+"/login"; |
| | | } else { |
| | | layer.msg("连接服务器失败", {icon: 2}); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | |
| | | //,anim: 'updown' //切换动画方式 |
| | | }); |
| | | }); |
| | | $('.counter').countUp(); |
| | | // 遮罩 |
| | | let closeBtn = document.getElementById('closeBtn'); |
| | | let detailModal = document.getElementById('detail-modal'); |
| | | closeBtn.onclick = function () { |
| | | detailModal.style.display = 'none'; |
| | | }; |
| | | var data = []; |
| | | |
| | | // 计数动画 |
| | | $('.counter').countUp(); |
| | | |
| | | /***********************************************************************************/ |
| | | /************************************* 折线图 ***************************************/ |