From 6d6271d6c97a9077626e50f09c1b860c41a44d60 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 14 Oct 2021 16:19:46 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=94=E7=BA=A7?= =?UTF-8?q?=E4=BB=A5=E4=B8=8A=E8=8F=9C=E5=8D=95404=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/store/modules/permission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js index 340524abc..6143038ab 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/ruoyi-ui/src/store/modules/permission.js @@ -86,7 +86,7 @@ function filterChildren(childrenMap, lastRouter = false) { var children = [] childrenMap.forEach((el, index) => { if (el.children && el.children.length) { - if (el.component === 'ParentView') { + if (el.component === 'ParentView' && !lastRouter) { el.children.forEach(c => { c.path = el.path + '/' + c.path if (c.children && c.children.length) { From e7afea4cb744c4789babd71af2dc03fd0d459ad7 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 14 Oct 2021 16:20:18 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=8D=87=E7=BA=A7oshi=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=ACv5.8.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 91ac13cee..6feb0ee79 100644 --- a/pom.xml +++ b/pom.xml @@ -25,8 +25,8 @@ 2.2.0 1.4.0 1.2.78 - 5.8.0 - 5.8.0 + 5.8.2 + 5.9.0 2.11.0 1.4 3.2.2 @@ -242,7 +242,7 @@ public aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ + https://maven.aliyun.com/repository/public true @@ -253,7 +253,7 @@ public aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ + https://maven.aliyun.com/repository/public true From e66d0e4f7465e840cc73e3b2d7dc4eeb2dc804b8 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 15 Oct 2021 17:56:57 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=9E=8B=E4=BF=9D=E6=8C=81=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java | 2 +- .../src/main/java/com/ruoyi/system/service/ISysRoleService.java | 2 +- .../java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java | 2 +- ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java index e4379c97b..58ede18e0 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java @@ -39,7 +39,7 @@ public interface SysRoleMapper * @param userId 用户ID * @return 选中角色ID列表 */ - public List selectRoleListByUserId(Long userId); + public List selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java index 1690ed53a..bf1f7b3d9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java @@ -49,7 +49,7 @@ public interface ISysRoleService * @param userId 用户ID * @return 选中角色ID列表 */ - public List selectRoleListByUserId(Long userId); + public List selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java index cde75c873..f53f975fe 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java @@ -122,7 +122,7 @@ public class SysRoleServiceImpl implements ISysRoleService * @return 选中角色ID列表 */ @Override - public List selectRoleListByUserId(Long userId) + public List selectRoleListByUserId(Long userId) { return roleMapper.selectRoleListByUserId(userId); } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index c26cfe5a0..a8d3ede58 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select r.role_id from sys_role r left join sys_user_role ur on ur.role_id = r.role_id From 519ea854d57f83feb6d6e992ce85eaad0a9acaaa Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 15 Oct 2021 17:57:46 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=B7=AF=E7=94=B1=E6=87=92=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E9=A1=B5=E9=9D=A2=E5=93=8D=E5=BA=94=E9=80=9F?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/store/modules/permission.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js index 6143038ab..4c8ed023b 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/ruoyi-ui/src/store/modules/permission.js @@ -106,8 +106,13 @@ function filterChildren(childrenMap, lastRouter = false) { return children } -export const loadView = (view) => { // 路由懒加载 - return (resolve) => require([`@/views/${view}`], resolve) +export const loadView = (view) => { + if (process.env.NODE_ENV === 'development') { + return (resolve) => require([`@/views/${view}`], resolve) + } else { + // 使用 import 实现生产环境的路由懒加载 + return () => import(`@/views/${view}`) + } } export default permission From c2a179e9dd0bcc0b7f0607b0220d1264dae46461 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 20 Oct 2021 11:18:20 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E7=AE=80=E5=8C=96=E6=9D=83=E9=99=90=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/plugins/auth.js | 60 +++++++++++++++++++++++++++++++++++ ruoyi-ui/src/plugins/index.js | 3 ++ 2 files changed, 63 insertions(+) create mode 100644 ruoyi-ui/src/plugins/auth.js diff --git a/ruoyi-ui/src/plugins/auth.js b/ruoyi-ui/src/plugins/auth.js new file mode 100644 index 000000000..af740aaef --- /dev/null +++ b/ruoyi-ui/src/plugins/auth.js @@ -0,0 +1,60 @@ +import store from '@/store' + +function authPermission(permission) { + const all_permission = "*:*:*"; + const permissions = store.getters && store.getters.permissions + if (permission && permission.length > 0) { + return permissions.some(v => { + return all_permission === v || v === permission + }) + } else { + return false + } +} + +function authRole(role) { + const super_admin = "admin"; + const roles = store.getters && store.getters.roles + if (role && role.length > 0) { + return roles.some(v => { + return super_admin === v || v === role + }) + } else { + return false + } +} + +export default { + // 验证用户是否具备某权限 + hasPermi(permission) { + return authPermission(permission); + }, + // 验证用户是否含有指定权限,只需包含其中一个 + hasPermiOr(permissions) { + return permissions.some(item => { + return authPermission(item) + }) + }, + // 验证用户是否含有指定权限,必须全部拥有 + hasPermiAnd(permissions) { + return permissions.every(item => { + return authPermission(item) + }) + }, + // 验证用户是否具备某角色 + hasRole(role) { + return authRole(role); + }, + // 验证用户是否含有指定角色,只需包含其中一个 + hasRoleOr(roles) { + return roles.some(item => { + return authRole(item) + }) + }, + // 验证用户是否含有指定角色,必须全部拥有 + hasRoleAnd(roles) { + return roles.every(item => { + return authRole(item) + }) + } +} diff --git a/ruoyi-ui/src/plugins/index.js b/ruoyi-ui/src/plugins/index.js index a138e6d6f..7cc83a4c8 100644 --- a/ruoyi-ui/src/plugins/index.js +++ b/ruoyi-ui/src/plugins/index.js @@ -1,9 +1,12 @@ +import auth from './auth' import cache from './cache' import modal from './modal' import download from './download' export default { install(Vue) { + // 认证对象 + Vue.prototype.$auth = auth // 缓存对象 Vue.prototype.$cache = cache // 模态框对象 From 2d7d137abd0eb54a632ca2e18424348eab96cdd8 Mon Sep 17 00:00:00 2001 From: abbfun <819589789@qq.com> Date: Fri, 22 Oct 2021 03:09:54 +0000 Subject: [PATCH 06/12] =?UTF-8?q?update=20ruoyi-common/src/main/java/com/r?= =?UTF-8?q?uoyi/common/core/domain/AjaxResult.java.=20AjaxResult=E9=93=BE?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/common/core/domain/AjaxResult.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java index b26e066ab..472afc868 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java @@ -145,4 +145,16 @@ public class AjaxResult extends HashMap { return new AjaxResult(code, msg, null); } + + /** + * 链式调用 + * + * @param key 键 + * @param value 内容 + * @return 警告消息 + */ + public AjaxResult put(String key, Object value) { + super.put(key, value); + return this; + } } From 3dbbc6a22360fa65c66609285f10bffc3a32334d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 22 Oct 2021 16:23:08 +0800 Subject: [PATCH 07/12] =?UTF-8?q?AjaxResult=E9=87=8D=E5=86=99put=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E4=BB=A5=E6=96=B9=E4=BE=BF=E9=93=BE=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/common/core/domain/AjaxResult.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java index 472afc868..8ca1b9b11 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java @@ -146,15 +146,17 @@ public class AjaxResult extends HashMap return new AjaxResult(code, msg, null); } - /** - * 链式调用 - * - * @param key 键 - * @param value 内容 - * @return 警告消息 - */ - public AjaxResult put(String key, Object value) { - super.put(key, value); - return this; - } + /** + * 方便链式调用 + * + * @param key 键 + * @param value 值 + * @return 数据对象 + */ + @Override + public AjaxResult put(String key, Object value) + { + super.put(key, value); + return this; + } } From ef4fef3d56f569d151ef71a9288e9973a19f4f6d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 23 Oct 2021 10:21:02 +0800 Subject: [PATCH 08/12] update ry.sh. --- ry.bat | 26 +++++++++++++------------- ry.sh | 12 ++++-------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/ry.bat b/ry.bat index 5de3e1503..9f16232b2 100644 --- a/ry.bat +++ b/ry.bat @@ -4,36 +4,36 @@ rem jarƽ set AppName=ruoyi-admin.jar rem JVM -set JVM_OPTS="-Dname=%AppName% -Duser.timezone=Asia/Shanghai -Xms512M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" +set JVM_OPTS="-Dname=%AppName% -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" -ECHO. +ECHO. ECHO. [1] %AppName% ECHO. [2] ر%AppName% ECHO. [3] %AppName% ECHO. [4] ״̬ %AppName% - ECHO. [5] -ECHO. + ECHO. [5] +ECHO. ECHO.ѡĿ: set /p ID= - IF "%id%"=="1" GOTO start - IF "%id%"=="2" GOTO stop - IF "%id%"=="3" GOTO restart + IF "%id%"=="1" GOTO start + IF "%id%"=="2" GOTO stop + IF "%id%"=="3" GOTO restart IF "%id%"=="4" GOTO status IF "%id%"=="5" EXIT -PAUSE +PAUSE :start for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do ( set pid=%%a set image_name=%%b ) if defined pid ( - echo %%is running - PAUSE - ) + echo %%is running + PAUSE + ) -start javaw -jar %JAVA_OPTS% ruoyi-admin.jar +start javaw %JAVA_OPTS% -jar %AppName% echo starting echo Start %AppName% success... @@ -64,4 +64,4 @@ goto:eof if not defined pid (echo process %AppName% is dead ) else ( echo %image_name% is running ) -goto:eof \ No newline at end of file +goto:eof diff --git a/ry.sh b/ry.sh index 7c4f50385..d6a9cf33a 100644 --- a/ry.sh +++ b/ry.sh @@ -1,13 +1,9 @@ #!/bin/sh -# author ruoyi -# ./ry.sh start 启动 -# ./ry.sh stop 停止 -# ./ry.sh restart 重启 -# ./ry.sh status 状态 +# ./ry.sh start 启动 stop 停止 restart 重启 status 状态 AppName=ruoyi-admin.jar # JVM参数 -JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" +JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" APP_HOME=`pwd` LOG_PATH=$APP_HOME/logs/$AppName.log @@ -30,7 +26,7 @@ function start() if [ x"$PID" != x"" ]; then echo "$AppName is running..." else - nohup java -jar $JVM_OPTS target/$AppName > /dev/null 2>&1 & + nohup java $JVM_OPTS -jar $AppName > /dev/null 2>&1 & echo "Start $AppName success..." fi } @@ -38,7 +34,7 @@ function start() function stop() { echo "Stop $AppName" - + PID="" query(){ PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'` From a4558c32b2b7630236f9f4323c79033879c1378b Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 23 Oct 2021 10:23:32 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E8=A7=A3=E6=9E=90blob=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E7=99=BB=E5=BD=95=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/plugins/download.js | 45 +++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/plugins/download.js b/ruoyi-ui/src/plugins/download.js index cb10ab0e4..2aa81229a 100644 --- a/ruoyi-ui/src/plugins/download.js +++ b/ruoyi-ui/src/plugins/download.js @@ -1,6 +1,7 @@ import { saveAs } from 'file-saver' import axios from 'axios' import { getToken } from '@/utils/auth' +import { Message } from 'element-ui' const baseURL = process.env.VUE_APP_BASE_API @@ -12,9 +13,14 @@ export default { url: url, responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } - }).then(res => { - const blob = new Blob([res.data]) - this.saveAs(blob, decodeURI(res.headers['download-filename'])) + }).then(async (res) => { + const isLogin = await this.blobValidate(res.data); + if (isLogin) { + const blob = new Blob([res.data]) + this.saveAs(blob, decodeURI(res.headers['download-filename'])) + } else { + Message.error('无效的会话,或者会话已过期,请重新登录。'); + } }) }, resource(resource) { @@ -24,9 +30,14 @@ export default { url: url, responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } - }).then(res => { - const blob = new Blob([res.data]) - this.saveAs(blob, decodeURI(res.headers['download-filename'])) + }).then(async (res) => { + const isLogin = await this.blobValidate(res.data); + if (isLogin) { + const blob = new Blob([res.data]) + this.saveAs(blob, decodeURI(res.headers['download-filename'])) + } else { + Message.error('无效的会话,或者会话已过期,请重新登录。'); + } }) }, zip(url, name) { @@ -36,13 +47,27 @@ export default { url: url, responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } - }).then(res => { - const blob = new Blob([res.data], { type: 'application/zip' }) - this.saveAs(blob, name) + }).then(async (res) => { + const isLogin = await this.blobValidate(res.data); + if (isLogin) { + const blob = new Blob([res.data], { type: 'application/zip' }) + this.saveAs(blob, name) + } else { + Message.error('无效的会话,或者会话已过期,请重新登录。'); + } }) }, saveAs(text, name, opts) { saveAs(text, name, opts); - } + }, + async blobValidate(data) { + try { + const text = await data.text(); + JSON.parse(text); + return false; + } catch (error) { + return true; + } + }, } From 17550a5f4bd152bb67a0de2c1284e2eef243777c Mon Sep 17 00:00:00 2001 From: Remenber_Ray <343509740@qq.com> Date: Sun, 24 Oct 2021 02:34:25 +0000 Subject: [PATCH 10/12] =?UTF-8?q?update=20ruoyi-common/src/main/java/com/r?= =?UTF-8?q?uoyi/common/utils/Threads.java.=20=E4=BF=AE=E5=A4=8D=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-common/src/main/java/com/ruoyi/common/utils/Threads.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/Threads.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/Threads.java index 395920a24..f34935284 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/Threads.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/Threads.java @@ -36,7 +36,7 @@ public class Threads * 停止线程池 * 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务. * 如果超时, 则调用shutdownNow, 取消在workQueue中Pending的任务,并中断所有阻塞函数. - * 如果仍人超時,則強制退出. + * 如果仍然超時,則強制退出. * 另对在shutdown时线程本身被调用中断做了处理. */ public static void shutdownAndAwaitTermination(ExecutorService pool) From 4583787759c30499cfb756615f9a10b4f7bbe281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Sun, 24 Oct 2021 17:13:04 +0800 Subject: [PATCH 11/12] =?UTF-8?q?fix=20=20=E8=B7=A8=E5=9F=9F=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E4=B9=8B=E5=90=8E=20=E4=B8=8B=E8=BD=BD=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=8E=B7=E5=8F=96=20download-filename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/utils/file/FileUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java index 8d8f5a6a3..dd1bcc46f 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java @@ -210,6 +210,8 @@ public class FileUtils .append("utf-8''") .append(percentEncodedFileName); + response.addHeader("Access-Control-Allow-Origin", "*"); + response.addHeader("Access-Control-Expose-Headers", "Content-Disposition,download-filename"); response.setHeader("Content-disposition", contentDispositionValue.toString()); response.setHeader("download-filename", percentEncodedFileName); } From 8a7dcf8a80583eb5710a336c89be63541c3054f0 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 25 Oct 2021 10:26:00 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/annotation/RepeatSubmit.java | 2 +- .../java/com/ruoyi/framework/aspectj/RateLimiterAspect.java | 4 ++-- ruoyi-ui/src/layout/components/Settings/index.vue | 4 ++-- ruoyi-ui/src/views/index.vue | 2 +- ruoyi-ui/src/views/monitor/cache/index.vue | 2 +- ruoyi-ui/src/views/monitor/server/index.vue | 2 +- ruoyi-ui/src/views/system/role/index.vue | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java index 408300525..1e2774350 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java @@ -27,5 +27,5 @@ public @interface RepeatSubmit /** * 提示消息 */ - public String message() default "不允许重复提交,请稍后再试"; + public String message() default "不允许重复提交,请稍候再试"; } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java index 5020d000b..7b8ccf1d3 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java @@ -61,7 +61,7 @@ public class RateLimiterAspect Long number = redisTemplate.execute(limitScript, keys, count, time); if (StringUtils.isNull(number) || number.intValue() > count) { - throw new ServiceException("访问过于频繁,请稍后再试"); + throw new ServiceException("访问过于频繁,请稍候再试"); } log.info("限制请求'{}',当前请求'{}',缓存key'{}'", count, number.intValue(), key); } @@ -71,7 +71,7 @@ public class RateLimiterAspect } catch (Exception e) { - throw new RuntimeException("服务器限流异常,请稍后再试"); + throw new RuntimeException("服务器限流异常,请稍候再试"); } } diff --git a/ruoyi-ui/src/layout/components/Settings/index.vue b/ruoyi-ui/src/layout/components/Settings/index.vue index 4dff1d0c5..bd2f553cf 100644 --- a/ruoyi-ui/src/layout/components/Settings/index.vue +++ b/ruoyi-ui/src/layout/components/Settings/index.vue @@ -162,7 +162,7 @@ export default { this.sideTheme = val; }, saveSetting() { - this.$modal.loading("正在保存到本地,请稍后..."); + this.$modal.loading("正在保存到本地,请稍候..."); this.$cache.local.set( "layout-setting", `{ @@ -178,7 +178,7 @@ export default { setTimeout(this.$modal.closeLoading(), 1000) }, resetSetting() { - this.$modal.loading("正在清除设置缓存并刷新,请稍后..."); + this.$modal.loading("正在清除设置缓存并刷新,请稍候..."); this.$cache.local.remove("layout-setting") setTimeout("window.location.reload()", 1000) } diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 00379e5aa..46811841b 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -590,7 +590,7 @@
  • 修复表格时间为空出现的异常
  • 添加Jackson日期反序列化时区配置
  • 调整根据用户权限加载菜单数据树形结构
  • -
  • 调整成功登陆不恢复按钮,防止多次点击
  • +
  • 调整成功登录不恢复按钮,防止多次点击
  • 修改用户个人资料同步缓存信息
  • 修复页面同时出现el-upload和Editor不显示处理
  • 修复在角色管理页修改菜单权限偶尔未选中问题
  • diff --git a/ruoyi-ui/src/views/monitor/cache/index.vue b/ruoyi-ui/src/views/monitor/cache/index.vue index 22501dc34..cafa28cfb 100644 --- a/ruoyi-ui/src/views/monitor/cache/index.vue +++ b/ruoyi-ui/src/views/monitor/cache/index.vue @@ -139,7 +139,7 @@ export default { }, // 打开加载层 openLoading() { - this.$modal.loading("正在加载缓存监控数据,请稍后!"); + this.$modal.loading("正在加载缓存监控数据,请稍候!"); }, }, }; diff --git a/ruoyi-ui/src/views/monitor/server/index.vue b/ruoyi-ui/src/views/monitor/server/index.vue index 503bf9b61..3eaaea0e1 100644 --- a/ruoyi-ui/src/views/monitor/server/index.vue +++ b/ruoyi-ui/src/views/monitor/server/index.vue @@ -196,7 +196,7 @@ export default { }, // 打开加载层 openLoading() { - this.$modal.loading("正在加载服务监控数据,请稍后!"); + this.$modal.loading("正在加载服务监控数据,请稍候!"); } } }; diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 6e5855863..5110834d4 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -200,7 +200,7 @@ ref="menu" node-key="id" :check-strictly="!form.menuCheckStrictly" - empty-text="加载中,请稍后" + empty-text="加载中,请稍候" :props="defaultProps" > @@ -245,7 +245,7 @@ ref="dept" node-key="id" :check-strictly="!form.deptCheckStrictly" - empty-text="加载中,请稍后" + empty-text="加载中,请稍候" :props="defaultProps" >