Commit 9233b6e8 by yangbenyong

修改登陆和首页的tab等问题

parent 43f58a36
...@@ -2,5 +2,6 @@ eclipse.preferences.version=1 ...@@ -2,5 +2,6 @@ eclipse.preferences.version=1
encoding//src/main/java=UTF-8 encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8 encoding//src/main/resources=UTF-8
encoding//src/main/resources/application.properties=UTF-8 encoding//src/main/resources/application.properties=UTF-8
encoding//src/main/resources/static/js/mhjs/config.js=UTF-8
encoding//src/test/java=UTF-8 encoding//src/test/java=UTF-8
encoding/<project>=UTF-8 encoding/<project>=UTF-8
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
.layadmin-body-shade{position:fixed;display:none;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.3);z-index:1000} .layadmin-body-shade{position:fixed;display:none;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.3);z-index:1000}
.layadmin-pagetabs,.layui-layout-admin .layui-body .layadmin-pagetabs,.layui-layout-admin .layui-body
,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-layout-left{left:210px} ,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-layout-left{left:200px}
/*.layadmin-side-shrink .layui-layout-admin .layui-logo{width:60px;background-image:url(res/logo.png)} /*.layadmin-side-shrink .layui-layout-admin .layui-logo{width:60px;background-image:url(res/logo.png)}
.layadmin-side-shrink .layui-layout-admin .layui-logo span{display:none} .layadmin-side-shrink .layui-layout-admin .layui-logo span{display:none}
......
...@@ -44,9 +44,6 @@ ...@@ -44,9 +44,6 @@
version : Common.version version : Common.version
}); });
</script> </script>
</head> </head>
<body> <body>
<div class="layui-layout layui-layout-admin"> <div class="layui-layout layui-layout-admin">
......
...@@ -2,68 +2,68 @@ ...@@ -2,68 +2,68 @@
<!-- 顶部 --> <!-- 顶部 -->
<link rel="stylesheet" href="${ctxPath}/plugins/messages/css/message.css"> <link rel="stylesheet" href="${ctxPath}/plugins/messages/css/message.css">
<style type="text/css"> <style type="text/css">
.fsTab{ .fsTab{
margin:10px; margin:10px;
height:webkit-calc(100% - 22px); height:webkit-calc(100% - 22px);
height:-moz-calc(100% - 22px); height:-moz-calc(100% - 22px);
height:calc(100% - 22px); height:calc(100% - 22px);
} }
.fsTab .layui-tab-content{ .fsTab .layui-tab-content{
height:webkit-calc(100% - 42px);
height:webkit-calc(100% - 42px); height:-moz-calc(100% - 42px);
height:-moz-calc(100% - 42px); height:calc(100% - 42px);
height:calc(100% - 42px); box-sizing: border-box;
box-sizing: border-box; }
}
.fsTab .layui-tab-content *{ .fsTab .layui-tab-content *{
height : 100%; height : 100%;
width: 100%; width: 100%;
} }
.ellipsis{ line-height: 20px; text-indent:2em; } .ellipsis{ line-height: 20px; text-indent:2em; }
a.looklist{ margin-top:10px;} a.looklist{ margin-top:10px;}
.fsTopMenu{ width: calc(100% - 570px);min-width: 200px;overflow:hidden;background-color: transparent;border: 0;} .fsTopMenu{ width: calc(100% - 570px);min-width: 200px;overflow:hidden;background-color: transparent;border: 0;}
#fsTopMenu li a,#fsTopMenu .layui-tab-bar{color:#ffffff; display:inline;} #fsTopMenu li a,#fsTopMenu .layui-tab-bar{color:#ffffff; display:inline;}
#fsTopMenu .layui-this,#fsTopMenu .layui-this a{color: #333;} #fsTopMenu .layui-this,#fsTopMenu .layui-this a{color: #333;}
.layui-layout-left>.layui-tab-title{ background-color: transparent; } .layui-layout-left>.layui-tab-title{ background-color: transparent; }
.layadmin-iframe{position:relative;}
</style> </style>
<form class="layui-form layui-form-pane"> <form class="layui-form layui-form-pane">
<div class="layui-header"> <div class="layui-header">
<a href="javascript:;" class="layui-hide-xs"><div class="layui-logo layui-elip">${env("app.name")}</div></a> <a href="javascript:;" class="layui-hide-xs"><div class="layui-logo layui-elip">${env("app.name")}</div></a>
<a href="javascript:;" class="layui-hide-xs"><div class="fsSwitchMenu"><i class="layui-icon iconfont layui-icon-shrink-right"></i></div></a> <a href="javascript:;" class="layui-hide-xs"><div class="fsSwitchMenu"><i class="layui-icon iconfont layui-icon-shrink-right"></i></div></a>
<!-- 顶部菜单spk-platform-core/src/resources/templates/index.html --> <!-- 顶部菜单spk-platform-core/src/resources/templates/index.html -->
<div class="layui-layout-left fsTopMenu layui-tab layui-tab-card"id="fsTopMenu" > <div class="layui-layout-left fsTopMenu layui-tab layui-tab-card"id="fsTopMenu" >
<ul class="layui-tab-title" lay-filter="fsTopMenu"> <ul class="layui-tab-title" lay-filter="fsTopMenu">
<!--#for(node in menus.children){ --> <!--#for(node in menus.children){ -->
<li class=" ${nodeLP.first?'layui-this'}" dataPid="${node.data.id}"><a href="javascript:;"><i class="layui-icon">${node.data.icon}</i> <li class=" ${nodeLP.first?'layui-this'}" dataPid="${node.data.id}"><a href="javascript:;"><i class="layui-icon">${node.data.icon}</i>
<!--#if(nodeLP.first){ --> <!--#if(nodeLP.first){ -->
<cite>${node.data.name}</cite> <cite>${node.data.name}</cite>
<!--#}else{ --> <!--#}else{ -->
${node.data.name} ${node.data.name}
<!--#} --> <!--#} -->
</a></li> </a></li>
<!--#} --> <!--#} -->
</ul> </ul>
</div> </div>
<ul class="layui-nav layui-layout-right"> <ul class="layui-nav layui-layout-right">
<!-- 消息提醒 --> <!-- 消息提醒 -->
<li class="layui-nav-item layui-hide-xs"> <li class="layui-nav-item layui-hide-xs">
<i id="message" class="layui-icon layui-icon-notice layui-icon-notice-top"></i> <i id="message" class="layui-icon layui-icon-notice layui-icon-notice-top"></i>
</li> </li>
<li class="layui-nav-item layui-hide-xs"> <li class="layui-nav-item layui-hide-xs">
<a href="javascript:;"> <a href="javascript:;">
${session["core:user"].name} ${session["core:user"].name}
</a> </a>
<dl class="layui-nav-child"> <dl class="layui-nav-child">
<dd><a href="javascript:;">基本资料</a></dd> <dd><a href="javascript:;">基本资料</a></dd>
<dd id="changeCompanyButton"><a href="javascript:;">${session["core:currentOrg"].name}</a> <dd id="changeCompanyButton"><a href="javascript:;">${session["core:currentOrg"].name}</a>
</dd> </dd>
</dl> </dl>
</li> </li>
<li class="layui-nav-item layui-hide-xs user-modify-password"><a style="cursor: pointer;"><i class="layui-icon layui-icon-set"></i> 修改密码</a></li> <li class="layui-nav-item layui-hide-xs user-modify-password"><a style="cursor: pointer;"><i class="layui-icon layui-icon-set"></i> 修改密码</a></li>
<li class="layui-nav-item layui-hide-xs"><a href="${ctxPath}/logout.do"><i class="iconfont icon-tuichu"></i> 退出</a></li> <li class="layui-nav-item layui-hide-xs"><a href="${ctxPath}/logout.do"><i class="iconfont icon-tuichu"></i> 退出</a></li>
</ul> </ul>
</div> </div>
<div id="selectCompany" style="padding: 50px;display:none;"> <div id="selectCompany" style="padding: 50px;display:none;">
...@@ -78,7 +78,6 @@ height:calc(100% - 42px); ...@@ -78,7 +78,6 @@ height:calc(100% - 42px);
checked=true; checked=true;
} }
--> -->
<option value="${org.id}" ${checked?"selected"}>${org.name}</option> <option value="${org.id}" ${checked?"selected"}>${org.name}</option>
<!--#} --> <!--#} -->
</select> </select>
...@@ -89,20 +88,17 @@ height:calc(100% - 42px); ...@@ -89,20 +88,17 @@ height:calc(100% - 42px);
<!-- 右边内容区域 --> <!-- 右边内容区域 -->
<div class="layui-body layui-form"> <div class="layui-body layui-form">
<div class="layui-tab layui-tab-card fsTab" lay-filter="fsTab" lay-allowClose="true"> <!-- <div class="layui-tab layui-tab-card fsTab" lay-filter="fsTab" lay-allowClose="true"> -->
<!-- 菜单导航
<!-- 菜单导航 -->
<ul class="layui-tab-title"> <ul class="layui-tab-title">
<li class="layui-this">系统说明</li> <li class="layui-this">系统说明</li>
</ul>
<!-- 内容 -->
<div class="layui-tab-content"> <div class="layui-tab-content">
<div class="layui-tab-item layui-show"> <div class="layui-tab-item layui-show"></ul>-->
<iframe src="" class="layadmin-iframe"></iframe> <!-- 内容 -->
</div>
<div class="layui-tab layui-tab-card fsTab">
<iframe loading="lazy" class="layadmin-iframe"></iframe>
</div> </div>
</div>
</div> </div>
<!-- 配色弹窗 --> <!-- 配色弹窗 -->
<div class="layui-hide" id="layer-style-color"> <div class="layui-hide" id="layer-style-color">
...@@ -209,7 +205,7 @@ layui.use(['layer'],function(){ ...@@ -209,7 +205,7 @@ layui.use(['layer'],function(){
}) })
//var id = ${session["core:user"].id}; //Common.userInfo.userId //var id = ${session["core:user"].id}; //Common.userInfo.userId
//var numbe = 0;//Common.userInfo.numberlist //var numbe = 0;//Common.userInfo.numberlist
$.ajax({ $.ajax({
url:'core/remind/unReadCount.json?userId='+Common.userInfo.userId, url:'core/remind/unReadCount.json?userId='+Common.userInfo.userId,
async:true, async:true,
type:'post', type:'post',
...@@ -218,7 +214,7 @@ layui.use(['layer'],function(){ ...@@ -218,7 +214,7 @@ layui.use(['layer'],function(){
listnum = data.data > 99?'99+':data.data; listnum = data.data > 99?'99+':data.data;
} }
}, },
complete:function(){ complete:function(){
if(listnum === 0)return; if(listnum === 0)return;
MessagePlugin.init({ MessagePlugin.init({
elem: "#message", elem: "#message",
...@@ -256,18 +252,19 @@ layui.use(['layer'],function(){ ...@@ -256,18 +252,19 @@ layui.use(['layer'],function(){
}, },
getNodeHtml: function(obj, node) { getNodeHtml: function(obj, node) {
obj.readStatus == 1? node.isRead = true: node.isRead = false; obj.readStatus == 1? node.isRead = true: node.isRead = false;
var html = "<p name='"+obj.id+"'>"+ obj.title +"</p> <small>"+obj.receiveTime+"</small> "; var html = "<p name='"+obj.id+"'>"+ obj.title +"</p> <small>"+obj.receiveTime+"</small> ";
node.html = html; node.html = html;
return node; return node;
} }
}); });
} }
}); });
$('#left-nav').on('click','.layui-this',function(){
var url = $(this).children('a').attr('dataurl')
$('.layadmin-iframe').attr('src',url);
})
//关闭nav tab #listall //关闭nav tab #listall
$(".layui-tab-title").on('click','.layui-tab-close',function(){ /* $(".layui-tab-title").on('click','.layui-tab-close',function(){
if($(this).parent().hasClass("layui-this")){ if($(this).parent().hasClass("layui-this")){
var _next = $(this).parent().next('li'), var _next = $(this).parent().next('li'),
_prev = $(this).parent().prev("li"); _prev = $(this).parent().prev("li");
...@@ -281,11 +278,12 @@ layui.use(['layer'],function(){ ...@@ -281,11 +278,12 @@ layui.use(['layer'],function(){
} }
$(".layui-tab-content").children().eq($(this).parents('li').index()).remove(); $(".layui-tab-content").children().eq($(this).parents('li').index()).remove();
$(this).parent().remove(); $(this).parent().remove();
}) }) */
$("#theme_id").on('click',parentDeck); //$("#theme_id").on('click',parentDeck);
$("#addDeck").on('click',addDecks); //$("#addDeck").on('click',addDecks);
function addDecks(){//添加桌面
/* function addDecks(){//添加桌面
var item = $("#addDeck").val().split(','); var item = $("#addDeck").val().split(',');
var len = $(".fsTab ul").children().length; var len = $(".fsTab ul").children().length;
$(".fsTab ul").children().removeClass('layui-this'); $(".fsTab ul").children().removeClass('layui-this');
...@@ -331,7 +329,7 @@ layui.use(['layer'],function(){ ...@@ -331,7 +329,7 @@ layui.use(['layer'],function(){
$(".layui-tab-content").children().eq(0).addClass("layui-show").siblings().removeClass('layui-show'); $(".layui-tab-content").children().eq(0).addClass("layui-show").siblings().removeClass('layui-show');
} }
} }
}) }) */
}); });
</script> </script>
<script type="text/javascript" src="${ctxPath}/js/common/json2.js"></script> <script type="text/javascript" src="${ctxPath}/js/common/json2.js"></script>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>${env("app.name")}</title>
<link rel="stylesheet" type="text/css" href="${ctxPath}/plugins/layui/css/layui.css?v=${jsVer}" media="all"/>
<link rel="stylesheet" type="text/css" href="css/base.css"/>
<link rel="stylesheet" type="text/css" href="css/login.css"/>
<script type="text/javascript" src="js/md5.js"></script>
<!-- layUI -->
<script type="text/javascript" src="${ctxPath}/plugins/layui/layui.js?v=${jsVer}"></script>
<style type="text/css">
</style>
</head>
<body>
<form action="" method="post" name="loginForm" id="loginForm">
<input type="hidden" ID="UserSignedData" name="UserSignedData">
<input type="hidden" ID="UserCert" name="UserCert">
<input type="hidden" ID="ContainerName" name="ContainerName">
<input type="hidden" ID="strRandom" name="strRandom">
<input type="hidden" ID="loginType" name="loginType" value="0">
<div class="header_top">
<img src="img/logo.jpg"/>
</div>
<div class="main">
<div class="content">
<div class="con_center">
<div class="nav_menu">
<div class="menu_ball">
<a href="#" class="menu_1"><img src="img/index/icon/l_f.png"/></a>
<a href="#" class="menu_2"><img src="img/index/icon/l_b.png"/></a>
<a href="#" class="menu_3"><img src="img/index/icon/l_c.png"/></a>
<a href="#" class="menu_4"><img src="img/index/icon/l_d.png"/></a>
<a href="#" class="menu_5"><img src="img/index/icon/l_e.png"/></a>
</div>
<a href="#" class="menu_0"><img src="img/index/icon/l_a.png"/></a>
</div>
<div class="login">
<!-- form action="" method="post"> -->
<ul class="login_list" id="loginbox">
<li><i></i><select id="loginName" name="loginName" style="display:none"></select>
<input type="text" name="loginname" id="loginname" autocomplete="off" placeholder="请输入用户名"/></li>
<li><i></i><input type="password" id="password" placeholder="请输入密码" /></li>
<li><a href="javascript:;" id="login_sbmit"><i>登录</i></a></li>
</ul>
<!-- </form> -->
</div>
</div>
</div>
<div class="footer">
<strong>技术支持:北京思普科软件股份有限公司</strong>
</div>
</div>
</form>
</body>
<script type="text/javascript">
var ctxPath = "${ctxPath}";
layui.use(['layer','jquery'],function(){
var layer , $;
layer = layui.layer, $ = layui.jquery;
var strServerSignedData;
var strServerRan;
var strServerCert;
var certId;
//登陆页面
$("#login_sbmit").click(severCheck)
//服务器校验
function severCheck(){
if("1" == $("#loginType").val()){
$("#strRandom").val(strServerRan);
var loginname = $("#loginName").val();
var password = $("#password").val();
Login("loginForm", loginname, password, "${ctxPath}/loginAjax.do");
}else{
severLogin();
}
}
function getUser(retObj){
certId = retObj.retVal;
var loginname = $("#loginName").val();
var password = $("#password").val();
var loginType = $("#loginType").val();
var strServerCert = $("#UserCert").val();
var strRandom = $("#strRandom").val();
var UserSignedData = $("#UserSignedData").val();
var code = loginname+","+hex_md5(password)+","+loginType+","+strServerCert+","+strRandom+","+UserSignedData+","+certId;
$.ajax({
type: "POST",
url: '${ctxPath}/loginAjax.do',
data: {
KEYDATA:code,
tm:new Date().getTime()
},
dataType:'json',
cache: false,
success: function(data){
console.log(data);
if(0 === data.code){
window.location.href="${ctxPath}/index.do";
}else{
layer.tips(data.msg,"#loginName",{time : 4000,tips:[2,'#FF5080']});
$("#loginName").focus();
}
}
});
}
function severKeyLogin(){
var strServerCert = $("#UserCert").val();
GetCertEntity(strServerCert,getUser);
}
function severLogin(forceLogin){
if(check()){
var loginname = $("#loginname").val();
var password = $("#password").val();
var loginType = $("#loginType").val();
var code = loginname+","+hex_md5(password)+","+loginType;
$.ajax({
type: "POST",
url: '${ctxPath}/loginAjax.do',
data: {
KEYDATA:code,
tm:new Date().getTime(),
forceLogin:forceLogin
},
dataType:'json',
cache: false,
success: function(data){
if(0 === data.code){
window.location.href="${ctxPath}/index.do";
}
/****/
else if(1000 === data.code){
//重复登录,询问是否强制下线之前的用户
//if(window.confirm("该用户已经登录系统,是否要强制其下线并登录当前用户?")){
// severLogin(true);
//}
//该用户已经登录系统,如正常退出请稍后重新登录!
layer.alert("该用户已经登录系统,如正常退出请稍后重新尝试!");
}
else{
layer.tips(data.msg,"#loginname",{time : 4000,tips:[2,'#FF5080']});
$("#loginname").focus();
}
}
});
}
}
$(document).keyup(function(event) {
if (event.keyCode == 13) {
$("#login_sbmit").trigger("click");
}
});
function genTimestamp() {
var time = new Date();
return time.getTime();
}
//客户端校验
function check() {
if ($("#loginname").val() == "") {
layer.tips("用户名不得为空","#loginname",{time : 4000,tips:[2,'#AE81FF']});
// showfh();
$("#loginname").focus();
return false;
} else {
$("#loginname").val($.trim($('#loginname').val()));
}
if ($("#password").val() == "") {
layer.tips("密码不得为空","#password",{time : 4000,tips:[2,'#AE81FF']});
// showfh();
$("#password").focus();
return false;
}
layer.tips("正在登录 , 请稍后 ...","#loginbox",{time : 4000,tips:[1,'green'],tipsMore: true});
return true;
}
});
//$(document).ready(function () {
// SetUserCertList("loginForm.loginName", CERT_TYPE_HARD);
//});
</script>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment