| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
- <%@ page import="cn.sinobest.framework.comm.iface.IOperator" %>
- <%@ page import="cn.sinobest.sysmngr.comm.ConVar" %>
- <%@ page import="cn.sinobest.framework.util.Util,cn.sinobest.framework.util.DTOUtil,cn.sinobest.framework.util.DateUtil,cn.sinobest.framework.util.ConfUtil,cn.sinobest.framework.comm.Environment"%>
- <%@ page import="java.util.List,java.util.Map" %> <%@ page import="cn.sinobest.sysmngr.service.blank.BlankService" %>
- <%@ page import="cn.sinobest.sysmngr.service.blank.BlankService" %>
- <%@ page import="java.text.DateFormat,java.text.SimpleDateFormat,java.util.Date" %>
- <%@include file="./taglib.jsp" %>
- <%
- final String token = DTOUtil.getToken(response,session);
- final String headtoken=Environment.HEADER_TOKEN;
- //字典获取方法
- final String DICT_MODE = ConfUtil.getSysParam("app.dictMode","server");
- IOperator Operator = null;
- Object obj = request.getSession().getAttribute(ConVar.LOGIN_SESSION_ID);
- String CurDate = DateUtil.CurDate.YYYYMMDD_ZH.getDate();
- //始终比设定的时间多1分钟,这样系统超时的话就会自动跳到登录界面
- //例如系统有可能在SESSION 50分钟的时候,开始不用,那么需要等到1个小时以后,才会自动转到登录界面
- long timeout = 3700*1000;
- String LoginID ="";
- String SessionID ="";
- String OperName ="";
- String OperUnitName="";
- String LoginType = (String)request.getSession().getAttribute("LOGINTYPE");
- String OperId = "";
- String shortcutHtml = "";
- String OperType2 = "";
- if(obj != null){
- Operator = (IOperator)obj;
- LoginID = Operator.getLoginID();
- OperName = Operator.getOperName();
- OperId = Operator.getOperID();
- OperUnitName = Operator.getOperUnitName();
- SessionID = (String)request.getSession().getId();
- OperType2 = Operator.getOperType2();
- BlankService blankService = (BlankService)Util.getBean("blankService");
- shortcutHtml = blankService.getShortcutHtml(OperId,request.getContextPath());
- }
-
- if(LoginType==null){
- LoginType="loginsb";
- }
- boolean isSheBaoUser = true;
- if(OperType2 != null && !"1".equals(OperType2)){
- isSheBaoUser = false;
- }
-
- String jsMin = "";
- if (Environment.getAppProductMode()) {
- jsMin = "-min";
- }
-
- Cookie[] cookies=request.getCookies();
- String styleMode="blue";
- for(Cookie cookie:cookies){
- if("b2cPlatform".equals(cookie.getName())){
- styleMode=cookie.getValue();
- }
- }
- %>
- <html>
- <head>
- <title>系统标题栏</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <%-- <% if ("-min".equals(jsMin)) { %>
- <link href="${ctx}/themes/default/fw-all-default<%=jsMin%>.css?v=${deployVersion}" rel="stylesheet" type="text/css">
- <% } else { %> --%>
- <link href="${ctx}/themes/default/default.css?v=${deployVersion}" rel="stylesheet" type="text/css">
- <%-- <% } %> --%>
- <link href="${ctx}/themes/default/banner.css?v=${deployVersion}" rel="stylesheet" type="text/css">
- <link href="${ctx}/themes/default/style_<%=styleMode%>.css?v=${deployVersion}"
- rel="stylesheet" type="text/css" id="cssfile" />
- <!--[if IE 6]>
- <link href="${ctx}/themes/default/ie6.css" rel="stylesheet" type="text/css">
- <![endif]-->
- <script src="${ctx}/js/comm/lib/jquery<%=jsMin%>.js"></script>
- <script src="${ctx}/js/comm/lib/jquery.cookie<%=jsMin%>.js"></script>
- <script src="${ctx}/js/comm/lib/json2<%=jsMin%>.js?v=${deployVersion}"></script>
- <script src="${ctx}/js/comm/fw/ajax<%=jsMin%>.js?v=${deployVersion}"></script>
- </head>
-
-
- <body leftmargin="0" topmargin="0">
- <FORM name="frm" method="post" action="<%=request.getContextPath()%>/framework/security/<%=LoginType%>!logout.do" >
- <input type="hidden" name="_rtnURL" value="<%=request.getContextPath()%>/framework/banner.do" />
- <div id="_bannerbutton" class="bannerbutton">
- <div class="leftHeader"></div>
- <div class="rightHeader"></div>
- <div class="colorScheme" style="text-align:right;">
- <!-- <a href="javascript:setCssFile('blue');" class="blue" title="">a</a>-->
- <!-- <a href="javascript:setCssFile('green');" class="orange">b</a>-->
- <!-- <a href="javascript:setCssFile('gray');" class="grey">c</a>-->
- </div>
- <div class="bannerTitle" style="padding-top:30px;padding-left:400px;">
- <span class="topover" ><%=CurDate%></span>
- <%if("true".equals(Environment.BPM_WORKFLOW_ON)){%>
- <a class="topover" href="${ctx}/jsp/framework/blank_bpm.jsp?RightID=blank" target=workspace style="text-decoration:underline;">首页</a>
- <%}else{%>
- <a class="topover" href="${ctx}/jsp/framework/blank.jsp?RightID=blank" target=workspace style="text-decoration:underline;">首页</a>
- <%}%>
- <%if(isSheBaoUser){//如果是社保局用户,则显示"查阅公告"链接%>
- <a class="topover" href="javascript:void(0);" onclick="showBulletinDialog();" style="text-decoration:underline;">公告查阅</a>
- <%}%>
- <a class="topover" href="javascript:void(0);" onclick="showShortcut();" style="text-decoration:underline;">常用菜单</a>
- <a class="topover" href="javascript:void(0);" onclick="mpass();" style="text-decoration:underline;">修改密码</a>
- <a class="topover" href="javascript:void(0);" onclick="relogon();" style="text-decoration:underline;">重新登录</a>
- <a class="topover" href="javascript:void(0);" onclick="doclose();" style="text-decoration:underline;">退出系统</a>
- <a class="topover" href="javascript:doLink();" style="text-decoration:underline;">帮助</a>
- <span class="topover" style="padding-left:80px;">姓名:</span>
- <span class="topover"><%=OperName%></span>
- <span class="topover"> 单位:</span>
- <span class="topover"><%=OperUnitName%></span>
- </div>
- </div>
- </FORM>
- </body>
- <script language="javascript">
- var contextPath='${ctx}';
- var GVAR = {'dictMode':'<%=DICT_MODE%>',
- 'dicts':{}
- };
- var token = '<%=token%>';
- var headtoken= '<%=headtoken%>';
-
- var shortData = null;
- //窗口的非正常退出时调用
- //window.attachEvent("onunload",doCloseWin);
-
- //document.all._bannerbutton.style.top="20px";
- setTimeout("doReload()",<%=timeout%>);//刷新
- function doReload(){
- unBindListener(self.top.window,'unload',doCloseWin);
- var services=[{serviceId:'seccuritySession',method:'iftimeout',parameters:{ifjy:true}}];
-
- $.ajax({
- url:contextPath+'/ajaxAdapter.do'
- ,data:{parameters:JSON.stringify(services)}
- ,dataType :'json'
- ,cache:false
- ,async:false
- ,type:'post'
- ,error:function (request, textStatus, errorThrown) {}
- ,success:function (data, textStatus) {
- if(data!=null && data[headtoken]!=null){
- token=data[headtoken];//更新全局变量token标志
- }
- //校验业务处理是否正确执行
- if("1"!=data.FHZ){//出错了,弹出错误提醒
- if ("loginTimeout" == data.FHZ) {
- var flag=window.confirm("登陆超时,是否重新登录?");
- if(flag){
- var nWidth = screen.availWidth-10;
- var nHeight = screen.availHeight-50;
- window.open("<%=request.getContextPath()%>"+"/index.jsp","","top=0,left=0,width="+nWidth+",height="+nHeight+",toolbar=no,resizable=yes,status=1,scrollbars")
-
- window.opener=null;
- window.open("","_self");
- window.close();
- try{ window.parent.close();}catch(e){}
- }
- }else if("CSRF" == data.FHZ){
- showMsg(data.MSG||'',3);
- return;
- }
- }else{
- self.location.reload();
- }
- },
- beforeSend:function(XMLHttpRequest ){
- var cToken = $.cookie(headtoken) || token;XMLHttpRequest.setRequestHeader(headtoken,cToken);
- }
-
- });
- }
-
- function relogon(){
- if (!window.confirm("是否退出系统?")) {
- return;
- }
- unBindListener(window,'unload',doCloseWin);
- doCloseWin();
- window.top.location.href="${ctx}/jsp/framework/security/<%=LoginType%>_i.jsp";
- }
- function doclose(){
- if (window.confirm("是否退出系统?")) {
- window.parent.close();
- }
- }
- function mpass(){
- unBindListener(window,'unload',doCloseWin);
- window.top.location.href="${ctx}/jsp/framework/security/pwdrest_u.jsp";
- }
-
- <%-- 此处用AJAX去销毁SESSION 销毁的动作在类 AjaxAction 内完成 --%>
- function doCloseWin(){
- var args = {'SD':'<%=SessionID%>'};
- var services=[{serviceId:'securityLogoutService',method:'logout',parameters:args}];
-
- $.ajax({
- url:contextPath+'/ajaxAdapter.do'
- ,data:{parameters:JSON.stringify(services)}
- ,dataType :'json'
- ,cache:false
- ,async:false
- ,type:'post'
- ,error:function (request, textStatus, errorThrown) {}
- ,success:function (data, textStatus) {
- if(data!=null && data[headtoken]!=null){
- token=data[headtoken];//更新全局变量token标志
- }
- },
- beforeSend:function(XMLHttpRequest ){
- var cToken = $.cookie(headtoken) || token;XMLHttpRequest.setRequestHeader(headtoken,cToken);
- }
-
- });
- }
- <%-- 弹出常用菜单窗口 --%>
- window.shortcut = {operId:"<%=OperId%>",shortcutHtml: "<%=shortcutHtml%>"};
- function showShortcut(){
- var title = encodeURIComponent('常用菜单');
- var url = "shortcut.jsp?title=" + title + "&_t=" + new Date().getTime();
- var position = "resizable:1;status:0;help:0;scroll:1;center:1;dialogWidth:900px;dialogHeight:450px";
- window.showModalDialog(url,window,position);
- }
- <%-- 弹出查阅公告窗口 --%>
- function showBulletinDialog(){
- var title = encodeURIComponent('查阅公告');//对话框的标题
- var url = "blank_bulletin.jsp?title="+title;
- var position="resizable:1;status:0;help:0;scroll:1;center:1;dialogWidth:1024px;dialogHeight:500px";
- window.showModalDialog(url,window,position);
- }
-
-
- function bindListener(obj,eventName,fun) {
- if (obj.addEventListener) {
- obj.addEventListener(eventName,fun,false);
- } else if (obj.attachEvent) {
- obj.attachEvent('on'+eventName,fun);
- } else {
- obj['on'+eventName] = fun;
- }
- }
-
- function unBindListener(obj,eventName,fun) {
- if (obj.removeEventListener) {
- obj.removeEventListener(eventName,fun,false);
- } else if (obj.detachEvent) {
- obj.detachEvent('on'+eventName,fun);
- } else {
- obj['on'+eventName] = '';
- }
- }
- // 设置样式
- function setCssFile(id){
- var csspath="${ctx}/themes/default/style_"+ id +".css";
- try{//设置不同皮肤
- $(window.parent.frames['TreeMenu'].document).find("#cssfile").attr("href",csspath);
- $(window.parent.frames['TreeMenuHideShow'].document).find("#cssfile").attr("href",csspath);
- $(window.parent.frames['contentFrameset'].document).find("#cssfile").attr("href",csspath);
- $(window.parent.frames['navigation'].document).find("#cssfile").attr("href",csspath);
- $(window.parent.frames['workspace'].document).find("#cssfile").attr("href",csspath);
- $(window.parent.frames['banner'].document).find("#cssfile").attr("href",csspath);
- }catch(e){ }
- $.cookie( "b2cPlatform" , id , { path: '/', expires: 10 });
- }
- </script>
- <script>
- parent.mLoadStatus.banner = true;
- </script>
- </html>
|