From f56aa2ad2ef9a455a3ee1f9817782be3c3e7158d Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Wed, 17 Jun 2026 16:18:34 +0800 Subject: [PATCH] =?UTF-8?q?780=20=E3=80=90=E6=8A=A4=E5=A3=AB=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=AB=99-=E5=B7=B2=E5=87=BA=E9=99=A2=E3=80=91?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=B8=8A=E7=9A=84=E3=80=90=E7=89=B9=E7=BA=A7?= =?UTF-8?q?=E3=80=91=E3=80=90=E4=B8=80=E7=BA=A7=E3=80=91=E3=80=90=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E3=80=91=E3=80=90=E4=B8=89=E7=BA=A7=E3=80=91=E7=9A=84?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=9F=A5=E8=AF=A2=E6=97=A0=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- healthlink-his-ui/src/utils/his.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/healthlink-his-ui/src/utils/his.js b/healthlink-his-ui/src/utils/his.js index 8767839d4..35b1a00a3 100755 --- a/healthlink-his-ui/src/utils/his.js +++ b/healthlink-his-ui/src/utils/his.js @@ -243,11 +243,20 @@ export function tansParams(params) { var part = encodeURIComponent(propName) + '='; if (value !== null && value !== '' && typeof value !== 'undefined') { if (typeof value === 'object') { - for (const key of Object.keys(value)) { - if (value[key] !== null && value[key] !== '' && typeof value[key] !== 'undefined') { - let params = propName + '[' + key + ']'; - var subPart = encodeURIComponent(params) + '='; - result += subPart + encodeURIComponent(value[key]) + '&'; + if (Array.isArray(value)) { + // 数组:序列化为重复同名参数,兼容 Spring @RequestParam List 绑定 + for (const item of value) { + if (item !== null && item !== '' && typeof item !== 'undefined') { + result += part + encodeURIComponent(item) + '&'; + } + } + } else { + for (const key of Object.keys(value)) { + if (value[key] !== null && value[key] !== '' && typeof value[key] !== 'undefined') { + let params = propName + '[' + key + ']'; + var subPart = encodeURIComponent(params) + '='; + result += subPart + encodeURIComponent(value[key]) + '&'; + } } } } else {