fix(nurse-station): 修复住院护士站门户护理级别筛选功能失效问题 (Bug #172)

This commit is contained in:
2026-03-12 17:32:55 +08:00
parent 2bfdd686c7
commit 17b8ea7192
7 changed files with 42 additions and 12 deletions

View File

@@ -241,11 +241,21 @@ 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)) {
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 {