429 433 438 476 477 478

This commit is contained in:
Ranyunqiao
2026-05-12 12:21:25 +08:00
parent 349c587386
commit 1b159cdfab
14 changed files with 755 additions and 256 deletions

View File

@@ -182,7 +182,7 @@ import {computed, getCurrentInstance, ref, watch} from 'vue';
import {Refresh, Search} from '@element-plus/icons-vue';
import {patientInfo} from '../../store/patient.js';
import {getInspection} from './api';
import {getDepartmentList} from '@/api/public.js';
import {getOrgList} from '@/views/doctorstation/components/api.js';
const { proxy } = getCurrentInstance();
@@ -353,11 +353,13 @@ const getLocationInfo = async () => {
};
const recursionFun = (targetDepartment) => {
if (!targetDepartment) return '';
let name = '';
for (let index = 0; index < orgOptions.value.length; index++) {
const obj = orgOptions.value[index];
if (obj.id == targetDepartment) {
name = obj.name;
break;
}
const subObjArray = obj['children'];
if (subObjArray && subObjArray.length > 0) {
@@ -365,9 +367,11 @@ const recursionFun = (targetDepartment) => {
const item = subObjArray[i];
if (item.id == targetDepartment) {
name = item.name;
break;
}
}
}
if (name) break;
}
return name;
};
@@ -385,7 +389,6 @@ const handleViewDetail = async (row) => {
const obj = JSON.parse(row.descJson);
obj.targetDepartment = recursionFun(obj.targetDepartment);
descJsonData.value = obj;
// descJsonData.value = JSON.parse(row.descJson);
} catch (e) {
console.error('解析 descJson 失败:', e);
descJsonData.value = null;