diff --git a/README.md b/README.md index 516adce8..2ada06c7 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@

logo

-

RuoYi v3.8.6

+

RuoYi v3.8.7

基于SpringBoot+Vue前后端分离的Java快速开发框架

- +

@@ -109,4 +109,4 @@ ## 若依前后端分离交流群 -QQ群: [![加入QQ群](https://img.shields.io/badge/已满-937441-blue.svg)](https://jq.qq.com/?_wv=1027&k=5bVB1og) [![加入QQ群](https://img.shields.io/badge/已满-887144332-blue.svg)](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [![加入QQ群](https://img.shields.io/badge/已满-180251782-blue.svg)](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [![加入QQ群](https://img.shields.io/badge/已满-104180207-blue.svg)](https://jq.qq.com/?_wv=1027&k=51G72yr) [![加入QQ群](https://img.shields.io/badge/已满-186866453-blue.svg)](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [![加入QQ群](https://img.shields.io/badge/已满-201396349-blue.svg)](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [![加入QQ群](https://img.shields.io/badge/已满-101456076-blue.svg)](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [![加入QQ群](https://img.shields.io/badge/已满-101539465-blue.svg)](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [![加入QQ群](https://img.shields.io/badge/已满-264312783-blue.svg)](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [![加入QQ群](https://img.shields.io/badge/已满-167385320-blue.svg)](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [![加入QQ群](https://img.shields.io/badge/已满-104748341-blue.svg)](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [![加入QQ群](https://img.shields.io/badge/已满-160110482-blue.svg)](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [![加入QQ群](https://img.shields.io/badge/已满-170801498-blue.svg)](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [![加入QQ群](https://img.shields.io/badge/已满-108482800-blue.svg)](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [![加入QQ群](https://img.shields.io/badge/已满-101046199-blue.svg)](https://jq.qq.com/?_wv=1027&k=SpyH2875) [![加入QQ群](https://img.shields.io/badge/已满-136919097-blue.svg)](https://jq.qq.com/?_wv=1027&k=tKEt51dz) [![加入QQ群](https://img.shields.io/badge/已满-143961921-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921) [![加入QQ群](https://img.shields.io/badge/174951577-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=ZFAPAbp09S2ltvwrJzp7wGlbopsc0rwi&authKey=HB2cxpxP2yspk%2Bo3WKTBfktRCccVkU26cgi5B16u0KcAYrVu7sBaE7XSEqmMdFQp&noverify=0&group_code=174951577) 点击按钮入群。 \ No newline at end of file +QQ群: [![加入QQ群](https://img.shields.io/badge/已满-937441-blue.svg)](https://jq.qq.com/?_wv=1027&k=5bVB1og) [![加入QQ群](https://img.shields.io/badge/已满-887144332-blue.svg)](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [![加入QQ群](https://img.shields.io/badge/已满-180251782-blue.svg)](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [![加入QQ群](https://img.shields.io/badge/已满-104180207-blue.svg)](https://jq.qq.com/?_wv=1027&k=51G72yr) [![加入QQ群](https://img.shields.io/badge/已满-186866453-blue.svg)](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [![加入QQ群](https://img.shields.io/badge/已满-201396349-blue.svg)](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [![加入QQ群](https://img.shields.io/badge/已满-101456076-blue.svg)](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [![加入QQ群](https://img.shields.io/badge/已满-101539465-blue.svg)](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [![加入QQ群](https://img.shields.io/badge/已满-264312783-blue.svg)](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [![加入QQ群](https://img.shields.io/badge/已满-167385320-blue.svg)](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [![加入QQ群](https://img.shields.io/badge/已满-104748341-blue.svg)](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [![加入QQ群](https://img.shields.io/badge/已满-160110482-blue.svg)](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [![加入QQ群](https://img.shields.io/badge/已满-170801498-blue.svg)](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [![加入QQ群](https://img.shields.io/badge/已满-108482800-blue.svg)](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [![加入QQ群](https://img.shields.io/badge/已满-101046199-blue.svg)](https://jq.qq.com/?_wv=1027&k=SpyH2875) [![加入QQ群](https://img.shields.io/badge/已满-136919097-blue.svg)](https://jq.qq.com/?_wv=1027&k=tKEt51dz) [![加入QQ群](https://img.shields.io/badge/已满-143961921-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921) [![加入QQ群](https://img.shields.io/badge/已满-174951577-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=ZFAPAbp09S2ltvwrJzp7wGlbopsc0rwi&authKey=HB2cxpxP2yspk%2Bo3WKTBfktRCccVkU26cgi5B16u0KcAYrVu7sBaE7XSEqmMdFQp&noverify=0&group_code=161281055) [![加入QQ群](https://img.shields.io/badge/174951577-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Fn2aF5IHpwsy8j6VlalNJK6qbwFLFHat&authKey=uyIT%2B97x2AXj3odyXpsSpVaPMC%2Bidw0LxG5MAtEqlrcBcWJUA%2FeS43rsF1Tg7IRJ&noverify=0&group_code=161281055) 点击按钮入群。 \ No newline at end of file diff --git a/pom.xml b/pom.xml index c2721925..91a7a4b2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,25 +6,25 @@ com.ruoyi ruoyi - 3.8.6 + 3.8.7 ruoyi http://www.ruoyi.vip 若依管理系统 - 3.8.6 + 3.8.7 UTF-8 UTF-8 1.8 3.1.1 - 1.2.16 + 1.2.20 1.21 3.0.0 2.3.3 - 1.4.6 - 2.0.41 - 6.4.6 + 1.4.7 + 2.0.43 + 6.4.8 2.13.0 3.2.2 4.1.2 diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index c7985de4..03af8a3d 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.8.6 + 3.8.7 4.0.0 jar diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java index 94c471e7..cd8abd6f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java @@ -67,11 +67,11 @@ public class SysProfileController extends BaseController currentUser.setSex(user.getSex()); if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser)) { - return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); + return error("修改用户'" + loginUser.getUsername() + "'失败,手机号码已存在"); } if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(currentUser)) { - return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); + return error("修改用户'" + loginUser.getUsername() + "'失败,邮箱账号已存在"); } if (userService.updateUserProfile(currentUser) > 0) { @@ -100,10 +100,11 @@ public class SysProfileController extends BaseController { return error("新密码不能与旧密码相同"); } - if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0) + newPassword = SecurityUtils.encryptPassword(newPassword); + if (userService.resetUserPwd(userName, newPassword) > 0) { // 更新缓存用户密码 - loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword)); + loginUser.getUser().setPassword(newPassword); tokenService.setLoginUser(loginUser); return success(); } diff --git a/ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties b/ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties index 2b23f85a..37e7b580 100644 --- a/ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties +++ b/ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties @@ -1 +1 @@ -restart.include.json=/com.alibaba.fastjson.*.jar \ No newline at end of file +restart.include.json=/com.alibaba.fastjson2.*.jar \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index b5ec8bbf..b091afff 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -3,11 +3,9 @@ ruoyi: # 名称 name: RuoYi # 版本 - version: 3.8.6 + version: 3.8.7 # 版权年份 copyrightYear: 2023 - # 实例演示开关 - demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) profile: D:/ruoyi/uploadPath # 获取ip地址开关 diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 35e34b7b..38326a1f 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.8.6 + 3.8.7 4.0.0 diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java b/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java index 84c0029d..eac3da15 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java @@ -21,9 +21,6 @@ public class RuoYiConfig /** 版权年份 */ private String copyrightYear; - /** 实例演示开关 */ - private boolean demoEnabled; - /** 上传路径 */ private static String profile; @@ -63,16 +60,6 @@ public class RuoYiConfig this.copyrightYear = copyrightYear; } - public boolean isDemoEnabled() - { - return demoEnabled; - } - - public void setDemoEnabled(boolean demoEnabled) - { - this.demoEnabled = demoEnabled; - } - public static String getProfile() { return profile; diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index 90e29185..0bcd7d07 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.8.6 + 3.8.7 4.0.0 diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java index 006a8b93..bd220525 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java @@ -18,6 +18,7 @@ import org.springframework.validation.BindingResult; import org.springframework.web.multipart.MultipartFile; import com.alibaba.fastjson2.JSON; import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.enums.BusinessStatus; import com.ruoyi.common.enums.HttpMethod; @@ -96,6 +97,11 @@ public class LogAspect if (loginUser != null) { operLog.setOperName(loginUser.getUsername()); + SysUser currentUser = loginUser.getUser(); + if (StringUtils.isNotNull(currentUser) && StringUtils.isNotNull(currentUser.getDept())) + { + operLog.setDeptName(currentUser.getDept().getDeptName()); + } } if (e != null) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPasswordService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPasswordService.java index a68dbc88..7a1f93d4 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPasswordService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPasswordService.java @@ -6,15 +6,11 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.security.core.Authentication; import org.springframework.stereotype.Component; import com.ruoyi.common.constant.CacheConstants; -import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.exception.user.UserPasswordNotMatchException; import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException; -import com.ruoyi.common.utils.MessageUtils; import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.framework.manager.AsyncManager; -import com.ruoyi.framework.manager.factory.AsyncFactory; import com.ruoyi.framework.security.context.AuthenticationContextHolder; /** @@ -60,16 +56,12 @@ public class SysPasswordService if (retryCount >= Integer.valueOf(maxRetryCount).intValue()) { - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, - MessageUtils.message("user.password.retry.limit.exceed", maxRetryCount, lockTime))); throw new UserPasswordRetryLimitExceedException(maxRetryCount, lockTime); } if (!matches(user, password)) { retryCount = retryCount + 1; - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, - MessageUtils.message("user.password.retry.limit.count", retryCount))); redisCache.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES); throw new UserPasswordNotMatchException(); } diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml index cea4f67e..83fde2f5 100644 --- a/ruoyi-generator/pom.xml +++ b/ruoyi-generator/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.8.6 + 3.8.7 4.0.0 diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java index 2abb94fa..c3af38f0 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java @@ -41,6 +41,9 @@ public class GenTable extends BaseEntity /** 使用的模板(crud单表操作 tree树表操作 sub主子表操作) */ private String tplCategory; + /** 前端类型(element-ui模版 element-plus模版) */ + private String tplWebType; + /** 生成包路径 */ @NotBlank(message = "生成包路径不能为空") private String packageName; @@ -165,6 +168,16 @@ public class GenTable extends BaseEntity this.tplCategory = tplCategory; } + public String getTplWebType() + { + return tplWebType; + } + + public void setTplWebType(String tplWebType) + { + this.tplWebType = tplWebType; + } + public String getPackageName() { return packageName; diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java index 1620995f..ff6291db 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java @@ -206,7 +206,7 @@ public class GenTableServiceImpl implements IGenTableService VelocityContext context = VelocityUtils.prepareContext(table); // 获取模板列表 - List templates = VelocityUtils.getTemplateList(table.getTplCategory()); + List templates = VelocityUtils.getTemplateList(table.getTplCategory(), table.getTplWebType()); for (String template : templates) { // 渲染模板 @@ -254,7 +254,7 @@ public class GenTableServiceImpl implements IGenTableService VelocityContext context = VelocityUtils.prepareContext(table); // 获取模板列表 - List templates = VelocityUtils.getTemplateList(table.getTplCategory()); + List templates = VelocityUtils.getTemplateList(table.getTplCategory(), table.getTplWebType()); for (String template : templates) { if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "index.vue.vm", "index-tree.vue.vm")) @@ -367,7 +367,7 @@ public class GenTableServiceImpl implements IGenTableService VelocityContext context = VelocityUtils.prepareContext(table); // 获取模板列表 - List templates = VelocityUtils.getTemplateList(table.getTplCategory()); + List templates = VelocityUtils.getTemplateList(table.getTplCategory(), table.getTplWebType()); for (String template : templates) { // 渲染模板 diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java index 733c7148..d64ab08f 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java @@ -123,11 +123,17 @@ public class VelocityUtils /** * 获取模板信息 - * + * @param tplCategory 生成的模板 + * @param tplWebType 前端类型 * @return 模板列表 */ - public static List getTemplateList(String tplCategory) + public static List getTemplateList(String tplCategory, String tplWebType) { + String useWebType = "vm/vue"; + if ("element-plus".equals(tplWebType)) + { + useWebType = "vm/vue/v3"; + } List templates = new ArrayList(); templates.add("vm/java/domain.java.vm"); templates.add("vm/java/mapper.java.vm"); @@ -139,15 +145,15 @@ public class VelocityUtils templates.add("vm/js/api.js.vm"); if (GenConstants.TPL_CRUD.equals(tplCategory)) { - templates.add("vm/vue/index.vue.vm"); + templates.add(useWebType + "/index.vue.vm"); } else if (GenConstants.TPL_TREE.equals(tplCategory)) { - templates.add("vm/vue/index-tree.vue.vm"); + templates.add(useWebType + "/index-tree.vue.vm"); } else if (GenConstants.TPL_SUB.equals(tplCategory)) { - templates.add("vm/vue/index.vue.vm"); + templates.add(useWebType + "/index.vue.vm"); templates.add("vm/java/sub-domain.java.vm"); } return templates; diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml index 07a33ce4..229fa607 100644 --- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml @@ -123,4 +123,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + \ No newline at end of file diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml index 71f9a802..7451f3a4 100644 --- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml +++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml @@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -52,11 +53,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table + select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, tpl_web_type, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table - + - + - + - + - + - + insert into gen_table ( table_name, @@ -192,7 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where table_id = #{tableId} - + delete from gen_table where table_id::bigint in @@ -200,4 +201,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + \ No newline at end of file diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/readme.txt b/ruoyi-generator/src/main/resources/vm/vue/v3/readme.txt deleted file mode 100644 index 99239bb5..00000000 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/readme.txt +++ /dev/null @@ -1 +0,0 @@ -ʹõRuoYi-Vue3ǰˣôҪһ´Ŀ¼ģindex.vue.vmindex-tree.vue.vmļϼvueĿ¼ \ No newline at end of file diff --git a/ruoyi-quartz/pom.xml b/ruoyi-quartz/pom.xml index b1c7b3ea..80279a82 100644 --- a/ruoyi-quartz/pom.xml +++ b/ruoyi-quartz/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.8.6 + 3.8.7 4.0.0 diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java index c37ff655..f4d40cb5 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java @@ -33,7 +33,7 @@ // // 集群配置 // prop.put("org.quartz.jobStore.isClustered", "true"); // prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); -// prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1"); +// prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "10"); // prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); // // // sqlserver 启用 diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml index c5940f77..2ae39ab5 100644 --- a/ruoyi-system/pom.xml +++ b/ruoyi-system/pom.xml @@ -5,7 +5,7 @@ ruoyi com.ruoyi - 3.8.6 + 3.8.7 4.0.0 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java index 9c33e546..81d6e719 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java @@ -37,7 +37,7 @@ public interface SysUserPostMapper /** * 批量新增用户岗位信息 * - * @param userPostList 用户角色列表 + * @param userPostList 用户岗位列表 * @return 结果 */ public int batchUserPost(List userPostList); diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 255259db..5b534d91 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "3.8.6", + "version": "3.8.7", "description": "若依管理系统", "author": "若依", "license": "MIT", @@ -41,7 +41,7 @@ "clipboard": "2.0.8", "core-js": "3.25.3", "echarts": "5.4.0", - "element-ui": "2.15.13", + "element-ui": "2.15.14", "file-saver": "2.0.5", "fuse.js": "6.4.3", "highlight.js": "9.18.5", diff --git a/ruoyi-ui/src/App.vue b/ruoyi-ui/src/App.vue index a2c4b872..cc29b466 100644 --- a/ruoyi-ui/src/App.vue +++ b/ruoyi-ui/src/App.vue @@ -11,14 +11,14 @@ import ThemePicker from "@/components/ThemePicker"; export default { name: "App", components: { ThemePicker }, - metaInfo() { - return { - title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title, - titleTemplate: title => { - return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE - } - } + metaInfo() { + return { + title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title, + titleTemplate: title => { + return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE + } } + } }; diff --git a/ruoyi-ui/src/components/RightToolbar/index.vue b/ruoyi-ui/src/components/RightToolbar/index.vue index 776fcee5..d3d42523 100644 --- a/ruoyi-ui/src/components/RightToolbar/index.vue +++ b/ruoyi-ui/src/components/RightToolbar/index.vue @@ -8,7 +8,17 @@ - + + + + + + + @@ -35,17 +45,26 @@ export default { }; }, props: { + /* 是否显示检索条件 */ showSearch: { type: Boolean, default: true, }, + /* 显隐列信息 */ columns: { type: Array, }, + /* 是否显示检索图标 */ search: { type: Boolean, default: true, }, + /* 显隐列类型(transfer穿梭框、checkbox复选框) */ + showColumnsType: { + type: String, + default: "checkbox", + }, + /* 右外边距 */ gutter: { type: Number, default: 10, @@ -61,10 +80,12 @@ export default { } }, created() { - // 显隐列初始默认隐藏列 - for (let item in this.columns) { - if (this.columns[item].visible === false) { - this.value.push(parseInt(item)); + if (this.showColumnsType == 'transfer') { + // 显隐列初始默认隐藏列 + for (let item in this.columns) { + if (this.columns[item].visible === false) { + this.value.push(parseInt(item)); + } } } }, @@ -88,6 +109,10 @@ export default { showColumn() { this.open = true; }, + // 勾选 + checkboxChange(event, label) { + this.columns.filter(item => item.label == label)[0].visible = event; + } }, }; diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue index daee1b87..86a91c4c 100644 --- a/ruoyi-ui/src/components/TopNav/index.vue +++ b/ruoyi-ui/src/components/TopNav/index.vue @@ -5,13 +5,12 @@ @select="handleSelect" > @@ -21,10 +20,12 @@ - {{ item.meta.title }} + v-if="index >= visibleNumber"> + + {{ item.meta.title }} + @@ -56,9 +57,9 @@ export default { if (menu.hidden !== true) { // 兼容顶部栏一级菜单内部跳转 if (menu.path === "/") { - topMenus.push(menu.children[0]); + topMenus.push(menu.children[0]); } else { - topMenus.push(menu); + topMenus.push(menu); } } }); diff --git a/ruoyi-ui/src/directive/dialog/dragHeight.js b/ruoyi-ui/src/directive/dialog/dragHeight.js index db5e1dbc..e805bd75 100644 --- a/ruoyi-ui/src/directive/dialog/dragHeight.js +++ b/ruoyi-ui/src/directive/dialog/dragHeight.js @@ -1,34 +1,34 @@ /** -* v-dialogDragWidth 可拖动弹窗高度(右下角) -* Copyright (c) 2019 ruoyi -*/ + * v-dialogDragWidth 可拖动弹窗高度(右下角) + * Copyright (c) 2019 ruoyi + */ export default { - bind(el) { - const dragDom = el.querySelector('.el-dialog'); - const lineEl = document.createElement('div'); - lineEl.style = 'width: 6px; background: inherit; height: 10px; position: absolute; right: 0; bottom: 0; margin: auto; z-index: 1; cursor: nwse-resize;'; - lineEl.addEventListener('mousedown', - function(e) { - // 鼠标按下,计算当前元素距离可视区的距离 - const disX = e.clientX - el.offsetLeft; - const disY = e.clientY - el.offsetTop; - // 当前宽度 高度 - const curWidth = dragDom.offsetWidth; - const curHeight = dragDom.offsetHeight; - document.onmousemove = function(e) { - e.preventDefault(); // 移动时禁用默认事件 - // 通过事件委托,计算移动的距离 - const xl = e.clientX - disX; - const yl = e.clientY - disY - dragDom.style.width = `${curWidth + xl}px`; - dragDom.style.height = `${curHeight + yl}px`; - }; - document.onmouseup = function(e) { - document.onmousemove = null; - document.onmouseup = null; - }; - }, false); - dragDom.appendChild(lineEl); - } -} \ No newline at end of file + bind(el) { + const dragDom = el.querySelector('.el-dialog'); + const lineEl = document.createElement('div'); + lineEl.style = 'width: 6px; background: inherit; height: 10px; position: absolute; right: 0; bottom: 0; margin: auto; z-index: 1; cursor: nwse-resize;'; + lineEl.addEventListener('mousedown', + function(e) { + // 鼠标按下,计算当前元素距离可视区的距离 + const disX = e.clientX - el.offsetLeft; + const disY = e.clientY - el.offsetTop; + // 当前宽度 高度 + const curWidth = dragDom.offsetWidth; + const curHeight = dragDom.offsetHeight; + document.onmousemove = function(e) { + e.preventDefault(); // 移动时禁用默认事件 + // 通过事件委托,计算移动的距离 + const xl = e.clientX - disX; + const yl = e.clientY - disY + dragDom.style.width = `${curWidth + xl}px`; + dragDom.style.height = `${curHeight + yl}px`; + }; + document.onmouseup = function(e) { + document.onmousemove = null; + document.onmouseup = null; + }; + }, false); + dragDom.appendChild(lineEl); + } +} diff --git a/ruoyi-ui/src/directive/dialog/dragWidth.js b/ruoyi-ui/src/directive/dialog/dragWidth.js index e3b5f3f8..96284bbf 100644 --- a/ruoyi-ui/src/directive/dialog/dragWidth.js +++ b/ruoyi-ui/src/directive/dialog/dragWidth.js @@ -1,30 +1,30 @@ /** -* v-dialogDragWidth 可拖动弹窗宽度(右侧边) -* Copyright (c) 2019 ruoyi -*/ + * v-dialogDragWidth 可拖动弹窗宽度(右侧边) + * Copyright (c) 2019 ruoyi + */ export default { - bind(el) { - const dragDom = el.querySelector('.el-dialog'); - const lineEl = document.createElement('div'); - lineEl.style = 'width: 5px; background: inherit; height: 80%; position: absolute; right: 0; top: 0; bottom: 0; margin: auto; z-index: 1; cursor: w-resize;'; - lineEl.addEventListener('mousedown', - function (e) { - // 鼠标按下,计算当前元素距离可视区的距离 - const disX = e.clientX - el.offsetLeft; - // 当前宽度 - const curWidth = dragDom.offsetWidth; - document.onmousemove = function (e) { - e.preventDefault(); // 移动时禁用默认事件 - // 通过事件委托,计算移动的距离 - const l = e.clientX - disX; - dragDom.style.width = `${curWidth + l}px`; - }; - document.onmouseup = function (e) { - document.onmousemove = null; - document.onmouseup = null; - }; - }, false); - dragDom.appendChild(lineEl); - } -} \ No newline at end of file + bind(el) { + const dragDom = el.querySelector('.el-dialog'); + const lineEl = document.createElement('div'); + lineEl.style = 'width: 5px; background: inherit; height: 80%; position: absolute; right: 0; top: 0; bottom: 0; margin: auto; z-index: 1; cursor: w-resize;'; + lineEl.addEventListener('mousedown', + function (e) { + // 鼠标按下,计算当前元素距离可视区的距离 + const disX = e.clientX - el.offsetLeft; + // 当前宽度 + const curWidth = dragDom.offsetWidth; + document.onmousemove = function (e) { + e.preventDefault(); // 移动时禁用默认事件 + // 通过事件委托,计算移动的距离 + const l = e.clientX - disX; + dragDom.style.width = `${curWidth + l}px`; + }; + document.onmouseup = function (e) { + document.onmousemove = null; + document.onmouseup = null; + }; + }, false); + dragDom.appendChild(lineEl); + } +} diff --git a/ruoyi-ui/src/directive/permission/hasPermi.js b/ruoyi-ui/src/directive/permission/hasPermi.js index 799e0153..6839161e 100644 --- a/ruoyi-ui/src/directive/permission/hasPermi.js +++ b/ruoyi-ui/src/directive/permission/hasPermi.js @@ -2,7 +2,7 @@ * v-hasPermi 操作权限处理 * Copyright (c) 2019 ruoyi */ - + import store from '@/store' export default { diff --git a/ruoyi-ui/src/directive/permission/hasRole.js b/ruoyi-ui/src/directive/permission/hasRole.js index 406b9435..9e0e0212 100644 --- a/ruoyi-ui/src/directive/permission/hasRole.js +++ b/ruoyi-ui/src/directive/permission/hasRole.js @@ -2,7 +2,7 @@ * v-hasRole 角色权限处理 * Copyright (c) 2019 ruoyi */ - + import store from '@/store' export default { diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 67a53ab6..5c5a2489 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -8,7 +8,7 @@
{ if (to.path === '/login') { next({ path: '/' }) NProgress.done() + } else if (whiteList.indexOf(to.path) !== -1) { + next() } else { if (store.getters.roles.length === 0) { isRelogin.show = true diff --git a/ruoyi-ui/src/plugins/download.js b/ruoyi-ui/src/plugins/download.js index ffb8c146..42acd006 100644 --- a/ruoyi-ui/src/plugins/download.js +++ b/ruoyi-ui/src/plugins/download.js @@ -1,11 +1,12 @@ import axios from 'axios' -import { Message } from 'element-ui' +import {Loading, Message} from 'element-ui' import { saveAs } from 'file-saver' import { getToken } from '@/utils/auth' import errorCode from '@/utils/errorCode' import { blobValidate } from "@/utils/ruoyi"; const baseURL = process.env.VUE_APP_BASE_API +let downloadLoadingInstance; export default { name(name, isDelete = true) { @@ -44,6 +45,7 @@ export default { }, zip(url, name) { var url = baseURL + url + downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", }) axios({ method: 'get', url: url, @@ -57,6 +59,11 @@ export default { } else { this.printErrMsg(res.data); } + downloadLoadingInstance.close(); + }).catch((r) => { + console.error(r) + Message.error('下载文件出现错误,请联系管理员!') + downloadLoadingInstance.close(); }) }, saveAs(text, name, opts) { diff --git a/ruoyi-ui/src/plugins/tab.js b/ruoyi-ui/src/plugins/tab.js index 60ceb5fa..8d7c6f1c 100644 --- a/ruoyi-ui/src/plugins/tab.js +++ b/ruoyi-ui/src/plugins/tab.js @@ -35,7 +35,7 @@ export default { return store.dispatch('tagsView/delView', router.currentRoute).then(({ visitedViews }) => { const latestView = visitedViews.slice(-1)[0] if (latestView) { - return router.push(latestView.fullPath) + return router.push(latestView.fullPath) } return router.push('/'); }); @@ -60,7 +60,7 @@ export default { }, // 添加tab页签 openPage(title, url, params) { - var obj = { path: url, meta: { title: title } } + const obj = { path: url, meta: { title: title } } store.dispatch('tagsView/addView', obj); return router.push({ path: url, query: params }); }, diff --git a/ruoyi-ui/src/utils/index.js b/ruoyi-ui/src/utils/index.js index 9679e757..5799c05d 100644 --- a/ruoyi-ui/src/utils/index.js +++ b/ruoyi-ui/src/utils/index.js @@ -5,12 +5,12 @@ import { parseTime } from './ruoyi' */ export function formatDate(cellValue) { if (cellValue == null || cellValue == "") return ""; - var date = new Date(cellValue) + var date = new Date(cellValue) var year = date.getFullYear() var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 - var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() - var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() - var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() + var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds } @@ -330,7 +330,7 @@ export function makeMap(str, expectsLowerCase) { ? val => map[val.toLowerCase()] : val => map[val] } - + export const exportDefault = 'export default ' export const beautifierConf = { @@ -387,4 +387,4 @@ export function camelCase(str) { export function isNumberStr(str) { return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) } - + diff --git a/ruoyi-ui/src/utils/permission.js b/ruoyi-ui/src/utils/permission.js index 25d1a029..0fc5515e 100644 --- a/ruoyi-ui/src/utils/permission.js +++ b/ruoyi-ui/src/utils/permission.js @@ -15,10 +15,8 @@ export function checkPermi(value) { return all_permission === permission || permissionDatas.includes(permission) }) - if (!hasPermission) { - return false - } - return true + return hasPermission; + } else { console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`) return false @@ -40,10 +38,8 @@ export function checkRole(value) { return super_admin === role || permissionRoles.includes(role) }) - if (!hasRole) { - return false - } - return true + return hasRole; + } else { console.error(`need roles! Like checkRole="['admin','editor']"`) return false diff --git a/ruoyi-ui/src/utils/validate.js b/ruoyi-ui/src/utils/validate.js index 9c00400e..79864331 100644 --- a/ruoyi-ui/src/utils/validate.js +++ b/ruoyi-ui/src/utils/validate.js @@ -65,10 +65,7 @@ export function validEmail(email) { * @returns {Boolean} */ export function isString(str) { - if (typeof str === 'string' || str instanceof String) { - return true - } - return false + return typeof str === 'string' || str instanceof String; } /** diff --git a/ruoyi-ui/src/views/components/icons/element-icons.js b/ruoyi-ui/src/views/components/icons/element-icons.js deleted file mode 100644 index ae33ba0e..00000000 --- a/ruoyi-ui/src/views/components/icons/element-icons.js +++ /dev/null @@ -1,3 +0,0 @@ -const elementIcons = ['platform-eleme', 'eleme', 'delete-solid', 'delete', 's-tools', 'setting', 'user-solid', 'user', 'phone', 'phone-outline', 'more', 'more-outline', 'star-on', 'star-off', 's-goods', 'goods', 'warning', 'warning-outline', 'question', 'info', 'remove', 'circle-plus', 'success', 'error', 'zoom-in', 'zoom-out', 'remove-outline', 'circle-plus-outline', 'circle-check', 'circle-close', 's-help', 'help', 'minus', 'plus', 'check', 'close', 'picture', 'picture-outline', 'picture-outline-round', 'upload', 'upload2', 'download', 'camera-solid', 'camera', 'video-camera-solid', 'video-camera', 'message-solid', 'bell', 's-cooperation', 's-order', 's-platform', 's-fold', 's-unfold', 's-operation', 's-promotion', 's-home', 's-release', 's-ticket', 's-management', 's-open', 's-shop', 's-marketing', 's-flag', 's-comment', 's-finance', 's-claim', 's-custom', 's-opportunity', 's-data', 's-check', 's-grid', 'menu', 'share', 'd-caret', 'caret-left', 'caret-right', 'caret-bottom', 'caret-top', 'bottom-left', 'bottom-right', 'back', 'right', 'bottom', 'top', 'top-left', 'top-right', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'd-arrow-left', 'd-arrow-right', 'video-pause', 'video-play', 'refresh', 'refresh-right', 'refresh-left', 'finished', 'sort', 'sort-up', 'sort-down', 'rank', 'loading', 'view', 'c-scale-to-original', 'date', 'edit', 'edit-outline', 'folder', 'folder-opened', 'folder-add', 'folder-remove', 'folder-delete', 'folder-checked', 'tickets', 'document-remove', 'document-delete', 'document-copy', 'document-checked', 'document', 'document-add', 'printer', 'paperclip', 'takeaway-box', 'search', 'monitor', 'attract', 'mobile', 'scissors', 'umbrella', 'headset', 'brush', 'mouse', 'coordinate', 'magic-stick', 'reading', 'data-line', 'data-board', 'pie-chart', 'data-analysis', 'collection-tag', 'film', 'suitcase', 'suitcase-1', 'receiving', 'collection', 'files', 'notebook-1', 'notebook-2', 'toilet-paper', 'office-building', 'school', 'table-lamp', 'house', 'no-smoking', 'smoking', 'shopping-cart-full', 'shopping-cart-1', 'shopping-cart-2', 'shopping-bag-1', 'shopping-bag-2', 'sold-out', 'sell', 'present', 'box', 'bank-card', 'money', 'coin', 'wallet', 'discount', 'price-tag', 'news', 'guide', 'male', 'female', 'thumb', 'cpu', 'link', 'connection', 'open', 'turn-off', 'set-up', 'chat-round', 'chat-line-round', 'chat-square', 'chat-dot-round', 'chat-dot-square', 'chat-line-square', 'message', 'postcard', 'position', 'turn-off-microphone', 'microphone', 'close-notification', 'bangzhu', 'time', 'odometer', 'crop', 'aim', 'switch-button', 'full-screen', 'copy-document', 'mic', 'stopwatch', 'medal-1', 'medal', 'trophy', 'trophy-1', 'first-aid-kit', 'discover', 'place', 'location', 'location-outline', 'location-information', 'add-location', 'delete-location', 'map-location', 'alarm-clock', 'timer', 'watch-1', 'watch', 'lock', 'unlock', 'key', 'service', 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round'] - -export default elementIcons diff --git a/ruoyi-ui/src/views/components/icons/index.vue b/ruoyi-ui/src/views/components/icons/index.vue deleted file mode 100644 index f422eee9..00000000 --- a/ruoyi-ui/src/views/components/icons/index.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - diff --git a/ruoyi-ui/src/views/components/icons/svg-icons.js b/ruoyi-ui/src/views/components/icons/svg-icons.js deleted file mode 100644 index 9713fd8d..00000000 --- a/ruoyi-ui/src/views/components/icons/svg-icons.js +++ /dev/null @@ -1,10 +0,0 @@ -const req = require.context('../../../assets/icons/svg', false, /\.svg$/) -const requireAll = requireContext => requireContext.keys() - -const re = /\.\/(.*)\.svg/ - -const svgIcons = requireAll(req).map(i => { - return i.match(re)[1] -}) - -export default svgIcons diff --git a/ruoyi-ui/src/views/dashboard/BarChart.vue b/ruoyi-ui/src/views/dashboard/BarChart.vue index 5be49bca..116a4317 100644 --- a/ruoyi-ui/src/views/dashboard/BarChart.vue +++ b/ruoyi-ui/src/views/dashboard/BarChart.vue @@ -3,7 +3,7 @@