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
52e17170
Commit
52e17170
authored
May 27, 2022
by
mingliangyang
Browse files
增加对空字符串参数的过滤
parent
8a2e3d13
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/src/utils/ruoyi.js
View file @
52e17170
...
...
@@ -68,7 +68,7 @@ export function addDateRange(params, dateRange, propName) {
return
search
;
}
// 回显数据字典
// 回显数据字典
export
function
selectDictLabel
(
datas
,
value
)
{
if
(
value
===
undefined
)
{
return
""
;
...
...
@@ -207,10 +207,10 @@ export function tansParams(params) {
for
(
const
propName
of
Object
.
keys
(
params
))
{
const
value
=
params
[
propName
];
var
part
=
encodeURIComponent
(
propName
)
+
"
=
"
;
if
(
value
!==
null
&&
typeof
(
value
)
!==
"
undefined
"
)
{
if
(
value
!==
null
&&
value
!==
""
&&
typeof
(
value
)
!==
"
undefined
"
)
{
if
(
typeof
value
===
'
object
'
)
{
for
(
const
key
of
Object
.
keys
(
value
))
{
if
(
value
[
key
]
!==
null
&&
typeof
(
value
[
key
])
!==
'
undefined
'
)
{
if
(
value
[
key
]
!==
null
&&
value
!==
""
&&
typeof
(
value
[
key
])
!==
'
undefined
'
)
{
let
params
=
propName
+
'
[
'
+
key
+
'
]
'
;
var
subPart
=
encodeURIComponent
(
params
)
+
"
=
"
;
result
+=
subPart
+
encodeURIComponent
(
value
[
key
])
+
"
&
"
;
...
...
@@ -233,4 +233,4 @@ export async function blobValidate(data) {
}
catch
(
error
)
{
return
true
;
}
}
\ 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