提示设置

//报警信息提醒
function getBjAlert(){
$.ajax({
type:'post',
async:false,
    url :'${ctx}/model/alarmrecord/bjjson',
    dataType : "json",
    success : function(data) {
var objdata = eval(data);
          if(objdata){
          for(var i=0;i<objdata.length;i++){
                if(objdata[i].Incident ==8){
                parent.$.messager.show({ title : "报警", 
              width:180,height:150,timeout:2000,
/*               msg:"<div style='z-index: 11;'><img style='cursor: pointer;' src='${ctx}/static/model/images/comm/timg.gif' /><iframe  src='' allowTransparency='true' frameBorder='0' marginHeight='0' marginWidth='0' style='position: absolute; visibility: inherit; top: 0px; left: 0px; width: 100%; height: 100%; z-index: -1; filter: alpha(opacity = 0);'></iframe></div>"
 */
//                msg:"<img style='cursor: pointer;' src='${ctx}/static/model/images/comm/timg.gif' />"
                msg:'<img οnclick="showStatis()" style="cursor: pointer;" src="${ctx}/static/model/images/comm/timg.gif" />'
              , position: "topRight" });
                }
              }
/* if(objdata.length>0){
parent.$.messager.show({ title : "", 
              width:280,height:280,timeout:0,
              msg:"<img style='cursor: pointer;' src='${ctx}/static/model/images/comm/timg.gif' />"
              , position: "topRight" });
} */
           }
             
    },
    error : function(){
   
    }
    
});
}
timerID = setInterval("getBjAlert()",2000);




// 跳转到报警记录的页面
function showStatis(){
window.mainpage.mainTabs.addModule("报警记录","${ctx}/model/alarmrecord/index","icon-hamburg-busy"); 
clearInterval(timerID);
}

猜你喜欢

转载自blog.csdn.net/qq_36521848/article/details/79447799