From d6d7cd84dabc54cb26733cd70105459ae052551e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 25 Nov 2018 17:27:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8F=90=E4=BA=A4=E9=9D=99?= =?UTF-8?q?=E9=BB=98=E6=9B=B4=E6=96=B0=E8=A1=A8=E6=A0=BC=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/clean.bat | 14 ++++++++++ package.bat => bin/package.bat | 1 + .../main/resources/static/ruoyi/js/ry-ui.js | 26 ++++++++++++++++--- .../resources/templates/system/dept/dept.html | 2 +- .../resources/templates/system/menu/menu.html | 2 +- .../resources/templates/system/role/add.html | 2 +- .../resources/templates/system/role/edit.html | 2 +- .../resources/templates/system/role/rule.html | 2 +- .../resources/templates/system/user/add.html | 2 +- .../resources/templates/system/user/edit.html | 2 +- 10 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 bin/clean.bat rename package.bat => bin/package.bat (92%) diff --git a/bin/clean.bat b/bin/clean.bat new file mode 100644 index 00000000..4462a011 --- /dev/null +++ b/bin/clean.bat @@ -0,0 +1,14 @@ +@echo off +echo. +echo [信息] 清理生成路径。 +echo. +pause +echo. + +cd %~dp0 +cd.. + +call mvn clean + +cd bin +pause \ No newline at end of file diff --git a/package.bat b/bin/package.bat similarity index 92% rename from package.bat rename to bin/package.bat index 7879e80d..dc756fbd 100644 --- a/package.bat +++ b/bin/package.bat @@ -6,6 +6,7 @@ pause echo. cd %~dp0 +cd.. call mvn clean package -Dmaven.test.skip=true 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 b6846d12..f015f1a8 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 @@ -99,7 +99,6 @@ // 鍒锋柊琛ㄦ牸 refresh: function() { $("#bootstrap-table").bootstrapTable('refresh', { - url: $.table._option.url, silent: true }); }, @@ -135,7 +134,7 @@ $.table._option = options; _striped = $.common.isEmpty(options.striped) ? false : options.striped; _expandColumn = $.common.isEmpty(options.expandColumn) ? '1' : options.expandColumn; - var treeTable = $('#bootstrap-table').bootstrapTreeTable({ + var treeTable = $('#bootstrap-tree-table').bootstrapTreeTable({ code: options.code, // 鐢ㄤ簬璁剧疆鐖跺瓙鍏崇郴 parentCode: options.parentCode, // 鐢ㄤ簬璁剧疆鐖跺瓙鍏崇郴 type: 'get', // 璇锋眰鏂瑰紡锛*锛 @@ -528,7 +527,7 @@ dataType: "json", data: data, success: function(result) { - $.operate.saveSuccess(result); + $.operate.successCallback(result); } }; $.ajax(config) @@ -543,7 +542,7 @@ } $.modal.closeLoading(); }, - // 淇濆瓨缁撴灉鎻愮ずmsg + // 鎴愬姛缁撴灉鎻愮ずmsg锛堢埗绐椾綋鍏ㄥ眬鏇存柊锛 saveSuccess: function (result) { if (result.code == web_status.SUCCESS) { $.modal.msgReload("淇濆瓨鎴愬姛,姝e湪鍒锋柊鏁版嵁璇风◢鍚庘︹", modal_status.SUCCESS); @@ -551,6 +550,25 @@ $.modal.alertError(result.msg); } $.modal.closeLoading(); + }, + // 鎴愬姛鍥炶皟鎵ц浜嬩欢锛堢埗绐椾綋闈欓粯鏇存柊锛 + successCallback: function(result) { + if (result.code == web_status.SUCCESS) { + if (window.parent.$("#bootstrap-table").length > 0) { + $.modal.close(); + window.parent.$.modal.msgSuccess(result.msg); + window.parent.$.table.refresh(); + } else if (window.parent.$("#bootstrap-tree-table").length > 0) { + $.modal.close(); + window.parent.$.modal.msgSuccess(result.msg); + window.parent.$.treeTable.refresh(); + } else { + $.modal.msgReload("淇濆瓨鎴愬姛,姝e湪鍒锋柊鏁版嵁璇风◢鍚庘︹", modal_status.SUCCESS); + } + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); } }, // 鏍¢獙灏佽澶勭悊 diff --git a/ruoyi-admin/src/main/resources/templates/system/dept/dept.html b/ruoyi-admin/src/main/resources/templates/system/dept/dept.html index b39bc992..70f09c6f 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dept/dept.html +++ b/ruoyi-admin/src/main/resources/templates/system/dept/dept.html @@ -40,7 +40,7 @@
-
+
diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/menu.html b/ruoyi-admin/src/main/resources/templates/system/menu/menu.html index 57ed456e..638b51ac 100644 --- a/ruoyi-admin/src/main/resources/templates/system/menu/menu.html +++ b/ruoyi-admin/src/main/resources/templates/system/menu/menu.html @@ -40,7 +40,7 @@
-
+
diff --git a/ruoyi-admin/src/main/resources/templates/system/role/add.html b/ruoyi-admin/src/main/resources/templates/system/role/add.html index 91d05865..be698922 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/add.html @@ -143,7 +143,7 @@ $.modal.alertError("绯荤粺閿欒"); }, success : function(data) { - $.operate.saveSuccess(data); + $.operate.successCallback(data); } }); } diff --git a/ruoyi-admin/src/main/resources/templates/system/role/edit.html b/ruoyi-admin/src/main/resources/templates/system/role/edit.html index b4f4de9c..446c146a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/edit.html @@ -146,7 +146,7 @@ $.modal.alertError("绯荤粺閿欒"); }, success : function(data) { - $.operate.saveSuccess(data); + $.operate.successCallback(data); } }); } diff --git a/ruoyi-admin/src/main/resources/templates/system/role/rule.html b/ruoyi-admin/src/main/resources/templates/system/role/rule.html index 6fd50abc..655ac47a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/rule.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/rule.html @@ -80,7 +80,7 @@ $.modal.alertError("绯荤粺閿欒"); }, success : function(data) { - $.operate.saveSuccess(data); + $.operate.successCallback(data); } }); } diff --git a/ruoyi-admin/src/main/resources/templates/system/user/add.html b/ruoyi-admin/src/main/resources/templates/system/user/add.html index 9884be4f..bb18ca9e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/add.html @@ -203,7 +203,7 @@ $.modal.alertError("绯荤粺閿欒"); }, success : function(data) { - $.operate.saveSuccess(data); + $.operate.successCallback(data); } }); } diff --git a/ruoyi-admin/src/main/resources/templates/system/user/edit.html b/ruoyi-admin/src/main/resources/templates/system/user/edit.html index 8260e04d..75c4012e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/edit.html @@ -177,7 +177,7 @@ $.modal.alertError("绯荤粺閿欒"); }, success : function(data) { - $.operate.saveSuccess(data); + $.operate.successCallback(data); } }); }