套餐设置套餐管理完善

This commit is contained in:
2026-02-02 11:08:19 +08:00
parent 063be326eb
commit 6c15f0d4d5
2 changed files with 15 additions and 9 deletions

View File

@@ -264,14 +264,16 @@ function getDiseaseTreatmentList() {
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;
});
// 动态加载所有 locationFormOptions 的子节点(包括药库、药房、耗材库)
if (response.data.locationFormOptions && response.data.locationFormOptions.length > 0) {
response.data.locationFormOptions.forEach((option, index) => {
getDiseaseInitLoc(option.value).then((children) => {
if (pharmacyDepartmentOptions.value && pharmacyDepartmentOptions.value[index]) {
pharmacyDepartmentOptions.value[index].children = children;
}
});
});
}
console.log(pharmacyDepartmentOptions.value);
});