Commit 133a10ecf2ac2082ce68f1f9799a05937c7df9b7
Committed by
Gitee
!47 修复和优化前端 utils 工具函数
Merge pull request !47 from FungLeo/master
Showing
2 changed files
with
6 additions
and
4 deletions
ruoyi-ui/src/utils/index.js
ruoyi-ui/src/utils/ruoyi.js
| ... | ... | @@ -68,10 +68,10 @@ export function addDateRange(params, dateRange) { |
| 68 | 68 | // 回显数据字典 |
| 69 | 69 | export function selectDictLabel(datas, value) { |
| 70 | 70 | var actions = []; |
| 71 | - Object.keys(datas).map((key) => { | |
| 71 | + Object.keys(datas).some((key) => { | |
| 72 | 72 | if (datas[key].dictValue == ('' + value)) { |
| 73 | 73 | actions.push(datas[key].dictLabel); |
| 74 | - return false; | |
| 74 | + return true; | |
| 75 | 75 | } |
| 76 | 76 | }) |
| 77 | 77 | return actions.join(''); |
| ... | ... | @@ -131,4 +131,4 @@ export function handleTree(data, id, parentId, children, rootId) { |
| 131 | 131 | }); |
| 132 | 132 | return treeData != '' ? treeData : data; |
| 133 | 133 | } |
| 134 | - | |
| 135 | 134 | \ No newline at end of file |
| 135 | + | ... | ... |