diff --git a/openhis-ui-vue3/src/views/basicmanage/organization/index.vue b/openhis-ui-vue3/src/views/basicmanage/organization/index.vue index 420ef23c..c100882d 100644 --- a/openhis-ui-vue3/src/views/basicmanage/organization/index.vue +++ b/openhis-ui-vue3/src/views/basicmanage/organization/index.vue @@ -386,12 +386,6 @@ function parseClassEnumValues(value) { /** 搜索按钮操作 */ function handleQuery() { queryParams.value.pageNo = 1; - if (Array.isArray(queryParams.value.classEnum)) { - queryParams.value.classEnum = - queryParams.value.classEnum.length > 0 - ? queryParams.value.classEnum.join(',') - : undefined; - } getPageList(); } @@ -406,7 +400,15 @@ function resetQuery() { function getPageList() { loading.value = true; - getList(queryParams.value).then((res) => { + // 创建API调用的查询参数副本,处理classEnum的转换 + const apiParams = { ...queryParams.value }; + if (Array.isArray(apiParams.classEnum)) { + apiParams.classEnum = + apiParams.classEnum.length > 0 + ? apiParams.classEnum.join(',') + : undefined; + } + getList(apiParams).then((res) => { // 处理返回的科室数据,确保科室分类显示与系统标准字典一致 const processedData = res.data.records.map(item => { // 保留原有显示文本作为基础