From 267ff79b0caf6e7df26e68e50aa22a4f0ea51775 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: Mon, 27 Nov 2023 13:23:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=B4=E5=8F=91=E5=B8=83=204.8.2=20?= =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E8=BF=9B=E5=85=A5=E7=BB=B4=E6=8A=A4=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .run/ruoyi-monitor-admin.run.xml | 2 +- .run/ruoyi-server.run.xml | 2 +- .run/ruoyi-xxl-job-admin.run.xml | 2 +- README.md | 10 +- pom.xml | 28 +- ruoyi-extend/pom.xml | 2 +- ruoyi-extend/ruoyi-monitor-admin/pom.xml | 2 +- ruoyi-extend/ruoyi-xxl-job-admin/pom.xml | 2 +- ruoyi-ui-vue3/package.json | 4 +- ruoyi-ui-vue3/src/components/Editor/index.vue | 23 +- .../src/components/HeaderSearch/index.vue | 17 +- .../layout/components/IframeToggle/index.vue | 16 +- ruoyi-ui-vue3/src/store/modules/permission.js | 4 + ruoyi-ui-vue3/src/store/modules/user.js | 4 +- ruoyi-ui-vue3/src/views/demo/demo/index.vue | 2 +- ruoyi-ui-vue3/src/views/demo/tree/index.vue | 2 +- ruoyi-ui-vue3/src/views/index.vue | 2 +- .../src/views/monitor/operlog/index.vue | 30 +- ruoyi-ui-vue3/src/views/system/menu/index.vue | 2 +- ruoyi-ui-vue3/src/views/system/role/index.vue | 2 +- ruoyi-ui-vue3/src/views/system/user/index.vue | 3 + ruoyi-ui/package.json | 2 +- ruoyi-ui/src/components/Editor/index.vue | 14 +- .../src/components/HeaderSearch/index.vue | 15 +- .../layout/components/IframeToggle/index.vue | 15 +- ruoyi-ui/src/store/modules/permission.js | 4 + ruoyi-ui/src/store/modules/user.js | 5 + ruoyi-ui/src/views/index.vue | 2 +- ruoyi-ui/src/views/monitor/cache/index.vue | 296 +++++++++--------- ruoyi-ui/src/views/monitor/operlog/index.vue | 22 +- ruoyi-ui/src/views/system/menu/index.vue | 2 +- ruoyi-ui/src/views/system/role/index.vue | 2 +- ruoyi/pom.xml | 8 +- .../com/ruoyi/common/enums/DataScopeType.java | 6 +- .../ruoyi/common/utils/ip/AddressUtils.java | 2 +- .../ruoyi/common/utils/redis/QueueUtils.java | 6 +- .../queue/DelayedQueueController.java | 2 +- .../PlusDataPermissionInterceptor.java | 25 +- .../PlusWebInvokeTimeInterceptor.java | 8 +- .../ruoyi/framework/aspectj/LogAspect.java | 5 +- .../ruoyi/framework/config/SaTokenConfig.java | 4 +- .../handler/PlusDataPermissionHandler.java | 19 +- .../generator/controller/GenController.java | 2 +- .../com/ruoyi/oss/factory/OssFactory.java | 2 +- .../service/impl/SysDataScopeServiceImpl.java | 7 +- .../service/impl/SysMenuServiceImpl.java | 4 +- .../service/impl/SysOperLogServiceImpl.java | 2 + .../service/impl/SysOssServiceImpl.java | 15 +- .../service/impl/SysRoleServiceImpl.java | 9 +- .../mapper/generator/GenTableColumnMapper.xml | 4 +- .../main/resources/vm/vue/index-tree.vue.vm | 4 +- .../resources/vm/vue/v3/index-tree.vue.vm | 4 +- script/docker/docker-compose.yml | 8 +- 53 files changed, 398 insertions(+), 288 deletions(-) diff --git a/.run/ruoyi-monitor-admin.run.xml b/.run/ruoyi-monitor-admin.run.xml index fc7e8a34f..acfd5f564 100644 --- a/.run/ruoyi-monitor-admin.run.xml +++ b/.run/ruoyi-monitor-admin.run.xml @@ -2,7 +2,7 @@ - diff --git a/.run/ruoyi-server.run.xml b/.run/ruoyi-server.run.xml index 394b23a7e..01e848e28 100644 --- a/.run/ruoyi-server.run.xml +++ b/.run/ruoyi-server.run.xml @@ -2,7 +2,7 @@ - diff --git a/.run/ruoyi-xxl-job-admin.run.xml b/.run/ruoyi-xxl-job-admin.run.xml index 2aeab19ed..091e1249e 100644 --- a/.run/ruoyi-xxl-job-admin.run.xml +++ b/.run/ruoyi-xxl-job-admin.run.xml @@ -2,7 +2,7 @@ - diff --git a/README.md b/README.md index 2d8cb9677..c4aac506b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,14 @@ - - - +## 版本状态说明 + +由于 springboot 2.X 与 vue 2.X 官方均宣布停止维护, 故而 框架 4.X 版本 进入维护状态(只处理问题不更新功能) + +停止维护时间预计: 2024年6-10月具体根据使用人数动态决定, 此版本已经相当稳定 即便不更新功能也不影响使用 + +如果依旧选择使用 jdk8 或者 jdk11 可以放心使用此版本, 如果希望使用 jdk17 或者 jdk21 可以选择使用 5.X 分支 + ## 平台简介 [![码云Gitee](https://gitee.com/dromara/RuoYi-Vue-Plus/badge/star.svg?theme=blue)](https://gitee.com/dromara/RuoYi-Vue-Plus) @@ -10,7 +18,7 @@ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://gitee.com/dromara/RuoYi-Vue-Plus/blob/master/LICENSE) [![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/?from=RuoYi-Vue-Plus)
-[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-4.8.1-success.svg)](https://gitee.com/dromara/RuoYi-Vue-Plus) +[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-4.8.2-success.svg)](https://gitee.com/dromara/RuoYi-Vue-Plus) [![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.7-blue.svg)]() [![JDK-8+](https://img.shields.io/badge/JDK-8-green.svg)]() [![JDK-11](https://img.shields.io/badge/JDK-11-green.svg)]() diff --git a/pom.xml b/pom.xml index 26e270bae..85863e4b7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,15 +6,15 @@ com.ruoyi ruoyi-vue-plus - 4.8.1 + 4.8.2 RuoYi-Vue-Plus https://gitee.com/dromara/RuoYi-Vue-Plus RuoYi-Vue-Plus后台管理系统 - 4.8.1 - 2.7.16 + 4.8.2 + 2.7.18 UTF-8 UTF-8 1.8 @@ -24,10 +24,10 @@ 5.2.3 3.3.2 2.3 - 1.36.0 - 3.5.3.2 + 1.37.0 + 3.5.4 3.9.1 - 5.8.20 + 5.8.22 4.10.0 2.7.11 3.20.1 @@ -40,11 +40,8 @@ 2.7.0 - - 1.33 - - 1.12.400 + 1.12.540 2.2.0 @@ -55,7 +52,7 @@ local - debug + info @@ -63,7 +60,7 @@ dev - debug + info @@ -261,13 +258,6 @@ ${ip2region.version} - - - org.yaml - snakeyaml - ${snakeyaml.version} - - org.bouncycastle diff --git a/ruoyi-extend/pom.xml b/ruoyi-extend/pom.xml index 6f35db8af..97347769d 100644 --- a/ruoyi-extend/pom.xml +++ b/ruoyi-extend/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.8.1 + 4.8.2 4.0.0 ruoyi-extend diff --git a/ruoyi-extend/ruoyi-monitor-admin/pom.xml b/ruoyi-extend/ruoyi-monitor-admin/pom.xml index b06929f55..8c771f55e 100644 --- a/ruoyi-extend/ruoyi-monitor-admin/pom.xml +++ b/ruoyi-extend/ruoyi-monitor-admin/pom.xml @@ -5,7 +5,7 @@ ruoyi-extend com.ruoyi - 4.8.1 + 4.8.2 4.0.0 jar diff --git a/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml b/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml index 85b050b71..357af1984 100644 --- a/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml +++ b/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml @@ -4,7 +4,7 @@ ruoyi-extend com.ruoyi - 4.8.1 + 4.8.2 ruoyi-xxl-job-admin jar diff --git a/ruoyi-ui-vue3/package.json b/ruoyi-ui-vue3/package.json index bd03f605b..5f7082d24 100644 --- a/ruoyi-ui-vue3/package.json +++ b/ruoyi-ui-vue3/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi-vue-plus", - "version": "4.8.1", + "version": "4.8.2", "description": "RuoYi-Vue-Plus后台管理系统", "author": "LionLi", "license": "MIT", @@ -15,7 +15,7 @@ }, "dependencies": { "@element-plus/icons-vue": "2.0.10", - "@vueup/vue-quill": "1.1.0", + "@vueup/vue-quill": "1.2.0", "@vueuse/core": "9.5.0", "axios": "0.27.2", "echarts": "5.4.0", diff --git a/ruoyi-ui-vue3/src/components/Editor/index.vue b/ruoyi-ui-vue3/src/components/Editor/index.vue index c27635c3e..4b198335f 100644 --- a/ruoyi-ui-vue3/src/components/Editor/index.vue +++ b/ruoyi-ui-vue3/src/components/Editor/index.vue @@ -9,14 +9,13 @@ name="file" :show-file-list="false" :headers="headers" - style="display: none" ref="uploadRef" v-if="type == 'url'" >
{ style.height = `${props.height}px`; } return style; -}) +}); const content = ref(""); watch(() => props.modelValue, (v) => { @@ -125,10 +124,10 @@ watch(() => props.modelValue, (v) => { // 图片上传成功返回图片地址 function handleUploadSuccess(res, file) { - // 获取富文本实例 - let quill = toRaw(myQuillEditor.value).getQuill(); // 如果上传成功 if (res.code == 200) { + // 获取富文本实例 + let quill = toRaw(quillEditorRef.value).getQuill(); // 获取光标位置 let length = quill.selection.savedRange.index; // 插入图片,res为服务器返回的图片链接地址 @@ -144,6 +143,13 @@ function handleUploadSuccess(res, file) { // 图片上传前拦截 function handleBeforeUpload(file) { + const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"]; + const isJPG = type.includes(file.type); + //检验文件格式 + if (!isJPG) { + proxy.$modal.msgError(`图片格式错误!`); + return false; + } // 校检文件大小 if (props.fileSize) { const isLt = file.size / 1024 / 1024 < props.fileSize; @@ -164,6 +170,9 @@ function handleUploadError(err) { \ No newline at end of file + diff --git a/ruoyi-ui-vue3/src/layout/components/IframeToggle/index.vue b/ruoyi-ui-vue3/src/layout/components/IframeToggle/index.vue index 2e07fe883..2b8269be3 100644 --- a/ruoyi-ui-vue3/src/layout/components/IframeToggle/index.vue +++ b/ruoyi-ui-vue3/src/layout/components/IframeToggle/index.vue @@ -5,15 +5,23 @@ :key="item.path" :iframeId="'iframe' + index" v-show="route.path === item.path" - :src="item.meta.link" + :src="iframeUrl(item.meta.link, item.query)" > diff --git a/ruoyi-ui-vue3/src/store/modules/permission.js b/ruoyi-ui-vue3/src/store/modules/permission.js index ef506e9b4..958fe6368 100644 --- a/ruoyi-ui-vue3/src/store/modules/permission.js +++ b/ruoyi-ui-vue3/src/store/modules/permission.js @@ -101,6 +101,10 @@ function filterChildren(childrenMap, lastRouter = false) { } if (lastRouter) { el.path = lastRouter.path + '/' + el.path + if (el.children && el.children.length) { + children = children.concat(filterChildren(el.children, el)) + return + } } children = children.concat(el) }) diff --git a/ruoyi-ui-vue3/src/store/modules/user.js b/ruoyi-ui-vue3/src/store/modules/user.js index 90fe853c1..2452d5792 100644 --- a/ruoyi-ui-vue3/src/store/modules/user.js +++ b/ruoyi-ui-vue3/src/store/modules/user.js @@ -7,6 +7,7 @@ const useUserStore = defineStore( { state: () => ({ token: getToken(), + id: '', name: '', avatar: '', roles: [], @@ -42,8 +43,9 @@ const useUserStore = defineStore( } else { this.roles = ['ROLE_DEFAULT'] } + this.id = user.userId this.name = user.userName - this.avatar = avatar; + this.avatar = avatar resolve(res) }).catch(error => { reject(error) diff --git a/ruoyi-ui-vue3/src/views/demo/demo/index.vue b/ruoyi-ui-vue3/src/views/demo/demo/index.vue index fa81f82f1..fe1d8dffd 100644 --- a/ruoyi-ui-vue3/src/views/demo/demo/index.vue +++ b/ruoyi-ui-vue3/src/views/demo/demo/index.vue @@ -336,7 +336,7 @@ function submitForm() { proxy.$refs["demoRef"].validate(valid => { if (valid) { buttonLoading.value = true; - if (form.value.ossConfigId != null) { + if (form.value.id != null) { updateDemo(form.value).then(response => { proxy.$modal.msgSuccess("修改成功"); open.value = false; diff --git a/ruoyi-ui-vue3/src/views/demo/tree/index.vue b/ruoyi-ui-vue3/src/views/demo/tree/index.vue index 4fa8ffd75..f7cb82c06 100644 --- a/ruoyi-ui-vue3/src/views/demo/tree/index.vue +++ b/ruoyi-ui-vue3/src/views/demo/tree/index.vue @@ -243,7 +243,7 @@ function submitForm() { proxy.$refs["treeRef"].validate(valid => { if (valid) { buttonLoading.value = true; - if (form.value.ossConfigId != null) { + if (form.value.id != null) { updateTree(form.value).then(response => { proxy.$modal.msgSuccess("修改成功"); open.value = false; diff --git a/ruoyi-ui-vue3/src/views/index.vue b/ruoyi-ui-vue3/src/views/index.vue index 3d93e631a..4569379dd 100644 --- a/ruoyi-ui-vue3/src/views/index.vue +++ b/ruoyi-ui-vue3/src/views/index.vue @@ -103,7 +103,7 @@ diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 29634aa47..820e6675b 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi-vue-plus", - "version": "4.8.1", + "version": "4.8.2", "description": "RuoYi-Vue-Plus后台管理系统", "author": "LionLi", "license": "MIT", diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue index 1f2e15ec2..d9ba27a33 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/ruoyi-ui/src/components/Editor/index.vue @@ -47,7 +47,7 @@ export default { type: Boolean, default: false, }, - // 上传文件大小限制(MB) + /* 上传文件大小限制(MB) */ fileSize: { type: Number, default: 5, @@ -129,7 +129,6 @@ export default { if (this.type == 'url') { let toolbar = this.Quill.getModule("toolbar"); toolbar.addHandler("image", (value) => { - this.uploadType = "image"; if (value) { this.$refs.upload.$children[0].$refs.input.click(); } else { @@ -158,6 +157,13 @@ export default { }, // 上传前校检格式和大小 handleBeforeUpload(file) { + const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"]; + const isJPG = type.includes(file.type); + // 检验文件格式 + if (!isJPG) { + this.$message.error(`图片格式错误!`); + return false; + } // 校检文件大小 if (this.fileSize) { const isLt = file.size / 1024 / 1024 < this.fileSize; @@ -169,10 +175,10 @@ export default { return true; }, handleUploadSuccess(res, file) { - // 获取富文本组件实例 - let quill = this.Quill; // 如果上传成功 if (res.code == 200) { + // 获取富文本组件实例 + let quill = this.Quill; // 获取光标所在位置 let length = quill.getSelection().index; // 插入图片 res.url为服务器返回的图片地址 diff --git a/ruoyi-ui/src/components/HeaderSearch/index.vue b/ruoyi-ui/src/components/HeaderSearch/index.vue index c4d76bbb9..888be5d9d 100644 --- a/ruoyi-ui/src/components/HeaderSearch/index.vue +++ b/ruoyi-ui/src/components/HeaderSearch/index.vue @@ -71,12 +71,17 @@ export default { }, change(val) { const path = val.path; + const query = val.query; if(this.ishttp(val.path)) { // http(s):// 路径新窗口打开 const pindex = path.indexOf("http"); window.open(path.substr(pindex, path.length), "_blank"); } else { - this.$router.push(val.path) + if (query) { + this.$router.push({ path: path, query: JSON.parse(query) }); + } else { + this.$router.push(path) + } } this.search = '' this.options = [] @@ -102,7 +107,7 @@ export default { }, // Filter out the routes that can be displayed in the sidebar // And generate the internationalized title - generateRoutes(routes, basePath = '/', prefixTitle = []) { + generateRoutes(routes, basePath = '/', prefixTitle = [], query = {}) { let res = [] for (const router of routes) { @@ -124,9 +129,13 @@ export default { } } + if (router.query) { + data.query = router.query + } + // recursive child routes if (router.children) { - const tempRoutes = this.generateRoutes(router.children, data.path, data.title) + const tempRoutes = this.generateRoutes(router.children, data.path, data.title, data.query) if (tempRoutes.length >= 1) { res = [...res, ...tempRoutes] } diff --git a/ruoyi-ui/src/layout/components/IframeToggle/index.vue b/ruoyi-ui/src/layout/components/IframeToggle/index.vue index 26e17c15a..39ad15bb5 100644 --- a/ruoyi-ui/src/layout/components/IframeToggle/index.vue +++ b/ruoyi-ui/src/layout/components/IframeToggle/index.vue @@ -5,19 +5,28 @@ :key="item.path" :iframeId="'iframe' + index" v-show="$route.path === item.path" - :src="item.meta.link" + :src="iframeUrl(item.meta.link, item.query)" > + + + diff --git a/ruoyi-ui/src/views/monitor/operlog/index.vue b/ruoyi-ui/src/views/monitor/operlog/index.vue index 8e672f91f..b5d3abd5d 100644 --- a/ruoyi-ui/src/views/monitor/operlog/index.vue +++ b/ruoyi-ui/src/views/monitor/operlog/index.vue @@ -1,6 +1,15 @@