Browse Source

git-svn-id: https://192.168.57.71/svn/qt@28 12fe181a-e57f-b044-8676-16dc139aa63e

ld_zhoutl 9 years ago
parent
commit
600a0ff6c9

+ 3 - 2
jdc/jdcweb/trunk/src/main/webapp/WEB-INF/view/sys/home.jsp

@@ -8,7 +8,9 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>主页</title>
+<title>导航</title>
+	<link rel="icon" href="${ctx}/static/favicon.ico" type="image/x-icon" />
+	<link rel="shortcut icon" href="${ctx}/static/favicon.ico" type="image/x-icon" />
 	<script type="text/javascript">
 		var basePath = '${ctx}';
 	</script>
@@ -40,6 +42,5 @@
 		</div>
 	</div>
 	<a href="#" id="aLink"><span id="spanId"></span></a>
-	
 </body>
 </html>

+ 48 - 57
jdc/jdcweb/trunk/src/main/webapp/WEB-INF/view/sys/login.jsp

@@ -8,65 +8,56 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>登录</title>
-<link rel="icon" href="${ctx}/static/favicon.ico" type="image/x-icon" />
-<script>
-function dl1(){
-    document.getElementById("loginForm").submit();
-}
-String.prototype.trim=function(){  
-    return this.replace(/(^\s*)|(\s*$)/g, "");  
- }  
-
-function keyLogin(){  
-    if (event.keyCode==13)  {
-        dl();
-    }                       
-  }  
-
-	function dl(){
-	    var uname = $("#username").val();
-	    var pwd = $("#password").val();
-	    if(uname==null||uname.trim()==""){
-	        $.messager.alert("提示", "请输入用户名");
-	        return ;
-	    }
-	    if(pwd==null||pwd.trim()==""){
-	        $.messager.alert("提示", "请输入密码");
-	        return ;
-	    }
-	    $('#loginForm').form('submit', {
-	        url : $.ctx + '/login',
-	        onSubmit : function() {
-	            
-	        },
-	        success : function(data, status) {
-	            if (data) {
-	                data = $.parseJSON(data);
-	            }
-	            if (data.success) {
-	                var newwin=window.open($.ctx+"/main","","top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+(window.screen.availWidth-10)+",height="+(window.screen.availHeight-30));//修改宽度和高度可控制窗口的大小
-	                newwin.focus();
-	               	window.opener=null; 
-	                window.open('', '_self', ''); 
-	                window.close(); 
-	            }
-	            else {
-	                $.messager.alert("提示", "用户名或密码错误");
-	            }
-	        }
-	    });
-	}
-</script>
+	<title>登录</title>
+	<link rel="icon" href="${ctx}/static/favicon.ico" type="image/x-icon" />
+	<link rel="shortcut icon" href="${ctx}/static/favicon.ico" type="image/x-icon" />
+	<script type="text/javascript">
+		var basePath = '${ctx}';
+	</script>
+	<link rel="stylesheet" type="text/css" href="${ctx }/static/xt/css/login.css" />
+	<script type="text/javascript" src="${ctx}/static/easyui/jquery.min.js"></script>
+	<script type="text/javascript" src="${ctx}/static/xt/js/sys/login.js"></script>
 </head>
-
-<body onkeydown="keyLogin()" onload="">
-
+<body class="l_bg">
 <form id="loginForm" action="${ctx}/login" method="post" >
-<input type="text" id="username" name="username" class="login_admin" value="admin" placeholder="请输入用户名" ></div>
-<input type="password" id="password" name="password" class="login_password" value="888888" placeholder="请输入密码">
-<input type="hidden" id="_type" name="_type"  value="web" />
-<button value="" name="" type="submit"  >登录</button>
+	<div class="l_all">
+	<div class="l_boock">
+		<div class="l_headdiv">
+			<div class="l_headblock">
+			<div class="l_hleft">
+				<img src="${ctx }/static/xt/images/login/salute.png" class="imgsalute"/>
+			</div>
+			<div class="l_hright">
+				<img src="${ctx }/static/xt/images/login/logo.png" class="imglogo"/>
+			</div>
+			</div>
+		</div>
+		<div class="l_centerdiv">
+			<img src="${ctx }/static/xt/images/login/center.png" class="imgcenter"/>
+		</div>
+		<div class="l_logindiv">
+			<table class="tablogin">
+				<tr class="trlogin">
+					<td class="tdname">
+						<input type="text" id="username" name="username" 
+							class="login_admin" value="admin" placeHolder="请输入用户名" >
+					</td>
+					<td class="tdsplit"></td>
+					<td class="tdpwd">
+						<input type="password" id="password" name="password" 
+							class="login_password" value="888888" placeHolder="请输入密码">
+					</td>
+					<td class="tdsplit"></td>
+					<td class="tdlogin" id="tdlogin"
+						onmouseover="btnMouseOver(this)"  onmouseout="btnMouseOut(this)"></td>
+				</tr>
+			</table>
+		</div>
+		<div class="bottomdiv">
+			<img src="${ctx }/static/xt/images/login/unit.png" class="imgunit"/>
+		</div>
+	</div>
+	</div>
 </form>
 </body>
 </html>

+ 2 - 2
jdc/jdcweb/trunk/src/main/webapp/static/xt/css/home.css

@@ -15,12 +15,12 @@
 	text-align:center;
 	margin-top:20px;
 	width:100%;
-	height:600px;
+	height:510px;
 }
 .h_moudlecenter {
 	margin:0 auto;
 	width:1190px;
-	height:600px;
+	height:510px;
 }
 .h_block {
 	text-align:center;

+ 133 - 19
jdc/jdcweb/trunk/src/main/webapp/static/xt/css/login.css

@@ -1,19 +1,133 @@
-body{ font:12px/1.5 Arial, Helvetica, sans-serif; margin:0 auto;color:#333;line-height:18px;background:url(../images/background.jpg) repeat-x;}
-.login_background {width:1280px;height:548px;margin:0 auto;padding-top:0px;}
-
-.div_login { width:418px; height:196px;background:url(../images/login_06.gif) no-repeat left bottom; }
-
-body, html, div, ul, li {
-    list-style: none outside none;
-    margin: 0;
-    padding: 0;
-}
-
-ul li{
-	width: 200px;
-	height: 30px
-}
-
-.input {
-	border: medium none; width: 200px; height: 24px; padding-top: 4px; padding-left: 2px;
-}
+.l_bg {
+	background-color:#FFFFFF;
+	height:100%;
+}
+.l_all {
+	height:100%;
+	text-align:center;
+	/* padding:30px 130px 0px 130px; */
+}
+.l_block {
+	width:1148px;
+	margin:0 auto;
+}
+.l_headblock {
+	margin:0 auto;
+}
+
+.l_headdiv {
+	width:1148px;
+	text-align:center;
+	height:27%;
+}
+
+.l_centerdiv {
+	height:50%;
+}
+
+.l_logindiv {
+	height:15%;
+	padding:20px 0px 20px 0px;
+	text-align:center;
+}
+
+.bottomdiv {
+	padding:20px 0px 0px 0px;
+	height:8%;
+}
+
+.imgsalute {
+	float:left;
+}
+
+.imglogo {
+	padding-top:64px;
+	padding-left:32px;
+	float:left;
+}
+
+.imgsalute {
+	width:240px;
+	height:160px;
+}
+
+.imgcenter {
+	width:1148px;
+	height:416px;
+}
+
+.imglogo {
+	width:871px;
+	height:80px;
+}
+
+.imglogo {
+	width:871px;
+	height:80px;
+}
+
+.imgunit {
+	width:768px;
+	height:19.2px;
+}
+
+.tablogin {
+	min-width:400px;
+	margin:0 auto;
+	height:19.2px;
+}
+
+.trlogin {
+	
+}
+
+.tdname {
+	text-align:right;
+	width:200px;
+	height:35px;
+	background-image:url('../images/login/username.jpg');
+	filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";  
+	-moz-background-size:100% 100%;  
+    background-size:100% 100%;  
+}
+
+.tdpwd {
+	text-align:right;
+	width:200px;
+	height:35px;
+	background-image:url('../images/login/userpwd.jpg') ;
+	filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";  
+	-moz-background-size:100% 100%;  
+    background-size:100% 100%;  
+}
+
+.tdlogin {
+	cursor:pointer;
+	width:80px;
+	height:35px;
+	background-image:url('../images/login/login_un.png') ;
+	filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";  
+	-moz-background-size:100% 100%;  
+    background-size:100% 100%;  
+}
+
+.tdsplit {
+	width:5px;
+}
+
+.login_admin {
+	width:160px;
+	height:31px;
+	border:0;
+	outline: none;
+	/* background-color: #FFFFFF; */
+}
+
+.login_password {
+	width:160px;
+	height:31px;
+	border:0;
+	outline: none;
+}
+
+

BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/login/center.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/login/login.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/login/login_un.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/login/logo.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/login/salute.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/login/unit.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/login/username.jpg


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/login/userpwd.jpg


+ 1 - 1
jdc/jdcweb/trunk/src/main/webapp/static/xt/js/sys/home.js

@@ -13,7 +13,7 @@ $(function () {
  * 
  */
 function getPermission() {
-        $.get(basePath + "/menu/topMenus", {}, function (result) {
+        $.get(basePath + "/menu/accordions", {}, function (result) {
             if(result && result.length > 0) {
                 for(var i=0; i <result.length;i++) {
                 	var obj = result[i];

+ 59 - 0
jdc/jdcweb/trunk/src/main/webapp/static/xt/js/sys/login.js

@@ -0,0 +1,59 @@
+/**
+ * 系统登录
+ *
+ * @author zhoutl
+ */
+
+/** 页面初始化 */
+$(function () {
+	adjustBlock();
+	$("#tdlogin").click(function(event){
+		dl();
+	});
+});
+
+function adjustBlock() {
+	// 调整高度和宽度
+    var height = $(document).height();
+    var width = $(document).width();
+    var blockWidth = 1148;
+    if(width > blockWidth) {
+    	var minus = (width - blockWidth)/2;
+        $(".l_all").css("padding-left", minus+"px");
+        $(".l_all").css("padding-right", minus+"px");
+    }
+    var blockHeight = 719;
+    if(height > blockHeight) {
+    	var minus = (height - blockHeight)/2;
+        $(".l_all").css("padding-top", minus+"px");
+        $(".l_all").css("padding-bottom", minus+"px");
+    }
+};
+
+function btnMouseOver(obj) {
+	$(obj).css("background-image", "url("+basePath+"/static/xt/images/login/login.png"+")");
+};
+
+function btnMouseOut(obj) {
+	$(obj).css("background-image", "url("+basePath+"/static/xt/images/login/login_un.png"+")");
+};
+
+function dl(){
+    var uname = $("#username").val();
+    var pwd = $("#password").val();
+    if(uname==null||uname.trim()==""){
+        alert("请输入用户名");
+        return ;
+    }
+    if(pwd==null||pwd.trim()==""){
+        alert("请输入密码");
+        return ;
+    }
+   /* $.get(basePath + "/login", {username:uname, password:pwd, _type:'web'}, function (result) {
+        alert(result);
+        alert(console.info(result));
+        if(result) {
+        }
+    }, 'json');*/
+    $("#loginForm").submit();
+}