取药科室下项目显示异常,没有耗材库的修复
This commit is contained in:
@@ -64,6 +64,8 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|||||||
.add(new OrgLocInitDto.locationFormOption(LocationForm.CABINET.getValue(), LocationForm.CABINET.getInfo()));
|
.add(new OrgLocInitDto.locationFormOption(LocationForm.CABINET.getValue(), LocationForm.CABINET.getInfo()));
|
||||||
chargeItemStatusOptions.add(
|
chargeItemStatusOptions.add(
|
||||||
new OrgLocInitDto.locationFormOption(LocationForm.PHARMACY.getValue(), LocationForm.PHARMACY.getInfo()));
|
new OrgLocInitDto.locationFormOption(LocationForm.PHARMACY.getValue(), LocationForm.PHARMACY.getInfo()));
|
||||||
|
chargeItemStatusOptions.add(
|
||||||
|
new OrgLocInitDto.locationFormOption(LocationForm.WAREHOUSE.getValue(), LocationForm.WAREHOUSE.getInfo()));
|
||||||
|
|
||||||
// 获取科室下拉选列表
|
// 获取科室下拉选列表
|
||||||
List<Organization> organizationList = organizationService.getList(OrganizationType.DEPARTMENT.getValue(), null);
|
List<Organization> organizationList = organizationService.getList(OrganizationType.DEPARTMENT.getValue(), null);
|
||||||
@@ -89,6 +91,8 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|||||||
locationList = locationService.getCabinetList();
|
locationList = locationService.getCabinetList();
|
||||||
} else if (LocationForm.PHARMACY.getValue().equals(locationForm)) {
|
} else if (LocationForm.PHARMACY.getValue().equals(locationForm)) {
|
||||||
locationList = locationService.getPharmacyList();
|
locationList = locationService.getPharmacyList();
|
||||||
|
} else if (LocationForm.WAREHOUSE.getValue().equals(locationForm)) {
|
||||||
|
locationList = locationService.getWarehouseList();
|
||||||
}
|
}
|
||||||
List<OrgLocInitDto.locationOption> locationOptions = locationList.stream()
|
List<OrgLocInitDto.locationOption> locationOptions = locationList.stream()
|
||||||
.map(location -> new OrgLocInitDto.locationOption(location.getId(), location.getName()))
|
.map(location -> new OrgLocInitDto.locationOption(location.getId(), location.getName()))
|
||||||
|
|||||||
@@ -261,19 +261,19 @@ const filterNode = (value, data) => {
|
|||||||
/** 目录分类查询 */
|
/** 目录分类查询 */
|
||||||
function getDiseaseTreatmentList() {
|
function getDiseaseTreatmentList() {
|
||||||
getDiseaseTreatmentInit().then((response) => {
|
getDiseaseTreatmentInit().then((response) => {
|
||||||
console.log(response, 'response诊疗目录分类查询下拉树结构');
|
pharmacyDepartmentOptions.value = response.data.locationFormOptions || [];
|
||||||
pharmacyDepartmentOptions.value = response.data.locationFormOptions;
|
departmentOptions.value = response.data.departmentOptions || [];
|
||||||
departmentOptions.value = response.data.departmentOptions;
|
// 动态加载所有 locationFormOptions 的子节点(包括药库、药房、耗材库)
|
||||||
// 调用 getDiseaseInitLoc 并在 then 回调中赋值
|
if (pharmacyDepartmentOptions.value.length > 0) {
|
||||||
getDiseaseInitLoc(response.data.locationFormOptions[0].value).then((children) => {
|
pharmacyDepartmentOptions.value.forEach((option, index) => {
|
||||||
pharmacyDepartmentOptions.value[0].children = children;
|
if (!option?.value) return;
|
||||||
|
getDiseaseInitLoc(option.value).then((children) => {
|
||||||
|
if (pharmacyDepartmentOptions.value && pharmacyDepartmentOptions.value[index]) {
|
||||||
|
pharmacyDepartmentOptions.value[index].children = children || [];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
getDiseaseInitLoc(response.data.locationFormOptions[1].value).then((children) => {
|
|
||||||
pharmacyDepartmentOptions.value[1].children = children;
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
console.log(pharmacyDepartmentOptions.value);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user