RemindNew.jsp 12 KB
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="weaver.general.TimeUtil"%>
<%@ page import="weaver.systeminfo.*"%>
<%@ include file="/page/maint/common/initNoCache.jsp" %>
<jsp:useBean id="AccessItemComInfo" class="weaver.gp.cominfo.AccessItemComInfo" scope="page" />
<jsp:useBean id="cmutil" class="weaver.gp.util.TransUtil" scope="page" />
<jsp:useBean id="cmutil2" class="weaver.pr.util.TransUtil" scope="page" />
<jsp:useBean id="OperateUtil" class="weaver.gp.util.OperateUtil" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs2" class="weaver.conn.RecordSet" scope="page" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 transitional//EN" "http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title><%= SystemEnv.getHtmlLabelName(84013, user.getLanguage()) %></title> <!-- 目标绩效提醒 -->
		<link rel="stylesheet" type="text/css" href="/css/Weaver_wev8.css" />
		<script type="text/javascript" src="/wui/common/jquery/jquery_wev8.js"></script>
		<script language="javascript" src="/performance/js/highcharts.src.js"></script>
		<style type="text/css">
			body{margin: 0px;padding:0px;}
			*{font-family:微软雅黑;font-size:12px;}
			.tab1{width: auto;line-height:26px;text-align:center;float: left;cursor: pointer;border-top:2px #fff solid;font-size: 12px;
				border-right: 1px #EBEBEB solid;font-weight: bold; padding: 0 10px;
			}
			.tab1_hover{border-top-color: #F9F9F9;background: #F9F9F9;}
			.tab1_click{border-top-color: #3C75D2;background: #F6F6F6;}
			
			.tab2{width: auto;padding-left:4px;padding-right:4px;height:26px;line-height:26px;text-align:left;cursor: pointer;font-size: 12px;color: #999999;
				empty-cells: show;word-break: keep-all;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
			.tab2_hover{color: #8B8B8B;}
			.tab2_click{font-weight: normal;color: #4B6EB8;}
		
			.list{width: 100%;}
			.list td{line-height: 22px;padding-left:4px;}
			.list td a,.list td a.link{color: #333333 !important;text-decoration: none;}
			.list tr.hover td{background: #FAFAFA;}
			
			
			.history{width: 100%;}
			.history td{height: 66px;text-align: center;background: #F9F9F9;}
			.ntd{}
			.htd{cursor: pointer;color: #676767}
			.htd_hover{background: #0094DB !important;color: #fff !important;}
			.htd_hover font{color: #fff !important;}
			.font1{color: #3f3f3f;font-size: 16px;line-height: 22px;font-weight: bold;font-family: Arial !important;}
			.font3{color: #676767;font-size: 12px;line-height: 22px;}
			.font2{color: #d4d4d4;line-height: 22px;}
			
			.show{
				SCROLLBAR-DARKSHADOW-COLOR: #EBEBEB;
				SCROLLBAR-ARROW-COLOR: #F7F7F7;
				SCROLLBAR-3DLIGHT-COLOR: #EBEBEB;
				SCROLLBAR-SHADOW-COLOR: #EBEBEB;
				SCROLLBAR-HIGHLIGHT-COLOR: #EBEBEB;
				SCROLLBAR-FACE-COLOR: #EBEBEB;
				scrollbar-track-color: #F7F7F7;
				overflow-x: hidden; 
				overflow-y: auto; 
			}
			::-webkit-scrollbar-track-piece {
				background-color: #E2E2E2;
				-webkit-border-radius: 0;
			}
			
			::-webkit-scrollbar {
				width: 12px;
				height: 8px;
			}
			
			::-webkit-scrollbar-thumb {
				height: 50px;
				background-color: #CDCDCD;
				-webkit-border-radius: 1px;
				outline: 0px solid #fff;
				outline-offset: -2px;
				border: 0px solid #fff;
			}
			
			::-webkit-scrollbar-thumb:hover {
				height: 50px;
				background-color: #BEBEBE;
				-webkit-border-radius: 1px;
			}
		</style>
	<%@ include file="/secondwev/common/head.jsp" %>
	</head>
	<body style="overflow: hidden;">
		<div style="width: auto;height: 208px;border: 1px #EBEBEB solid;overflow: hidden;">
			<div style="width: 100%;height: 28px;background: #fff;border-bottom: 1px #EBEBEB solid;">
<%--				<%if(hasitem){%><div id="tab1_1" class="tab1" _index="1" title="近六个月定量指标目标及完成统计">定量指标</div><%}%>--%>
				<div id="tab1_2" class="tab1" _index="2" title="<%= SystemEnv.getHtmlLabelName(509988, user.getLanguage()) %>"><%= SystemEnv.getHtmlLabelName(509989, user.getLanguage()) %></div>
				<div id="tab1_3" class="tab1 tab1_click" _index="3" title="<%= SystemEnv.getHtmlLabelName(509990, user.getLanguage()) %>"><%= SystemEnv.getHtmlLabelName(509991, user.getLanguage()) %></div>
				<div style="width: 60px;line-height: 22px;float: right;text-align: center;color: #8C8C8C;font-weight: bold;display: none;"><%= SystemEnv.getHtmlLabelName(18027, user.getLanguage()) %></div>
			</div>

			<div id="show1" class="show" style="width: 100%;height: auto;display: none;">
				<div id="tabdiv" style="width: 100%;height: auto;background: #F6F6F6;border-bottom: 1px #EBEBEB solid;table-layout: fixed">
					<table id="tabtable" class="tabtable" style="width:auto;" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<!-- access items -->
						</tr>
					</table>
				</div>
				<div id="showreport" style="width: 100%;height: 155px;margin-top: 4px;"></div>
			</div>

			<div id="show2" class="show" style="width: 100%;height: 180px;display: none;">
				<div style="width: 100%;height: 2px;background: #F6F6F6;border-bottom: 1px #EBEBEB solid;"></div>
				<table class="list" style="width: 100%;margin-top: 6px;" cellpadding="0" cellspacing="0" border="0">
					<!-- remind info -->
				</table>
			</div>

			<div id="show3" class="show" style="width: 100%;height: 180px;">
				<table class="history" cellpadding="0" cellspacing="5" border="0">
					<colgroup><col width="33%"/><col width="33%"/><col width="34%"/></colgroup>
					<!-- history access -->
					<tr>
						<td colspan="3" class="htd" style="height: 24px;" _scoreid="0"><%= SystemEnv.getHtmlLabelName(17499, user.getLanguage()) %></td>  <!-- 更多 -->
					</tr>
				</table>
			</div>
		</div>
		
		<script type="text/javascript">
			$.ajaxSetup ({
			    cache: false //关闭AJAX相应的缓存
			});
			$(document).ready(function(){
				// 获取当前月考核项数据
				$.ajax({
					url: "/api/workrelate/performance/currMonthItems",
					method: "GET",
					success: function (res) {
						res = JSON.parse(res)
						if (res.api_status) {
							var data = res.data;
							if (data.hasitem) {
								window.hasitem = true;
								$("#tab1_2").before(data.tabmsg);
								var accessitemmsg = data.accessitemmsg;
								for (var i = 0; i < accessitemmsg.length; i++) {
									$($("#tabtable").find("tr")[0]).append(accessitemmsg[i]);
								}
							}
						}
					}
				});

				// 获取考核提醒信息(计划)
				$.ajax({
					url: "/api/workrelate/plan/getRemindInfo",
					method: "GET",
					success: function (res) {
						res = JSON.parse(res);
						if (res.api_status) {
							var data = res.data;
							if (data.audit_c_msg) {
								$($("#show2").find("table")[0]).append(data.audit_c_msg);
							}
							if (data.submitplan) {
								$($("#show2").find("table")[0]).append(data.submitplan);
							}
							if (data.finishplanlist.length > 0) {
								for (var i = 0; i < data.finishplanlist.length; i++) {
									$($("#show2").find("table")[0]).append(data.finishplanlist[i]);
								}
							}
							if (data.noreadplanlist.length > 0) {
								for (var i = 0; i < data.noreadplanlist.length; i++) {
									$($("#show2").find("table")[0]).append(data.noreadplanlist[i]);
								}
							}
						}

						// 获取考核提醒信息(绩效)
						$.ajax({
							url: "/api/workrelate/performance/getRemindInfo",
							method: "GET",
							success: function (res1) {
								res1 = JSON.parse(res1);
								if (res1.api_status) {
									var data1 = res1.data;
									if (data1.audit_p_msg) {
										$($("#show2").find("table")[0]).append(data1.audit_p_msg);
									}
									if (data1.score_msg) {
										$($("#show2").find("table")[0]).append(data1.score_msg);
									}
									if (data1.audit_s_msg) {
										$($("#show2").find("table")[0]).append(data1.audit_s_msg);
									}
									if (data1.finishaccesslist.length > 0) {
										for (var i = 0; i < data1.finishaccesslist.length; i++) {
											$($("#show2").find("table")[0]).append(data.finishaccesslist[i]);
										}
									}
									if (data1.noreadaccesslist.length > 0) {
										for (var i = 0; i < data1.noreadaccesslist.length; i++) {
											$($("#show2").find("table")[0]).append(data1.noreadaccesslist[i]);
										}
									}
									if (data1.amount_msg) {
										$($("#show2").find("table")[0]).append(data1.amount_msg);
									}
									if (!data.hasremind && !data1.hasremind) {
										var no_msg = "<tr>" +
														"<td style='color: #ADADAD;font-style: italic;'>" +
															"<%= SystemEnv.getHtmlLabelName(509992, user.getLanguage()) %>" +
														"</td>" +
													"</tr>";
										$($("#show2").find("table")[0]).append(no_msg);
									} else {
										window.hasremind = true;
									}
								}
							}
						})
					}
				});

				// 获取历史绩效
				$.ajax({
					url: "/api/workrelate/performance/getHisAccessList",
					method: "GET",
					success: function (res) {
						res = JSON.parse(res);
						if (res.api_status) {
							var data = res.data;
							var onerowcount = 3;
							var totalrow = parseInt(data.scorelist.length / onerowcount) + 1;
							for (var i = totalrow - 1; i >= 0; i--) {
								var tr = "<tr>";
								for (var k = i * onerowcount; k < (i + 1) * onerowcount; k++) {
									if (k < data.scorelist.length) {
										tr += data.scorelist[k];
									}
								}
								tr += "</tr>";
								$("#show3 colgroup").first().after(tr);
							}
						}
					}
				});

				$("table.list").find("tr").live("mouseover",function(){
					$(this).addClass("hover");
				}).live("mouseout",function(){
					$(this).removeClass("hover");
				});
				
				$("div.tab1").live("mouseover",function(){
					$(this).addClass("tab1_hover");
				}).live("mouseout",function(){
					$(this).removeClass("tab1_hover");
				}).live("click",function(){
					$("div.tab1").removeClass("tab1_click");
					$(this).addClass("tab1_click");
					var _index = $(this).attr("_index");
					$("div.show").hide();
					$("#show"+_index).show();
					if(_index==1){
						$("td.tab2")[0].click();
					}
				});

				$("td.tab2").live("mouseover",function(){
					$(this).addClass("tab2_hover");
				}).live("mouseout",function(){
					$(this).removeClass("tab2_hover");
				}).live("click",function(){
					$("td.tab2").removeClass("tab2_click");
					$(this).addClass("tab2_click");
					var _itemid = $(this).attr("_itemid");
					var _desc = $(this).attr("_desc");
					$("#showreport").load("Report.jsp?accessitemid="+_itemid+"&itemdesc="+_desc);

					if($("#tabtable").width()>$("#tabdiv").width()){
						$("#tabtable").width("100%").css("table-layout","fixed");
					}
				});

				$("td.htd").live("mouseover",function(){
					$(this).addClass("htd_hover");
				}).live("mouseout",function(){
					$(this).removeClass("htd_hover");
				}).live("click",function(){
					var scoreid = $(this).attr("_scoreid");
					if(scoreid!=""){
						if(scoreid=="0"){
							openFullWindowHaveBar("/spa/workrelate/static/index.html#/main/workrelate/performance/performanceIndex");
						}else{
							openFullWindowHaveBar("/spa/workrelate/static/index.html#/main/workrelate/performance/accessView?scoreid="+scoreid);
						}
					}
				});

				if(window.hasremind){
					$("#tab1_2").click();
				}else if(window.hasitem){
					$("#tab1_1").click();
				}
			});

			function openFullWindowHaveBar(url){
				  var redirectUrl = url ;
				  var width = screen.availWidth-10 ;
				  var height = screen.availHeight-50 ;
				  //if (height == 768 ) height -= 75 ;
				  //if (height == 600 ) height -= 60 ;
				   var szFeatures = "top=0," ;
				  szFeatures +="left=0," ;
				  szFeatures +="width="+width+"," ;
				  szFeatures +="height="+height+"," ;
				  szFeatures +="directories=no," ;
				  szFeatures +="status=yes,toolbar=no,location=no," ;
				  szFeatures +="menubar=no," ;
				  szFeatures +="scrollbars=yes," ;
				  szFeatures +="resizable=yes" ; //channelmode
				  window.open(redirectUrl,"",szFeatures) ;
			}

			function removeObj(obj){
				$(obj).parent().parent("tr").remove();
			}
		</script>
	</body>
</html>