diff --git a/src/directive/permission/hasPermi.js b/src/directive/permission/hasPermi.js index 5599919..83a1a00 100644 --- a/src/directive/permission/hasPermi.js +++ b/src/directive/permission/hasPermi.js @@ -10,7 +10,6 @@ export default { const { value } = binding; const all_permission = '*:*:*'; const permissions = store.getters && store.getters.permissions; - if (value && value instanceof Array && value.length > 0) { const permissionFlag = value; diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index 3362a81..4817b10 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -73,20 +73,10 @@ export function addDateRange(params, dateRange, propName) { // 回显数据字典 export function selectDictLabel(datas, value) { - if (value === undefined) { + if (value == undefined) { return ''; } - var actions = []; - Object.keys(datas).some((key) => { - if (datas[key].value === '' + value) { - actions.push(datas[key].label); - return true; - } - }); - if (actions.length === 0) { - actions.push(value); - } - return actions.join(''); + return datas.find((item) => item.dictValue == value).dictLabel; } // 回显数据字典(字符串数组) diff --git a/src/views/sch/classType/index.vue b/src/views/sch/classType/index.vue index 79f7602..7797547 100644 --- a/src/views/sch/classType/index.vue +++ b/src/views/sch/classType/index.vue @@ -31,7 +31,6 @@ 新增 删除 克隆 - @@ -41,13 +40,13 @@ - + - +