审核消息优化
parent
2e39095430
commit
b939e750c1
|
@ -1,6 +1,7 @@
|
|||
package cn.palmte.work.controller.backend;
|
||||
|
||||
|
||||
import cn.palmte.work.bean.ResponseMsg;
|
||||
import cn.palmte.work.config.Constant;
|
||||
import cn.palmte.work.model.*;
|
||||
import cn.palmte.work.pojo.LoginRequest;
|
||||
|
@ -153,9 +154,6 @@ public class AdminController extends BaseController {
|
|||
adminService.updateLoginInfo(admin, request);
|
||||
loginLogService.saveLog(userName, LoginLog.SUCCESS, "登录成功");
|
||||
|
||||
Page<Project> myApproveProjects = projectService.findMyApproveProjects(new HashMap<>(), InterfaceUtil.getAdminId(), 1, 1);
|
||||
request.getSession().setAttribute("hasApproveProjectsMessage", CollectionUtil.isNotEmpty(myApproveProjects.getList())?"您有新的待审核项目,请及时确认。":"");
|
||||
|
||||
/**
|
||||
* admin用户去检查,如果检查job有失败的,显示弹出框[1]
|
||||
*/
|
||||
|
@ -286,5 +284,20 @@ public class AdminController extends BaseController {
|
|||
new CaptchaUtils().getRandCode(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询自己是否有审核任务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/approveProjectsMsg")
|
||||
public ResponseMsg approveProjectsMsg() {
|
||||
Page<Project> myApproveProjects = projectService.findMyApproveProjects(new HashMap<>(), InterfaceUtil.getAdminId(), 1, 1);
|
||||
if (myApproveProjects != null && !myApproveProjects.getList().isEmpty()) {
|
||||
return ResponseMsg.buildSuccessMsg("您有新的待审核项目,请及时确认。");
|
||||
} else {
|
||||
return ResponseMsg.buildSuccessMsg("");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -92,6 +92,25 @@
|
|||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* 刷新审批更新 更新跑马灯
|
||||
*/
|
||||
function refreshApproveMsg() {
|
||||
var span = $("#myMsgSpan", parent.document);
|
||||
$.ajax({
|
||||
url: '${base}/admin/approveProjectsMsg',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
type: 'post',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
if (data.status == 0) {
|
||||
span.text(data.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#arrow").on("click",function(){
|
||||
if($(this).hasClass("arrow-left")){
|
||||
|
@ -111,6 +130,8 @@
|
|||
$(this).popover('setContent', '点击显示菜单栏');
|
||||
}
|
||||
});
|
||||
|
||||
refreshApproveMsg();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -1954,10 +1954,10 @@
|
|||
type: 'post',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
$("#marqueeLi", parent.document).addClass("am-hide");
|
||||
if (data.status == 0) {
|
||||
alert(data.msg);
|
||||
window.location.href = window.location.href;
|
||||
refreshMyApproveMsg();
|
||||
} else if (data.status == 1) {
|
||||
alert(data.msg);
|
||||
}
|
||||
|
@ -1997,4 +1997,23 @@
|
|||
|
||||
$("#keywords").val(keywords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新审批更新 更新跑马灯
|
||||
*/
|
||||
function refreshMyApproveMsg() {
|
||||
var span = $("#myMsgSpan", parent.document);
|
||||
$.ajax({
|
||||
url: '${base}/admin/approveProjectsMsg',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
type: 'post',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
if (data.status == 0) {
|
||||
span.text(data.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<li id="marqueeLi" style="margin-top: -10px">
|
||||
<marquee align="left" behavior="scroll" direction="left" height="20" width="200" hspace="50" vspace="20" loop="-1" scrollamount="10" scrolldelay="100" onMouseOut="this.start()" onMouseOver="this.stop()">
|
||||
<a href="${base}/project/listApprove" target="mainFrame">${hasApproveProjectsMessage!""}</a>
|
||||
<a href="${base}/project/listApprove" target="mainFrame"><span id="myMsgSpan"></span></a>
|
||||
</marquee>
|
||||
</li>
|
||||
|
||||
|
|
Loading…
Reference in New Issue