diff --git a/bin/run.bat b/bin/run.bat new file mode 100644 index 000000000..a49052e9f --- /dev/null +++ b/bin/run.bat @@ -0,0 +1,15 @@ +@echo off +echo. +echo [信息] 运行Web工程。 +echo. + +%~d0 +cd %~dp0 +cd ../ruoyi-admin/target + +set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m + +java -jar %JAVA_OPTS% ruoyi-admin.jar + +cd bin +pause \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index 3303b61d8..1d3493c19 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -14,6 +14,7 @@ init: function(options) { $.table._option = options; $.table._params = $.common.isEmpty(options.queryParams) ? $.table.queryParams : options.queryParams; + _sidePagination = $.common.isEmpty(options.sidePagination) ? "server" : options.pagination; _sortOrder = $.common.isEmpty(options.sortOrder) ? "asc" : options.sortOrder; _sortName = $.common.isEmpty(options.sortName) ? "" : options.sortName; _pageSize = $.common.isEmpty(options.pageSize) ? 10 : options.pageSize; @@ -42,7 +43,7 @@ showFooter: _showFooter, // 鏄惁鏄剧ず琛ㄥ熬 iconSize: 'outline', // 鍥炬爣澶у皬锛歶ndefined榛樿鐨勬寜閽昂瀵 xs瓒呭皬鎸夐挳sm灏忔寜閽甽g澶ф寜閽 toolbar: '#toolbar', // 鎸囧畾宸ヤ綔鏍 - sidePagination: "server", // 鍚敤鏈嶅姟绔垎椤 + sidePagination: _sidePagination, // server鍚敤鏈嶅姟绔垎椤礳lient瀹㈡埛绔垎椤 search: $.common.visible(options.search), // 鏄惁鏄剧ず鎼滅储妗嗗姛鑳 showSearch: $.common.visible(options.showSearch), // 鏄惁鏄剧ず妫绱俊鎭 showRefresh: $.common.visible(options.showRefresh), // 鏄惁鏄剧ず鍒锋柊鎸夐挳 @@ -73,7 +74,11 @@ // 璇锋眰鑾峰彇鏁版嵁鍚庡鐞嗗洖璋冨嚱鏁 responseHandler: function(res) { if (res.code == 0) { - return { rows: res.rows, total: res.total }; + if ($.common.isNotEmpty($.table._option.sidePagination) && $.table._option.sidePagination === 'client') { + return res.rows; + } else { + return { rows: res.rows, total: res.total }; + } } else { $.modal.alertWarning(res.msg); return { rows: [], total: 0 };