取药科室下项目显示异常,没有耗材库的修复
This commit is contained in:
@@ -261,19 +261,19 @@ const filterNode = (value, data) => {
|
||||
/** 目录分类查询 */
|
||||
function getDiseaseTreatmentList() {
|
||||
getDiseaseTreatmentInit().then((response) => {
|
||||
console.log(response, 'response诊疗目录分类查询下拉树结构');
|
||||
pharmacyDepartmentOptions.value = response.data.locationFormOptions;
|
||||
departmentOptions.value = response.data.departmentOptions;
|
||||
// 调用 getDiseaseInitLoc 并在 then 回调中赋值
|
||||
getDiseaseInitLoc(response.data.locationFormOptions[0].value).then((children) => {
|
||||
pharmacyDepartmentOptions.value[0].children = children;
|
||||
});
|
||||
|
||||
getDiseaseInitLoc(response.data.locationFormOptions[1].value).then((children) => {
|
||||
pharmacyDepartmentOptions.value[1].children = children;
|
||||
});
|
||||
|
||||
console.log(pharmacyDepartmentOptions.value);
|
||||
pharmacyDepartmentOptions.value = response.data.locationFormOptions || [];
|
||||
departmentOptions.value = response.data.departmentOptions || [];
|
||||
// 动态加载所有 locationFormOptions 的子节点(包括药库、药房、耗材库)
|
||||
if (pharmacyDepartmentOptions.value.length > 0) {
|
||||
pharmacyDepartmentOptions.value.forEach((option, index) => {
|
||||
if (!option?.value) return;
|
||||
getDiseaseInitLoc(option.value).then((children) => {
|
||||
if (pharmacyDepartmentOptions.value && pharmacyDepartmentOptions.value[index]) {
|
||||
pharmacyDepartmentOptions.value[index].children = children || [];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user