Parcourir la source

公告弹框大小调整

Perperon il y a 3 mois
Parent
commit
da23b9c509

+ 1 - 1
projects/src/main/webapp/asset/modules/frame/MainApp.js

@@ -106,7 +106,7 @@ var MainApp = {
 						App.openLayer({
 							title : "公告列表",
 		    				content : App.getUrl("/notice/show"),
-		    				height : "800",
+							height : document.body.clientHeight - 150,
 		    				width : "1000"
 						})
 					});

+ 26 - 26
projects/src/main/webapp/vmodules/notice/show.jsp

@@ -13,7 +13,7 @@
 <body>
 <div class="layuimini-container">
     <div class="layuimini-main">
-		<div class="table_box" style="padding-top: 0;">
+        <div class="table_box" style="padding-top: 0;">
             <div class="table_process">
                 <table id="notice" lay-filter="notice"></table>
                 <div id="pagination"></div>
@@ -26,17 +26,17 @@
 <script type="text/javascript">
     App.namespace("App.projects.notice");
     (function($, mod){
-		mod = mod || {};
-		var _table = layui.table,
+        mod = mod || {};
+        var _table = layui.table,
             _form = layui.form,
             pageNo = 1,
-	    	pageSize = 10,
+            pageSize = 10,
             _toolbar = layui.toolbar,
             _tableName = "notice";
 
-		mod.options = mod.options || {};
-		
-		var methods = {
+        mod.options = mod.options || {};
+
+        var methods = {
             init : function(){
                 _table.on("tool("+_tableName+")", function(obj){
                     methods[obj.event].call(this, obj);
@@ -55,16 +55,16 @@
                 });
             },
             getData: function() {
-    			var searchForm = {};
-    			searchForm.pageNo = pageNo;
-    			searchForm.pageSize = pageSize;
-    			App.postJson("/api/notice/pageShow", searchForm, function(res){
-    				methods.initTable(res.rows);
-    				methods.loadPage(res.total);
-    			});
-    		},
-			initTable: function(data) {
-    			layui.table.render({
+                var searchForm = {};
+                searchForm.pageNo = pageNo;
+                searchForm.pageSize = pageSize;
+                App.postJson("/api/notice/pageShow", searchForm, function(res){
+                    methods.initTable(res.rows);
+                    methods.loadPage(res.total);
+                });
+            },
+            initTable: function(data) {
+                layui.table.render({
                     elem: "#"+_tableName, // 指定原始表格元素选择器(推荐id选择器)
                     even: true,
                     toolbar: '#toolbarDemo',
@@ -77,11 +77,11 @@
                     limit: pageSize,
                     data : data
                 });
-    			layui.table.on('row('+_tableName+')', function(obj){
-    				App.openWindow(App.getUrl("/notice/detail?id="+obj.data.id));
-    			})
-    		},
-    		loadPage : function(totalCount){
+                layui.table.on('row('+_tableName+')', function(obj){
+                    App.openWindow(App.getUrl("/notice/detail?id="+obj.data.id));
+                })
+            },
+            loadPage : function(totalCount){
                 var self = this;
                 layui.laypage.render({
                     elem: 'pagination',
@@ -98,10 +98,10 @@
                     }
                 });
             },
-    		search : function(){
-    			pageNo = 1;
-    			methods.getData();
-    		}
+            search : function(){
+                pageNo = 1;
+                methods.getData();
+            }
         };
         mod.list = methods;