diff --git a/pom.xml b/pom.xml
index d1617561..7e69dc6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
Hoxton.SR9
2.2.5.RELEASE
2.3.1
- 2.1.3
+ 2.1.4
2.9.2
1.5.24
1.26.5
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java
index f754a2ca..426d37d8 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java
@@ -528,7 +528,10 @@ public class ExcelUtil
}
else if (ColumnType.NUMERIC == attr.cellType())
{
- cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
+ if (StringUtils.isNotNull(value))
+ {
+ cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
+ }
}
else if (ColumnType.IMAGE == attr.cellType())
{
diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
index e76018e7..86f1863b 100644
--- a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
+++ b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
@@ -18,6 +18,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
+import org.springframework.validation.BindingResult;
import org.springframework.web.multipart.MultipartFile;
import com.alibaba.fastjson.JSON;
import com.ruoyi.common.core.utils.SecurityUtils;
@@ -236,6 +237,7 @@ public class LogAspect
return entry.getValue() instanceof MultipartFile;
}
}
- return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse;
+ return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse
+ || o instanceof BindingResult;
}
}
diff --git a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java
index 09af096d..b856f661 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java
+++ b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java
@@ -22,7 +22,7 @@ public class VelocityInitializer
// 加载classpath目录下的vm文件
p.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
// 定义字符集
- p.setProperty(Velocity.ENCODING_DEFAULT, Constants.UTF8);
+ p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8);
p.setProperty(Velocity.OUTPUT_ENCODING, Constants.UTF8);
// 初始化Velocity引擎,指定配置Properties
Velocity.init(p);
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm
index 7ac19872..600044f7 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm
@@ -68,7 +68,7 @@ public class ${ClassName}Controller extends BaseController
{
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class);
- util.exportExcel(response, list, "${businessName}");
+ util.exportExcel(response, list, "${functionName}数据");
}
/**
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
index d4c5e42f..6d67c2e0 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
@@ -108,8 +108,12 @@
#elseif($column.list && "" != $column.dictType)
#elseif($column.list && "" != $javaField)
+#if(${foreach.index} == 1)
+
+#else
#end
+#end
#end
@@ -120,6 +124,13 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:edit']"
>修改
+ 新增
{
this.${businessName}Options = [];
@@ -456,16 +467,21 @@ export default {
this.handleQuery();
},
/** 新增按钮操作 */
- handleAdd() {
+ handleAdd(row) {
this.reset();
- this.getTreeselect();
+ this.getTreeselect();
+ if (row != null && row.${treeCode}) {
+ this.form.${treeParentCode} = row.${treeCode};
+ } else {
+ this.form.${treeParentCode} = 0;
+ }
this.open = true;
this.title = "添加${functionName}";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
- this.getTreeselect();
+ this.getTreeselect();
if (row != null) {
this.form.${treeParentCode} = row.${treeCode};
}
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm
index 93963ea3..6d0954e0 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm
@@ -12,12 +12,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#if($table.sub)
-
+
#foreach ($column in $subTable.columns)
-
+
#end
#end
@@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
#elseif($table.sub)
select#foreach($column in $columns) a.$column.columnName#if($velocityCount != $columns.size()),#end#end,
- #foreach($column in $subTable.columns) b.$column.columnName#if($velocityCount != $subTable.columns.size()),#end#end
+ #foreach($column in $subTable.columns) b.$column.columnName as sub_$column.columnName#if($velocityCount != $subTable.columns.size()),#end#end
from ${tableName} a
left join ${subTableName} b on b.${subTableFkName} = a.${pkColumn.columnName}
diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss
index 579e82db..55118fad 100644
--- a/ruoyi-ui/src/assets/styles/ruoyi.scss
+++ b/ruoyi-ui/src/assets/styles/ruoyi.scss
@@ -176,12 +176,6 @@
color: #FFFFFF;
}
-/* submenu item */
-.el-menu--horizontal > .el-submenu .el-submenu__title {
- height: 50px !important;
- line-height: 50px !important;
-}
-
/* text color */
.text-navy {
color: #1ab394;
diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue
index c4d32691..6cb82a14 100644
--- a/ruoyi-ui/src/components/Editor/index.vue
+++ b/ruoyi-ui/src/components/Editor/index.vue
@@ -1,5 +1,19 @@
+
diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue
index db69e1df..18c89a0e 100644
--- a/ruoyi-ui/src/layout/components/Navbar.vue
+++ b/ruoyi-ui/src/layout/components/Navbar.vue
@@ -3,7 +3,7 @@
-
+
+
+
+ 保存配置
+ 重置配置
@@ -72,15 +76,12 @@ import ThemePicker from '@/components/ThemePicker'
export default {
components: { ThemePicker },
data() {
- return {}
+ return {
+ theme: this.$store.state.settings.theme,
+ sideTheme: this.$store.state.settings.sideTheme
+ };
},
computed: {
- theme() {
- return this.$store.state.settings.theme
- },
- sideTheme() {
- return this.$store.state.settings.sideTheme
- },
fixedHeader: {
get() {
return this.$store.state.settings.fixedHeader
@@ -135,12 +136,46 @@ export default {
key: 'theme',
value: val
})
+ this.theme = val;
},
handleTheme(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'sideTheme',
value: val
})
+ this.sideTheme = val;
+ },
+ saveSetting() {
+ const loading = this.$loading({
+ lock: true,
+ fullscreen: false,
+ text: "正在保存到本地,请稍后...",
+ spinner: "el-icon-loading",
+ background: "rgba(0, 0, 0, 0.7)"
+ });
+ localStorage.setItem(
+ "layout-setting",
+ `{
+ "topNav":${this.topNav},
+ "tagsView":${this.tagsView},
+ "fixedHeader":${this.fixedHeader},
+ "sidebarLogo":${this.sidebarLogo},
+ "sideTheme":"${this.sideTheme}",
+ "theme":"${this.theme}"
+ }`
+ );
+ setTimeout(loading.close(), 1000)
+ },
+ resetSetting() {
+ this.$loading({
+ lock: true,
+ fullscreen: false,
+ text: "正在清除设置缓存并刷新,请稍后...",
+ spinner: "el-icon-loading",
+ background: "rgba(0, 0, 0, 0.7)"
+ });
+ localStorage.removeItem("layout-setting")
+ setTimeout("window.location.reload()", 1000)
}
}
}
diff --git a/ruoyi-ui/src/store/modules/settings.js b/ruoyi-ui/src/store/modules/settings.js
index f113e9a8..aeedaba1 100644
--- a/ruoyi-ui/src/store/modules/settings.js
+++ b/ruoyi-ui/src/store/modules/settings.js
@@ -3,16 +3,16 @@ import defaultSettings from '@/settings'
const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo } = defaultSettings
+const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
const state = {
- theme: variables.theme,
- sideTheme: sideTheme,
+ theme: storageSetting.theme || variables.theme,
+ sideTheme: storageSetting.sideTheme || sideTheme,
showSettings: showSettings,
- topNav: topNav,
- tagsView: tagsView,
- fixedHeader: fixedHeader,
- sidebarLogo: sidebarLogo
+ topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
+ tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
+ fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
+ sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo
}
-
const mutations = {
CHANGE_SETTING: (state, { key, value }) => {
if (state.hasOwnProperty(key)) {
diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js
index dd5ef15c..22e1ebf4 100644
--- a/ruoyi-ui/src/utils/ruoyi.js
+++ b/ruoyi-ui/src/utils/ruoyi.js
@@ -58,7 +58,7 @@ export function addDateRange(params, dateRange, propName) {
var search = params;
search.params = {};
if (null != dateRange && '' != dateRange) {
- if (typeof (propName) === "undefined") {
+ if (typeof(propName) === "undefined") {
search.params["beginTime"] = dateRange[0];
search.params["endTime"] = dateRange[1];
} else {
@@ -87,8 +87,8 @@ export function selectDictLabels(datas, value, separator) {
var currentSeparator = undefined === separator ? "," : separator;
var temp = value.split(currentSeparator);
Object.keys(value.split(currentSeparator)).some((val) => {
- Object.keys(datas).some((key) => {
- if (datas[key].dictValue == ('' + temp[val])) {
+ Object.keys(datas).some((key) => {
+ if (datas[key].dictValue == ('' + temp[val])) {
actions.push(datas[key].dictLabel + currentSeparator);
}
})
@@ -173,3 +173,17 @@ export function handleTree(data, id, parentId, children) {
}
return tree;
}
+
+/**
+* 参数处理
+* @param {*} params 参数
+*/
+export function tansParams(params) {
+ let result = ''
+ Object.keys(params).forEach((key) => {
+ if (!Object.is(params[key], undefined) && !Object.is(params[key], null) && !Object.is(JSON.stringify(params[key]), '{}')) {
+ result += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + '&'
+ }
+ })
+ return result
+}
diff --git a/ruoyi-ui/src/views/monitor/druid/index.vue b/ruoyi-ui/src/views/monitor/druid/index.vue
index 9e8e1e75..fcfa9463 100644
--- a/ruoyi-ui/src/views/monitor/druid/index.vue
+++ b/ruoyi-ui/src/views/monitor/druid/index.vue
@@ -8,7 +8,7 @@ export default {
name: "Druid",
data() {
return {
- src: process.env.VUE_APP_BASE_API + "/druid/index.html",
+ src: process.env.VUE_APP_BASE_API + "/druid/login.html",
height: document.documentElement.clientHeight - 94.5 + "px;",
loading: true
};