Commit 9233b6e8 by yangbenyong

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

parent 43f58a36
......@@ -2,5 +2,6 @@ eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=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/<project>=UTF-8
......@@ -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-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 span{display:none}
......
......@@ -44,9 +44,6 @@
version : Common.version
});
</script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
......
......@@ -2,17 +2,16 @@
<!-- 顶部 -->
<link rel="stylesheet" href="${ctxPath}/plugins/messages/css/message.css">
<style type="text/css">
.fsTab{
margin:10px;
height:webkit-calc(100% - 22px);
height:-moz-calc(100% - 22px);
height:calc(100% - 22px);
}
.fsTab .layui-tab-content{
height:webkit-calc(100% - 42px);
height:-moz-calc(100% - 42px);
height:calc(100% - 42px);
.fsTab{
margin:10px;
height:webkit-calc(100% - 22px);
height:-moz-calc(100% - 22px);
height:calc(100% - 22px);
}
.fsTab .layui-tab-content{
height:webkit-calc(100% - 42px);
height:-moz-calc(100% - 42px);
height:calc(100% - 42px);
box-sizing: border-box;
}
.fsTab .layui-tab-content *{
......@@ -25,6 +24,7 @@ height:calc(100% - 42px);
#fsTopMenu li a,#fsTopMenu .layui-tab-bar{color:#ffffff; display:inline;}
#fsTopMenu .layui-this,#fsTopMenu .layui-this a{color: #333;}
.layui-layout-left>.layui-tab-title{ background-color: transparent; }
.layadmin-iframe{position:relative;}
</style>
<form class="layui-form layui-form-pane">
......@@ -78,7 +78,6 @@ height:calc(100% - 42px);
checked=true;
}
-->
<option value="${org.id}" ${checked?"selected"}>${org.name}</option>
<!--#} -->
</select>
......@@ -89,19 +88,16 @@ height:calc(100% - 42px);
<!-- 右边内容区域 -->
<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">
<li class="layui-this">系统说明</li>
</ul>
<!-- 内容 -->
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<iframe src="" class="layadmin-iframe"></iframe>
</div>
</div>
<div class="layui-tab-item layui-show"></ul>-->
<!-- 内容 -->
<div class="layui-tab layui-tab-card fsTab">
<iframe loading="lazy" class="layadmin-iframe"></iframe>
</div>
</div>
<!-- 配色弹窗 -->
......@@ -256,18 +252,19 @@ layui.use(['layer'],function(){
},
getNodeHtml: function(obj, node) {
obj.readStatus == 1? node.isRead = true: node.isRead = false;
var html = "<p name='"+obj.id+"'>"+ obj.title +"</p> <small>"+obj.receiveTime+"</small> ";
node.html = html;
return node;
}
});
}
});
$('#left-nav').on('click','.layui-this',function(){
var url = $(this).children('a').attr('dataurl')
$('.layadmin-iframe').attr('src',url);
})
//关闭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")){
var _next = $(this).parent().next('li'),
_prev = $(this).parent().prev("li");
......@@ -281,11 +278,12 @@ layui.use(['layer'],function(){
}
$(".layui-tab-content").children().eq($(this).parents('li').index()).remove();
$(this).parent().remove();
})
}) */
$("#theme_id").on('click',parentDeck);
$("#addDeck").on('click',addDecks);
function addDecks(){//添加桌面
//$("#theme_id").on('click',parentDeck);
//$("#addDeck").on('click',addDecks);
/* function addDecks(){//添加桌面
var item = $("#addDeck").val().split(',');
var len = $(".fsTab ul").children().length;
$(".fsTab ul").children().removeClass('layui-this');
......@@ -331,7 +329,7 @@ layui.use(['layer'],function(){
$(".layui-tab-content").children().eq(0).addClass("layui-show").siblings().removeClass('layui-show');
}
}
})
}) */
});
</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