diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue index 6f7b68826..d89930a88 100644 --- a/ruoyi-ui/src/components/TopNav/index.vue +++ b/ruoyi-ui/src/components/TopNav/index.vue @@ -73,7 +73,9 @@ export default { if(router.path === "/") { router.children[item].path = "/redirect/" + router.children[item].path; } else { - router.children[item].path = router.path + "/" + router.children[item].path; + if(!this.ishttp(router.children[item].path)) { + router.children[item].path = router.path + "/" + router.children[item].path; + } } router.children[item].parentPath = router.path; } @@ -122,7 +124,7 @@ export default { // 菜单选择事件 handleSelect(key, keyPath) { this.currentIndex = key; - if (key.indexOf("http://") !== -1 || key.indexOf("https://") !== -1) { + if (this.ishttp(key)) { // http(s):// 路径新窗口打开 window.open(key, "_blank"); } else if (key.indexOf("/redirect") !== -1) { @@ -147,6 +149,9 @@ export default { this.$store.commit("SET_SIDEBAR_ROUTERS", routes); } return routes; + }, + ishttp(url) { + return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1 } }, }; diff --git a/ruoyi/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 4fd41dced..8fc46d0c2 100644 --- a/ruoyi/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -32,7 +32,7 @@ import java.util.stream.Collectors; /** * Excel相关处理 - * + * * @author ruoyi */ public class ExcelUtil @@ -88,12 +88,12 @@ public class ExcelUtil * 统计列表 */ private Map statistics = new HashMap(); - + /** * 数字格式 */ private static final DecimalFormat DOUBLE_FORMAT = new DecimalFormat("######0.00"); - + /** * 实体对象 */ @@ -119,7 +119,7 @@ public class ExcelUtil /** * 对excel表单默认第一个索引名转换成list - * + * * @param is 输入流 * @return 转换后集合 */ @@ -130,7 +130,7 @@ public class ExcelUtil /** * 对excel表单指定表格索引名转换成list - * + * * @param sheetName 表格索引名 * @param is 输入流 * @return 转换后集合 @@ -298,7 +298,7 @@ public class ExcelUtil /** * 对list数据源将其里面的数据导入到excel表单 - * + * * @param list 导出数据集合 * @param sheetName 工作表的名称 * @return 结果 @@ -311,7 +311,7 @@ public class ExcelUtil /** * 对list数据源将其里面的数据导入到excel表单 - * + * * @param sheetName 工作表的名称 * @return 结果 */ @@ -323,7 +323,7 @@ public class ExcelUtil /** * 对list数据源将其里面的数据导入到excel表单 - * + * * @return 结果 */ public AjaxResult exportExcel() @@ -391,7 +391,7 @@ public class ExcelUtil /** * 填充excel数据 - * + * * @param index 序号 * @param row 单元格行 */ @@ -418,7 +418,7 @@ public class ExcelUtil /** * 创建表格样式 - * + * * @param wb 工作薄对象 * @return 样式列表 */ @@ -456,7 +456,7 @@ public class ExcelUtil headerFont.setColor(IndexedColors.WHITE.getIndex()); style.setFont(headerFont); styles.put("header", style); - + style = wb.createCellStyle(); style.setAlignment(HorizontalAlignment.CENTER); style.setVerticalAlignment(VerticalAlignment.CENTER); @@ -500,7 +500,7 @@ public class ExcelUtil /** * 设置单元格信息 - * + * * @param value 单元格值 * @param attr 注解相关 * @param cell 单元格信息 @@ -513,7 +513,10 @@ public class ExcelUtil } else if (ColumnType.NUMERIC == attr.cellType()) { - cell.setCellValue(StrUtil.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value)); + if (Validator.isNotNull(value)) + { + cell.setCellValue(StrUtil.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value)); + } } else if (ColumnType.IMAGE == attr.cellType()) { @@ -528,7 +531,7 @@ public class ExcelUtil } } } - + /** * 获取画布 */ @@ -643,7 +646,7 @@ public class ExcelUtil /** * 设置 POI XSSFSheet 单元格提示 - * + * * @param sheet 表单 * @param promptTitle 提示标题 * @param promptContent 提示内容 @@ -653,7 +656,7 @@ public class ExcelUtil * @param endCol 结束列 */ public void setXSSFPrompt(Sheet sheet, String promptTitle, String promptContent, int firstRow, int endRow, - int firstCol, int endCol) + int firstCol, int endCol) { DataValidationHelper helper = sheet.getDataValidationHelper(); DataValidationConstraint constraint = helper.createCustomConstraint("DD1"); @@ -666,7 +669,7 @@ public class ExcelUtil /** * 设置某些列的值只能输入预制的数据,显示下拉框. - * + * * @param sheet 要设置的sheet. * @param textlist 下拉框显示的内容 * @param firstRow 开始行 @@ -700,7 +703,7 @@ public class ExcelUtil /** * 解析导出值 0=男,1=女,2=未知 - * + * * @param propertyValue 参数值 * @param converterExp 翻译注解 * @param separator 分隔符 @@ -737,7 +740,7 @@ public class ExcelUtil /** * 反向解析值 男=0,女=1,未知=2 - * + * * @param propertyValue 参数值 * @param converterExp 翻译注解 * @param separator 分隔符 @@ -771,10 +774,10 @@ public class ExcelUtil } return StrUtil.strip(propertyString.toString(), null,separator); } - + /** * 解析字典值 - * + * * @param dictValue 字典值 * @param dictType 字典类型 * @param separator 分隔符 @@ -787,7 +790,7 @@ public class ExcelUtil /** * 反向解析值字典值 - * + * * @param dictLabel 字典标签 * @param dictType 字典类型 * @param separator 分隔符 @@ -797,7 +800,7 @@ public class ExcelUtil { return DictUtils.getDictValue(dictType, dictLabel, separator); } - + /** * 合计统计信息 */ @@ -834,7 +837,7 @@ public class ExcelUtil cell = row.createCell(0); cell.setCellStyle(styles.get("total")); cell.setCellValue("合计"); - + for (Integer key : keys) { cell = row.createCell(key); @@ -856,7 +859,7 @@ public class ExcelUtil /** * 获取下载路径 - * + * * @param filename 文件名称 */ public String getAbsoluteFile(String filename) @@ -872,7 +875,7 @@ public class ExcelUtil /** * 获取bean中的属性值 - * + * * @param vo 实体对象 * @param field 字段 * @param excel 注解 @@ -903,7 +906,7 @@ public class ExcelUtil /** * 以类的属性的get方法方法形式获取值 - * + * * @param o * @param name * @return value @@ -952,7 +955,7 @@ public class ExcelUtil this.fields = this.fields.stream().sorted(Comparator.comparing(objects -> ((Excel) objects[1]).sort())).collect(Collectors.toList()); this.maxHeight = getRowHeight(); } - + /** * 根据注解获取最大行高 */ @@ -988,7 +991,7 @@ public class ExcelUtil /** * 创建工作表 - * + * * @param sheetNo sheet数量 * @param index 序号 */ @@ -1009,7 +1012,7 @@ public class ExcelUtil /** * 获取单元格值 - * + * * @param row 获取的行 * @param column 获取单元格列号 * @return 单元格值 diff --git a/ruoyi/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index de669b193..b04d3b267 100644 --- a/ruoyi/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -142,6 +142,7 @@ public class SysMenuServiceImpl extends ServiceImpl impl router.setRedirect("noRedirect"); router.setChildren(buildMenus(cMenus)); } else if (isMenuFrame(menu)) { + router.setMeta(null); List childrenList = new ArrayList(); RouterVo children = new RouterVo(); children.setPath(menu.getPath());