| | |
| | | <i class="fa fa-bell" title="关闭语音播报"></i>
|
| | | <i class="fa fa-bell-slash" title="开启语音播报"></i>
|
| | | </div>
|
| | | <!-- <div class="cell-list full-screen-top">
|
| | | <i class="fa fa-arrows" title="退出全屏"></i>
|
| | | <i class="fa fa-arrows-alt" title="开启全屏"></i>
|
| | | </div> -->
|
| | | <div class="cell-list server-time" style="white-space: nowrap">
|
| | | 2018-11-26 00:00:00
|
| | | </div>
|
| | |
| | | </div>
|
| | | </div>
|
| | | </body>
|
| | | <script type="text/javascript">
|
| | | // 检测页面是否被访问
|
| | | var pageIsVisit = false;
|
| | | ;(function($) {
|
| | | // 隐藏的原型
|
| | | var hiddenProperty = 'hidden' in document ? 'hidden' : |
| | | 'webkitHidden' in document ? 'webkitHidden' : |
| | | 'mozHidden' in document ? 'mozHidden' : |
| | | null;
|
| | | |
| | | // 页面初始化
|
| | | if (!document[hiddenProperty]) { |
| | | pageIsVisit = true;
|
| | | }else{
|
| | | pageIsVisit = false;
|
| | | }
|
| | | |
| | | |
| | | var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
|
| | | var onVisibilityChange = function(){
|
| | | if (!document[hiddenProperty]) { |
| | | pageIsVisit = true;
|
| | | }else{
|
| | | pageIsVisit = false;
|
| | | }
|
| | | }
|
| | | document.addEventListener(visibilityChangeEvent, onVisibilityChange);
|
| | | })(jQuery);
|
| | | </script>
|
| | | <script src="pages/js/base.js"></script>
|
| | | <script src="pages/js/common.js"></script>
|
| | | <script src="js/dev.js"></script>
|
| | |
| | | });
|
| | | }
|
| | | });
|
| | | searchAlm(); //查询电池告警总数(我在base.js里)
|
| | | searchAlm(pageIsVisit); //查询电池告警总数(我在base.js里)
|
| | | searchlowmon(); //查询落后单体总数
|
| | | searchpoweroff(); //查询机房停电总数
|
| | | searchdevalarm(); //查询设备实时告警总数
|
| | |
| | |
|
| | | //查询落后单体总数
|
| | | function searchlowmon(){
|
| | | |
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchlowmon, 5000);
|
| | | return;
|
| | | }
|
| | | |
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "BadBatt_monAction!searchNums",
|
| | |
| | |
|
| | | //查询机房停电总数
|
| | | function searchpoweroffOld(){
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchpoweroffOld, 5000);
|
| | | return;
|
| | | }
|
| | | |
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "BattPower_offAction!serchPowerOff",
|
| | |
| | |
|
| | | //查询机房停电总数
|
| | | function searchpoweroff(){
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchpoweroff, 5000);
|
| | | return;
|
| | | }
|
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "Bts_station_stateAction_action_serchByState",
|
| | |
| | |
|
| | | //查询设备告警总数
|
| | | function searchdevalarm(){
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchdevalarm, 5000);
|
| | | return;
|
| | | }
|
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "Batt_devalarm_dataAction!searchNums",
|
| | |
| | |
|
| | | //查询放电计划延迟总数
|
| | | function searchnotcomplan(){
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchnotcomplan, 5000);
|
| | | return;
|
| | | }
|
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "BattDischarge_planAction!searchNums",
|
| | |
| | |
|
| | | // 机房续航不足个数
|
| | | function searchWeakHome() {
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchWeakHome, 5000);
|
| | | return;
|
| | | }
|
| | | $.ajax({
|
| | | type: 'post'
|
| | | ,async: true
|
| | |
| | | // 查询所有的设备数
|
| | | searchAllDevNum();
|
| | | function searchAllDevNum() {
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchAllDevNum, 5000);
|
| | | return;
|
| | | }
|
| | | $.ajax({
|
| | | type: 'post'
|
| | | ,async: true
|
| | |
| | | // 查询所有的电池组数
|
| | | searchAllEleGroupNum();
|
| | | function searchAllEleGroupNum() {
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchAllEleGroupNum, 5000);
|
| | | return;
|
| | | }
|
| | | $.ajax({
|
| | | type: 'post'
|
| | | ,async: true
|
| | |
| | | * 实时查询告警信息
|
| | | */
|
| | | function searchBattAndDevAlarm(){
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchBattAndDevAlarm, 3000);
|
| | | return;
|
| | | }
|
| | | $.ajax({
|
| | | type:"post",
|
| | | url: "Battalarm_dataAction!serchTopAlmTen",
|
| | |
| | |
|
| | | seachServerTime();
|
| | | //获取服务器上的时间
|
| | | function seachServerTime(){ |
| | | function seachServerTime(){
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(seachServerTime, 1000);
|
| | | return;
|
| | | } |
| | | $.ajax({
|
| | | type:"post",
|
| | | url: "User_infAction!searchServerTime",
|
| | |
| | |
|
| | | //查询最近30内的设备和电池告警并播报语音
|
| | | function searchRecentlyAlarm(){
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchRecentlyAlarm, 5000);
|
| | | return;
|
| | | }
|
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "Battalarm_dataAction!serchIn30",
|
| | |
| | | }
|
| | | })(jQuery);
|
| | |
|
| | | // 设置页面是否为全屏显示
|
| | | ;(function($, window, document, undefined){
|
| | | //判断是否全屏
|
| | | function isFull() {
|
| | | var fullscreenElement =
|
| | | document.fullscreenEnabled
|
| | | || document.mozFullscreenElement
|
| | | || document.webkitFullscreenElement;
|
| | | var fullscreenEnabled =
|
| | | document.fullscreenEnabled
|
| | | || document.mozFullscreenEnabled
|
| | | || document.webkitFullscreenEnabled;
|
| | | if (fullscreenElement == null)
|
| | | {
|
| | | return false;
|
| | | } else {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | |
| | | // 全屏
|
| | | function fullScreen() {
|
| | | if(document.documentElement.RequestFullScreen){
|
| | | document.documentElement.RequestFullScreen();
|
| | | }
|
| | | //兼容火狐
|
| | | if(document.documentElement.mozRequestFullScreen){
|
| | | document.documentElement.mozRequestFullScreen();
|
| | | }
|
| | | //兼容谷歌等可以webkitRequestFullScreen也可以webkitRequestFullscreen
|
| | | if(document.documentElement.webkitRequestFullScreen){
|
| | | document.documentElement.webkitRequestFullScreen();
|
| | | }
|
| | | //兼容IE,只能写msRequestFullscreen
|
| | | if(document.documentElement.msRequestFullscreen){
|
| | | document.documentElement.msRequestFullscreen();
|
| | | }
|
| | | }
|
| | | |
| | | // 关闭全屏
|
| | | function exitFullScreen() {
|
| | | if(document.exitFullScreen){
|
| | | document.exitFullscreen()
|
| | | }
|
| | | //兼容火狐
|
| | | if(document.mozCancelFullScreen){
|
| | | document.mozCancelFullScreen()
|
| | | }
|
| | | //兼容谷歌等
|
| | | if(document.webkitExitFullscreen){
|
| | | document.webkitExitFullscreen()
|
| | | }
|
| | | //兼容IE
|
| | | if(document.msExitFullscreen){
|
| | | document.msExitFullscreen()
|
| | | }
|
| | | }
|
| | | |
| | | $('.cell-list.full-screen-top').click(function() {
|
| | | if($(this).hasClass('close-full-screen')) {
|
| | | exitFullScreen();
|
| | | }else {
|
| | | fullScreen();
|
| | | }
|
| | | $(this).toggleClass('close-full-screen')
|
| | | });
|
| | | })(jQuery, window, document);
|
| | | </script>
|
| | | </html>
|