From 101e15d83f4b91ef338d2cbc3be43fe1176cc779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9F=E6=9B=BE=E4=B8=BA=E4=BD=A0=E5=83=8F=E8=B6=85?= =?UTF-8?q?=E4=BA=BA?= <1553592282@qq.com> Date: Mon, 31 Oct 2022 05:45:21 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B0=83=E5=BA=A6?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=82=B9=E5=87=BB=E5=A4=9A=E6=AC=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=8D=E5=8F=98=E5=8C=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 也曾为你像超人 <1553592282@qq.com> --- ruoyi-ui/src/router/index.js | 2 +- ruoyi-ui/src/views/monitor/job/index.vue | 2 +- ruoyi-ui/src/views/monitor/job/log.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 0ef9d709..b370bdd9 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -141,7 +141,7 @@ export const dynamicRoutes = [ permissions: ['monitor:job:list'], children: [ { - path: 'index', + path: 'index/:jobId(\\d+)', component: () => import('@/views/monitor/job/log'), name: 'JobLog', meta: { title: '调度日志', activeMenu: '/monitor/job' } diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 54d81f83..37c8fc11 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -454,7 +454,7 @@ export default { /** 任务日志列表查询 */ handleJobLog(row) { const jobId = row.jobId || 0; - this.$router.push({ path: '/monitor/job-log/index', query: { jobId: jobId } }) + this.$router.push('/monitor/job-log/index/' + jobId) }, /** 新增按钮操作 */ handleAdd() { diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue index d7c36f46..60bee1de 100644 --- a/ruoyi-ui/src/views/monitor/job/log.vue +++ b/ruoyi-ui/src/views/monitor/job/log.vue @@ -217,7 +217,7 @@ export default { }; }, created() { - const jobId = this.$route.query.jobId; + const jobId = this.$route.params && this.$route.params.jobId; if (jobId !== undefined && jobId != 0) { getJob(jobId).then(response => { this.queryParams.jobName = response.data.jobName; From 836180fe0ed73d314b0ad56c99d5e6075d2316bb Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 11 Nov 2022 11:31:27 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E7=9A=84=E5=AD=90=E5=88=97=E8=A1=A8=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E4=BC=9A=E5=87=BA=E7=8E=B0[]=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 4 ++++ 1 file changed, 4 insertions(+) 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 3310220b..cd8dd41f 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 @@ -911,6 +911,10 @@ public class ExcelUtil { cellValue = RegExUtils.replaceFirst(cellValue, FORMULA_REGEX_STR, "\t$0"); } + if (value instanceof Collection && StringUtils.equals("[]", cellValue)) + { + cellValue = StringUtils.EMPTY; + } cell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue + attr.suffix()); } else if (ColumnType.NUMERIC == attr.cellType()) From 27e34c2f0ae39df3270ecc8f06e79897a1ac0aa1 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 12 Nov 2022 11:26:48 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E5=B1=9E=E6=80=A7=E6=95=B0=E6=8D=AE=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/core/domain/BaseEntity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java index 0fc68beb..b3dee628 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java @@ -5,6 +5,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; /** * Entity基类 @@ -16,6 +17,7 @@ public class BaseEntity implements Serializable private static final long serialVersionUID = 1L; /** 搜索值 */ + @JsonIgnore private String searchValue; /** 创建者 */ @@ -36,6 +38,7 @@ public class BaseEntity implements Serializable private String remark; /** 请求参数 */ + @JsonIgnore private Map params; public String getSearchValue() From 7eee3b9f02f7bd394e1d88faff41ee840e5d863b Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 14 Nov 2022 11:17:04 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=8D=87=E7=BA=A7druid=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC1.2.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../src/main/java/com/ruoyi/common/core/domain/BaseEntity.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f543e1cb..f7280e97 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ UTF-8 1.8 3.1.1 - 1.2.11 + 1.2.14 1.21 3.0.0 2.3.2 diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java index b3dee628..67269ff6 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java @@ -6,6 +6,7 @@ import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; /** * Entity基类 @@ -38,7 +39,7 @@ public class BaseEntity implements Serializable private String remark; /** 请求参数 */ - @JsonIgnore + @JsonInclude(JsonInclude.Include.NON_EMPTY) private Map params; public String getSearchValue() From 74ba681fee30c8b7937db0c1c053189f48e4ae64 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 15 Nov 2022 14:11:52 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8=E6=95=B0=E7=BB=84=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98(I60UYQ)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/request.js | 41 ++++++++++------------------------- ruoyi-ui/src/utils/ruoyi.js | 7 ++++-- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index 80ee3c35..ad9923cc 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -78,37 +78,24 @@ service.interceptors.response.use(res => { if (code === 401) { if (!isRelogin.show) { isRelogin.show = true; - MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { - confirmButtonText: '重新登录', - cancelButtonText: '取消', - type: 'warning' - } - ).then(() => { - isRelogin.show = false; - store.dispatch('LogOut').then(() => { - location.href = '/index'; - }) + MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { + isRelogin.show = false; + store.dispatch('LogOut').then(() => { + location.href = '/index'; + }) }).catch(() => { isRelogin.show = false; }); } return Promise.reject('无效的会话,或者会话已过期,请重新登录。') } else if (code === 500) { - Message({ - message: msg, - type: 'error' - }) + Message({ message: msg, type: 'error' }) return Promise.reject(new Error(msg)) } else if (code === 601) { - Message({ - message: msg, - type: 'warning' - }) + Message({ message: msg, type: 'warning' }) return Promise.reject('error') } else if (code !== 200) { - Notification.error({ - title: msg - }) + Notification.error({ title: msg }) return Promise.reject('error') } else { return res.data @@ -119,18 +106,12 @@ service.interceptors.response.use(res => { let { message } = error; if (message == "Network Error") { message = "后端接口连接异常"; - } - else if (message.includes("timeout")) { + } else if (message.includes("timeout")) { message = "系统接口请求超时"; - } - else if (message.includes("Request failed with status code")) { + } else if (message.includes("Request failed with status code")) { message = "系统接口" + message.substr(message.length - 3) + "异常"; } - Message({ - message: message, - type: 'error', - duration: 5 * 1000 - }) + Message({ message: message, type: 'error', duration: 5 * 1000 }) return Promise.reject(error) } ) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index d2cd2a06..243c4c7b 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -86,11 +86,14 @@ export function selectDictLabel(datas, value) { return actions.join(''); } -// 回显数据字典(字符串数组) +// 回显数据字典(字符串、数组) export function selectDictLabels(datas, value, separator) { - if (value === undefined) { + if (value === undefined || value.length ===0) { return ""; } + if (Array.isArray(value)) { + value = value.join(","); + } var actions = []; var currentSeparator = undefined === separator ? "," : separator; var temp = value.split(currentSeparator);