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 {

View File

@@ -26,14 +26,12 @@
>
</el-radio-group>
</el-form-item>
<el-form-item label="" prop="checkboxGroup2">
<el-form-item label="" prop="nursingLevelList">
<el-checkbox-group v-model="queryParams.nursingLevelList" @change="getList">
<el-checkbox-button
v-for="item in levelList"
:key="item.value"
v-model="item.value"
style="display: inline-block"
:label="item.label"
:label="item.value"
>
{{ item.label }}
</el-checkbox-button>
@@ -187,7 +185,7 @@ const data = reactive({
pageNo: 1,
pageSize: 10,
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
checkboxGroup2: [], // 类型(包括 1中药2成药
nursingLevelList: [], // 护理级别列表(多选
statusEnum: 1, // 状态
},
rules: {},