From b16b860b63cfeaea13fab89459e26866f1aa0889 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 30 May 2020 12:13:12 +0800 Subject: [PATCH 01/45] =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8Fkey=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/layout/components/Sidebar/index.vue | 4 ++-- .../service/impl/SysMenuServiceImpl.java | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/layout/components/Sidebar/index.vue b/ruoyi-ui/src/layout/components/Sidebar/index.vue index 342dbbed6..1004f53a0 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/index.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/index.vue @@ -13,8 +13,8 @@ mode="vertical" > diff --git a/ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java index d8562a351..56900efc5 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java @@ -140,7 +140,7 @@ public class SysMenuServiceImpl implements ISysMenuService { RouterVo router = new RouterVo(); router.setHidden("1".equals(menu.getVisible())); - router.setName(StringUtils.capitalize(menu.getPath())); + router.setName(getRouteName(menu)); router.setPath(getRouterPath(menu)); router.setComponent(getComponent(menu)); router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon())); @@ -299,6 +299,23 @@ public class SysMenuServiceImpl implements ISysMenuService return UserConstants.UNIQUE; } + /** + * 获取路由名称 + * + * @param menu 菜单信息 + * @return 路由名称 + */ + public String getRouteName(SysMenu menu) + { + String routerName = StringUtils.capitalize(menu.getPath()); + // 非外链并且是一级目录(类型为目录) + if (isMeunFrame(menu)) + { + routerName = StringUtils.EMPTY; + } + return routerName; + } + /** * 获取路由地址 * From 0d546e4ba491cbfc77d63b2b30b33b69bd7e46d0 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 30 May 2020 13:46:31 +0800 Subject: [PATCH 02/45] =?UTF-8?q?=E5=8F=82=E6=95=B0=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=BC=93=E5=AD=98=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/system/config.js | 8 ++ ruoyi-ui/src/views/system/config/index.vue | 22 ++++- .../com/ruoyi/common/constant/Constants.java | 5 ++ .../controller/SysConfigController.java | 12 +++ .../system/service/ISysConfigService.java | 13 ++- .../service/impl/SysConfigServiceImpl.java | 87 +++++++++++++++---- 6 files changed, 122 insertions(+), 25 deletions(-) diff --git a/ruoyi-ui/src/api/system/config.js b/ruoyi-ui/src/api/system/config.js index 124c9812f..2221540e5 100644 --- a/ruoyi-ui/src/api/system/config.js +++ b/ruoyi-ui/src/api/system/config.js @@ -51,6 +51,14 @@ export function delConfig(configId) { }) } +// 清理参数缓存 +export function clearCache() { + return request({ + url: '/system/config/clearCache', + method: 'delete' + }) +} + // 导出参数 export function exportConfig(query) { return request({ diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index c2a68f903..e32d2ee1e 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -88,6 +88,15 @@ v-hasPermi="['system:config:export']" >导出 + + 清理缓存 + @@ -165,7 +174,7 @@ From 8a61b9fe99aabde5c42b02d96464458b480a9ade Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 30 May 2020 15:04:11 +0800 Subject: [PATCH 05/45] =?UTF-8?q?slidebar=20eslint=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/styles/element-ui.scss | 2 +- .../src/layout/components/Sidebar/Link.vue | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/element-ui.scss b/ruoyi-ui/src/assets/styles/element-ui.scss index cd94103b6..558eea484 100644 --- a/ruoyi-ui/src/assets/styles/element-ui.scss +++ b/ruoyi-ui/src/assets/styles/element-ui.scss @@ -31,7 +31,7 @@ .fixed-width { .el-button--mini { padding: 7px 10px; - min-width: 60px; + width: 60px; } } diff --git a/ruoyi-ui/src/layout/components/Sidebar/Link.vue b/ruoyi-ui/src/layout/components/Sidebar/Link.vue index 6cd6e2c0c..d235d10b6 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Link.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/Link.vue @@ -1,7 +1,5 @@ - @@ -16,19 +14,28 @@ export default { required: true } }, + computed: { + isExternal() { + return isExternal(this.to) + }, + type() { + if (this.isExternal) { + return 'a' + } + return 'router-link' + } + }, methods: { - linkProps(url) { - if (isExternal(url)) { + linkProps(to) { + if (this.isExternal) { return { - is: 'a', - href: url, + href: to, target: '_blank', rel: 'noopener' } } return { - is: 'router-link', - to: url + to: to } } } From f26f90fa23e738be3022850449645b7535925162 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 30 May 2020 15:08:36 +0800 Subject: [PATCH 06/45] =?UTF-8?q?=E4=BD=BF=E7=94=A8vue-cli=E9=BB=98?= =?UTF-8?q?=E8=AE=A4source-map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/styles/element-variables.scss | 2 +- ruoyi-ui/vue.config.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/element-variables.scss b/ruoyi-ui/src/assets/styles/element-variables.scss index bc7697eff..039d1e480 100644 --- a/ruoyi-ui/src/assets/styles/element-variables.scss +++ b/ruoyi-ui/src/assets/styles/element-variables.scss @@ -6,7 +6,7 @@ /* theme color */ $--color-primary: #1890ff; $--color-success: #13ce66; -$--color-warning: #FFBA00; +$--color-warning: #ffba00; $--color-danger: #ff4949; // $--color-info: #1E1E1E; diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 5dce8d694..963a82383 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -82,12 +82,6 @@ module.exports = { }) .end() - config - // https://webpack.js.org/configuration/devtool/#development - .when(process.env.NODE_ENV === 'development', - config => config.devtool('cheap-source-map') - ) - config .when(process.env.NODE_ENV !== 'development', config => { From d48475c585a1c082e24728f58c18d44d8df68b81 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 31 May 2020 09:56:11 +0800 Subject: [PATCH 07/45] =?UTF-8?q?dev=E5=90=AF=E5=8A=A8=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=B5=8F=E8=A7=88=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 2 +- ruoyi-ui/src/components/SvgIcon/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 62c2bddb1..c57375454 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -5,7 +5,7 @@ "author": "若依", "license": "MIT", "scripts": { - "dev": "vue-cli-service serve", + "dev": "vue-cli-service serve --open", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", diff --git a/ruoyi-ui/src/components/SvgIcon/index.vue b/ruoyi-ui/src/components/SvgIcon/index.vue index 6cd3ab928..340ace45c 100644 --- a/ruoyi-ui/src/components/SvgIcon/index.vue +++ b/ruoyi-ui/src/components/SvgIcon/index.vue @@ -1,7 +1,7 @@ From 5ce4291ef1e1436b8fcde190494e4eede52ca758 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 1 Jun 2020 09:18:18 +0800 Subject: [PATCH 08/45] =?UTF-8?q?=E8=8B=A5=E4=BE=9D=202.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + ruoyi-ui/package.json | 2 +- ruoyi-ui/src/router/index.js | 18 +++++++++--------- ruoyi-ui/src/store/modules/permission.js | 2 +- ruoyi-ui/src/views/monitor/job/index.vue | 4 ---- ruoyi-ui/src/views/system/config/index.vue | 6 ------ ruoyi-ui/src/views/system/dept/index.vue | 4 ---- ruoyi-ui/src/views/system/dict/data.vue | 4 ---- ruoyi-ui/src/views/system/dict/index.vue | 6 ------ ruoyi-ui/src/views/system/menu/index.vue | 4 ---- ruoyi-ui/src/views/system/notice/index.vue | 4 ---- ruoyi-ui/src/views/system/post/index.vue | 4 ---- ruoyi-ui/src/views/system/role/index.vue | 6 ------ ruoyi-ui/src/views/system/user/index.vue | 6 ------ .../src/views/system/user/profile/resetPwd.vue | 2 -- .../views/system/user/profile/userAvatar.vue | 2 -- .../src/views/system/user/profile/userInfo.vue | 2 -- ruoyi/pom.xml | 2 +- ruoyi/src/main/resources/application.yml | 2 +- ruoyi/src/main/resources/vm/sql/sql.vm | 10 +++++----- .../main/resources/vm/vue/index-tree.vue.vm | 4 ---- ruoyi/src/main/resources/vm/vue/index.vue.vm | 4 ---- 22 files changed, 19 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index 6365feea9..b9eef10ad 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ * 权限认证使用Jwt,支持多终端认证系统。 * 支持加载动态权限菜单,多方式轻松权限控制。 * 高效率开发,使用代码生成器可以一键生成前后端代码。 +* 提供了一个Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。 * 感谢[Vue-Element-Admin](https://github.com/PanJiaChen/vue-element-admin),[eladmin-web](https://gitee.com/elunez/eladmin-web?_from=gitee_search)。 * 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud) * 阿里云优惠券:[点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)   diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index c57375454..b41c859eb 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "2.2.0", + "version": "2.3.0", "description": "若依管理系统", "author": "若依", "license": "MIT", diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index acebbd0ea..ec7bc7c0f 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -33,23 +33,23 @@ export const constantRoutes = [ children: [ { path: '/redirect/:path(.*)', - component: (resolve) => require(['@/views/redirect'], resolve) + component: () => import('@/views/redirect') } ] }, { path: '/login', - component: (resolve) => require(['@/views/login'], resolve), + component: () => import('@/views/login'), hidden: true }, { path: '/404', - component: (resolve) => require(['@/views/error/404'], resolve), + component: () => import('@/views/error/404'), hidden: true }, { path: '/401', - component: (resolve) => require(['@/views/error/401'], resolve), + component: () => import('@/views/error/401'), hidden: true }, { @@ -59,7 +59,7 @@ export const constantRoutes = [ children: [ { path: 'index', - component: (resolve) => require(['@/views/index'], resolve), + component: () => import('@/views/index'), name: '首页', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } } @@ -73,7 +73,7 @@ export const constantRoutes = [ children: [ { path: 'profile', - component: (resolve) => require(['@/views/system/user/profile/index'], resolve), + component: () => import('@/views/system/user/profile/index'), name: 'Profile', meta: { title: '个人中心', icon: 'user' } } @@ -86,7 +86,7 @@ export const constantRoutes = [ children: [ { path: 'type/data/:dictId(\\d+)', - component: (resolve) => require(['@/views/system/dict/data'], resolve), + component: () => import('@/views/system/dict/data'), name: 'Data', meta: { title: '字典数据', icon: '' } } @@ -99,7 +99,7 @@ export const constantRoutes = [ children: [ { path: 'log', - component: (resolve) => require(['@/views/monitor/job/log'], resolve), + component: () => import('@/views/monitor/job/log'), name: 'JobLog', meta: { title: '调度日志' } } @@ -112,7 +112,7 @@ export const constantRoutes = [ children: [ { path: 'edit', - component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), + component: () => import('@/views/tool/gen/editTable'), name: 'GenEdit', meta: { title: '修改生成配置' } } diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js index deed45193..eb311642a 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/ruoyi-ui/src/store/modules/permission.js @@ -48,7 +48,7 @@ function filterAsyncRouter(asyncRouterMap) { } export const loadView = (view) => { // 路由懒加载 - return (resolve) => require([`@/views/${view}`], resolve) + return () => import(`@/views/${view}`) } export default permission diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 499ab2600..6f6227107 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -438,8 +438,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -448,8 +446,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index 6f87aeacb..83b77b93e 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -305,8 +305,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -315,8 +313,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } @@ -355,8 +351,6 @@ export default { clearCache().then(response => { if (response.code === 200) { this.msgSuccess("清理成功"); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue index ac6d66319..4d4d97882 100644 --- a/ruoyi-ui/src/views/system/dept/index.vue +++ b/ruoyi-ui/src/views/system/dept/index.vue @@ -281,8 +281,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -291,8 +289,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue index 49c4058d7..f5eb63eab 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/ruoyi-ui/src/views/system/dict/data.vue @@ -305,8 +305,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -315,8 +313,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index 295400816..779c173a1 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/ruoyi-ui/src/views/system/dict/index.vue @@ -309,8 +309,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -319,8 +317,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } @@ -359,8 +355,6 @@ export default { clearCache().then(response => { if (response.code === 200) { this.msgSuccess("清理成功"); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index 74b43786c..1e36780b5 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -340,8 +340,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -350,8 +348,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue index 50dcd3ebd..828dd3e4c 100644 --- a/ruoyi-ui/src/views/system/notice/index.vue +++ b/ruoyi-ui/src/views/system/notice/index.vue @@ -308,8 +308,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -318,8 +316,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue index 42a66b434..046ef220d 100644 --- a/ruoyi-ui/src/views/system/post/index.vue +++ b/ruoyi-ui/src/views/system/post/index.vue @@ -277,8 +277,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -287,8 +285,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 42e3d828a..658efc617 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -482,8 +482,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -493,8 +491,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } @@ -510,8 +506,6 @@ export default { this.msgSuccess("修改成功"); this.openDataScope = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 582e7464e..94cd37170 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -572,8 +572,6 @@ export default { resetUserPwd(row.userId, value).then(response => { if (response.code === 200) { this.msgSuccess("修改成功,新密码是:" + value); - } else { - this.msgError(response.msg); } }); }).catch(() => {}); @@ -588,8 +586,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -598,8 +594,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue index 380e16865..e39948e34 100644 --- a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue +++ b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue @@ -59,8 +59,6 @@ export default { response => { if (response.code === 200) { this.msgSuccess("修改成功"); - } else { - this.msgError(response.msg); } } ); diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue index 5446ab5d9..8ffe25e31 100644 --- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue +++ b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue @@ -122,8 +122,6 @@ export default { this.open = false; this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl; this.msgSuccess("修改成功"); - } else { - this.msgError(response.msg); } this.$refs.cropper.clearCrop(); }); diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/ruoyi-ui/src/views/system/user/profile/userInfo.vue index 2e8ef99d9..0b1780d9b 100644 --- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue +++ b/ruoyi-ui/src/views/system/user/profile/userInfo.vue @@ -64,8 +64,6 @@ export default { updateUserProfile(this.user).then(response => { if (response.code === 200) { this.msgSuccess("修改成功"); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi/pom.xml b/ruoyi/pom.xml index 2afc4193f..d77acf3ea 100644 --- a/ruoyi/pom.xml +++ b/ruoyi/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi - 2.2.0 + 2.3.0 jar ruoyi diff --git a/ruoyi/src/main/resources/application.yml b/ruoyi/src/main/resources/application.yml index 89ea4a60a..4e17bf193 100644 --- a/ruoyi/src/main/resources/application.yml +++ b/ruoyi/src/main/resources/application.yml @@ -3,7 +3,7 @@ ruoyi: # 名称 name: RuoYi # 版本 - version: 2.2.0 + version: 2.3.0 # 版权年份 copyrightYear: 2019 # 实例演示开关 diff --git a/ruoyi/src/main/resources/vm/sql/sql.vm b/ruoyi/src/main/resources/vm/sql/sql.vm index c553476f4..ab17d1bee 100644 --- a/ruoyi/src/main/resources/vm/sql/sql.vm +++ b/ruoyi/src/main/resources/vm/sql/sql.vm @@ -6,17 +6,17 @@ values('${functionName}', '3', '1', '${businessName}', '${moduleName}/${business SELECT @parentId := LAST_INSERT_ID(); -- 按钮 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}查询', @parentId, '1', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}新增', @parentId, '2', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}修改', @parentId, '3', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}删除', @parentId, '4', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}导出', @parentId, '5', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); \ No newline at end of file diff --git a/ruoyi/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi/src/main/resources/vm/vue/index-tree.vue.vm index 1a74fca67..ffea73650 100644 --- a/ruoyi/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi/src/main/resources/vm/vue/index-tree.vue.vm @@ -375,8 +375,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -385,8 +383,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi/src/main/resources/vm/vue/index.vue.vm b/ruoyi/src/main/resources/vm/vue/index.vue.vm index 7c19a3aab..db471f444 100644 --- a/ruoyi/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi/src/main/resources/vm/vue/index.vue.vm @@ -392,8 +392,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -402,8 +400,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } From 31b63bf14d66531e7c8ca14e712a9b9f947b1eb2 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 1 Jun 2020 10:09:39 +0800 Subject: [PATCH 09/45] =?UTF-8?q?=E5=8D=87=E7=BA=A7fastjson=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=881.2.70=20=E4=BF=AE=E5=A4=8D=E9=AB=98?= =?UTF-8?q?=E5=8D=B1=E5=AE=89=E5=85=A8=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi/pom.xml b/ruoyi/pom.xml index d77acf3ea..bd9af4845 100644 --- a/ruoyi/pom.xml +++ b/ruoyi/pom.xml @@ -25,7 +25,7 @@ 1.8 1.3.2 1.2.5 - 1.2.68 + 1.2.70 1.1.14 2.5 1.3.3 From 0d7f5e037e2d61450751f28200c122fb592cd584 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 1 Jun 2020 10:36:19 +0800 Subject: [PATCH 10/45] =?UTF-8?q?=E8=8B=A5=E4=BE=9D=202.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/router/index.js | 18 +++++++++--------- ruoyi-ui/src/store/modules/permission.js | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index ec7bc7c0f..acebbd0ea 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -33,23 +33,23 @@ export const constantRoutes = [ children: [ { path: '/redirect/:path(.*)', - component: () => import('@/views/redirect') + component: (resolve) => require(['@/views/redirect'], resolve) } ] }, { path: '/login', - component: () => import('@/views/login'), + component: (resolve) => require(['@/views/login'], resolve), hidden: true }, { path: '/404', - component: () => import('@/views/error/404'), + component: (resolve) => require(['@/views/error/404'], resolve), hidden: true }, { path: '/401', - component: () => import('@/views/error/401'), + component: (resolve) => require(['@/views/error/401'], resolve), hidden: true }, { @@ -59,7 +59,7 @@ export const constantRoutes = [ children: [ { path: 'index', - component: () => import('@/views/index'), + component: (resolve) => require(['@/views/index'], resolve), name: '首页', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } } @@ -73,7 +73,7 @@ export const constantRoutes = [ children: [ { path: 'profile', - component: () => import('@/views/system/user/profile/index'), + component: (resolve) => require(['@/views/system/user/profile/index'], resolve), name: 'Profile', meta: { title: '个人中心', icon: 'user' } } @@ -86,7 +86,7 @@ export const constantRoutes = [ children: [ { path: 'type/data/:dictId(\\d+)', - component: () => import('@/views/system/dict/data'), + component: (resolve) => require(['@/views/system/dict/data'], resolve), name: 'Data', meta: { title: '字典数据', icon: '' } } @@ -99,7 +99,7 @@ export const constantRoutes = [ children: [ { path: 'log', - component: () => import('@/views/monitor/job/log'), + component: (resolve) => require(['@/views/monitor/job/log'], resolve), name: 'JobLog', meta: { title: '调度日志' } } @@ -112,7 +112,7 @@ export const constantRoutes = [ children: [ { path: 'edit', - component: () => import('@/views/tool/gen/editTable'), + component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), name: 'GenEdit', meta: { title: '修改生成配置' } } diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js index eb311642a..deed45193 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/ruoyi-ui/src/store/modules/permission.js @@ -48,7 +48,7 @@ function filterAsyncRouter(asyncRouterMap) { } export const loadView = (view) => { // 路由懒加载 - return () => import(`@/views/${view}`) + return (resolve) => require([`@/views/${view}`], resolve) } export default permission From 4cf3786f48f0f42adc7ecf9352ddfc7df038f5bc Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 1 Jun 2020 10:46:30 +0800 Subject: [PATCH 11/45] =?UTF-8?q?=E5=8D=87=E7=BA=A7fastjson=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=881.2.70=20=E4=BF=AE=E5=A4=8D=E9=AB=98?= =?UTF-8?q?=E5=8D=B1=E5=AE=89=E5=85=A8=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi/pom.xml b/ruoyi/pom.xml index 2afc4193f..4179590cc 100644 --- a/ruoyi/pom.xml +++ b/ruoyi/pom.xml @@ -25,7 +25,7 @@ 1.8 1.3.2 1.2.5 - 1.2.68 + 1.2.70 1.1.14 2.5 1.3.3 From b4b3ff881318bd8d95e1d13539e80077a8723acd Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 1 Jun 2020 10:49:36 +0800 Subject: [PATCH 12/45] =?UTF-8?q?=E8=8B=A5=E4=BE=9D=202.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + ruoyi-ui/package.json | 2 +- ruoyi-ui/src/views/monitor/job/index.vue | 4 ---- ruoyi-ui/src/views/system/config/index.vue | 6 ------ ruoyi-ui/src/views/system/dept/index.vue | 4 ---- ruoyi-ui/src/views/system/dict/data.vue | 4 ---- ruoyi-ui/src/views/system/dict/index.vue | 6 ------ ruoyi-ui/src/views/system/menu/index.vue | 4 ---- ruoyi-ui/src/views/system/notice/index.vue | 4 ---- ruoyi-ui/src/views/system/post/index.vue | 4 ---- ruoyi-ui/src/views/system/role/index.vue | 6 ------ ruoyi-ui/src/views/system/user/index.vue | 6 ------ ruoyi-ui/src/views/system/user/profile/resetPwd.vue | 2 -- ruoyi-ui/src/views/system/user/profile/userAvatar.vue | 2 -- ruoyi-ui/src/views/system/user/profile/userInfo.vue | 2 -- ruoyi/pom.xml | 2 +- ruoyi/src/main/resources/application.yml | 2 +- ruoyi/src/main/resources/vm/sql/sql.vm | 10 +++++----- ruoyi/src/main/resources/vm/vue/index-tree.vue.vm | 4 ---- ruoyi/src/main/resources/vm/vue/index.vue.vm | 4 ---- 20 files changed, 9 insertions(+), 70 deletions(-) diff --git a/README.md b/README.md index 6365feea9..b9eef10ad 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ * 权限认证使用Jwt,支持多终端认证系统。 * 支持加载动态权限菜单,多方式轻松权限控制。 * 高效率开发,使用代码生成器可以一键生成前后端代码。 +* 提供了一个Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。 * 感谢[Vue-Element-Admin](https://github.com/PanJiaChen/vue-element-admin),[eladmin-web](https://gitee.com/elunez/eladmin-web?_from=gitee_search)。 * 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud) * 阿里云优惠券:[点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)   diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index c57375454..b41c859eb 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "2.2.0", + "version": "2.3.0", "description": "若依管理系统", "author": "若依", "license": "MIT", diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 499ab2600..6f6227107 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -438,8 +438,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -448,8 +446,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index 6f87aeacb..83b77b93e 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -305,8 +305,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -315,8 +313,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } @@ -355,8 +351,6 @@ export default { clearCache().then(response => { if (response.code === 200) { this.msgSuccess("清理成功"); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue index ac6d66319..4d4d97882 100644 --- a/ruoyi-ui/src/views/system/dept/index.vue +++ b/ruoyi-ui/src/views/system/dept/index.vue @@ -281,8 +281,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -291,8 +289,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue index 49c4058d7..f5eb63eab 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/ruoyi-ui/src/views/system/dict/data.vue @@ -305,8 +305,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -315,8 +313,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index 295400816..779c173a1 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/ruoyi-ui/src/views/system/dict/index.vue @@ -309,8 +309,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -319,8 +317,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } @@ -359,8 +355,6 @@ export default { clearCache().then(response => { if (response.code === 200) { this.msgSuccess("清理成功"); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index 74b43786c..1e36780b5 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -340,8 +340,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -350,8 +348,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue index 50dcd3ebd..828dd3e4c 100644 --- a/ruoyi-ui/src/views/system/notice/index.vue +++ b/ruoyi-ui/src/views/system/notice/index.vue @@ -308,8 +308,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -318,8 +316,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue index 42a66b434..046ef220d 100644 --- a/ruoyi-ui/src/views/system/post/index.vue +++ b/ruoyi-ui/src/views/system/post/index.vue @@ -277,8 +277,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -287,8 +285,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 42e3d828a..658efc617 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -482,8 +482,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -493,8 +491,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } @@ -510,8 +506,6 @@ export default { this.msgSuccess("修改成功"); this.openDataScope = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 582e7464e..94cd37170 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -572,8 +572,6 @@ export default { resetUserPwd(row.userId, value).then(response => { if (response.code === 200) { this.msgSuccess("修改成功,新密码是:" + value); - } else { - this.msgError(response.msg); } }); }).catch(() => {}); @@ -588,8 +586,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -598,8 +594,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue index 380e16865..e39948e34 100644 --- a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue +++ b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue @@ -59,8 +59,6 @@ export default { response => { if (response.code === 200) { this.msgSuccess("修改成功"); - } else { - this.msgError(response.msg); } } ); diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue index 5446ab5d9..8ffe25e31 100644 --- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue +++ b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue @@ -122,8 +122,6 @@ export default { this.open = false; this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl; this.msgSuccess("修改成功"); - } else { - this.msgError(response.msg); } this.$refs.cropper.clearCrop(); }); diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/ruoyi-ui/src/views/system/user/profile/userInfo.vue index 2e8ef99d9..0b1780d9b 100644 --- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue +++ b/ruoyi-ui/src/views/system/user/profile/userInfo.vue @@ -64,8 +64,6 @@ export default { updateUserProfile(this.user).then(response => { if (response.code === 200) { this.msgSuccess("修改成功"); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi/pom.xml b/ruoyi/pom.xml index 4179590cc..bd9af4845 100644 --- a/ruoyi/pom.xml +++ b/ruoyi/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi - 2.2.0 + 2.3.0 jar ruoyi diff --git a/ruoyi/src/main/resources/application.yml b/ruoyi/src/main/resources/application.yml index 89ea4a60a..4e17bf193 100644 --- a/ruoyi/src/main/resources/application.yml +++ b/ruoyi/src/main/resources/application.yml @@ -3,7 +3,7 @@ ruoyi: # 名称 name: RuoYi # 版本 - version: 2.2.0 + version: 2.3.0 # 版权年份 copyrightYear: 2019 # 实例演示开关 diff --git a/ruoyi/src/main/resources/vm/sql/sql.vm b/ruoyi/src/main/resources/vm/sql/sql.vm index c553476f4..ab17d1bee 100644 --- a/ruoyi/src/main/resources/vm/sql/sql.vm +++ b/ruoyi/src/main/resources/vm/sql/sql.vm @@ -6,17 +6,17 @@ values('${functionName}', '3', '1', '${businessName}', '${moduleName}/${business SELECT @parentId := LAST_INSERT_ID(); -- 按钮 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}查询', @parentId, '1', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}新增', @parentId, '2', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}修改', @parentId, '3', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}删除', @parentId, '4', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}导出', @parentId, '5', '#', '', 1, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); \ No newline at end of file diff --git a/ruoyi/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi/src/main/resources/vm/vue/index-tree.vue.vm index 1a74fca67..ffea73650 100644 --- a/ruoyi/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi/src/main/resources/vm/vue/index-tree.vue.vm @@ -375,8 +375,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -385,8 +383,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } diff --git a/ruoyi/src/main/resources/vm/vue/index.vue.vm b/ruoyi/src/main/resources/vm/vue/index.vue.vm index 7c19a3aab..db471f444 100644 --- a/ruoyi/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi/src/main/resources/vm/vue/index.vue.vm @@ -392,8 +392,6 @@ export default { this.msgSuccess("修改成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } else { @@ -402,8 +400,6 @@ export default { this.msgSuccess("新增成功"); this.open = false; this.getList(); - } else { - this.msgError(response.msg); } }); } From ec407bbe25ce8e387fa7adc98afd62171340f0dd Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 3 Jun 2020 13:00:30 +0800 Subject: [PATCH 13/45] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=B1=9E=E6=80=A7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/framework/aspectj/DataScopeAspect.java | 7 ++++++- .../com/ruoyi/framework/web/domain/BaseEntity.java | 13 ------------- .../main/resources/mybatis/system/SysDeptMapper.xml | 2 +- .../main/resources/mybatis/system/SysRoleMapper.xml | 2 +- .../main/resources/mybatis/system/SysUserMapper.xml | 2 +- 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/ruoyi/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/ruoyi/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java index 634f0ed69..e28e9680c 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java @@ -52,6 +52,11 @@ public class DataScopeAspect */ public static final String DATA_SCOPE_SELF = "5"; + /** + * 数据权限过滤关键字 + */ + public static final String DATA_SCOPE = "dataScope"; + // 配置织入点 @Pointcut("@annotation(com.ruoyi.framework.aspectj.lang.annotation.DataScope)") public void dataScopePointCut() @@ -138,7 +143,7 @@ public class DataScopeAspect if (StringUtils.isNotBlank(sqlString.toString())) { BaseEntity baseEntity = (BaseEntity) joinPoint.getArgs()[0]; - baseEntity.setDataScope(" AND (" + sqlString.substring(4) + ")"); + baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")"); } } diff --git a/ruoyi/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java b/ruoyi/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java index 6ed760cbf..08f4f9027 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java @@ -36,9 +36,6 @@ public class BaseEntity implements Serializable /** 备注 */ private String remark; - /** 数据权限 */ - private String dataScope; - /** 开始时间 */ @JsonIgnore private String beginTime; @@ -110,16 +107,6 @@ public class BaseEntity implements Serializable this.remark = remark; } - public String getDataScope() - { - return dataScope; - } - - public void setDataScope(String dataScope) - { - this.dataScope = dataScope; - } - public String getBeginTime() { return beginTime; diff --git a/ruoyi/src/main/resources/mybatis/system/SysDeptMapper.xml b/ruoyi/src/main/resources/mybatis/system/SysDeptMapper.xml index c546dee17..333804636 100644 --- a/ruoyi/src/main/resources/mybatis/system/SysDeptMapper.xml +++ b/ruoyi/src/main/resources/mybatis/system/SysDeptMapper.xml @@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND status = #{status} - ${dataScope} + ${params.dataScope} order by d.parent_id, d.order_num diff --git a/ruoyi/src/main/resources/mybatis/system/SysRoleMapper.xml b/ruoyi/src/main/resources/mybatis/system/SysRoleMapper.xml index a5e7be0b7..82524b823 100644 --- a/ruoyi/src/main/resources/mybatis/system/SysRoleMapper.xml +++ b/ruoyi/src/main/resources/mybatis/system/SysRoleMapper.xml @@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and date_format(r.create_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d') - ${dataScope} + ${params.dataScope} order by r.role_sort diff --git a/ruoyi/src/main/resources/mybatis/system/SysUserMapper.xml b/ruoyi/src/main/resources/mybatis/system/SysUserMapper.xml index 2e6969cb7..99c0d50e0 100644 --- a/ruoyi/src/main/resources/mybatis/system/SysUserMapper.xml +++ b/ruoyi/src/main/resources/mybatis/system/SysUserMapper.xml @@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) )) - ${dataScope} + ${params.dataScope}