Merge remote-tracking branch 'origin/develop' into zhaoyun
This commit is contained in:
@@ -26,6 +26,18 @@ public class SysMenuController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISysMenuService menuService;
|
private ISysMenuService menuService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前用户可访问的菜单树(无需管理员权限)
|
||||||
|
* 用于功能配置页面,让普通用户也能选择自己有权限的菜单
|
||||||
|
*/
|
||||||
|
@GetMapping("/userMenus")
|
||||||
|
public AjaxResult userMenus() {
|
||||||
|
Long userId = getUserId();
|
||||||
|
List<SysMenu> menus = menuService.selectMenuList(new SysMenu(), userId);
|
||||||
|
List<SysMenu> menuTreeWithFullPath = menuService.buildMenuTreeWithFullPath(menus);
|
||||||
|
return success(menuTreeWithFullPath);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取菜单列表
|
* 获取菜单列表
|
||||||
*/
|
*/
|
||||||
@@ -42,7 +54,7 @@ public class SysMenuController extends BaseController {
|
|||||||
* 根据菜单编号获取详细信息
|
* 根据菜单编号获取详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:menu:query')")
|
@PreAuthorize("@ss.hasPermi('system:menu:query')")
|
||||||
@GetMapping(value = "/{menuId}")
|
@GetMapping(value = "/{menuId:\\d+}")
|
||||||
public AjaxResult getInfo(@PathVariable Long menuId) {
|
public AjaxResult getInfo(@PathVariable Long menuId) {
|
||||||
return success(menuService.selectMenuById(menuId));
|
return success(menuService.selectMenuById(menuId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -461,12 +461,15 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
}
|
}
|
||||||
// 处理转科/出院等特殊医嘱
|
// 处理转科/出院等特殊医嘱
|
||||||
for (ServiceRequest serviceRequest : allServiceRequests) {
|
for (ServiceRequest serviceRequest : allServiceRequests) {
|
||||||
|
// Bug #718: 延迟状态变更时机。核对通过时不立即变更患者就诊状态,
|
||||||
|
// 而是等到护士在【入出转管理】中手动点击“转科”或“清床”时再处理。
|
||||||
|
// 这样可以确保护士在真正转出前,依然能在在科列表中选中患者并处理遗留医嘱。
|
||||||
if (ActivityDefCategory.TRANSFER.getValue().equals(serviceRequest.getCategoryEnum())) {
|
if (ActivityDefCategory.TRANSFER.getValue().equals(serviceRequest.getCategoryEnum())) {
|
||||||
encounterService.updateEncounterStatus(serviceRequest.getEncounterId(),
|
// encounterService.updateEncounterStatus(serviceRequest.getEncounterId(),
|
||||||
EncounterZyStatus.PENDING_TRANSFER.getValue());
|
// EncounterZyStatus.PENDING_TRANSFER.getValue());
|
||||||
} else if (ActivityDefCategory.DISCHARGE.getValue().equals(serviceRequest.getCategoryEnum())) {
|
} else if (ActivityDefCategory.DISCHARGE.getValue().equals(serviceRequest.getCategoryEnum())) {
|
||||||
encounterService.updateEncounterStatus(serviceRequest.getEncounterId(),
|
// encounterService.updateEncounterStatus(serviceRequest.getEncounterId(),
|
||||||
EncounterZyStatus.AWAITING_DISCHARGE.getValue());
|
// EncounterZyStatus.AWAITING_DISCHARGE.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,8 +206,8 @@ public class MedicineSummaryAppServiceImpl implements IMedicineSummaryAppService
|
|||||||
// 领药人
|
// 领药人
|
||||||
Long receiverId = medicineSummaryParamList.get(0).getReceiverId();
|
Long receiverId = medicineSummaryParamList.get(0).getReceiverId();
|
||||||
// 申请时间(优先使用前端传递的操作时间,确保与实际操作时间一致)
|
// 申请时间(优先使用前端传递的操作时间,确保与实际操作时间一致)
|
||||||
Date now = medicineSummaryParamList.get(0).getDispenseTime() != null
|
Date now = medicineSummaryParamList.get(0).getExecuteTime() != null
|
||||||
? medicineSummaryParamList.get(0).getDispenseTime() : DateUtils.getNowDate();
|
? medicineSummaryParamList.get(0).getExecuteTime() : DateUtils.getNowDate();
|
||||||
// 申请人
|
// 申请人
|
||||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||||
// 药品发放id
|
// 药品发放id
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import java.util.Date;
|
|||||||
public class MedicineSummaryParam {
|
public class MedicineSummaryParam {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领药时间
|
* 实际执行时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date dispenseTime;
|
private Date executeTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发放id
|
* 发放id
|
||||||
|
|||||||
@@ -322,33 +322,60 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// 根据adviceType判断删除哪种类型的医嘱
|
// 根据adviceType判断删除哪种类型的医嘱
|
||||||
if (ItemType.MEDICINE.getValue().equals(adviceType)) {
|
if (ItemType.MEDICINE.getValue().equals(adviceType) || (adviceType != null && adviceType == 7)) {
|
||||||
// 药品删除
|
// 药品删除 (7表示出院带药,也按药品逻辑删除)
|
||||||
iMedicationRequestService.removeById(requestId);
|
MedicationRequest medRequest = iMedicationRequestService.getById(requestId);
|
||||||
iMedicationDispenseService.deleteMedicationDispense(requestId);
|
if (medRequest != null) {
|
||||||
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.MED_MEDICATION_REQUEST, requestId);
|
if (!RequestStatus.DRAFT.getValue().equals(medRequest.getStatusEnum())) {
|
||||||
log.info("删除药品医嘱成功,requestId: {}", requestId);
|
throw new ServiceException("仅待签发状态的医嘱允许删除");
|
||||||
|
}
|
||||||
|
iMedicationRequestService.removeById(requestId);
|
||||||
|
iMedicationDispenseService.deleteMedicationDispense(requestId);
|
||||||
|
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.MED_MEDICATION_REQUEST, requestId);
|
||||||
|
log.info("删除药品医嘱成功,requestId: {}", requestId);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (ItemType.DEVICE.getValue().equals(adviceType)) {
|
} else if (ItemType.DEVICE.getValue().equals(adviceType)) {
|
||||||
// 耗材删除
|
// 耗材删除
|
||||||
iDeviceRequestService.removeById(requestId);
|
DeviceRequest deviceRequest = iDeviceRequestService.getById(requestId);
|
||||||
iDeviceDispenseService.deleteDeviceDispense(requestId);
|
if (deviceRequest != null) {
|
||||||
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.WOR_DEVICE_REQUEST, requestId);
|
if (!RequestStatus.DRAFT.getValue().equals(deviceRequest.getStatusEnum())) {
|
||||||
log.info("删除耗材医嘱成功,requestId: {}", requestId);
|
throw new ServiceException("仅待签发状态的医嘱允许删除");
|
||||||
|
}
|
||||||
|
iDeviceRequestService.removeById(requestId);
|
||||||
|
iDeviceDispenseService.deleteDeviceDispense(requestId);
|
||||||
|
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.WOR_DEVICE_REQUEST, requestId);
|
||||||
|
log.info("删除耗材医嘱成功,requestId: {}", requestId);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (ItemType.ACTIVITY.getValue().equals(adviceType)
|
} else if (ItemType.ACTIVITY.getValue().equals(adviceType)
|
||||||
|| (adviceType != null && (adviceType == 26 || adviceType == 31))) {
|
|| (adviceType != null && (adviceType == 26 || adviceType == 31))) {
|
||||||
// 诊疗活动删除(包括护理type=26和未知类型type=31)
|
// 诊疗活动删除(包括护理type=26和未知类型type=31)
|
||||||
iServiceRequestService.removeById(requestId);
|
ServiceRequest serviceRequest = iServiceRequestService.getById(requestId);
|
||||||
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.WOR_SERVICE_REQUEST, requestId);
|
if (serviceRequest != null) {
|
||||||
log.info("删除诊疗/护理医嘱成功,requestId: {}, adviceType: {}", requestId, adviceType);
|
if (!RequestStatus.DRAFT.getValue().equals(serviceRequest.getStatusEnum())) {
|
||||||
|
throw new ServiceException("仅待签发状态的医嘱允许删除");
|
||||||
|
}
|
||||||
|
iServiceRequestService.removeById(requestId);
|
||||||
|
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.WOR_SERVICE_REQUEST, requestId);
|
||||||
|
log.info("删除诊疗/护理医嘱成功,requestId: {}, adviceType: {}", requestId, adviceType);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 未知类型,尝试按诊疗活动删除(兜底策略)
|
// 未知类型,尝试按诊疗活动删除(兜底策略)
|
||||||
log.warn("未知的adviceType: {},尝试按诊疗活动删除,requestId: {}", adviceType, requestId);
|
log.warn("未知的adviceType: {},尝试按诊疗活动删除,requestId: {}", adviceType, requestId);
|
||||||
|
ServiceRequest serviceRequest = iServiceRequestService.getById(requestId);
|
||||||
|
if (serviceRequest != null) {
|
||||||
|
if (!RequestStatus.DRAFT.getValue().equals(serviceRequest.getStatusEnum())) {
|
||||||
|
throw new ServiceException("仅待签发状态的医嘱允许删除");
|
||||||
|
}
|
||||||
|
}
|
||||||
iServiceRequestService.removeById(requestId);
|
iServiceRequestService.removeById(requestId);
|
||||||
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.WOR_SERVICE_REQUEST, requestId);
|
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.WOR_SERVICE_REQUEST, requestId);
|
||||||
}
|
}
|
||||||
|
} catch (ServiceException e) {
|
||||||
|
// 业务校验异常,直接向上抛出,中断并回滚事务
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("删除医嘱失败,requestId: {}, adviceType: {}", requestId, adviceType, e);
|
log.error("删除医嘱失败,requestId: {}, adviceType: {}", requestId, adviceType, e);
|
||||||
// 继续处理其他记录,不中断整个流程
|
// 继续处理其他记录,不中断整个流程
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE empi_merge_log ADD COLUMN IF NOT EXISTS create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
NULL::numeric AS unit_price,
|
NULL::numeric AS unit_price,
|
||||||
NULL::numeric AS total_price,
|
NULL::numeric AS total_price,
|
||||||
NULL::bigint AS stopper_id,
|
NULL::bigint AS stopper_id,
|
||||||
NULL::varchar AS stopper_name
|
CASE WHEN T1.status_enum IN (6, 13) THEN T1.update_by ELSE NULL END AS stopper_name
|
||||||
FROM med_medication_request AS T1
|
FROM med_medication_request AS T1
|
||||||
LEFT JOIN med_medication_definition AS T2
|
LEFT JOIN med_medication_definition AS T2
|
||||||
ON T2.id = T1.medication_id
|
ON T2.id = T1.medication_id
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
T1.unit_code AS unit_code,
|
T1.unit_code AS unit_code,
|
||||||
T1.status_enum AS request_status,
|
T1.status_enum AS request_status,
|
||||||
NULL::varchar AS method_code,
|
NULL::varchar AS method_code,
|
||||||
NULL::varchar AS rate_code,
|
T1.rate_code AS rate_code,
|
||||||
NULL::numeric AS dose,
|
NULL::numeric AS dose,
|
||||||
NULL::varchar AS dose_unit_code,
|
NULL::varchar AS dose_unit_code,
|
||||||
ao1.id AS position_id,
|
ao1.id AS position_id,
|
||||||
@@ -359,7 +359,7 @@
|
|||||||
NULL::numeric AS unit_price,
|
NULL::numeric AS unit_price,
|
||||||
NULL::numeric AS total_price,
|
NULL::numeric AS total_price,
|
||||||
NULL::bigint AS stopper_id,
|
NULL::bigint AS stopper_id,
|
||||||
NULL::varchar AS stopper_name
|
CASE WHEN T1.status_enum IN (6, 13) THEN T1.update_by ELSE NULL END AS stopper_name
|
||||||
FROM wor_service_request AS T1
|
FROM wor_service_request AS T1
|
||||||
LEFT JOIN wor_activity_definition AS T2
|
LEFT JOIN wor_activity_definition AS T2
|
||||||
ON T2.id = T1.activity_id
|
ON T2.id = T1.activity_id
|
||||||
@@ -496,7 +496,7 @@
|
|||||||
NULL::numeric AS unit_price,
|
NULL::numeric AS unit_price,
|
||||||
NULL::numeric AS total_price,
|
NULL::numeric AS total_price,
|
||||||
NULL::bigint AS stopper_id,
|
NULL::bigint AS stopper_id,
|
||||||
NULL::varchar AS stopper_name
|
CASE WHEN T1.status_enum IN (6, 13) THEN T1.update_by ELSE NULL END AS stopper_name
|
||||||
FROM wor_device_request AS T1
|
FROM wor_device_request AS T1
|
||||||
LEFT JOIN adm_device_definition AS T2
|
LEFT JOIN adm_device_definition AS T2
|
||||||
ON T2.id = T1.device_def_id
|
ON T2.id = T1.device_def_id
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<collection property="medicineSummaryParamList" ofType="com.healthlink.his.web.inhospitalnursestation.dto.MedicineSummaryParam">
|
<collection property="medicineSummaryParamList" ofType="com.healthlink.his.web.inhospitalnursestation.dto.MedicineSummaryParam">
|
||||||
<result property="procedureId" column="procedure_id"/>
|
<result property="procedureId" column="procedure_id"/>
|
||||||
<result property="dispenseId" column="dispense_id"/>
|
<result property="dispenseId" column="dispense_id"/>
|
||||||
<result property="dispenseTime" column="execution_time"/>
|
<result property="executeTime" column="execution_time"/>
|
||||||
<result property="dispenseStatus" column="dispense_status"/>
|
<result property="dispenseStatus" column="dispense_status"/>
|
||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取当前用户可访问的菜单树(无需管理员权限)
|
||||||
|
export function getUserMenus() {
|
||||||
|
return request({
|
||||||
|
url: '/system/menu/userMenus',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询菜单列表
|
// 查询菜单列表
|
||||||
export function listMenu(query) {
|
export function listMenu(query) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<div ref="tableWrapperRef" class="table-wrapper">
|
<div ref="tableWrapperRef" class="table-wrapper">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
@@ -9,8 +9,7 @@
|
|||||||
:stripe="stripe"
|
:stripe="stripe"
|
||||||
:size="size === 'large' ? 'medium' : size === 'small' ? 'mini' : 'small'"
|
:size="size === 'large' ? 'medium' : size === 'small' ? 'mini' : 'small'"
|
||||||
:height="computedTableHeight"
|
:height="computedTableHeight"
|
||||||
:row-config="{ keyField: rowKey || 'id', isHover: true }"
|
:row-config="{ keyField: rowKey || 'id', isHover: true, isCurrent: highlightCurrentRow }"
|
||||||
:highlight-current-row="highlightCurrentRow"
|
|
||||||
show-overflow="title"
|
show-overflow="title"
|
||||||
show-header-overflow="title"
|
show-header-overflow="title"
|
||||||
:auto-resize="true"
|
:auto-resize="true"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ const useUserStore = defineStore(
|
|||||||
this.avatar = avatar
|
this.avatar = avatar
|
||||||
this.optionMap = res.optionMap || {}
|
this.optionMap = res.optionMap || {}
|
||||||
// 优先从optionMap获取配置,如果没有则从optionJson获取
|
// 优先从optionMap获取配置,如果没有则从optionJson获取
|
||||||
this.hospitalName = this.optionMap.hospitalName || res.optionJson.hospitalName || ''
|
this.hospitalName = res.tenantName || this.optionMap.hospitalName || res.optionJson.hospitalName || ''
|
||||||
this.tenantName = res.tenantName || ''
|
this.tenantName = res.tenantName || ''
|
||||||
|
|
||||||
resolve(res)
|
resolve(res)
|
||||||
|
|||||||
@@ -1,39 +1,46 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<vxe-table
|
<vxe-table
|
||||||
height="400"
|
height="420"
|
||||||
:data="patientList"
|
:data="patientList"
|
||||||
:row-config="{ keyField: 'id' }"
|
:row-config="{ keyField: 'id' }"
|
||||||
|
:scroll-x="{ enabled: true }"
|
||||||
@cell-click="clickRow"
|
@cell-click="clickRow"
|
||||||
>
|
>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
title="姓名"
|
title="姓名"
|
||||||
align="center"
|
align="center"
|
||||||
field="name"
|
field="name"
|
||||||
|
:min-width="80"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
title="就诊卡号"
|
title="就诊卡号"
|
||||||
align="center"
|
align="center"
|
||||||
field="identifierNo"
|
field="identifierNo"
|
||||||
|
:min-width="140"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
title="性别"
|
title="性别"
|
||||||
align="center"
|
align="center"
|
||||||
field="genderEnum_enumText"
|
field="genderEnum_enumText"
|
||||||
|
:min-width="60"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
title="证件号"
|
title="证件号"
|
||||||
align="center"
|
align="center"
|
||||||
field="idCard"
|
field="idCard"
|
||||||
|
:min-width="180"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
title="联系电话"
|
title="联系电话"
|
||||||
align="center"
|
align="center"
|
||||||
field="phone"
|
field="phone"
|
||||||
|
:min-width="130"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
title="年龄"
|
title="年龄"
|
||||||
align="center"
|
align="center"
|
||||||
|
:min-width="60"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.age ? `${scope.row.age}` : '-' }}
|
{{ scope.row.age ? `${scope.row.age}` : '-' }}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
:visible="showPopover"
|
:visible="showPopover"
|
||||||
trigger="manual"
|
trigger="manual"
|
||||||
:width="1200"
|
:width="1600"
|
||||||
>
|
>
|
||||||
<patientList
|
<patientList
|
||||||
:searchkey="patientSearchKey"
|
:searchkey="patientSearchKey"
|
||||||
@@ -634,7 +634,8 @@
|
|||||||
<vxe-table
|
<vxe-table
|
||||||
:row-config="{ isCurrent: true }" v-loading="loading"
|
:row-config="{ isCurrent: true }" v-loading="loading"
|
||||||
:data="outpatientRegistrationList"
|
:data="outpatientRegistrationList"
|
||||||
max-height="250"
|
:max-height="Math.max(470, Math.min(outpatientRegistrationList.length, 10) * 42 + 50)"
|
||||||
|
:scroll-x="{ enabled: true }"
|
||||||
>
|
>
|
||||||
<!-- <vxe-column
|
<!-- <vxe-column
|
||||||
title="租户ID"
|
title="租户ID"
|
||||||
@@ -659,6 +660,7 @@
|
|||||||
title=""
|
title=""
|
||||||
align="center"
|
align="center"
|
||||||
width="50"
|
width="50"
|
||||||
|
fixed="left"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.rowIndex + 1 }}
|
{{ scope.rowIndex + 1 }}
|
||||||
@@ -669,14 +671,14 @@
|
|||||||
title="患者姓名"
|
title="患者姓名"
|
||||||
align="center"
|
align="center"
|
||||||
field="patientName"
|
field="patientName"
|
||||||
width="120"
|
:min-width="100"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
key="age"
|
key="age"
|
||||||
title="年龄"
|
title="年龄"
|
||||||
align="center"
|
align="center"
|
||||||
field="age"
|
field="age"
|
||||||
width="120"
|
:min-width="60"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.age ? `${scope.row.age}` : '-' }}
|
{{ scope.row.age ? `${scope.row.age}` : '-' }}
|
||||||
@@ -687,18 +689,20 @@
|
|||||||
title="患者性别"
|
title="患者性别"
|
||||||
align="center"
|
align="center"
|
||||||
field="genderEnum_enumText"
|
field="genderEnum_enumText"
|
||||||
|
:min-width="100"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
key="phone"
|
key="phone"
|
||||||
title="联系电话"
|
title="联系电话"
|
||||||
align="center"
|
align="center"
|
||||||
field="phone"
|
field="phone"
|
||||||
|
:min-width="120"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
key="identifierNo"
|
key="identifierNo"
|
||||||
title="就诊卡号"
|
title="就诊卡号"
|
||||||
align="center"
|
align="center"
|
||||||
width="150"
|
:min-width="150"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.identifierNo || scope.row.cardNo || scope.row.card || scope.row.patientCardNo || scope.row.patient?.identifierNo || '-' }}
|
{{ scope.row.identifierNo || scope.row.cardNo || scope.row.card || scope.row.patientCardNo || scope.row.patient?.identifierNo || '-' }}
|
||||||
@@ -710,6 +714,7 @@
|
|||||||
align="center"
|
align="center"
|
||||||
field="organizationName"
|
field="organizationName"
|
||||||
:show-overflow="true"
|
:show-overflow="true"
|
||||||
|
:min-width="120"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
key="healthcareName"
|
key="healthcareName"
|
||||||
@@ -717,7 +722,7 @@
|
|||||||
align="center"
|
align="center"
|
||||||
field="healthcareName"
|
field="healthcareName"
|
||||||
:show-overflow="true"
|
:show-overflow="true"
|
||||||
width="200"
|
:min-width="140"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>
|
<span>
|
||||||
@@ -736,18 +741,21 @@
|
|||||||
title="专家"
|
title="专家"
|
||||||
align="center"
|
align="center"
|
||||||
field="practitionerName"
|
field="practitionerName"
|
||||||
|
:min-width="80"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
key="contractName"
|
key="contractName"
|
||||||
title="费用性质"
|
title="费用性质"
|
||||||
align="center"
|
align="center"
|
||||||
field="contractName"
|
field="contractName"
|
||||||
|
:min-width="90"
|
||||||
/>
|
/>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
key="totalPrice"
|
key="totalPrice"
|
||||||
title="挂号金额"
|
title="挂号金额"
|
||||||
align="center"
|
align="center"
|
||||||
field="totalPrice"
|
field="totalPrice"
|
||||||
|
:min-width="100"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>
|
<span>
|
||||||
@@ -760,6 +768,7 @@
|
|||||||
title="收款人"
|
title="收款人"
|
||||||
align="center"
|
align="center"
|
||||||
field="entererName"
|
field="entererName"
|
||||||
|
:min-width="80"
|
||||||
/>
|
/>
|
||||||
<!-- <vxe-column
|
<!-- <vxe-column
|
||||||
title="收款方式"
|
title="收款方式"
|
||||||
@@ -779,6 +788,7 @@
|
|||||||
title="就诊状态"
|
title="就诊状态"
|
||||||
align="center"
|
align="center"
|
||||||
field="statusEnum_enumText"
|
field="statusEnum_enumText"
|
||||||
|
:min-width="90"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
@@ -819,6 +829,7 @@
|
|||||||
key="operation" title="操作"
|
key="operation" title="操作"
|
||||||
align="center"
|
align="center"
|
||||||
field="" width="150"
|
field="" width="150"
|
||||||
|
fixed="right"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <el-tooltip
|
<!-- <el-tooltip
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<el-col :span="6"><el-card shadow="hover"><el-statistic title="待合并" :value="stats.pendingMerges || 0" /></el-card></el-col>
|
<el-col :span="6"><el-card shadow="hover"><el-statistic title="待合并" :value="stats.pendingMerges || 0" /></el-card></el-col>
|
||||||
<el-col :span="6"><el-card shadow="hover"><el-statistic title="重复率" :value="stats.duplicateRate || 0" suffix="%" /></el-card></el-col>
|
<el-col :span="6"><el-card shadow="hover"><el-statistic title="重复率" :value="stats.duplicateRate || 0" suffix="%" /></el-card></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="display:flex;justify-content:space-between;align-items:center">
|
<div style="display:flex;justify-content:space-between;align-items:center">
|
||||||
@@ -13,18 +14,49 @@
|
|||||||
<el-button type="primary" icon="Plus" @click="handleRegister">注册患者</el-button>
|
<el-button type="primary" icon="Plus" @click="handleRegister">注册患者</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-form :model="searchForm" :inline="true" class="mb8">
|
<el-form :model="searchForm" :inline="true" class="mb8">
|
||||||
<el-form-item label="全局ID"><el-input v-model="searchForm.globalId" placeholder="全局ID" clearable /></el-form-item>
|
<el-form-item label="姓名"><el-input v-model="searchForm.name" placeholder="患者姓名" clearable @keyup.enter="handleSearch" /></el-form-item>
|
||||||
<el-form-item label="身份证号"><el-input v-model="searchForm.idCardNo" placeholder="身份证号" clearable /></el-form-item>
|
<el-form-item label="身份证号"><el-input v-model="searchForm.idCardNo" placeholder="身份证号" clearable @keyup.enter="handleSearch" /></el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="handleSearch">查询</el-button>
|
<el-button type="primary" icon="Search" @click="handleSearch">查询</el-button>
|
||||||
<el-button @click="handleReset">重置</el-button>
|
<el-button icon="Refresh" @click="handleReset">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-descriptions v-if="patientData" :column="2" border>
|
|
||||||
|
<el-table :data="patientList" border stripe v-loading="loading" @row-click="handleRowClick" highlight-current-row>
|
||||||
|
<el-table-column prop="globalId" label="全局ID" width="180" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="name" label="姓名" width="100" />
|
||||||
|
<el-table-column prop="gender" label="性别" width="60">
|
||||||
|
<template #default="{row}">{{ row.gender === 'M' ? '男' : row.gender === 'F' ? '女' : row.gender === '1' ? '男' : row.gender === '2' ? '女' : row.gender }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="birthDate" label="出生日期" width="120" />
|
||||||
|
<el-table-column prop="idCardNo" label="身份证号" width="180" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="phone" label="电话" width="130" />
|
||||||
|
<el-table-column prop="sourceSystem" label="来源" width="80" />
|
||||||
|
<el-table-column prop="mergeStatus" label="状态" width="80">
|
||||||
|
<template #default="{row}">
|
||||||
|
<el-tag :type="row.mergeStatus === 'ACTIVE' ? 'success' : 'warning'" size="small">
|
||||||
|
{{ row.mergeStatus === 'ACTIVE' ? '正常' : row.mergeStatus === 'MERGED' ? '已合并' : row.mergeStatus }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="创建时间" width="170" />
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 患者详情 -->
|
||||||
|
<el-card v-if="patientData" style="margin-top:16px">
|
||||||
|
<template #header>
|
||||||
|
<div style="display:flex;justify-content:space-between;align-items:center">
|
||||||
|
<span>患者详情</span>
|
||||||
|
<el-button text @click="patientData = null; linkedPatients = []; mappings = []">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
<el-descriptions-item label="全局ID">{{ patientData.globalId }}</el-descriptions-item>
|
<el-descriptions-item label="全局ID">{{ patientData.globalId }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="姓名">{{ patientData.name }}</el-descriptions-item>
|
<el-descriptions-item label="姓名">{{ patientData.name }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="性别">{{ patientData.gender === 'M' ? '男' : '女' }}</el-descriptions-item>
|
<el-descriptions-item label="性别">{{ patientData.gender === 'M' ? '男' : patientData.gender === 'F' ? '女' : patientData.gender === '1' ? '男' : patientData.gender === '2' ? '女' : patientData.gender }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="出生日期">{{ patientData.birthDate }}</el-descriptions-item>
|
<el-descriptions-item label="出生日期">{{ patientData.birthDate }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="身份证号">{{ patientData.idCardNo }}</el-descriptions-item>
|
<el-descriptions-item label="身份证号">{{ patientData.idCardNo }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="手机号">{{ patientData.phone }}</el-descriptions-item>
|
<el-descriptions-item label="手机号">{{ patientData.phone }}</el-descriptions-item>
|
||||||
@@ -36,14 +68,11 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-empty v-else description="请输入查询条件" />
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 关联院内患者记录 -->
|
<!-- 关联院内患者记录 -->
|
||||||
<el-card v-if="linkedPatients.length > 0" style="margin-top:16px">
|
<el-card v-if="linkedPatients.length > 0" style="margin-top:16px">
|
||||||
<template #header>
|
<template #header><span>关联院内患者记录 ({{ linkedPatients.length }})</span></template>
|
||||||
<span>关联院内患者记录 ({{ linkedPatients.length }})</span>
|
|
||||||
</template>
|
|
||||||
<el-table :data="linkedPatients" border stripe>
|
<el-table :data="linkedPatients" border stripe>
|
||||||
<el-table-column prop="id" label="院内ID" width="100" />
|
<el-table-column prop="id" label="院内ID" width="100" />
|
||||||
<el-table-column prop="busNo" label="病历号" width="140" />
|
<el-table-column prop="busNo" label="病历号" width="140" />
|
||||||
@@ -62,9 +91,7 @@
|
|||||||
|
|
||||||
<!-- ID映射列表 -->
|
<!-- ID映射列表 -->
|
||||||
<el-card v-if="mappings.length > 0" style="margin-top:16px">
|
<el-card v-if="mappings.length > 0" style="margin-top:16px">
|
||||||
<template #header>
|
<template #header><span>ID映射关系</span></template>
|
||||||
<span>ID映射关系</span>
|
|
||||||
</template>
|
|
||||||
<el-table :data="mappings" border stripe>
|
<el-table :data="mappings" border stripe>
|
||||||
<el-table-column prop="globalId" label="全局ID" width="180" />
|
<el-table-column prop="globalId" label="全局ID" width="180" />
|
||||||
<el-table-column prop="localPatientId" label="院内患者ID" width="120" />
|
<el-table-column prop="localPatientId" label="院内患者ID" width="120" />
|
||||||
@@ -99,14 +126,16 @@
|
|||||||
import { useDict } from '@/utils/dict'
|
import { useDict } from '@/utils/dict'
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
import {
|
import {
|
||||||
registerPerson, findByGlobalId, findByIdCard, getStatistics,
|
registerPerson, findByGlobalId, findByIdCard, getStatistics, listPersons,
|
||||||
findLinkedPatientsByGlobalId, findLinkedPatientsByIdCard, getMappings
|
findLinkedPatientsByGlobalId, findLinkedPatientsByIdCard, getMappings
|
||||||
} from '../api'
|
} from '../api'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
const { sys_user_sex } = useDict('sys_user_sex')
|
const { sys_user_sex } = useDict('sys_user_sex')
|
||||||
const stats = ref({})
|
const stats = ref({})
|
||||||
const searchForm = reactive({ globalId: '', idCardNo: '' })
|
const loading = ref(false)
|
||||||
|
const patientList = ref([])
|
||||||
|
const searchForm = reactive({ name: '', idCardNo: '' })
|
||||||
const patientData = ref(null)
|
const patientData = ref(null)
|
||||||
const linkedPatients = ref([])
|
const linkedPatients = ref([])
|
||||||
const mappings = ref([])
|
const mappings = ref([])
|
||||||
@@ -115,41 +144,49 @@ const formData = ref({})
|
|||||||
|
|
||||||
const loadStats = async () => { const res = await getStatistics(); stats.value = res.data || {} }
|
const loadStats = async () => { const res = await getStatistics(); stats.value = res.data || {} }
|
||||||
|
|
||||||
const handleSearch = async () => {
|
const loadPatientList = async (params = {}) => {
|
||||||
linkedPatients.value = []
|
loading.value = true
|
||||||
mappings.value = []
|
try {
|
||||||
if (searchForm.globalId) {
|
const res = await listPersons(params)
|
||||||
const res = await findByGlobalId(searchForm.globalId)
|
patientList.value = res.data || []
|
||||||
patientData.value = res.data
|
} finally {
|
||||||
if (res.data) {
|
loading.value = false
|
||||||
const lp = await findLinkedPatientsByGlobalId(searchForm.globalId)
|
|
||||||
linkedPatients.value = lp.data || []
|
|
||||||
const mp = await getMappings(searchForm.globalId)
|
|
||||||
mappings.value = mp.data || []
|
|
||||||
}
|
|
||||||
} else if (searchForm.idCardNo) {
|
|
||||||
const res = await findByIdCard(searchForm.idCardNo)
|
|
||||||
patientData.value = res.data
|
|
||||||
if (res.data) {
|
|
||||||
const lp = await findLinkedPatientsByIdCard(searchForm.idCardNo)
|
|
||||||
linkedPatients.value = lp.data || []
|
|
||||||
const mp = await getMappings(res.data.globalId)
|
|
||||||
mappings.value = mp.data || []
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ElMessage.warning('请输入查询条件')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleSearch = async () => {
|
||||||
|
patientData.value = null
|
||||||
|
linkedPatients.value = []
|
||||||
|
mappings.value = []
|
||||||
|
const params = {}
|
||||||
|
if (searchForm.name) params.name = searchForm.name
|
||||||
|
if (searchForm.idCardNo) params.idCardNo = searchForm.idCardNo
|
||||||
|
await loadPatientList(params)
|
||||||
|
}
|
||||||
|
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
searchForm.globalId = ''
|
searchForm.name = ''
|
||||||
searchForm.idCardNo = ''
|
searchForm.idCardNo = ''
|
||||||
patientData.value = null
|
patientData.value = null
|
||||||
linkedPatients.value = []
|
linkedPatients.value = []
|
||||||
mappings.value = []
|
mappings.value = []
|
||||||
|
loadPatientList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRowClick = async (row) => {
|
||||||
|
patientData.value = row
|
||||||
|
linkedPatients.value = []
|
||||||
|
mappings.value = []
|
||||||
|
try {
|
||||||
|
const lp = await findLinkedPatientsByGlobalId(row.globalId)
|
||||||
|
linkedPatients.value = lp.data || []
|
||||||
|
const mp = await getMappings(row.globalId)
|
||||||
|
mappings.value = mp.data || []
|
||||||
|
} catch (e) { /* ignore */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRegister = () => { formData.value = {}; dialogVisible.value = true }
|
const handleRegister = () => { formData.value = {}; dialogVisible.value = true }
|
||||||
const submitForm = async () => { await registerPerson(formData.value); ElMessage.success('注册成功'); dialogVisible.value = false; loadStats() }
|
const submitForm = async () => { await registerPerson(formData.value); ElMessage.success('注册成功'); dialogVisible.value = false; loadStats(); loadPatientList() }
|
||||||
onMounted(() => loadStats())
|
|
||||||
|
onMounted(() => { loadStats(); loadPatientList() })
|
||||||
</script>
|
</script>
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
class="tree-card"
|
class="tree-card"
|
||||||
>
|
>
|
||||||
<el-tree
|
<el-tree
|
||||||
|
:key="treeKey"
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
:data="menuTree"
|
:data="menuTree"
|
||||||
:props="treeProps"
|
:props="treeProps"
|
||||||
@@ -189,8 +190,7 @@ import { ref, onMounted, nextTick, watch, onUnmounted } from 'vue'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import Sortable from 'sortablejs'
|
import Sortable from 'sortablejs'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import { listMenu } from '@/api/system/menu'
|
import { getUserMenus } from '@/api/system/menu'
|
||||||
import { getMenuFullPath } from '@/api/system/menu'
|
|
||||||
import { saveCurrentUserConfig, getCurrentUserConfig } from '@/api/system/userConfig'
|
import { saveCurrentUserConfig, getCurrentUserConfig } from '@/api/system/userConfig'
|
||||||
import {
|
import {
|
||||||
Menu,
|
Menu,
|
||||||
@@ -265,6 +265,7 @@ import SvgIcon from '@/components/SvgIcon'
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
const treeRef = ref()
|
const treeRef = ref()
|
||||||
|
const treeKey = ref(0)
|
||||||
const menuTree = ref([])
|
const menuTree = ref([])
|
||||||
const expandedKeys = ref([])
|
const expandedKeys = ref([])
|
||||||
const checkedKeys = ref([])
|
const checkedKeys = ref([])
|
||||||
@@ -310,14 +311,17 @@ const loadMenuData = async () => {
|
|||||||
// 尝试从本地缓存获取菜单数据
|
// 尝试从本地缓存获取菜单数据
|
||||||
const cachedMenuData = localStorage.getItem('menuTreeCache');
|
const cachedMenuData = localStorage.getItem('menuTreeCache');
|
||||||
const cacheTimestamp = localStorage.getItem('menuTreeCacheTimestamp');
|
const cacheTimestamp = localStorage.getItem('menuTreeCacheTimestamp');
|
||||||
|
const cacheVersion = localStorage.getItem('menuTreeCacheVersion');
|
||||||
|
|
||||||
// 检查缓存是否有效(24小时内)
|
// 检查缓存是否有效(24小时内且版本匹配)
|
||||||
if (cachedMenuData && cacheTimestamp) {
|
if (cachedMenuData && cacheTimestamp && cacheVersion === 'v2') {
|
||||||
const cacheAge = Date.now() - parseInt(cacheTimestamp);
|
const cacheAge = Date.now() - parseInt(cacheTimestamp);
|
||||||
if (cacheAge < 24 * 60 * 60 * 1000) { // 24小时
|
if (cacheAge < 24 * 60 * 60 * 1000) { // 24小时
|
||||||
menuTree.value = JSON.parse(cachedMenuData);
|
menuTree.value = JSON.parse(cachedMenuData);
|
||||||
// 展开所有节点
|
// 展开所有节点
|
||||||
expandedKeys.value = getAllNodeIds(menuTree.value);
|
expandedKeys.value = getAllNodeIds(menuTree.value);
|
||||||
|
// 强制树重渲染以应用展开
|
||||||
|
treeKey.value++
|
||||||
// 获取已保存的配置
|
// 获取已保存的配置
|
||||||
await loadSavedConfig();
|
await loadSavedConfig();
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -325,7 +329,7 @@ const loadMenuData = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await listMenu({})
|
const response = await getUserMenus()
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
// 过滤掉隐藏的菜单项、目录和按钮类型的菜单,只保留当前角色可访问的菜单项
|
// 过滤掉隐藏的菜单项、目录和按钮类型的菜单,只保留当前角色可访问的菜单项
|
||||||
const filteredMenus = filterVisibleMenus(response.data)
|
const filteredMenus = filterVisibleMenus(response.data)
|
||||||
@@ -337,6 +341,10 @@ const loadMenuData = async () => {
|
|||||||
// 将菜单数据缓存到本地存储
|
// 将菜单数据缓存到本地存储
|
||||||
localStorage.setItem('menuTreeCache', JSON.stringify(filteredMenus));
|
localStorage.setItem('menuTreeCache', JSON.stringify(filteredMenus));
|
||||||
localStorage.setItem('menuTreeCacheTimestamp', Date.now().toString());
|
localStorage.setItem('menuTreeCacheTimestamp', Date.now().toString());
|
||||||
|
localStorage.setItem('menuTreeCacheVersion', 'v2');
|
||||||
|
|
||||||
|
// 强制树重渲染以应用展开
|
||||||
|
treeKey.value++
|
||||||
|
|
||||||
// 获取已保存的配置
|
// 获取已保存的配置
|
||||||
await loadSavedConfig()
|
await loadSavedConfig()
|
||||||
@@ -370,6 +378,21 @@ const filterVisibleMenus = (menus) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 程序化展开所有树节点
|
||||||
|
const expandAllNodes = (nodes) => {
|
||||||
|
if (!treeRef.value) return
|
||||||
|
const store = treeRef.value.store
|
||||||
|
const traverse = (nodeList) => {
|
||||||
|
nodeList.forEach(node => {
|
||||||
|
store.nodesMap[node.menuId] && (store.nodesMap[node.menuId].expanded = true)
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
traverse(node.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
traverse(nodes)
|
||||||
|
}
|
||||||
|
|
||||||
// 获取所有节点ID
|
// 获取所有节点ID
|
||||||
const getAllNodeIds = (nodes) => {
|
const getAllNodeIds = (nodes) => {
|
||||||
const ids = []
|
const ids = []
|
||||||
@@ -392,69 +415,25 @@ const saveConfig = async () => {
|
|||||||
// 只保留菜单类型(C类型)的节点
|
// 只保留菜单类型(C类型)的节点
|
||||||
const validMenuNodes = checkedNodes.filter(node => node.menuType === 'C')
|
const validMenuNodes = checkedNodes.filter(node => node.menuType === 'C')
|
||||||
|
|
||||||
// 创建包含菜单ID和完整路径的对象数组
|
// fullPath 已在 userMenus 接口返回时填充到节点数据上,直接使用
|
||||||
const menuPromises = validMenuNodes.map(async (node) => {
|
const menuDataWithPaths = validMenuNodes.map((node) => {
|
||||||
try {
|
let fullPath = node.fullPath || node.path || ''
|
||||||
console.log(`开始获取菜单 ${node.menuName} (ID: ${node.menuId}) 的完整路径`);
|
// 将多个连续的斜杠替换为单个斜杠,但保留协议部分的双斜杠
|
||||||
console.log(`节点对象:`, node);
|
if (fullPath && typeof fullPath === 'string') {
|
||||||
console.log(`节点的 path 属性:`, node.path);
|
fullPath = fullPath.replace(/([^:])\/{2,}/g, '$1/')
|
||||||
|
|
||||||
// 获取菜单的完整路径
|
|
||||||
const fullPathResponse = await getMenuFullPath(node.menuId);
|
|
||||||
console.log(`菜单 ${node.menuName} 的完整路径响应:`, fullPathResponse);
|
|
||||||
|
|
||||||
let fullPath = fullPathResponse.code === 200 ? (fullPathResponse.data || fullPathResponse.msg) : node.path;
|
|
||||||
// 确保路径格式正确,去除多余的斜杠
|
|
||||||
if (fullPath && typeof fullPath === 'string') {
|
|
||||||
// 将多个连续的斜杠替换为单个斜杠,但保留协议部分的双斜杠(如 http://)
|
|
||||||
fullPath = fullPath.replace(/([^:])\/{2,}/g, '$1/');
|
|
||||||
}
|
|
||||||
console.log(`菜单 ${node.menuName} 的完整路径:`, fullPath);
|
|
||||||
|
|
||||||
const menuItem = {
|
|
||||||
menuId: node.menuId,
|
|
||||||
fullPath: fullPath,
|
|
||||||
menuName: node.menuName,
|
|
||||||
path: node.path,
|
|
||||||
icon: node.icon, // 保存数据库中的图标类名
|
|
||||||
menuType: node.menuType // 保存菜单类型信息
|
|
||||||
};
|
|
||||||
|
|
||||||
console.log(`构造的菜单项对象:`, menuItem);
|
|
||||||
return menuItem;
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`获取菜单 ${node.menuName} 的完整路径失败:`, error);
|
|
||||||
console.error(`错误堆栈:`, error.stack);
|
|
||||||
|
|
||||||
// 如果获取完整路径失败,使用现有路径作为备选
|
|
||||||
console.log(`在错误处理中,节点的 path 属性:`, node.path);
|
|
||||||
const menuItem = {
|
|
||||||
menuId: node.menuId,
|
|
||||||
fullPath: node.path,
|
|
||||||
menuName: node.menuName,
|
|
||||||
path: node.path,
|
|
||||||
icon: node.icon, // 保存数据库中的图标类名
|
|
||||||
menuType: node.menuType // 保存菜单类型信息
|
|
||||||
};
|
|
||||||
console.log(`构造的菜单项对象(错误处理):`, menuItem);
|
|
||||||
return menuItem;
|
|
||||||
}
|
}
|
||||||
});
|
return {
|
||||||
|
menuId: node.menuId,
|
||||||
// 等待所有完整路径获取完成
|
fullPath: fullPath,
|
||||||
const menuDataWithPaths = await Promise.all(menuPromises);
|
menuName: node.menuName,
|
||||||
|
path: node.path,
|
||||||
// 添加调试信息
|
icon: node.icon,
|
||||||
console.log('准备保存的菜单数据:', menuDataWithPaths);
|
menuType: node.menuType
|
||||||
|
}
|
||||||
// 检查每个对象是否包含 fullPath 属性
|
})
|
||||||
menuDataWithPaths.forEach((item, index) => {
|
|
||||||
console.log(`菜单项 ${index} 包含 fullPath:`, item.hasOwnProperty('fullPath'), '值为:', item.fullPath);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 对配置值进行URL编码以避免特殊字符问题
|
// 对配置值进行URL编码以避免特殊字符问题
|
||||||
const encodedConfigValue = encodeURIComponent(JSON.stringify(menuDataWithPaths))
|
const encodedConfigValue = encodeURIComponent(JSON.stringify(menuDataWithPaths))
|
||||||
console.log('编码后的配置值:', encodedConfigValue);
|
|
||||||
|
|
||||||
// 保存到数据库
|
// 保存到数据库
|
||||||
const saveResult = await saveCurrentUserConfig('homeFeaturesConfig', encodedConfigValue)
|
const saveResult = await saveCurrentUserConfig('homeFeaturesConfig', encodedConfigValue)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.targetLocationId"
|
v-model="form.targetLocationId"
|
||||||
no-data-text="请先选择科室"
|
:no-data-text="form.targetOrganizationId ? '该科室暂无对应病区' : '请先选择科室'"
|
||||||
placeholder="请选择转入病区"
|
placeholder="请选择转入病区"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.reasonText"
|
v-model="form.reasonText"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
:rows="5"
|
||||||
placeholder="请输入转科原因"
|
placeholder="请输入转科原因"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -236,7 +236,7 @@
|
|||||||
style="width: 62%"
|
style="width: 62%"
|
||||||
v-model="scope.row.adviceName"
|
v-model="scope.row.adviceName"
|
||||||
placeholder="请选择项目"
|
placeholder="请选择项目"
|
||||||
@input="handleChange"
|
@input="(value) => handleChange(value, scope.row, scope.rowIndex)"
|
||||||
@focus="handleFocus(scope.row, scope.rowIndex)"
|
@focus="handleFocus(scope.row, scope.rowIndex)"
|
||||||
@keyup.enter.stop="handleFocus(scope.row, scope.rowIndex)"
|
@keyup.enter.stop="handleFocus(scope.row, scope.rowIndex)"
|
||||||
@keydown="
|
@keydown="
|
||||||
@@ -1150,7 +1150,12 @@ function expandTextRow(rowIndex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleFocus(row, index) {
|
function handleFocus(row, index) {
|
||||||
rowIndex.value = index;
|
const actualIndex = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
|
||||||
|
if (actualIndex !== -1) {
|
||||||
|
rowIndex.value = actualIndex;
|
||||||
|
} else {
|
||||||
|
rowIndex.value = index;
|
||||||
|
}
|
||||||
// 同步表格水平滚动偏移,确保浮框位置正确
|
// 同步表格水平滚动偏移,确保浮框位置正确
|
||||||
const scrollWrapper = document.querySelector('.vxe-table--body-wrapper');
|
const scrollWrapper = document.querySelector('.vxe-table--body-wrapper');
|
||||||
if (scrollWrapper) {
|
if (scrollWrapper) {
|
||||||
@@ -1184,11 +1189,9 @@ function handleBlur(row) {
|
|||||||
popoverJustClosedByKey.value = row.uniqueKey;
|
popoverJustClosedByKey.value = row.uniqueKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleChange(value) {
|
function handleChange(value, row, index) {
|
||||||
// 文字医嘱(type=8)不触发药品搜索
|
// 文字医嘱(type=8)不触发药品搜索
|
||||||
const currentIndex = rowIndex.value;
|
if (index < 0 || !row) return;
|
||||||
if (currentIndex < 0) return;
|
|
||||||
const row = filterPrescriptionList.value[currentIndex];
|
|
||||||
const adviceType = row?.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType;
|
const adviceType = row?.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType;
|
||||||
if (adviceType == 8) {
|
if (adviceType == 8) {
|
||||||
return;
|
return;
|
||||||
@@ -1199,7 +1202,7 @@ function handleChange(value) {
|
|||||||
if (!row.showPopover) {
|
if (!row.showPopover) {
|
||||||
row.showPopover = true;
|
row.showPopover = true;
|
||||||
}
|
}
|
||||||
const tableRef = Array.isArray(adviceTableRef.value) ? adviceTableRef.value[currentIndex] : adviceTableRef.value;
|
const tableRef = Array.isArray(adviceTableRef.value) ? adviceTableRef.value[index] : adviceTableRef.value;
|
||||||
if (tableRef && tableRef.refresh) {
|
if (tableRef && tableRef.refresh) {
|
||||||
const adviceType = row?.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType;
|
const adviceType = row?.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType;
|
||||||
let categoryCode = '';
|
let categoryCode = '';
|
||||||
@@ -1217,8 +1220,14 @@ function handleChange(value) {
|
|||||||
*/
|
*/
|
||||||
function selectAdviceBase(key, row) {
|
function selectAdviceBase(key, row) {
|
||||||
|
|
||||||
|
// 每次选择药品时,根据 uniqueKey 找到 prescriptionList 中的正确索引
|
||||||
|
const actualIndex = prescriptionList.value.findIndex((item) => item.uniqueKey === key);
|
||||||
|
if (actualIndex !== -1) {
|
||||||
|
rowIndex.value = actualIndex;
|
||||||
|
}
|
||||||
|
|
||||||
// 每次选择药品时,将当前行数据初始化为最初状态
|
// 每次选择药品时,将当前行数据初始化为最初状态
|
||||||
const currentUniqueKey = prescriptionList.value[rowIndex.value]?.uniqueKey || key;
|
const currentUniqueKey = key;
|
||||||
const prevRow = prescriptionList.value[rowIndex.value] || {};
|
const prevRow = prescriptionList.value[rowIndex.value] || {};
|
||||||
prescriptionList.value[rowIndex.value] = {
|
prescriptionList.value[rowIndex.value] = {
|
||||||
uniqueKey: currentUniqueKey,
|
uniqueKey: currentUniqueKey,
|
||||||
@@ -1411,7 +1420,7 @@ function handleDelete() {
|
|||||||
deleteList.push({
|
deleteList.push({
|
||||||
requestId: deleteItem.requestId,
|
requestId: deleteItem.requestId,
|
||||||
dbOpType: '3',
|
dbOpType: '3',
|
||||||
adviceType: deleteItem.adviceType,
|
adviceType: deleteItem.adviceType == 7 ? 1 : deleteItem.adviceType,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1976,6 +1985,7 @@ function setValue(row) {
|
|||||||
...baseRow,
|
...baseRow,
|
||||||
uniqueKey: currentUniqueKey, // 确保 uniqueKey 不被覆盖
|
uniqueKey: currentUniqueKey, // 确保 uniqueKey 不被覆盖
|
||||||
// Bug #589: 出院带药在 baseRow 中被药品的 adviceType=1 覆盖,此处恢复
|
// Bug #589: 出院带药在 baseRow 中被药品的 adviceType=1 覆盖,此处恢复
|
||||||
|
dischargeFlag: prevRow.dischargeFlag, // 显式保留,防止被 baseRow 中的 undefined/null/0 覆盖
|
||||||
adviceType: prevRow.dischargeFlag ? 7 : baseRow.adviceType,
|
adviceType: prevRow.dischargeFlag ? 7 : baseRow.adviceType,
|
||||||
// 🔧 修复执行科室逻辑:
|
// 🔧 修复执行科室逻辑:
|
||||||
// 1. 非诊疗类型(adviceType!=3)不需要执行科室,设为undefined
|
// 1. 非诊疗类型(adviceType!=3)不需要执行科室,设为undefined
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
field="requestTime"
|
field="requestTime"
|
||||||
width="150"
|
width="150"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default>
|
||||||
{{ '1支' }}
|
{{ '1支' }}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
@@ -166,17 +166,17 @@
|
|||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div
|
<div
|
||||||
v-for="(item, timeIndex) in scope.row.times"
|
v-for="(timeItem, timeIndex) in scope.row.times"
|
||||||
:key="timeIndex"
|
:key="timeIndex"
|
||||||
style="padding-bottom: 5px"
|
style="padding-bottom: 5px"
|
||||||
>
|
>
|
||||||
<span>{{ item }}</span>
|
<span>{{ timeItem }}</span>
|
||||||
<el-checkbox-group
|
<el-checkbox-group
|
||||||
v-model="scope.row.checkedRates[item]"
|
v-model="scope.row.checkedRates[timeItem]"
|
||||||
style="display: inline-block; margin-left: 15px"
|
style="display: inline-block; margin-left: 15px"
|
||||||
>
|
>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-for="(rateItem, rateIndex) in scope.row.rate[item]"
|
v-for="(rateItem, rateIndex) in scope.row.rate[timeItem]"
|
||||||
:key="rateIndex"
|
:key="rateIndex"
|
||||||
:value="rateItem.rate"
|
:value="rateItem.rate"
|
||||||
border
|
border
|
||||||
@@ -252,7 +252,6 @@ const activeNames = ref([]);
|
|||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const prescriptionList = ref([]);
|
const prescriptionList = ref([]);
|
||||||
const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59');
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const chooseAll = ref(false);
|
const chooseAll = ref(false);
|
||||||
@@ -267,6 +266,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
deadline: {
|
deadline: {
|
||||||
type: String,
|
type: String,
|
||||||
|
default: '',
|
||||||
},
|
},
|
||||||
therapyEnum: {
|
therapyEnum: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -309,8 +309,8 @@ function handleGetPrescription() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 将全部的时间点拆分 把日期去重,页面显示示例 05-15 [01:30 02:30 03:30]
|
// 将全部的时间点拆分 把日期去重,页面显示示例 05-15 [01:30 02:30 03:30]
|
||||||
let time = item.dispenseTime?.substring(5, 10);
|
let time = item.executeTime?.substring(5, 10);
|
||||||
let rateTime = item.dispenseTime?.substring(11, 16);
|
let rateTime = item.executeTime?.substring(11, 16);
|
||||||
times.add(time);
|
times.add(time);
|
||||||
rate[time] = rate[time] || [];
|
rate[time] = rate[time] || [];
|
||||||
rate[time].push({ rate: rateTime, dispenseId: item.dispenseId });
|
rate[time].push({ rate: rateTime, dispenseId: item.dispenseId });
|
||||||
@@ -367,7 +367,7 @@ function handleMedicineSummary() {
|
|||||||
const now = proxy.formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss');
|
const now = proxy.formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss');
|
||||||
paramList.forEach((item) => {
|
paramList.forEach((item) => {
|
||||||
item.dispenseIds.forEach((d) => {
|
item.dispenseIds.forEach((d) => {
|
||||||
ids.push({ ...d, dispenseTime: now });
|
ids.push({ ...d, executeTime: now });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
if (ids.length === 0) {
|
if (ids.length === 0) {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>未闭环医嘱预警</span>
|
<span>未闭环医嘱预警</span>
|
||||||
<el-tag type="danger" size="small">{{ unclosedWarnings.length }} 条待处理</el-tag>
|
<el-tag type="danger" size="small">{{ warningTotal }} 条待处理</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-table v-loading="warningLoading" :data="unclosedWarnings" border>
|
<el-table v-loading="warningLoading" :data="unclosedWarnings" border>
|
||||||
@@ -97,6 +97,16 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="开具时间" align="center" prop="orderTime" width="180" />
|
<el-table-column label="开具时间" align="center" prop="orderTime" width="180" />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
style="margin-top:16px;justify-content:flex-end"
|
||||||
|
v-model:current-page="warningPage"
|
||||||
|
v-model:page-size="warningPageSize"
|
||||||
|
:total="warningTotal"
|
||||||
|
:page-sizes="[10, 20, 50]"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="loadWarnings"
|
||||||
|
@current-change="loadWarnings"
|
||||||
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -167,25 +177,25 @@ function loadWarnings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleRemind(row) {
|
function handleRemind(row) {
|
||||||
ElMessageBox.confirm('??? ' + row.doctorName + ' ???????', '????', {
|
ElMessageBox.confirm('确认提醒 ' + row.doctorName + ' 处理未闭环医嘱?', '催办提醒', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
confirmButtonText: '????',
|
confirmButtonText: '确认催办',
|
||||||
cancelButtonText: '??'
|
cancelButtonText: '取消'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
apiRemindOrder({ orderNo: row.orderNo, message: '?????????????' }).then(res => {
|
apiRemindOrder({ orderNo: row.orderNo, message: '您有未闭环医嘱需要处理' }).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
ElMessage.success('???????? ' + row.doctorName)
|
ElMessage.success('催办消息已发送给 ' + row.doctorName)
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.msg || '????')
|
ElMessage.error(res.msg || '催办失败')
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
ElMessage.error('??????')
|
ElMessage.error('催办失败')
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleViewDetail(row) {
|
function handleViewDetail(row) {
|
||||||
ElMessage.info('???: ' + row.orderNo + ' | ??: ' + row.patientName + ' | ????: ' + row.currentStep)
|
ElMessage.info('医嘱号: ' + row.orderNo + ' | 患者: ' + row.patientName + ' | 当前环节: ' + row.currentStep)
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -687,15 +687,15 @@ import {
|
|||||||
} from '../api'
|
} from '../api'
|
||||||
|
|
||||||
// 当前日期 & 统计信息(总已签到/在队列中)
|
// 当前日期 & 统计信息(总已签到/在队列中)
|
||||||
const currentDate = ref('2025/12/22 上午')
|
const currentDate = ref('')
|
||||||
const totalSignedIn = ref(0)
|
const totalSignedIn = ref(0)
|
||||||
const totalInQueue = ref(0)
|
const totalInQueue = ref(0)
|
||||||
|
|
||||||
// 当前呼叫信息
|
// 当前呼叫信息
|
||||||
const currentCall = ref({
|
const currentCall = ref({
|
||||||
number: '1',
|
number: '-',
|
||||||
name: '郑华',
|
name: '-',
|
||||||
room: '4号诊室'
|
room: '-'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 当前选中的队列行(用于选呼)
|
// 当前选中的队列行(用于选呼)
|
||||||
@@ -785,85 +785,6 @@ const weekOptions = [
|
|||||||
// 叫号类型
|
// 叫号类型
|
||||||
const callType = ref('选呼')
|
const callType = ref('选呼')
|
||||||
|
|
||||||
// ============ 数据初始化/刷新(前端模拟) ============
|
|
||||||
const getInitialCandidatePoolList = () => ([
|
|
||||||
{
|
|
||||||
sequenceNo: 12,
|
|
||||||
patientName: '陈明',
|
|
||||||
age: 65,
|
|
||||||
appointmentType: '专家',
|
|
||||||
room: '3号诊室',
|
|
||||||
doctor: '张医生',
|
|
||||||
matchingRule: '年龄≥60'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sequenceNo: 13,
|
|
||||||
patientName: '刘芳',
|
|
||||||
age: 58,
|
|
||||||
appointmentType: '普通',
|
|
||||||
room: '4号诊室',
|
|
||||||
doctor: '李医生',
|
|
||||||
matchingRule: '-'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sequenceNo: 14,
|
|
||||||
patientName: '周强',
|
|
||||||
age: 45,
|
|
||||||
appointmentType: '普通',
|
|
||||||
room: '5号诊室',
|
|
||||||
doctor: '王医生',
|
|
||||||
matchingRule: '-'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sequenceNo: 15,
|
|
||||||
patientName: '吴伟',
|
|
||||||
age: 72,
|
|
||||||
appointmentType: '专家',
|
|
||||||
room: '3号诊室',
|
|
||||||
doctor: '张医生',
|
|
||||||
matchingRule: '年龄≥70'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
const getInitialQueueList = () => ([
|
|
||||||
{
|
|
||||||
queueOrder: 1,
|
|
||||||
patientName: '林静',
|
|
||||||
appointmentType: '专家',
|
|
||||||
room: '3号诊室',
|
|
||||||
doctor: '张医生',
|
|
||||||
waitingTime: '05:00',
|
|
||||||
status: '等待'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
queueOrder: 2,
|
|
||||||
patientName: '郑华',
|
|
||||||
appointmentType: '普通',
|
|
||||||
room: '4号诊室',
|
|
||||||
doctor: '李医生',
|
|
||||||
waitingTime: '00:00',
|
|
||||||
status: '叫号中'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
queueOrder: 3,
|
|
||||||
patientName: '王丽',
|
|
||||||
appointmentType: '普通',
|
|
||||||
room: '5号诊室',
|
|
||||||
doctor: '王医生',
|
|
||||||
waitingTime: '08:00',
|
|
||||||
status: '等待'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
queueOrder: 4,
|
|
||||||
patientName: '张伟',
|
|
||||||
appointmentType: '专家',
|
|
||||||
room: '3号诊室',
|
|
||||||
doctor: '张医生',
|
|
||||||
waitingTime: '12:00',
|
|
||||||
status: '等待'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
const syncCurrentCallFromQueue = () => {
|
const syncCurrentCallFromQueue = () => {
|
||||||
const calling = originalQueueList.value.find((i) => i.status === '叫号中')
|
const calling = originalQueueList.value.find((i) => i.status === '叫号中')
|
||||||
if (!calling) {
|
if (!calling) {
|
||||||
@@ -1108,12 +1029,12 @@ const loadDataFromApi = async () => {
|
|||||||
}))
|
}))
|
||||||
console.log('【心内科】候选池已加载', originalCandidatePoolList.value.length, '条今天的数据')
|
console.log('【心内科】候选池已加载', originalCandidatePoolList.value.length, '条今天的数据')
|
||||||
} else {
|
} else {
|
||||||
console.log('【心内科】候选池数据为空数组或非数组,使用默认数据')
|
console.log('【心内科】候选池数据为空数组或非数组')
|
||||||
originalCandidatePoolList.value = getInitialCandidatePoolList()
|
originalCandidatePoolList.value = []
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('【心内科】候选池响应为空或格式错误,使用默认数据')
|
console.log('【心内科】候选池响应为空或格式错误')
|
||||||
originalCandidatePoolList.value = getInitialCandidatePoolList()
|
originalCandidatePoolList.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2) 队列列表:从数据库读取(可刷新、可恢复)
|
// 2) 队列列表:从数据库读取(可刷新、可恢复)
|
||||||
@@ -1161,10 +1082,8 @@ const loadDataFromApi = async () => {
|
|||||||
console.log('【心内科】数据加载完成:候选池', originalCandidatePoolList.value.length, '条,队列', originalQueueList.value.length, '条')
|
console.log('【心内科】数据加载完成:候选池', originalCandidatePoolList.value.length, '条,队列', originalQueueList.value.length, '条')
|
||||||
ElMessage.success('【心内科】已从门诊挂号接口加载数据')
|
ElMessage.success('【心内科】已从门诊挂号接口加载数据')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('【心内科】loadDataFromApi 执行异常,使用本地假数据:', e)
|
console.error('【心内科】loadDataFromApi 执行异常:', e)
|
||||||
// 任何异常:回退本地假数据
|
originalCandidatePoolList.value = []
|
||||||
originalCandidatePoolList.value = getInitialCandidatePoolList()
|
|
||||||
// 队列不再回退假数据,避免误导
|
|
||||||
originalQueueList.value = []
|
originalQueueList.value = []
|
||||||
totalSignedIn.value = originalCandidatePoolList.value.length
|
totalSignedIn.value = originalCandidatePoolList.value.length
|
||||||
totalInQueue.value = originalQueueList.value.length
|
totalInQueue.value = originalQueueList.value.length
|
||||||
@@ -1173,7 +1092,7 @@ const loadDataFromApi = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 原始数据存储(用于过滤)
|
// 原始数据存储(用于过滤)
|
||||||
const originalCandidatePoolList = ref(getInitialCandidatePoolList())
|
const originalCandidatePoolList = ref([])
|
||||||
|
|
||||||
// 过滤后的智能候选池数据(按诊室过滤)
|
// 过滤后的智能候选池数据(按诊室过滤)
|
||||||
const filteredCandidatePoolList = computed(() => {
|
const filteredCandidatePoolList = computed(() => {
|
||||||
@@ -1184,7 +1103,7 @@ const filteredCandidatePoolList = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 原始队列数据存储(用于过滤)
|
// 原始队列数据存储(用于过滤)
|
||||||
const originalQueueList = ref(getInitialQueueList())
|
const originalQueueList = ref([])
|
||||||
|
|
||||||
// 动态计算已加载数据中的唯一诊室列表(依赖上方两个 ref,确保声明顺序正确)
|
// 动态计算已加载数据中的唯一诊室列表(依赖上方两个 ref,确保声明顺序正确)
|
||||||
const uniqueRooms = computed(() => {
|
const uniqueRooms = computed(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user