Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
133a10ec
Commit
133a10ec
authored
Jul 22, 2020
by
若依
Committed by
Gitee
Jul 22, 2020
Browse files
!47 修复和优化前端 utils 工具函数
Merge pull request !47 from FungLeo/master
parents
6a84ae42
a09a342f
Changes
2
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/src/utils/index.js
View file @
133a10ec
import
{
parseTime
}
from
'
./ruoyi
'
/**
* 表格时间格式化
*/
...
...
@@ -385,4 +387,4 @@ export function camelCase(str) {
export
function
isNumberStr
(
str
)
{
return
/^
[
+-
]?(
0|
([
1-9
]\d
*
))(\.\d
+
)?
$/g
.
test
(
str
)
}
\ No newline at end of file
ruoyi-ui/src/utils/ruoyi.js
View file @
133a10ec
...
...
@@ -68,10 +68,10 @@ export function addDateRange(params, dateRange) {
// 回显数据字典
export
function
selectDictLabel
(
datas
,
value
)
{
var
actions
=
[];
Object
.
keys
(
datas
).
map
((
key
)
=>
{
Object
.
keys
(
datas
).
some
((
key
)
=>
{
if
(
datas
[
key
].
dictValue
==
(
''
+
value
))
{
actions
.
push
(
datas
[
key
].
dictLabel
);
return
fals
e
;
return
tru
e
;
}
})
return
actions
.
join
(
''
);
...
...
@@ -131,4 +131,4 @@ export function handleTree(data, id, parentId, children, rootId) {
});
return
treeData
!=
''
?
treeData
:
data
;
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment