From b5b8d941f32395cf968cda40852382f2b0614a13 Mon Sep 17 00:00:00 2001 From: 也曾为你、像超人 <1553592282@qq.com> Date: 星期二, 17 五月 2022 10:08:37 +0800 Subject: [PATCH] update ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml. 问题:查业务类型为其他(businessType = 0)的数据时,会查到所有数据 --- ruoyi-ui/src/utils/ruoyi.js | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 8e3cb0c..7e6eccd 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -70,6 +70,9 @@ // 回显数据字典 export function selectDictLabel(datas, value) { + if (value === undefined) { + return ""; + } var actions = []; Object.keys(datas).some((key) => { if (datas[key].value == ('' + value)) { @@ -77,23 +80,31 @@ return true; } }) + if (actions.length === 0) { + actions.push(value); + } return actions.join(''); } // 回显数据字典(字符串数组) export function selectDictLabels(datas, value, separator) { - if(value === undefined) { + if (value === undefined) { return ""; } var actions = []; var currentSeparator = undefined === separator ? "," : separator; var temp = value.split(currentSeparator); Object.keys(value.split(currentSeparator)).some((val) => { + var match = false; Object.keys(datas).some((key) => { if (datas[key].value == ('' + temp[val])) { actions.push(datas[key].label + currentSeparator); + match = true; } }) + if (!match) { + actions.push(temp[val] + currentSeparator); + } }) return actions.join('').substring(0, actions.join('').length - 1); } -- Gitblit v1.9.2