bug 785 799 800

This commit is contained in:
Ranyunqiao
2026-06-26 11:49:52 +08:00
parent 8eb2c1e0e2
commit 3236375154
3 changed files with 23 additions and 11 deletions

View File

@@ -188,7 +188,7 @@ public class PatientHomeAppServiceImpl implements IPatientHomeAppService {
@Override
public List<OrgMetadata> getCaty() {
List<Organization> list = iOrganizationService.getList(OrganizationType.DEPARTMENT.getValue(),
OrganizationClass.INPATIENT.getCode());
String.valueOf(OrganizationClass.INPATIENT.getValue()));
List<OrgMetadata> orgMetadataList = new ArrayList<>();
OrgMetadata orgMetadata;
for (Organization organization : list) {

View File

@@ -920,14 +920,14 @@
clearable
@change="
(value) => {
expandOrder = [];
expandOrder.value = [];
// 当医嘱类型改变时,清空当前选择的项目名称,因为不同类型项目的数据结构可能不兼容
prescriptionList[scope.rowIndex].adviceName = undefined;
prescriptionList[scope.rowIndex].adviceType_dictText = '';
prescriptionList.value[scope.rowIndex].adviceName = undefined;
prescriptionList.value[scope.rowIndex].adviceType_dictText = '';
// 🔧 Bug Fix: 医嘱类型改变时重置minUnitQuantity和minUnitCode避免null值
prescriptionList[scope.rowIndex].minUnitQuantity = prescriptionList[scope.rowIndex].quantity || 1;
prescriptionList[scope.rowIndex].minUnitCode = prescriptionList[scope.rowIndex].unitCode;
prescriptionList[scope.rowIndex].minUnitCode_dictText = prescriptionList[scope.rowIndex].unitCode_dictText;
prescriptionList.value[scope.rowIndex].minUnitQuantity = prescriptionList.value[scope.rowIndex].quantity || 1;
prescriptionList.value[scope.rowIndex].minUnitCode = prescriptionList.value[scope.rowIndex].unitCode;
prescriptionList.value[scope.rowIndex].minUnitCode_dictText = prescriptionList.value[scope.rowIndex].unitCode_dictText;
adviceQueryParams.adviceTypes = [value]; // 🎯 修复:改为 adviceTypes复数
// 根据选择的类型设置categoryCode用于药品分类筛选
@@ -2417,10 +2417,14 @@ function checkUnit(item, row) {
}
// 行双击打开编辑块,仅待发送的可编辑
function clickRowDb(row, column, event) {
// vxe-table v4: @cell-dblclick 只传一个 params 对象,行数据在 params.rowDOM 事件在 params.$event
function clickRowDb(params) {
const row = params.row;
const $event = params.$event;
if (!row) return;
// 检查点击的是否是复选框
if (event && event.target.closest('.el-checkbox')) {
return; // 如果是复选框点击,不执行行点击逻辑
if ($event && $event.target && $event.target.closest('.el-checkbox')) {
return;
}
if (expandOrder.value.length > 0) {
proxy.$modal.msgWarning('有医嘱处于编辑状态,请先保存,再编辑此条医嘱');
@@ -2431,8 +2435,15 @@ function clickRowDb(row, column, event) {
row.isEdit = true;
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
prescriptionList.value[index] = row;
// 确保只有当前行展开先清空数组再添加当前行的uniqueKey
updateExpandOrder([row.uniqueKey]);
nextTick(() => {
if (prescriptionRef.value?.setRowExpand) {
const rowObj = prescriptionList.value.find(item => item.uniqueKey === row.uniqueKey);
if (rowObj) {
prescriptionRef.value.setRowExpand([rowObj], true);
}
}
});
}
}

View File

@@ -122,6 +122,7 @@ function loadPatientList(wardId, resolve) {
getPatientList({
wardId: wardId,
searchKey: searchKey.value || '',
pageSize: 999,
})
.then((res) => {
// 处理返回的患者数据