Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
c9d19cbe
Commit
c9d19cbe
authored
Jan 02, 2022
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
空值不进行回显数据字典
parent
10ae0bce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
169 additions
and
164 deletions
+169
-164
ruoyi.js
ruoyi-ui/src/utils/ruoyi.js
+169
-164
No files found.
ruoyi-ui/src/utils/ruoyi.js
View file @
c9d19cbe
/**
/**
* 通用js方法封装处理
* 通用js方法封装处理
* Copyright (c) 2019 ruoyi
* Copyright (c) 2019 ruoyi
...
@@ -16,7 +18,7 @@ export function parseTime(time, pattern) {
...
@@ -16,7 +18,7 @@ export function parseTime(time, pattern) {
if
((
typeof
time
===
'string'
)
&&
(
/^
[
0-9
]
+$/
.
test
(
time
)))
{
if
((
typeof
time
===
'string'
)
&&
(
/^
[
0-9
]
+$/
.
test
(
time
)))
{
time
=
parseInt
(
time
)
time
=
parseInt
(
time
)
}
else
if
(
typeof
time
===
'string'
)
{
}
else
if
(
typeof
time
===
'string'
)
{
time
=
time
.
replace
(
new
RegExp
(
/-/gm
),
'/'
).
replace
(
'T'
,
' '
).
replace
(
new
RegExp
(
/
\.[\d]{3}
/gm
),
''
);
time
=
time
.
replace
(
new
RegExp
(
/-/gm
),
'/'
).
replace
(
'T'
,
' '
).
replace
(
new
RegExp
(
/
\.[\d]{3}
/gm
),
''
);
}
}
if
((
typeof
time
===
'number'
)
&&
(
time
.
toString
().
length
===
10
))
{
if
((
typeof
time
===
'number'
)
&&
(
time
.
toString
().
length
===
10
))
{
time
=
time
*
1000
time
=
time
*
1000
...
@@ -80,6 +82,9 @@ export function selectDictLabel(datas, value) {
...
@@ -80,6 +82,9 @@ export function selectDictLabel(datas, value) {
// 回显数据字典(字符串数组)
// 回显数据字典(字符串数组)
export
function
selectDictLabels
(
datas
,
value
,
separator
)
{
export
function
selectDictLabels
(
datas
,
value
,
separator
)
{
if
(
value
===
undefined
)
{
return
""
;
}
var
actions
=
[];
var
actions
=
[];
var
currentSeparator
=
undefined
===
separator
?
","
:
separator
;
var
currentSeparator
=
undefined
===
separator
?
","
:
separator
;
var
temp
=
value
.
split
(
currentSeparator
);
var
temp
=
value
.
split
(
currentSeparator
);
...
@@ -124,7 +129,7 @@ export function mergeRecursive(source, target) {
...
@@ -124,7 +129,7 @@ export function mergeRecursive(source, target) {
}
else
{
}
else
{
source
[
p
]
=
target
[
p
];
source
[
p
]
=
target
[
p
];
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
source
[
p
]
=
target
[
p
];
source
[
p
]
=
target
[
p
];
}
}
}
}
...
...
Write
Preview
Markdown
is supported
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