Ver Fonte

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

ld_zhoutl há 9 anos atrás
pai
commit
6572071740
39 ficheiros alterados com 250 adições e 3 exclusões
  1. 9 1
      jdc/jdcweb/trunk/src/main/java/com/jsjty/jdc/web/sys/ctl/IndexCtl.java
  2. 1 1
      jdc/jdcweb/trunk/src/main/resources/spring/applicationContext-shiro.xml
  3. 1 1
      jdc/jdcweb/trunk/src/main/resources/spring/spring-mvc.xml
  4. 116 0
      jdc/jdcweb/trunk/src/main/webapp/static/xt/css/home.css
  5. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/12306.png
  6. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/ADS-B.png
  7. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/SKY.png
  8. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/bg.png
  9. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/block.png
  10. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/line.png
  11. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/logo.png
  12. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/信息查询.png
  13. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/公路.png
  14. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/指挥.png
  15. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/水路.png
  16. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/海事.png
  17. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/航空.png
  18. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/船汛网.png
  19. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/规章制度.png
  20. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/视频监控.png
  21. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/资源信息.png
  22. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/通讯指挥.png
  23. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/铁路.png
  24. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/12306.png
  25. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/ADS-B.png
  26. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/SKY.png
  27. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/信息查询.png
  28. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/公路.png
  29. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/指挥.png
  30. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/水路.png
  31. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/海事.png
  32. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/航空.png
  33. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/船汛网.png
  34. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/规章制度.png
  35. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/视频监控.png
  36. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/资源信息.png
  37. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/通讯指挥.png
  38. BIN
      jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/铁路.png
  39. 123 0
      jdc/jdcweb/trunk/src/main/webapp/static/xt/js/sys/home.js

+ 9 - 1
jdc/jdcweb/trunk/src/main/java/com/jsjty/jdc/web/sys/ctl/IndexCtl.java

@@ -41,6 +41,12 @@ public class IndexCtl extends BaseWebCtl {
     private HashedCredentialsMatcher credentialsMatcher;
     // 随机数
     private Random rnd = new Random();
+    
+    @RequestMapping("home")
+    public String home(Model model) {
+        model.addAttribute("type", "11");
+        return "sys/home";
+    }
 
     @RequestMapping("index")
     public String index(@RequestParam(value = "type", required = false) String type, Model model) {
@@ -149,7 +155,9 @@ public class IndexCtl extends BaseWebCtl {
 
     @RequestMapping(value = "/login")
     public String login(HttpServletRequest request) {
-        if (coreMgr.isAuthenticated()) { return "redirect:/index"; }
+        if (coreMgr.isAuthenticated()) { 
+        	return "redirect:/home"; 
+        }
         return "sys/login";
     }
 

+ 1 - 1
jdc/jdcweb/trunk/src/main/resources/spring/applicationContext-shiro.xml

@@ -34,7 +34,7 @@
     <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
         <property name="securityManager" ref="securityManager" />
         <property name="loginUrl" value="/login" />
-        <property name="successUrl" value="/index" />
+        <property name="successUrl" value="/home" />
         <property name="filters">
             <map>
                 <entry key="authc" value-ref="formAuthenticationFilter" />

+ 1 - 1
jdc/jdcweb/trunk/src/main/resources/spring/spring-mvc.xml

@@ -24,7 +24,7 @@
     	</mvc:message-converters>
     </mvc:annotation-driven>
 
-    <mvc:view-controller path="/" view-name="redirect:/index" />
+    <mvc:view-controller path="/" view-name="redirect:/home" />
 
     <mvc:resources mapping="/static/**" location="/static/" />
 

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

@@ -0,0 +1,116 @@
+
+.h_bg {background-image:url('../images/home/bg.png') ;background-attachment:fixed;
+	background-repeat:no-repeat;background-size:cover;
+	-moz-background-size:cover;-webkit-background-size:cover;
+}
+.h_logodiv {
+	padding-top:2em;
+	text-align:center;
+}
+.h_logoimg {
+	width:900px;
+	height:80px;
+}
+.h_moudle {
+	text-align:center;
+	margin-top:20px;
+	width:100%;
+	height:600px;
+}
+.h_moudlecenter {
+	margin:0 auto;
+	width:1190px;
+	height:600px;
+}
+.h_block {
+	text-align:center;
+	margin-left:15px;
+	float:left;
+	background-image:url('../images/home/block.png');
+}
+.h_block_road {
+	width:210px;
+	height:350px;
+}
+.h_block_air {
+	width:230px;
+	height:450px;
+}
+.h_block_command {
+	width:230px;
+	height:500px;
+}
+.h_block_waterway {
+	width:230px;
+	height:450px;
+}
+.h_block_railway {
+	width:210px;
+	height:350px;
+}
+
+.h_cirleicon1 {
+	margin-top:60px;
+	margin-bottom:16px;
+	width:130px;
+	height:130px;
+}
+
+.h_cirleicon2 {
+	margin-top:40px;
+	margin-bottom:16px;
+	width:130px;
+	height:130px;
+}
+
+.h_cirleicon3 {
+	margin-top:30px;
+	margin-bottom:16px;
+	width:160px;
+	height:160px;
+}
+
+.h_cirleicon3 {
+	margin-top:30px;
+	width:160px;
+	height:160px;
+}
+
+.h_linediv {
+	font-size:0px;
+	height:1px;
+}
+
+.h_line {
+	width:160px;
+	height:1px;
+}
+
+.h_menudiv {
+	cursor:pointer;
+	margin: 0 auto;
+	font-size:20px;
+	color:#FFFFFF;
+	width:160px;
+	height:41px;
+	padding-left:0px;
+}
+.h_menudiv .infoimg {
+	float:left;
+	padding-left:20px;
+}
+.h_menudiv .info {
+	float:left;
+	padding-top:11px;
+	padding-left:12px;
+}
+
+.h_menudivmouse {
+	background-color:#41A8F7;
+}
+
+.h_menuicon {
+	margin-top:8px;
+	width:25px;
+	height:25px;
+}

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


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/ADS-B.png


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


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


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


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


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


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/信息查询.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/公路.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/指挥.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/水路.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/海事.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/航空.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/船汛网.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/规章制度.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/视频监控.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/资源信息.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/通讯指挥.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/home/铁路.png


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


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/ADS-B.png


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


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/信息查询.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/公路.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/指挥.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/水路.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/海事.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/航空.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/船汛网.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/规章制度.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/视频监控.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/资源信息.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/通讯指挥.png


BIN
jdc/jdcweb/trunk/src/main/webapp/static/xt/images/homegray/铁路.png


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

@@ -0,0 +1,123 @@
+/**
+ * 系统导航也
+ *
+ * @author zhoutl
+ */
+/** 页面初始化 */
+$(function () {
+	adjustBlock();
+	getPermission();
+});
+
+/**
+ * 
+ */
+function getPermission() {
+        $.get(basePath + "/menu/topMenus", {}, function (result) {
+            if(result && result.length > 0) {
+                for(var i=0; i <result.length;i++) {
+                	var obj = result[i];
+        			//console.info(obj.attributes.url);
+            		var img = $("#"+obj.attributes.code).find("img")[0];
+            		$(img).css('cursor', "pointer");
+            		$(img).attr('src', basePath + "/" +obj.attributes.icon2);
+            		$(img).click({top: obj}, function(event){
+            			var obj1 = event.data.top;
+            			window.open(basePath+obj1.attributes.url);
+            		});
+            		// 获取二级菜单
+            		getMenus(obj.id, obj.attributes.code);
+                }
+            }
+        }, 'json');
+}
+
+/**
+ *
+ * 增加formatString功能
+ *
+ * 使用方法:$.formatString('字符串{0}字符串{1}字符串','第一个变量','第二个变量');
+ *
+ * @returns 格式化后的字符串
+ */
+$.formatString = function (str) {
+    for (var i = 0; i < arguments.length - 1; i++) {
+        str = str.replace("{" + i + "}", arguments[i + 1]);
+    }
+    return str;
+};
+
+/**
+ * 获取二级菜单
+ */
+function getMenus(id, code) {
+	var lineStr = '<div class="h_linediv"><img src="' + basePath
+		+'/static/xt/images/home/line.png" class="h_line"></div>';
+	var menuStr = '<div class="h_menudiv" onclick="openSubPage(\'{0}\',\'{1}\',\'{2}\')" onmouseover="menuMouseOver(this)"  onmouseout="menuMouseOut(this)">'
+		+ '<div class="infoimg"><img src="'+basePath+'/{3}" class="h_menuicon"></div>'
+		+ '<div class="info">{4}</div></div>';
+    $.get(basePath + "/menu/submenu/"+id, {}, function (result) {
+        if(result && result.length > 0) {
+        	var menuStrTotal = "";
+            for(var i=0; i <result.length;i++) {
+            	var obj = result[i];
+            	if(obj.attributes.code == "air" || obj.attributes.code == "waterway" 
+            		|| obj.attributes.code == "road" || obj.attributes.code == "railway" 
+            		|| obj.attributes.code == "command") {
+        			continue;
+            	}
+            	menuStrTotal += $.formatString(menuStr, 
+            			obj.attributes.code,obj.attributes.url,code,
+            			obj.attributes.icon2, obj.text);
+            	menuStrTotal += lineStr;
+            }
+            if(menuStrTotal.length > 0) {
+            	$("#"+code).append(lineStr).append(menuStrTotal);
+            }
+        }
+    }, 'json');
+}
+
+function openSubPage(code, url, pcode) {
+	if(code == "skyView") {
+		$("#aLink").attr("href", url);
+		$("#spanId").click();
+	} else if(code == "cxw") {
+		window.open(url);
+	} else if(code == "hsais") {
+		window.open(url);
+	} else if(code == "12306") {
+		window.open(url);
+	} else if(code == "chat") {
+		$("#aLink").attr("href", url);
+		$("#spanId").click();
+	} else {
+		window.open(basePath + url);
+	}
+}
+
+function adjustBlock() {
+	var topHeight = 130;
+	// 调整高度和宽度
+    var height = $(document).height() - topHeight;
+    var width = $(document).width();
+    $(".h_block_road").css("margin-top","100px");
+    $(".h_block_air").css("margin-top","50px");
+    $(".h_block_command").css("margin-top","25px");
+    $(".h_block_waterway").css("margin-top","50px");
+    $(".h_block_railway").css("margin-top","100px");
+};
+
+/*function aa() {
+	var url = basePath + "/index";
+    url += "?type=" + "air";
+    window.location.href=url;
+};*/
+
+function menuMouseOver(obj) {
+	$(obj).addClass("h_menudivmouse");
+};
+
+function menuMouseOut(obj) {
+	$(obj).removeClass("h_menudivmouse");
+};