From a2d3f987c04a2e5176a8686f1032f7f5bfee4af2 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 30 Nov 2021 11:15:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SysProfileController.java | 2 +- .../system/service/impl/SysMenuServiceImpl.java | 15 +++++++++++++-- ruoyi-ui/src/plugins/modal.js | 8 ++++++++ ruoyi-ui/src/views/monitor/online/index.vue | 2 +- ruoyi-ui/src/views/system/user/index.vue | 2 +- ruoyi-ui/src/views/tool/gen/basicInfoForm.vue | 3 +-- ruoyi-ui/src/views/tool/gen/editTable.vue | 1 + ruoyi-ui/src/views/tool/gen/genInfoForm.vue | 3 +-- 8 files changed, 27 insertions(+), 9 deletions(-) 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 d764651c..be515fd6 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 @@ -72,7 +72,7 @@ public class SysProfileController extends BaseController && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); - } + } user.setUserId(sysUser.getUserId()); user.setPassword(null); if (userService.updateUserProfile(user) > 0) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index af97f149..d509da2b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -179,7 +179,7 @@ public class SysMenuServiceImpl implements ISysMenuService router.setPath("/inner"); List childrenList = new ArrayList(); RouterVo children = new RouterVo(); - String routerPath = StringUtils.replaceEach(menu.getPath(), new String[] { Constants.HTTP, Constants.HTTPS }, new String[] { "", "" }); + String routerPath = innerLinkReplaceEach(menu.getPath()); children.setPath(routerPath); children.setComponent(UserConstants.INNER_LINK); children.setName(StringUtils.capitalize(routerPath)); @@ -358,7 +358,7 @@ public class SysMenuServiceImpl implements ISysMenuService // 内链打开外网方式 if (menu.getParentId().intValue() != 0 && isInnerLink(menu)) { - routerPath = StringUtils.replaceEach(routerPath, new String[] { Constants.HTTP, Constants.HTTPS }, new String[] { "", "" }); + routerPath = innerLinkReplaceEach(routerPath); } // 非外链并且是一级目录(类型为目录) if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType()) @@ -500,4 +500,15 @@ public class SysMenuServiceImpl implements ISysMenuService { return getChildList(list, t).size() > 0 ? true : false; } + + /** + * 内链域名特殊字符替换 + * + * @return + */ + public String innerLinkReplaceEach(String path) + { + return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS }, + new String[] { "", "" }); + } } diff --git a/ruoyi-ui/src/plugins/modal.js b/ruoyi-ui/src/plugins/modal.js index 7df61a89..503a16f4 100644 --- a/ruoyi-ui/src/plugins/modal.js +++ b/ruoyi-ui/src/plugins/modal.js @@ -59,6 +59,14 @@ export default { type: "warning", }) }, + // 提交内容 + prompt(content) { + return MessageBox.prompt(content, "系统提示", { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: "warning", + }) + }, // 打开遮罩层 loading(content) { loadingInstance = Loading.service({ diff --git a/ruoyi-ui/src/views/monitor/online/index.vue b/ruoyi-ui/src/views/monitor/online/index.vue index ab66827b..fedf0803 100644 --- a/ruoyi-ui/src/views/monitor/online/index.vue +++ b/ruoyi-ui/src/views/monitor/online/index.vue @@ -111,7 +111,7 @@ export default { }, /** 强退按钮操作 */ handleForceLogout(row) { - this.$modal.confirm('是否确认强退名称为"' + row.userName + '"的数据项?').then(function() { + this.$modal.confirm('是否确认强退名称为"' + row.userName + '"的用户?').then(function() { return forceLogout(row.tokenId); }).then(() => { this.getList(); diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 3525c9b3..c538a698 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -596,7 +596,7 @@ export default { cancelButtonText: "取消", closeOnClickModal: false, inputPattern: /^.{5,20}$/, - inputErrorMessage: "用户密码长度必须介于 5 和 20 之间", + inputErrorMessage: "用户密码长度必须介于 5 和 20 之间" }).then(({ value }) => { resetUserPwd(row.userId, value).then(response => { this.$modal.msgSuccess("修改成功,新密码是:" + value); diff --git a/ruoyi-ui/src/views/tool/gen/basicInfoForm.vue b/ruoyi-ui/src/views/tool/gen/basicInfoForm.vue index f3e87172..75dc3bf3 100644 --- a/ruoyi-ui/src/views/tool/gen/basicInfoForm.vue +++ b/ruoyi-ui/src/views/tool/gen/basicInfoForm.vue @@ -11,7 +11,6 @@ - @@ -30,9 +29,9 @@ +