|
|
|
@ -44,22 +44,27 @@
|
|
|
|
//每隔1分钟轮询一次未通知数量
|
|
|
|
//每隔1分钟轮询一次未通知数量
|
|
|
|
setInterval(function () {
|
|
|
|
setInterval(function () {
|
|
|
|
getNoticeCount();
|
|
|
|
getNoticeCount();
|
|
|
|
}, 60*1000);
|
|
|
|
}, 30*60*1000);
|
|
|
|
//每隔1秒钟轮询一次session所剩时间
|
|
|
|
//每隔1秒钟轮询一次session所剩时间
|
|
|
|
|
|
|
|
let countdown = 10; // 设置倒计时为10秒
|
|
|
|
var r = setInterval(function () {
|
|
|
|
var r = setInterval(function () {
|
|
|
|
$.get(path+'/getSessionRemainingTime',function(data){
|
|
|
|
$.get(path+'/getSessionRemainingTime',function(data){
|
|
|
|
if(data != null){
|
|
|
|
if(data != null){
|
|
|
|
data /= 1000
|
|
|
|
data /= 1000
|
|
|
|
if(data < 11 && data > 10){
|
|
|
|
if(data < 0){
|
|
|
|
toastr.warning("还有10秒将登录超时,将退出登录!")
|
|
|
|
const intervalId = setInterval(() => {
|
|
|
|
}else if(data < 6 && data > 5){
|
|
|
|
if (countdown > 0) {
|
|
|
|
toastr.warning("还有5秒将登录超时,将退出登录!")
|
|
|
|
toastr.warning('即将登录超时,'+ countdown + '秒后将退出登录!');
|
|
|
|
}else if(data < 0){
|
|
|
|
countdown--;
|
|
|
|
window.location.href = powerUrlHead + '/login'
|
|
|
|
} else {
|
|
|
|
|
|
|
|
clearInterval(intervalId); // 倒计时结束,清除定时器
|
|
|
|
|
|
|
|
window.location.href = powerUrlHead + '/login'; // 跳转到登录页面
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},'json');
|
|
|
|
},'json');
|
|
|
|
}, 1000);
|
|
|
|
}, 30*60*1000);
|
|
|
|
//跳转到通知
|
|
|
|
//跳转到通知
|
|
|
|
function noticeManage1(noticeId){
|
|
|
|
function noticeManage1(noticeId){
|
|
|
|
//noticeId = 'emr_record'为跳转病案管理系统的病案未审批页面
|
|
|
|
//noticeId = 'emr_record'为跳转病案管理系统的病案未审批页面
|
|
|
|
|