Compare commits
1 Commits
develop
...
赵云-fix-476
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7480acaeb1 |
@@ -200,10 +200,9 @@ public interface ICommonService {
|
|||||||
* 批号匹配
|
* 批号匹配
|
||||||
*
|
*
|
||||||
* @param encounterIdList 就诊id列表
|
* @param encounterIdList 就诊id列表
|
||||||
* @param requestIdList 医嘱请求id列表(可选,用于限定仅校验与当前执行医嘱关联的耗材)
|
|
||||||
* @return 处理结果
|
* @return 处理结果
|
||||||
*/
|
*/
|
||||||
R<?> lotNumberMatch(List<Long> encounterIdList, List<Long> requestIdList);
|
R<?> lotNumberMatch(List<Long> encounterIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据机构ID获取机构名称
|
* 根据机构ID获取机构名称
|
||||||
|
|||||||
@@ -39,10 +39,8 @@ import com.openhis.web.common.dto.*;
|
|||||||
import com.openhis.web.common.mapper.CommonAppMapper;
|
import com.openhis.web.common.mapper.CommonAppMapper;
|
||||||
import com.openhis.web.pharmacymanage.dto.InventoryDetailDto;
|
import com.openhis.web.pharmacymanage.dto.InventoryDetailDto;
|
||||||
import com.openhis.workflow.domain.DeviceDispense;
|
import com.openhis.workflow.domain.DeviceDispense;
|
||||||
import com.openhis.workflow.domain.DeviceRequest;
|
|
||||||
import com.openhis.workflow.domain.InventoryItem;
|
import com.openhis.workflow.domain.InventoryItem;
|
||||||
import com.openhis.workflow.service.IDeviceDispenseService;
|
import com.openhis.workflow.service.IDeviceDispenseService;
|
||||||
import com.openhis.workflow.service.IDeviceRequestService;
|
|
||||||
import com.openhis.workflow.service.IInventoryItemService;
|
import com.openhis.workflow.service.IInventoryItemService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -101,9 +99,6 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
@Resource
|
@Resource
|
||||||
private IDeviceDispenseService deviceDispenseService;
|
private IDeviceDispenseService deviceDispenseService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IDeviceRequestService deviceRequestService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取药房列表
|
* 获取药房列表
|
||||||
*
|
*
|
||||||
@@ -683,11 +678,10 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
* 批号匹配
|
* 批号匹配
|
||||||
*
|
*
|
||||||
* @param encounterIdList 就诊id列表
|
* @param encounterIdList 就诊id列表
|
||||||
* @param requestIdList 医嘱请求id列表(可选,用于限定仅校验与当前执行医嘱关联的耗材)
|
|
||||||
* @return 处理结果
|
* @return 处理结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> lotNumberMatch(List<Long> encounterIdList, List<Long> requestIdList) {
|
public R<?> lotNumberMatch(List<Long> encounterIdList) {
|
||||||
// 查询患者待发放的药品信息
|
// 查询患者待发放的药品信息
|
||||||
List<MedicationDispense> medicationDispenseList = medicationDispenseService
|
List<MedicationDispense> medicationDispenseList = medicationDispenseService
|
||||||
.list(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getEncounterId, encounterIdList)
|
.list(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getEncounterId, encounterIdList)
|
||||||
@@ -804,27 +798,10 @@ public class CommonServiceImpl implements ICommonService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 查询患者待发放的耗材信息
|
// 查询患者待发放的耗材信息
|
||||||
LambdaQueryWrapper<DeviceDispense> deviceDispenseQuery = new LambdaQueryWrapper<DeviceDispense>()
|
List<DeviceDispense> deviceDispenseList = deviceDispenseService
|
||||||
.in(DeviceDispense::getEncounterId, encounterIdList)
|
.list(new LambdaQueryWrapper<DeviceDispense>().in(DeviceDispense::getEncounterId, encounterIdList)
|
||||||
.eq(DeviceDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
.eq(DeviceDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||||
.eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode());
|
.eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||||
// 若传入requestIdList,则仅查询与指定医嘱请求关联的耗材,避免其他未执行医嘱的耗材记录干扰
|
|
||||||
if (requestIdList != null && !requestIdList.isEmpty()) {
|
|
||||||
List<Long> deviceReqIds = deviceRequestService
|
|
||||||
.list(new LambdaQueryWrapper<DeviceRequest>()
|
|
||||||
.in(DeviceRequest::getBasedOnId, requestIdList)
|
|
||||||
.eq(DeviceRequest::getBasedOnTable, CommonConstants.TableName.WOR_SERVICE_REQUEST))
|
|
||||||
.stream()
|
|
||||||
.map(DeviceRequest::getId)
|
|
||||||
.collect(java.util.stream.Collectors.toList());
|
|
||||||
if (!deviceReqIds.isEmpty()) {
|
|
||||||
deviceDispenseQuery.in(DeviceDispense::getDeviceReqId, deviceReqIds);
|
|
||||||
} else {
|
|
||||||
// 无关联的耗材请求,直接跳过耗材校验
|
|
||||||
deviceDispenseQuery.eq(DeviceDispense::getId, -1L);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
List<DeviceDispense> deviceDispenseList = deviceDispenseService.list(deviceDispenseQuery);
|
|
||||||
// 耗材批号匹配
|
// 耗材批号匹配
|
||||||
if (deviceDispenseList != null && !deviceDispenseList.isEmpty()) {
|
if (deviceDispenseList != null && !deviceDispenseList.isEmpty()) {
|
||||||
// 获取待发放的耗材id
|
// 获取待发放的耗材id
|
||||||
|
|||||||
@@ -274,13 +274,10 @@ public class CommonAppController {
|
|||||||
* 批号匹配
|
* 批号匹配
|
||||||
*
|
*
|
||||||
* @param encounterIdList 就诊id列表
|
* @param encounterIdList 就诊id列表
|
||||||
* @param requestIdList 医嘱请求id列表(可选,用于限定仅校验与当前执行医嘱关联的耗材)
|
|
||||||
* @return 处理结果
|
* @return 处理结果
|
||||||
*/
|
*/
|
||||||
@GetMapping("/lot-number-match")
|
@GetMapping("/lot-number-match")
|
||||||
public R<?> lotNumberMatch(
|
public R<?> lotNumberMatch(@RequestParam(value = "encounterIdList") List<Long> encounterIdList) {
|
||||||
@RequestParam(value = "encounterIdList") List<Long> encounterIdList,
|
return commonService.lotNumberMatch(encounterIdList);
|
||||||
@RequestParam(value = "requestIdList", required = false) List<Long> requestIdList) {
|
|
||||||
return commonService.lotNumberMatch(encounterIdList, requestIdList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
inpatientAdviceParam.setEncounterIds(null);
|
inpatientAdviceParam.setEncounterIds(null);
|
||||||
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
||||||
inpatientAdviceParam.setExeStatus(null);
|
inpatientAdviceParam.setExeStatus(null);
|
||||||
Integer requestStatus = inpatientAdviceParam.getRequestStatus();
|
// requestStatus由前端tab控制,后端SQL已通过CASE条件处理校对状态过滤,无需再作为SQL条件
|
||||||
inpatientAdviceParam.setRequestStatus(null);
|
inpatientAdviceParam.setRequestStatus(null);
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
QueryWrapper<InpatientAdviceParam> queryWrapper
|
QueryWrapper<InpatientAdviceParam> queryWrapper
|
||||||
@@ -198,7 +198,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
ParticipantType.ADMITTING_DOCTOR.getCode(), AccountType.PERSONAL_CASH_ACCOUNT.getCode(),
|
ParticipantType.ADMITTING_DOCTOR.getCode(), AccountType.PERSONAL_CASH_ACCOUNT.getCode(),
|
||||||
ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(),
|
ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(),
|
||||||
ChargeItemStatus.REFUNDED.getValue(), EncounterClass.IMP.getValue(),
|
ChargeItemStatus.REFUNDED.getValue(), EncounterClass.IMP.getValue(),
|
||||||
GenerateSource.DOCTOR_PRESCRIPTION.getValue(), requestStatus);
|
GenerateSource.DOCTOR_PRESCRIPTION.getValue());
|
||||||
inpatientAdvicePage.getRecords().forEach(e -> {
|
inpatientAdvicePage.getRecords().forEach(e -> {
|
||||||
// 是否皮试
|
// 是否皮试
|
||||||
e.setSkinTestFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getSkinTestFlag()));
|
e.setSkinTestFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getSkinTestFlag()));
|
||||||
|
|||||||
@@ -69,6 +69,5 @@ public interface AdviceProcessAppMapper {
|
|||||||
@Param("active") Integer active, @Param("bed") Integer bed, @Param("admittingDoctor") String admittingDoctor,
|
@Param("active") Integer active, @Param("bed") Integer bed, @Param("admittingDoctor") String admittingDoctor,
|
||||||
@Param("personalCashAccount") String personalCashAccount, @Param("billable") Integer billable,
|
@Param("personalCashAccount") String personalCashAccount, @Param("billable") Integer billable,
|
||||||
@Param("billed") Integer billed, @Param("refunded") Integer refunded, @Param("imp") Integer imp,
|
@Param("billed") Integer billed, @Param("refunded") Integer refunded, @Param("imp") Integer imp,
|
||||||
@Param("doctorPrescription") Integer doctorPrescription,
|
@Param("doctorPrescription") Integer doctorPrescription);
|
||||||
@Param("requestStatus") Integer requestStatus);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,35 +81,36 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
|||||||
Long requestFormId = requestFormSaveDto.getRequestFormId();
|
Long requestFormId = requestFormSaveDto.getRequestFormId();
|
||||||
boolean isEdit = requestFormId != null && requestFormId != 0L;
|
boolean isEdit = requestFormId != null && requestFormId != 0L;
|
||||||
|
|
||||||
// 校验所有activityList中的项目是否都配置了执行科室,并收集positionId供后续使用
|
// 诊疗执行科室配置校验(必须在任何数据库操作之前)
|
||||||
// 必须在任何数据库操作之前完成全部校验,避免部分保存后异常导致脏数据
|
|
||||||
List<ActivitySaveDto> activityList = requestFormSaveDto.getActivityList();
|
|
||||||
if (activityList == null || activityList.isEmpty()) {
|
|
||||||
throw new ServiceException("请选择检查项目");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 🔧 Bug #475: 查询诊疗执行科室配置
|
|
||||||
List<ActivityOrganizationConfigDto> activityOrganizationConfig =
|
List<ActivityOrganizationConfigDto> activityOrganizationConfig =
|
||||||
requestFormManageAppMapper.getActivityOrganizationConfig(typeCode);
|
requestFormManageAppMapper.getActivityOrganizationConfig(typeCode);
|
||||||
|
if (activityOrganizationConfig.isEmpty()) {
|
||||||
|
throw new ServiceException("请先配置当前时间段的执行科室");
|
||||||
|
}
|
||||||
|
|
||||||
// 缓存校验结果,先全部验证通过后再进行数据库操作
|
// 逐个校验activityList中的项目是否都配置了执行科室,并收集positionId供后续使用
|
||||||
// 优先使用前端传入的positionId(用户手动选择的发往科室),仅在未选择时使用配置的执行科室
|
// 必须在任何数据库操作之前完成全部校验,避免部分保存后异常导致脏数据
|
||||||
|
// 🔧 Bug #516: 优先使用前端传入的positionId(用户手动选择的发往科室),仅在未选择时使用配置的执行科室
|
||||||
|
List<ActivitySaveDto> activityList = requestFormSaveDto.getActivityList();
|
||||||
|
// 缓存校验结果,避免主循环中重复查询和可能出现的数据不一致
|
||||||
java.util.Map<Long, Long> activityIdToPositionIdMap = new java.util.HashMap<>();
|
java.util.Map<Long, Long> activityIdToPositionIdMap = new java.util.HashMap<>();
|
||||||
for (ActivitySaveDto activitySaveDto : activityList) {
|
if (activityList != null && !activityList.isEmpty()) {
|
||||||
// 优先使用前端传入的positionId(用户手动选择的科室)
|
for (ActivitySaveDto activitySaveDto : activityList) {
|
||||||
Long frontendPositionId = activitySaveDto.getPositionId();
|
// 优先使用前端传入的positionId(用户手动选择的科室)
|
||||||
if (frontendPositionId != null) {
|
Long frontendPositionId = activitySaveDto.getPositionId();
|
||||||
activityIdToPositionIdMap.put(activitySaveDto.getAdviceDefinitionId(), frontendPositionId);
|
if (frontendPositionId != null) {
|
||||||
continue;
|
activityIdToPositionIdMap.put(activitySaveDto.getAdviceDefinitionId(), frontendPositionId);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 前端未传入时,使用配置的执行科室
|
||||||
|
Long configPositionId = activityOrganizationConfig.stream()
|
||||||
|
.filter(dto -> activitySaveDto.getAdviceDefinitionId().equals(dto.getActivityDefinitionId()))
|
||||||
|
.map(ActivityOrganizationConfigDto::getOrganizationId).findFirst().orElse(null);
|
||||||
|
if (configPositionId == null) {
|
||||||
|
throw new ServiceException(activitySaveDto.getAdviceDefinitionName() + "未配置当前时间段的执行科室");
|
||||||
|
}
|
||||||
|
activityIdToPositionIdMap.put(activitySaveDto.getAdviceDefinitionId(), configPositionId);
|
||||||
}
|
}
|
||||||
// 前端未传入时,使用配置的执行科室
|
|
||||||
Long configPositionId = activityOrganizationConfig.stream()
|
|
||||||
.filter(dto -> activitySaveDto.getAdviceDefinitionId().equals(dto.getActivityDefinitionId()))
|
|
||||||
.map(ActivityOrganizationConfigDto::getOrganizationId).findFirst().orElse(null);
|
|
||||||
if (configPositionId == null) {
|
|
||||||
throw new ServiceException(activitySaveDto.getAdviceDefinitionName() + "未配置当前时间段的执行科室");
|
|
||||||
}
|
|
||||||
activityIdToPositionIdMap.put(activitySaveDto.getAdviceDefinitionId(), configPositionId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 诊疗处方号
|
// 诊疗处方号
|
||||||
|
|||||||
@@ -290,7 +290,6 @@
|
|||||||
WHERE T1.delete_flag = '0'
|
WHERE T1.delete_flag = '0'
|
||||||
AND T1.refund_medicine_id IS NULL
|
AND T1.refund_medicine_id IS NULL
|
||||||
AND T1.generate_source_enum = #{doctorPrescription}
|
AND T1.generate_source_enum = #{doctorPrescription}
|
||||||
AND T1.status_enum = #{requestStatus}
|
|
||||||
AND CASE WHEN T1.status_enum = #{draft}
|
AND CASE WHEN T1.status_enum = #{draft}
|
||||||
THEN T1.performer_check_id IS NOT NULL
|
THEN T1.performer_check_id IS NOT NULL
|
||||||
ELSE 1=1 END
|
ELSE 1=1 END
|
||||||
@@ -423,7 +422,6 @@
|
|||||||
AND af.delete_flag = '0'
|
AND af.delete_flag = '0'
|
||||||
WHERE T1.delete_flag = '0'
|
WHERE T1.delete_flag = '0'
|
||||||
AND T1.generate_source_enum = #{doctorPrescription}
|
AND T1.generate_source_enum = #{doctorPrescription}
|
||||||
AND T1.status_enum = #{requestStatus}
|
|
||||||
AND CASE WHEN T1.status_enum = #{draft}
|
AND CASE WHEN T1.status_enum = #{draft}
|
||||||
THEN T1.performer_check_id IS NOT NULL
|
THEN T1.performer_check_id IS NOT NULL
|
||||||
ELSE 1=1 END
|
ELSE 1=1 END
|
||||||
|
|||||||
@@ -61,14 +61,15 @@
|
|||||||
GROUP BY drf.id, drf.encounter_id, drf.prescription_no, drf.name, drf.desc_json,
|
GROUP BY drf.id, drf.encounter_id, drf.prescription_no, drf.name, drf.desc_json,
|
||||||
drf.requester_id, drf.create_time, ap.name
|
drf.requester_id, drf.create_time, ap.name
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
HAVING CASE
|
HAVING CASE MIN(wsr.status_enum)
|
||||||
WHEN MIN(wsr.status_enum) = 1 THEN 0
|
WHEN 1 THEN 0
|
||||||
WHEN MIN(wsr.status_enum) = 2 THEN 1
|
WHEN 2 THEN 1
|
||||||
WHEN MIN(wsr.status_enum) = 3 AND MAX(CASE WHEN wsr.performer_check_id IS NOT NULL THEN 1 ELSE 0 END) = 1 THEN 2
|
WHEN 3 THEN 4
|
||||||
WHEN MIN(wsr.status_enum) = 3 THEN 4
|
WHEN 4 THEN 4
|
||||||
WHEN MIN(wsr.status_enum) = 4 THEN 3
|
WHEN 5 THEN 5
|
||||||
WHEN MIN(wsr.status_enum) = 5 OR MIN(wsr.status_enum) = 6 OR MIN(wsr.status_enum) = 7 THEN 7
|
WHEN 6 THEN 5
|
||||||
WHEN MIN(wsr.status_enum) = 8 THEN 6
|
WHEN 7 THEN 5
|
||||||
|
WHEN 8 THEN 6
|
||||||
ELSE NULL
|
ELSE NULL
|
||||||
END = #{status}::integer
|
END = #{status}::integer
|
||||||
</if>
|
</if>
|
||||||
@@ -77,11 +78,7 @@
|
|||||||
<select id="getRequestFormDetail" resultType="com.openhis.web.regdoctorstation.dto.RequestFormDetailQueryDto">
|
<select id="getRequestFormDetail" resultType="com.openhis.web.regdoctorstation.dto.RequestFormDetailQueryDto">
|
||||||
SELECT wsr.quantity,
|
SELECT wsr.quantity,
|
||||||
wsr.unit_code,
|
wsr.unit_code,
|
||||||
COALESCE(
|
COALESCE(wad.NAME, wsr.content_json::jsonb->>'surgeryName') AS advice_name,
|
||||||
wad.NAME,
|
|
||||||
wsr.content_json::jsonb->>'surgeryName',
|
|
||||||
'检验项目'
|
|
||||||
) AS advice_name,
|
|
||||||
aci.total_price
|
aci.total_price
|
||||||
FROM wor_service_request AS wsr
|
FROM wor_service_request AS wsr
|
||||||
LEFT JOIN wor_activity_definition AS wad ON wad.ID = wsr.activity_id
|
LEFT JOIN wor_activity_definition AS wad ON wad.ID = wsr.activity_id
|
||||||
@@ -91,7 +88,6 @@
|
|||||||
AND aci.delete_flag = '0'
|
AND aci.delete_flag = '0'
|
||||||
WHERE wsr.delete_flag = '0'
|
WHERE wsr.delete_flag = '0'
|
||||||
AND wsr.prescription_no = #{prescriptionNo}
|
AND wsr.prescription_no = #{prescriptionNo}
|
||||||
ORDER BY wsr.id
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getActivityOrganizationConfig"
|
<select id="getActivityOrganizationConfig"
|
||||||
|
|||||||
@@ -389,8 +389,7 @@
|
|||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
<span class="item-price">¥{{ item.price }}/{{ item.unit || "次" }}</span>
|
<span class="item-price">¥{{ item.price }}/{{ item.unit || "次" }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- Bug #500修复: 使用 v-show + 占位符,避免加载提示出现/消失时高度跳变 -->
|
<div v-if="categoryLoadingSet.has(cat.typeId)" class="category-loading-hint">
|
||||||
<div v-show="categoryLoadingSet.has(cat.typeId)" class="category-loading-hint">
|
|
||||||
加载中...
|
加载中...
|
||||||
</div>
|
</div>
|
||||||
<!-- Bug #428修复: 渲染分类联动加载的检查方法列表 -->
|
<!-- Bug #428修复: 渲染分类联动加载的检查方法列表 -->
|
||||||
@@ -1805,8 +1804,8 @@ defineExpose({ getList });
|
|||||||
.collapse-scroll {
|
.collapse-scroll {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden; /* Bug #500: 防止切换时水平方向溢出导致抖动 */
|
||||||
min-height: 350px; /* Bug #500: 增大最小高度,确保切换分类时容器高度不会收缩导致抖动 */
|
min-height: 120px; /* Bug #500: 固定最小高度,避免分类切换时 flex 容器高度突变 */
|
||||||
}
|
}
|
||||||
.empty-hint {
|
.empty-hint {
|
||||||
color: #909399;
|
color: #909399;
|
||||||
@@ -2120,18 +2119,18 @@ defineExpose({ getList });
|
|||||||
height: auto;
|
height: auto;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
/* Bug #500修复: 折叠内容不添加额外过渡动画,避免与 el-collapse 内部动画冲突导致双重动画/闪烁 */
|
/* Bug #500修复: 折叠内容使用明确属性过渡,避免 transition: all 导致子元素意外动画 */
|
||||||
:deep(.el-collapse-item__content) {
|
:deep(.el-collapse-item__content) {
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
|
transition: height 0.3s ease, max-height 0.3s ease;
|
||||||
}
|
}
|
||||||
/* Bug #500: 折叠面板容器不加 border,保持简洁 */
|
/* Bug #500: 折叠面板动画容器,添加 overflow:hidden 防止展开时内容溢出导致闪烁 */
|
||||||
:deep(.el-collapse-item__wrap) {
|
:deep(.el-collapse-item__wrap) {
|
||||||
border: none;
|
border: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
/* Bug #500: 分类项不加 margin 过渡,避免展开/收起时意外位移 */
|
|
||||||
:deep(.el-collapse-item) {
|
:deep(.el-collapse-item) {
|
||||||
/* 不使用 transition,依赖 el-collapse 原生动画 */
|
transition: margin 0.2s ease;
|
||||||
}
|
}
|
||||||
/* Bug #500: 分类加载中提示样式 */
|
/* Bug #500: 分类加载中提示样式 */
|
||||||
.category-loading-hint {
|
.category-loading-hint {
|
||||||
|
|||||||
@@ -1141,9 +1141,7 @@ function submitForm() {
|
|||||||
// 保存麻醉方式
|
// 保存麻醉方式
|
||||||
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
||||||
open.value = false
|
open.value = false
|
||||||
// 子组件自身主动刷新列表(立即),确保数据展示不依赖父组件事件
|
// 由父组件 @saved 事件负责刷新列表(带延迟确保后端事务已提交)
|
||||||
getList()
|
|
||||||
// 通知父组件刷新医嘱列表(父组件也会带延迟再次刷新手术列表作为兜底)
|
|
||||||
emit('saved')
|
emit('saved')
|
||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息')
|
proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息')
|
||||||
@@ -1160,8 +1158,6 @@ function submitForm() {
|
|||||||
// 保存麻醉方式
|
// 保存麻醉方式
|
||||||
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
||||||
open.value = false
|
open.value = false
|
||||||
// 子组件自身主动刷新列表(立即)
|
|
||||||
getList()
|
|
||||||
// 由父组件 @saved 事件负责刷新列表
|
// 由父组件 @saved 事件负责刷新列表
|
||||||
emit('saved')
|
emit('saved')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -93,6 +93,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createTime" label="创建时间" width="160" />
|
<el-table-column prop="createTime" label="创建时间" width="160" />
|
||||||
<el-table-column prop="prescriptionNo" label="申请单号" width="140" />
|
<el-table-column prop="prescriptionNo" label="申请单号" width="140" />
|
||||||
|
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||||
<el-table-column label="申请单状态" width="120" align="center">
|
<el-table-column label="申请单状态" width="120" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag :type="getStatusTagType(scope.row.status)" effect="plain" round>
|
<el-tag :type="getStatusTagType(scope.row.status)" effect="plain" round>
|
||||||
@@ -100,7 +101,6 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
|
||||||
<el-table-column label="操作" width="280" align="center" fixed="right">
|
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- 详情 - 所有状态都显示 -->
|
<!-- 详情 - 所有状态都显示 -->
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
currentDetail.patientName || '-'
|
currentDetail.patientName || '-'
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申请单名称">{{
|
<el-descriptions-item label="申请单名称">{{
|
||||||
buildApplicationName(currentDetail)
|
currentDetail.name || '-'
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间">{{
|
<el-descriptions-item label="创建时间">{{
|
||||||
currentDetail.createTime || '-'
|
currentDetail.createTime || '-'
|
||||||
|
|||||||
@@ -142,11 +142,6 @@
|
|||||||
<el-table-column label="医嘱" align="center" prop="productName" width="300">
|
<el-table-column label="医嘱" align="center" prop="productName" width="300">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<template v-if="getRowDisabled(scope.row)">
|
<template v-if="getRowDisabled(scope.row)">
|
||||||
<!-- 当行的 adviceType 不在当前选项列表中时,显示标签而非下拉框 -->
|
|
||||||
<template v-if="!hasAdviceTypeOption(scope.row)">
|
|
||||||
<el-tag size="small" type="primary">{{ getAdviceTypeLabel(scope.row.adviceType) }}</el-tag>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 35%; margin-right: 8px"
|
style="width: 35%; margin-right: 8px"
|
||||||
:model-value="getRowSelectValue(scope.row)"
|
:model-value="getRowSelectValue(scope.row)"
|
||||||
@@ -221,7 +216,6 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
|
||||||
</template>
|
</template>
|
||||||
<span v-else>{{ scope.row.adviceName }}</span>
|
<span v-else>{{ scope.row.adviceName }}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -756,31 +750,6 @@ function getRowDisabled(row) {
|
|||||||
return row.isEdit;
|
return row.isEdit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断行的 adviceType 是否在当前 adviceTypeList 选项中有匹配项
|
|
||||||
* 修复 Bug #488:避免 el-select 因无匹配选项而回显为纯数字
|
|
||||||
*/
|
|
||||||
function hasAdviceTypeOption(row) {
|
|
||||||
if (!row.adviceType && row.adviceType !== 0) return false;
|
|
||||||
if (row.adviceType == 1 && row.categoryCode) {
|
|
||||||
const compositeValue = '1-' + row.categoryCode;
|
|
||||||
return adviceTypeList.value.some(item => item.value === compositeValue);
|
|
||||||
}
|
|
||||||
return adviceTypeList.value.some(item => item.value === row.adviceType);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将原始 adviceType 数字映射为人类可读标签
|
|
||||||
* 修复 Bug #488:当 adviceType 不在选项列表中时,显示标签而非数字
|
|
||||||
*/
|
|
||||||
function getAdviceTypeLabel(type) {
|
|
||||||
if (!type && type !== 0) return '';
|
|
||||||
// 优先使用字典文本(如果后端返回了 adviceType_dictText)
|
|
||||||
// 但由于当前行数据可能没有 dictText,提供兜底映射
|
|
||||||
const fallbackMap = { 1: '西药', 2: '中成药', 3: '诊疗', 4: '耗材', 5: '会诊', 6: '手术', 23: '检查' };
|
|
||||||
return fallbackMap[type] || String(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将行的 adviceType + categoryCode 映射为 el-select 的选中值
|
* 将行的 adviceType + categoryCode 映射为 el-select 的选中值
|
||||||
* 药品子分类使用复合值如 '1-2'(adviceType-categoryCode),诊疗/手术/全部使用原始值
|
* 药品子分类使用复合值如 '1-2'(adviceType-categoryCode),诊疗/手术/全部使用原始值
|
||||||
@@ -863,22 +832,13 @@ function clickRowDb(row, column, event) {
|
|||||||
}
|
}
|
||||||
row.showPopover = false;
|
row.showPopover = false;
|
||||||
// 仅”待签发(statusEnum==1)”允许编辑;”已签发(statusEnum==2)”及之后状态不允许编辑
|
// 仅”待签发(statusEnum==1)”允许编辑;”已签发(statusEnum==2)”及之后状态不允许编辑
|
||||||
// 使用 Number() 做类型转换,确保后端返回的数值能正确比较
|
if (row.statusEnum == 1) {
|
||||||
if (Number(row.statusEnum) === 1) {
|
|
||||||
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
||||||
row.therapyEnum = String(row.therapyEnum ?? '1');
|
row.therapyEnum = String(row.therapyEnum ?? '1');
|
||||||
row.isEdit = true;
|
row.isEdit = true;
|
||||||
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
|
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
|
||||||
if (index !== -1) {
|
prescriptionList.value[index] = row;
|
||||||
prescriptionList.value.splice(index, 1, row);
|
expandOrder.value = [row.uniqueKey];
|
||||||
// 使用 nextTick 确保数据更新后再设置展开状态,保证 el-table 能正确识别 row-key
|
|
||||||
nextTick(() => {
|
|
||||||
expandOrder.value = [row.uniqueKey];
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.warn('⚠️ clickRowDb 未找到匹配行: uniqueKey=', row.uniqueKey, ', row=', row);
|
|
||||||
proxy.$modal.msgWarning('无法进入编辑模式,请刷新列表后重试');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -950,8 +910,9 @@ function handleFocus(row, index) {
|
|||||||
// 用 adviceType + categoryCode 组合查找匹配的选项
|
// 用 adviceType + categoryCode 组合查找匹配的选项
|
||||||
const selectValue = (adviceType == 1 && row.categoryCode) ? '1-' + row.categoryCode : adviceType;
|
const selectValue = (adviceType == 1 && row.categoryCode) ? '1-' + row.categoryCode : adviceType;
|
||||||
const selectedItem = adviceTypeList.value.find(item => item.value === selectValue) || adviceTypeList.value.find(item => item.adviceType === adviceType);
|
const selectedItem = adviceTypeList.value.find(item => item.value === selectValue) || adviceTypeList.value.find(item => item.adviceType === adviceType);
|
||||||
// 当行没有显式选择医嘱类型时,使用已配置的默认categoryCode,确保后端能返回结果
|
// 修复Bug #486:当行没有显式选择医嘱类型时(row.adviceType为undefined),
|
||||||
const categoryCode = row.adviceType !== undefined ? (selectedItem ? selectedItem.categoryCode : '') : (adviceQueryParams.value.categoryCode || '');
|
// 不传categoryCode,让搜索在全药库中进行;只有行已选择类型时才用对应categoryCode过滤
|
||||||
|
const categoryCode = row.adviceType !== undefined ? (selectedItem ? selectedItem.categoryCode : '') : '';
|
||||||
const searchKey = row.adviceName || '';
|
const searchKey = row.adviceName || '';
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -988,8 +949,9 @@ function handleChange(value) {
|
|||||||
// 用 adviceType + categoryCode 组合查找匹配的选项
|
// 用 adviceType + categoryCode 组合查找匹配的选项
|
||||||
const selectValue = (adviceType == 1 && row?.categoryCode) ? '1-' + row.categoryCode : adviceType;
|
const selectValue = (adviceType == 1 && row?.categoryCode) ? '1-' + row.categoryCode : adviceType;
|
||||||
const selectedItem = adviceTypeList.value.find(item => item.value === selectValue) || adviceTypeList.value.find(item => item.adviceType === adviceType);
|
const selectedItem = adviceTypeList.value.find(item => item.value === selectValue) || adviceTypeList.value.find(item => item.adviceType === adviceType);
|
||||||
// 当行没有显式选择医嘱类型时,使用已配置的默认categoryCode,确保后端能返回结果
|
// 修复Bug #486:当行没有显式选择医嘱类型时(row?.adviceType为undefined),
|
||||||
const categoryCode = row?.adviceType !== undefined ? (selectedItem ? selectedItem.categoryCode : '') : (adviceQueryParams.value.categoryCode || '');
|
// 不传categoryCode,让搜索在全药库中进行;只有行已选择类型时才用对应categoryCode过滤
|
||||||
|
const categoryCode = row?.adviceType !== undefined ? (selectedItem ? selectedItem.categoryCode : '') : '';
|
||||||
// 修复Bug #453:当adviceType为空字符串或NaN时,不传具体类型,让refresh函数根据searchKey决定搜索范围
|
// 修复Bug #453:当adviceType为空字符串或NaN时,不传具体类型,让refresh函数根据searchKey决定搜索范围
|
||||||
const effectiveAdviceType = (adviceType && !isNaN(Number(adviceType))) ? adviceType : '';
|
const effectiveAdviceType = (adviceType && !isNaN(Number(adviceType))) ? adviceType : '';
|
||||||
tableRef.refresh(effectiveAdviceType, categoryCode, value);
|
tableRef.refresh(effectiveAdviceType, categoryCode, value);
|
||||||
@@ -1416,9 +1378,6 @@ function handleSaveSign(row, index) {
|
|||||||
bindMethod.value[itemNo] = true;
|
bindMethod.value[itemNo] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
// 绑定设备接口失败不影响主流程保存,静默降级
|
|
||||||
console.warn('绑定设备检查接口调用失败(adviceType=' + row.adviceType + ', itemNo=' + itemNo + ')');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fee-dialog-wrapper">
|
<el-dialog v-model="dialogVisible" title="补费" width="80%" :close-on-click-modal="false">
|
||||||
<el-dialog v-model="dialogVisible" title="补费" width="80%" :close-on-click-modal="false">
|
|
||||||
<div style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
|
<div style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
|
||||||
患者信息:{{
|
患者信息:{{
|
||||||
props.patientInfo.patientName +
|
props.patientInfo.patientName +
|
||||||
@@ -252,7 +251,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 划价组套选择对话框 -->
|
<!-- 划价组套选择对话框 -->
|
||||||
<el-dialog v-model="groupSetDialogVisible" title="划价组套选择" width="600px" :close-on-click-modal="false" append-to-body :z-index="3000" destroy-on-close>
|
<el-dialog v-model="groupSetDialogVisible" title="划价组套选择" width="600px" :close-on-click-modal="false" append-to-body :z-index="3000">
|
||||||
<div style="margin-bottom: 15px; display: flex; align-items: center; gap: 10px">
|
<div style="margin-bottom: 15px; display: flex; align-items: center; gap: 10px">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="groupSetSearchText"
|
v-model="groupSetSearchText"
|
||||||
@@ -303,7 +302,6 @@
|
|||||||
<el-button type="primary" @click="applyGroupSet" :disabled="!selectedGroupSet">应用</el-button>
|
<el-button type="primary" @click="applyGroupSet" :disabled="!selectedGroupSet">应用</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -521,28 +519,31 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// 加载科室选项(递归扁平化树形结构)
|
// 加载科室选项(支持树形/扁平两种数据结构)
|
||||||
function loadDepartmentOptions() {
|
function loadDepartmentOptions() {
|
||||||
getOrgList()
|
getOrgList()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (!res?.data?.records?.length) {
|
if (res.data) {
|
||||||
departmentOptions.value = [];
|
// 尝试从树形结构中取:records[0].children
|
||||||
return;
|
if (res.data.records && res.data.records.length > 0) {
|
||||||
}
|
if (res.data.records[0].children && res.data.records[0].children.length > 0) {
|
||||||
// 递归扁平化树形结构,提取所有科室节点
|
departmentOptions.value = res.data.records[0].children;
|
||||||
const flattenTree = (nodes) => {
|
return;
|
||||||
const result = [];
|
|
||||||
for (const node of nodes) {
|
|
||||||
if (node?.id && node?.name) {
|
|
||||||
result.push(node);
|
|
||||||
}
|
}
|
||||||
if (node?.children?.length) {
|
// 如果 records[0] 有 id 和 name(非树根节点),直接用所有 records
|
||||||
result.push(...flattenTree(node.children));
|
if (res.data.records[0].id) {
|
||||||
|
departmentOptions.value = res.data.records;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
// 兜底:如果 records 不存在或为空,尝试直接使用 data 本身
|
||||||
};
|
if (Array.isArray(res.data)) {
|
||||||
departmentOptions.value = flattenTree(res.data.records);
|
departmentOptions.value = res.data;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 所有方式都失败,置空
|
||||||
|
departmentOptions.value = [];
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.warn('科室列表加载失败(可能无权限)');
|
console.warn('科室列表加载失败(可能无权限)');
|
||||||
@@ -608,13 +609,13 @@ function getUnitCodeOptions(row) {
|
|||||||
const unitCodes = [];
|
const unitCodes = [];
|
||||||
// 大单位:优先用 code,code 缺失时用字典文本兜底
|
// 大单位:优先用 code,code 缺失时用字典文本兜底
|
||||||
if (row.unitCode != null && String(row.unitCode) !== '') {
|
if (row.unitCode != null && String(row.unitCode) !== '') {
|
||||||
unitCodes.push({ code: String(row.unitCode), codeText: row.unitCode_dictText || String(row.unitCode) });
|
unitCodes.push({ code: String(row.unitCode), codeText: row.unitCode_dictText });
|
||||||
} else if (row.unitCode_dictText) {
|
} else if (row.unitCode_dictText) {
|
||||||
unitCodes.push({ code: row.unitCode_dictText, codeText: row.unitCode_dictText });
|
unitCodes.push({ code: row.unitCode_dictText, codeText: row.unitCode_dictText });
|
||||||
}
|
}
|
||||||
// 小单位:同上
|
// 小单位:同上
|
||||||
if (row.minUnitCode != null && String(row.minUnitCode) !== '') {
|
if (row.minUnitCode != null && String(row.minUnitCode) !== '') {
|
||||||
unitCodes.push({ code: String(row.minUnitCode), codeText: row.minUnitCode_dictText || String(row.minUnitCode) });
|
unitCodes.push({ code: String(row.minUnitCode), codeText: row.minUnitCode_dictText });
|
||||||
} else if (row.minUnitCode_dictText) {
|
} else if (row.minUnitCode_dictText) {
|
||||||
unitCodes.push({ code: row.minUnitCode_dictText, codeText: row.minUnitCode_dictText });
|
unitCodes.push({ code: row.minUnitCode_dictText, codeText: row.minUnitCode_dictText });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,8 +241,6 @@ const loading = ref(false);
|
|||||||
const chooseAll = ref(false);
|
const chooseAll = ref(false);
|
||||||
// 独立维护选中行ID集合,避免el-table内部selection状态异常导致联动全选
|
// 独立维护选中行ID集合,避免el-table内部selection状态异常导致联动全选
|
||||||
const selectedRowIds = ref(new Set());
|
const selectedRowIds = ref(new Set());
|
||||||
// 跳过选中事件级联:程序化调用 toggleRowSelection 时阻止 handleRowSelect 触发 selectAllCheckboxesInRow
|
|
||||||
const skipSelectCascade = ref(false);
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
exeStatus: {
|
exeStatus: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -486,13 +484,8 @@ function handleExecute() {
|
|||||||
if (hasServiceRequest) {
|
if (hasServiceRequest) {
|
||||||
// 仅传入选中医嘱对应的 encounterId,避免其他患者的耗材记录干扰
|
// 仅传入选中医嘱对应的 encounterId,避免其他患者的耗材记录干扰
|
||||||
const selectedEncounterIds = [...new Set(list.map((item) => item.encounterId).filter(Boolean))];
|
const selectedEncounterIds = [...new Set(list.map((item) => item.encounterId).filter(Boolean))];
|
||||||
// 仅传入诊疗类医嘱的 requestId,让后端仅校验与本次执行相关的耗材,避免其他未执行医嘱的耗材记录干扰
|
|
||||||
const selectedRequestIds = list
|
|
||||||
.filter((item) => String(item.adviceTable || '') === 'wor_service_request')
|
|
||||||
.map((item) => item.requestId)
|
|
||||||
.filter(Boolean);
|
|
||||||
if (selectedEncounterIds.length > 0) {
|
if (selectedEncounterIds.length > 0) {
|
||||||
lotNumberMatch({ encounterIdList: selectedEncounterIds, requestIdList: selectedRequestIds }, { skipErrorMsg: true })
|
lotNumberMatch({ encounterIdList: selectedEncounterIds }, { skipErrorMsg: true })
|
||||||
.then((matchRes) => {
|
.then((matchRes) => {
|
||||||
if (matchRes && matchRes.code !== 200) {
|
if (matchRes && matchRes.code !== 200) {
|
||||||
console.warn('lotNumberMatch returned error:', matchRes.msg);
|
console.warn('lotNumberMatch returned error:', matchRes.msg);
|
||||||
@@ -657,7 +650,6 @@ function handleRateChange(value, date, time, row, rateItem) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handelSwicthChange(value) {
|
function handelSwicthChange(value) {
|
||||||
skipSelectCascade.value = true;
|
|
||||||
prescriptionList.value.forEach((item, index) => {
|
prescriptionList.value.forEach((item, index) => {
|
||||||
const tableRef = proxy.$refs['tableRef' + index];
|
const tableRef = proxy.$refs['tableRef' + index];
|
||||||
if (tableRef && tableRef[0]) {
|
if (tableRef && tableRef[0]) {
|
||||||
@@ -678,15 +670,12 @@ function handelSwicthChange(value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
skipSelectCascade.value = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 默认选中全部行
|
// 默认选中全部行
|
||||||
function defaultSelectAllRows() {
|
function defaultSelectAllRows() {
|
||||||
// 清空并重建选中集合
|
// 清空并重建选中集合
|
||||||
selectedRowIds.value.clear();
|
selectedRowIds.value.clear();
|
||||||
// 阻止 toggleRowSelection 触发 handleRowSelect 中的 selectAllCheckboxesInRow 级联
|
|
||||||
skipSelectCascade.value = true;
|
|
||||||
prescriptionList.value.forEach((item, index) => {
|
prescriptionList.value.forEach((item, index) => {
|
||||||
const tableRef = proxy.$refs['tableRef' + index];
|
const tableRef = proxy.$refs['tableRef' + index];
|
||||||
if (tableRef && tableRef[0]) {
|
if (tableRef && tableRef[0]) {
|
||||||
@@ -699,7 +688,6 @@ function defaultSelectAllRows() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
skipSelectCascade.value = false;
|
|
||||||
// 更新全选开关状态
|
// 更新全选开关状态
|
||||||
chooseAll.value = true;
|
chooseAll.value = true;
|
||||||
}
|
}
|
||||||
@@ -776,7 +764,6 @@ function checkAndToggleRowSelection(row) {
|
|||||||
const isCurrentlySelected = selectedRowIds.value.has(row.requestId);
|
const isCurrentlySelected = selectedRowIds.value.has(row.requestId);
|
||||||
|
|
||||||
// 根据checkbox状态更新表格行选中状态
|
// 根据checkbox状态更新表格行选中状态
|
||||||
skipSelectCascade.value = true;
|
|
||||||
if (isAllSelected && !isCurrentlySelected) {
|
if (isAllSelected && !isCurrentlySelected) {
|
||||||
selectedRowIds.value.add(row.requestId);
|
selectedRowIds.value.add(row.requestId);
|
||||||
tableRef[0].toggleRowSelection(row, true);
|
tableRef[0].toggleRowSelection(row, true);
|
||||||
@@ -784,7 +771,6 @@ function checkAndToggleRowSelection(row) {
|
|||||||
selectedRowIds.value.delete(row.requestId);
|
selectedRowIds.value.delete(row.requestId);
|
||||||
tableRef[0].toggleRowSelection(row, false);
|
tableRef[0].toggleRowSelection(row, false);
|
||||||
}
|
}
|
||||||
skipSelectCascade.value = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -796,10 +782,8 @@ function handleRowSelect(selection, row, tableIndex) {
|
|||||||
|
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
selectedRowIds.value.add(row.requestId);
|
selectedRowIds.value.add(row.requestId);
|
||||||
// 仅在非程序化选中时,联动选中该行内部的所有checkbox
|
// 选中行时,选中该行内部的所有checkbox
|
||||||
if (!skipSelectCascade.value) {
|
selectAllCheckboxesInRow(row);
|
||||||
selectAllCheckboxesInRow(row);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
selectedRowIds.value.delete(row.requestId);
|
selectedRowIds.value.delete(row.requestId);
|
||||||
// 取消选中行时,取消选中该行内部的所有checkbox
|
// 取消选中行时,取消选中该行内部的所有checkbox
|
||||||
|
|||||||
Reference in New Issue
Block a user