From a5adee3c5f3daf8742520c36d6b2051dd0667b03 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 13 Nov 2025 11:35:04 +0800 Subject: [PATCH 01/25] =?UTF-8?q?=E4=BF=AE=E5=A4=8DcomboReadDict=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E4=B8=8B=E5=A4=9A=E4=B8=AAsheet=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E7=9A=84=E6=8A=A5=E9=94=99(ICWQ8E)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/common/utils/poi/ExcelUtil.java | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 5131908f6..84737994d 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -1238,18 +1238,36 @@ public class ExcelUtil public void setXSSFValidationWithHidden(Sheet sheet, String[] textlist, String promptContent, int firstRow, int endRow, int firstCol, int endCol) { String hideSheetName = "combo_" + firstCol + "_" + endCol; - Sheet hideSheet = wb.createSheet(hideSheetName); // 用于存储 下拉菜单数据 - for (int i = 0; i < textlist.length; i++) + Sheet hideSheet = null; + String hideSheetDataName = hideSheetName + "_data"; + Name name = wb.getName(hideSheetDataName); + if (name != null) { - hideSheet.createRow(i).createCell(0).setCellValue(textlist[i]); + // 名称已存在,尝试从名称的引用中找到sheet名称 + String refersToFormula = name.getRefersToFormula(); + if (StringUtils.isNotEmpty(refersToFormula) && refersToFormula.contains("!")) + { + String sheetNameFromFormula = refersToFormula.substring(0, refersToFormula.indexOf("!")); + hideSheet = wb.getSheet(sheetNameFromFormula); + } } - // 创建名称,可被其他单元格引用 - Name name = wb.createName(); - name.setNameName(hideSheetName + "_data"); - name.setRefersToFormula(hideSheetName + "!$A$1:$A$" + textlist.length); + + if (hideSheet == null) + { + hideSheet = wb.createSheet(hideSheetName); // 用于存储 下拉菜单数据 + for (int i = 0; i < textlist.length; i++) + { + hideSheet.createRow(i).createCell(0).setCellValue(textlist[i]); + } + // 创建名称,可被其他单元格引用 + name = wb.createName(); + name.setNameName(hideSheetDataName); + name.setRefersToFormula(hideSheetName + "!$A$1:$A$" + textlist.length); + } + DataValidationHelper helper = sheet.getDataValidationHelper(); // 加载下拉列表内容 - DataValidationConstraint constraint = helper.createFormulaListConstraint(hideSheetName + "_data"); + DataValidationConstraint constraint = helper.createFormulaListConstraint(hideSheetDataName); // 设置数据有效性加载在哪个单元格上,四个参数分别是:起始行、终止行、起始列、终止列 CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); // 数据有效性对象 @@ -1656,7 +1674,8 @@ public class ExcelUtil { this.sheet = wb.createSheet(); this.createTitle(); - wb.setSheetName(index, sheetName + index); + int actualIndex = wb.getSheetIndex(this.sheet); + wb.setSheetName(actualIndex, sheetName + index); } } From 0eaa090f4b34e2a7a0d23c6f409e57cb9c2a2a3a Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 2 Dec 2025 13:07:37 +0800 Subject: [PATCH 02/25] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E7=A7=BB=E9=99=A4=E6=89=80=E6=9C=89=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=90=8E=E5=88=87=E6=8D=A2=E8=B7=AF=E7=94=B1=E5=9B=9E?= =?UTF-8?q?=E6=9D=A5=E7=A9=BA=E7=99=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/utils/generator/drawingDefault.js | 64 +++++++++++-------- ruoyi-ui/src/views/tool/build/index.vue | 12 ++-- 2 files changed, 44 insertions(+), 32 deletions(-) diff --git a/ruoyi-ui/src/utils/generator/drawingDefault.js b/ruoyi-ui/src/utils/generator/drawingDefault.js index 09f133ca1..18017a29f 100644 --- a/ruoyi-ui/src/utils/generator/drawingDefault.js +++ b/ruoyi-ui/src/utils/generator/drawingDefault.js @@ -1,29 +1,37 @@ -export default [ - { - layout: 'colFormItem', - tagIcon: 'input', - label: '手机号', - vModel: 'mobile', - formId: 6, - tag: 'el-input', - placeholder: '请输入手机号', - defaultValue: '', - span: 24, - style: { width: '100%' }, - clearable: true, - prepend: '', - append: '', - 'prefix-icon': 'el-icon-mobile', - 'suffix-icon': '', - maxlength: 11, - 'show-word-limit': true, - readonly: false, - disabled: false, - required: true, - changeTag: true, - regList: [{ - pattern: '/^1(3|4|5|7|8|9)\\d{9}$/', - message: '手机号格式错误' - }] +export const drawingDefaultValue = [] + +export function initDrawingDefaultValue() { + if (drawingDefaultValue.length === 0) { + drawingDefaultValue.push({ + layout: 'colFormItem', + tagIcon: 'input', + label: '手机号', + vModel: 'mobile', + formId: 6, + tag: 'el-input', + placeholder: '请输入手机号', + defaultValue: '', + span: 24, + style: {width: '100%'}, + clearable: true, + prepend: '', + append: '', + 'prefix-icon': 'el-icon-mobile', + 'suffix-icon': '', + maxlength: 11, + 'show-word-limit': true, + readonly: false, + disabled: false, + required: true, + changeTag: true, + regList: [{ + pattern: '/^1(3|4|5|7|8|9)\\d{9}$/', + message: '手机号格式错误' + }] + }) } -] +} + +export function cleanDrawingDefaultValue() { + drawingDefaultValue.splice(0, drawingDefaultValue.length) +} diff --git a/ruoyi-ui/src/views/tool/build/index.vue b/ruoyi-ui/src/views/tool/build/index.vue index 5849b340a..fe2ebeab6 100644 --- a/ruoyi-ui/src/views/tool/build/index.vue +++ b/ruoyi-ui/src/views/tool/build/index.vue @@ -146,7 +146,7 @@ import { beautifierConf, titleCase } from '@/utils/index' import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/html' import { makeUpJs } from '@/utils/generator/js' import { makeUpCss } from '@/utils/generator/css' -import drawingDefault from '@/utils/generator/drawingDefault' +import { drawingDefaultValue, initDrawingDefaultValue, cleanDrawingDefaultValue } from '@/utils/generator/drawingDefault' import logo from '@/assets/logo/logo.png' import CodeTypeDialog from './CodeTypeDialog' import DraggableItem from './DraggableItem' @@ -171,17 +171,20 @@ export default { selectComponents, layoutComponents, labelWidth: 100, - drawingList: drawingDefault, + drawingList: drawingDefaultValue, drawingData: {}, - activeId: drawingDefault[0].formId, + activeId: drawingDefaultValue[0].formId, drawerVisible: false, formData: {}, dialogVisible: false, generateConf: null, showFileName: false, - activeData: drawingDefault[0] + activeData: drawingDefaultValue[0] } }, + beforeCreate() { + initDrawingDefaultValue() + }, created() { // 防止 firefox 下 拖拽 会新打卡一个选项卡 document.body.ondrop = event => { @@ -284,6 +287,7 @@ export default { this.$confirm('确定要清空所有组件吗?', '提示', { type: 'warning' }).then( () => { this.drawingList = [] + cleanDrawingDefaultValue() } ) }, From 9372d3401fb190b95b5fb0cae0346bcccf30d636 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 2 Dec 2025 14:56:34 +0800 Subject: [PATCH 03/25] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dv3=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6between=E9=80=89=E6=8B=A9=E5=90=8E=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm | 2 +- ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm index 765a5e300..fabd92160 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm @@ -334,7 +334,7 @@ function getList() { #foreach ($column in $columns) #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - if (null != daterange${AttrName} && '' != daterange${AttrName}) { + if (null != daterange${AttrName}.value && '' != daterange${AttrName}.value) { queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0] queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1] } diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm index 936b4651f..1a9c51797 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm @@ -415,7 +415,7 @@ function getList() { #foreach ($column in $columns) #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - if (null != daterange${AttrName} && '' != daterange${AttrName}) { + if (null != daterange${AttrName}.value && '' != daterange${AttrName}.value) { queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0] queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1] } From 91263711d4abffeef2fece2c922df9239fc39026 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 2 Dec 2025 15:28:44 +0800 Subject: [PATCH 04/25] =?UTF-8?q?=E7=99=BB=E5=BD=95/=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=BA=95=E9=83=A8=E7=89=88=E6=9D=83=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9=E4=B8=BA=E8=AF=BB=E5=8F=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/login.vue | 6 ++++-- ruoyi-ui/src/views/register.vue | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index f979f68b5..30ff921bf 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -56,7 +56,7 @@ @@ -65,12 +65,14 @@ import { getCodeImg } from "@/api/login" import Cookies from "js-cookie" import { encrypt, decrypt } from '@/utils/jsencrypt' +import defaultSettings from '@/settings' export default { name: "Login", data() { return { title: process.env.VUE_APP_TITLE, + footerContent: defaultSettings.footerContent, codeUrl: "", loginForm: { username: "admin", @@ -156,7 +158,7 @@ export default { } - diff --git a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue index 584a5b7ec..feaefaf71 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue @@ -1,13 +1,13 @@