通用下载Excel,只要查询参数给params属性传了参,导出就会报错。
问题出现在参数转换。ruoyi.js文件185行
This commit is contained in:
parent
d53881d07e
commit
9167a05b1b
|
|
@ -183,6 +183,17 @@ export function tansParams(params) {
|
|||
Object.keys(params).forEach((key) => {
|
||||
if (!Object.is(params[key], undefined) && !Object.is(params[key], null) && !Object.is(JSON.stringify(params[key]), '{}')) {
|
||||
// result += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + '&'
|
||||
if(key != 'params'){
|
||||
result += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + '&'
|
||||
}
|
||||
if(key === 'params'){
|
||||
let p = params[key];
|
||||
Object.keys(p).forEach((k) => {
|
||||
if(!Object.is(p[k], undefined) && !Object.is(p[k], null)){
|
||||
result += encodeURIComponent(key) + encodeURIComponent('[') + encodeURIComponent(k) + encodeURIComponent(']') + '=' + encodeURIComponent(p[k]) + '&'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return result
|
||||
|
|
|
|||
Loading…
Reference in New Issue