实现功能:定时查询到新的报障单,则在页面右下角显示气泡,并循环播放提示音,可关闭/开启声音。
页面气泡div和开启提醒按钮:
<div class="msg-box cui-msg-extend-message-alert msg-box-rb" id="message" style="width: 250px;height: 96px;display: none;">
<div class="msgbox-titlebar"><span class="msgbox-title" title="温馨提醒">温馨提醒</span></div>
<div class="msgbox-content"><div class="box-icon cui-icon box-icon-alert"></div><div class="box-msg" id="msg"></div></div>
</div>
<button type="button" class="btn filter-change" id="remind_btn" onClick="autoRemind('ON')">开启提醒</button>
开启提醒按钮JS方法:
/** 自动提醒功能 开始**/
//开启关闭自动提醒
function autoRemind(switchFlag){
debugger;
if(switchFlag == 'ON'){
jQuery.ajax({
type: "POST",
url: "#URL()/fastrepairforother/addAutoRemindStatus?type=1",
async:false,
success: function(json){
var result = json.result;
if(result == "success"){
var autoRemindInterval = ${autoRemindIn