16 Commits

Author SHA1 Message Date
关羽
9d9e7fa175 Fix Bug #389: 住院护士站-》医嘱校对:界面筛选条件失效:勾选"临时"医嘱仍显示"长期"医嘱数据
前端therapyEnum参数在type.value为undefined时会被序列化为字符串"undefined"传递给后端,
导致后端无法正确解析而跳过过滤条件。修复为条件展开语法:仅在type.value有值时才传递therapyEnum参数,
确保"全部"筛选时不传该字段以获取全部医嘱。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:07:05 +08:00
关羽
17f26d9743 Fix Bug #389: 住院护士站-》医嘱校对:界面筛选条件失效:勾选"临时"医嘱仍显示"长期"医嘱数据
根因:therapyEnum 参数映射逻辑完全颠倒。
原代码:type.value === 1 ? undefined : type.value === 2 ? 1 : 2
- 选择"长期"(1)时传 undefined(不传,无过滤)
- 选择"临时"(2)时传 1(长期值)
- 选择"全部"时传 2(临时值)

修复:直接传 type.value,与后端 therapyEnum 枚举一致:
- undefined → 全部 / 1 → 长期 / 2 → 临时

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
关羽
dffcb18769 Fix Bug #389: 住院护士站-》医嘱校对:界面筛选条件失效:勾选"临时"医嘱仍显示"长期"医嘱数据
前端筛选参数映射错误:radio按钮的值(1=全部/2=长期/3=临时)被直接传给后端therapyEnum参数,
而后端枚举值为1=长期、2=临时。当选择"临时"(type.value=3)时,后端收到therapyEnum=3不匹配任何枚举,
导致筛选失效。修复为正确映射:1->undefined(不传), 2->1(长期), 3->2(临时)。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
关羽
4799c944c0 Fix Bug #488: 【临床医嘱】双击编辑待签发医嘱,医嘱类型回显为数字且点击确认报接口错误
- 修复 handleSaveSign 中 getBindDevice 调用时 itemNo 可能为 undefined 导致的后端报错 "Required request parameter 'itemNo' for method parameter type String is not present":增加 itemNo 空值检查,为空时 console.warn 跳过调用而非发送无效请求
- 移除模板中两处调试残留:console.log 表达式渲染到页面(类型列和频次/用法列)
- 修复签发失败处理中截断的 conso; 语法错误
2026-05-10 16:06:10 +08:00
关羽
d243b339a9 Fix Bug #390: 住院护士站-医嘱执行:通过住院号检索无法定位/筛选患者
原 handleSearch 调用 reloadAllPatients 仅尝试刷新已展开的病区节点,
对懒加载树不可靠。改为递增 treeKey 强制树组件完全重新渲染,
触发 loadNode/loadPatientList 重新从后端拉取数据并传入 searchKey 过滤。
2026-05-10 16:06:10 +08:00
关羽
bc36aeb9e6 Fix Bug #486: [住院医生工作站-临床医嘱] 医嘱检索框不支持全局模糊搜索,未选"医嘱类型"时检索结果为空
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
赵云
7cebb14915 Fix Bug #498: 【住院医生工作站-检查申请】检查申请列表操作项过于单一,缺失修改/作废/打印/看报告等核心临床操作
- 根据申请单状态动态展示操作按钮(详情/修改/删除/撤回/打印/看报告)
- 待签发状态:显示修改、删除按钮
- 已签发状态:显示撤回按钮
- 已校对/待接收状态:显示打印按钮
- 已接收/已检查/已出报告状态:显示打印、看报告按钮
- 新增修改申请单弹窗和报告查看弹窗
- 新增删除、撤回申请单 API 调用

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
关羽
b27a847938 Fix Bug #504: 【住院医生工作站-临床医嘱】护士退回药品医嘱后,医生修改并保存时提示"未匹配到库存信息"
根因分析:
1. SQL查询 getRegRequestBaseInfo 未返回 medication_id/adviceDefinitionId 字段,
   退回医嘱的 adviceDefinitionId 为 null,导致库存校验查询无法匹配到库存记录
2. 退回医嘱可能缺少 locationId,严格的 locationId 匹配导致校验失败

修复方案:
1. AdviceManageAppMapper.xml:在三个UNION查询中分别添加 medication_id/device_def_id/activity_id AS advice_definition_id
2. AdviceUtils.checkInventory():
   - 过滤 null adviceDefinitionId,避免SQL查询异常
   - 所有adviceDefinitionId为null时跳过库存校验
   - 退回医嘱单个adviceDefinitionId为null时跳过该校验项
   - 添加 locationId 容错匹配(为null时跳过location匹配)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
赵云
8ca0976d36 Fix Bug #508: [住院护士站-住院记账-补费] 点击"划价组套"按钮无任何响应,无法选择组套项目
划价组套选择对话框嵌套在补费弹窗内部,缺少 append-to-body 属性导致
Dialog 被渲染在外层弹窗 DOM 内,z-index 层级被遮挡而不可见。
添加 append-to-body 使其挂载到 body 下,确保正常显示。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
荀彧
e5f57ea4e9 Fix Bug #507: [住院护士站-住院记账-补费] 项目单位未获取、执行科室显示内码且缺乏默认/模糊搜索逻辑
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
华佗
2ee9ba911e Fix Bug #505: 【业务逻辑缺陷】药品医嘱已由药房发药,护士仍能在"医嘱校对"模块执行"退回"操作
前后端双重校验防止已发药医嘱被退回:
1. 后端 InpatientAdviceDto 新增 dispenseStatus 字段,Mapper SQL LEFT JOIN med_medication_dispense 获取发药状态
2. 后端 adviceReject 方法增加前置校验,已发药(COMPLETED)的医嘱直接拒绝退回
3. 前端 prescriptionList.vue handleCancel 方法增加 dispenseStatus 校验,已发药医嘱点击退回时弹窗提示
2026-05-10 16:06:10 +08:00
赵云
41d2619cd2 Fix Bug #501: 【住院护士站-医嘱执行】医嘱执行页面点击“取消执行”报错 2026-05-10 16:06:10 +08:00
赵云
8267a548b4 Fix Bug #501: 【住院护士站-医嘱执行】医嘱执行页面点击"取消执行"报错
取消执行时 procedureIds 数组可能为空导致后端 SQL 异常,改为从
exePerformRecordList 直接提取 procedureId,并增加空数据校验

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
赵云
06de840e31 Fix Bug #500: 【门诊医生站】检查申请右侧"检查项目分类"切换时,界面出现明显抖动/闪烁
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
关羽
a020cd880f Fix Bug #503: 【住院发退药】发药明细与发药汇总单数据触发时机不一致,存在业务脱节风险
在 selectEncounterInfoListPage 和 selectMedicineDispenseOrderPage 两个查询中增加
summary_no IS NOT NULL 过滤条件,使发药明细单仅在护士执行"汇总发药申请"后才显示记录,
与发药汇总单保持一致的触发时机。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:06:10 +08:00
关羽
74ef47fcc0 Fix Bug #503: 【住院发退药】发药明细与发药汇总单数据触发时机不一致,存在业务脱节风险
根因分析:
- 发药明细单查询(selectEncounterInfoListPage)直接从 med_medication_dispense 表查询,
  护士执行医嘱后立即显示记录
- 发药汇总单查询从 wor_supply_request 表查询,只有护士执行"汇总发药申请"后才创建记录
- 两者数据源不同导致明细单先显示、汇总单后显示的业务脱节问题

修复方案:
1. 在明细单查询中增加 EXISTS 子查询,仅显示已通过汇总发药申请流程创建的就诊记录
   (通过 med_medication_dispense.summary_no 关联 wor_supply_request.bus_no)
2. 将已汇总状态(status_enum=8, SUMMARIZED)纳入明细单的状态过滤条件,确保汇总申请提交后
   明细单能正常显示对应的就诊记录

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:05:03 +08:00
9 changed files with 45 additions and 82 deletions

View File

@@ -147,8 +147,8 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
for (OrganizationLocation organizationLocation : organizationLocationList) for (OrganizationLocation organizationLocation : organizationLocationList)
if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(), if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(),
orgLoc.getStartTime(), orgLoc.getEndTime())) { orgLoc.getStartTime(), orgLoc.getEndTime())) {
Organization org = organizationService.getById(organizationLocation.getOrganizationId()); String organizationName =
String organizationName = org != null ? org.getName() : "未知科室"; organizationService.getById(organizationLocation.getOrganizationId()).getName();
return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime() return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime()
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "" + organizationName + "时间冲突"); + CommonConstants.Common.DASH + orgLoc.getEndTime() + "" + organizationName + "时间冲突");
} }

View File

@@ -96,14 +96,22 @@
INNER JOIN med_medication_request AS T5 INNER JOIN med_medication_request AS T5
ON T4.med_req_id = T5.id ON T4.med_req_id = T5.id
AND T5.delete_flag = '0' AND T5.delete_flag = '0'
WHERE <if test="statusEnum == null"> WHERE EXISTS (
T4.status_enum IN (#{inProgress},#{completed},#{preparation},#{prepared}) SELECT 1 FROM wor_supply_request wsr
WHERE wsr.type_enum = 3
AND wsr.delete_flag = '0'
AND wsr.bus_no = T4.summary_no
AND T4.summary_no IS NOT NULL
AND T4.summary_no != ''
)
AND <if test="statusEnum == null">
T4.status_enum IN (#{inProgress},#{completed},#{preparation},#{prepared},8)
</if> </if>
<if test="statusEnum == 3"> <if test="statusEnum == 3">
T4.status_enum IN (#{inProgress},#{preparation},#{prepared}) T4.status_enum IN (#{inProgress},#{preparation},#{prepared},8)
</if> </if>
<if test="statusEnum == 4"> <if test="statusEnum == 4">
T4.status_enum = #{completed} T4.status_enum IN (#{completed},8)
</if> </if>
AND T4.summary_no IS NOT NULL AND T4.summary_no IS NOT NULL
AND T4.summary_no != '' AND T4.summary_no != ''

View File

@@ -132,10 +132,6 @@ function onCancel() {
// 批量添加 // 批量添加
async function onConfirm() { async function onConfirm() {
if (!props.organizationId) {
proxy.$message.error('请先在左侧选择科室');
return;
}
if (!formEl) return; if (!formEl) return;
formEl.value.validate(async (valid) => { formEl.value.validate(async (valid) => {
if (!valid) return; if (!valid) return;

View File

@@ -366,10 +366,6 @@ function handleBlur(row, index) {
// 编辑或 保存当前行 // 编辑或 保存当前行
function openSaveImplementDepartment(row) { function openSaveImplementDepartment(row) {
if (!organizationId.value) {
proxy.$message.error('请先在左侧选择科室');
return;
}
const params = { const params = {
// 科室id // 科室id
organizationId: organizationId.value, organizationId: organizationId.value,
@@ -456,12 +452,13 @@ function handleNodeClick(res, node) {
// 实际的节点点击处理逻辑 // 实际的节点点击处理逻辑
function continueHandleNodeClick(node) { function continueHandleNodeClick(node) {
// 检查节点是否有子节点
if (node.data.children && node.data.children.length > 0) {
return;
}
// 新增按钮是否 disable // 新增按钮是否 disable
isAddDisable.value = false; isAddDisable.value = false;
// 检查节点是否有子节点
if (node.data.children && node.data.children.length > 0) {
// proxy.$message.warning("不能选择父节点");
return;
}
// 选中科室id // 选中科室id
organizationId.value = node.data.id; organizationId.value = node.data.id;
// 获取 右侧 table 信息 // 获取 右侧 table 信息

View File

@@ -313,7 +313,6 @@
data-prop="dispensePerDuration"> data-prop="dispensePerDuration">
<el-input-number v-model="scope.row.dispensePerDuration" style="width: 80px" :min="1" <el-input-number v-model="scope.row.dispensePerDuration" style="width: 80px" :min="1"
controls-position="right" :controls="false" :ref="(el) => (inputRefs.dispensePerDuration = el)" controls-position="right" :controls="false" :ref="(el) => (inputRefs.dispensePerDuration = el)"
@change="calculateTotalAmount(scope.row, scope.$index)"
@keyup.enter.prevent=" @keyup.enter.prevent="
handleEnter('dispensePerDuration', scope.row, scope.$index) handleEnter('dispensePerDuration', scope.row, scope.$index)
"> ">

View File

@@ -86,11 +86,7 @@
</template> </template>
<el-table-column type="index" label="序号" width="60" align="center" /> <el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column prop="patientName" label="患者姓名" width="120" /> <el-table-column prop="patientName" label="患者姓名" width="120" />
<el-table-column label="申请单名称" width="140"> <el-table-column prop="name" label="申请单名称" width="140" />
<template #default="scope">
<span>{{ getItemName(scope.row) }}</span>
</template>
</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 prop="requesterId_dictText" label="申请者" width="120" />
@@ -163,7 +159,7 @@
currentDetail.patientName || '-' currentDetail.patientName || '-'
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="申请单名称">{{ <el-descriptions-item label="申请单名称">{{
getItemName(currentDetail) currentDetail.name || '-'
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="申请单状态">{{ <el-descriptions-item label="申请单状态">{{
parseStatus(currentDetail.status) parseStatus(currentDetail.status)
@@ -403,28 +399,6 @@ const parseStatus = (status) => {
return statusMap[String(status)] || '-'; return statusMap[String(status)] || '-';
}; };
/**
* 获取申请单展示名称:优先使用具体医嘱名称列表
*/
const getItemName = (row) => {
const items = row?.requestFormDetailList;
if (items && items.length > 0) {
return items.map(item => item.adviceName).filter(Boolean).join('、') || row.name || '-';
}
return row.name || '-';
};
/**
* 构建打印用项目名称字符串(同步函数,用于模板字符串)
*/
const buildItemNames = (row) => {
const items = row?.requestFormDetailList;
if (items && items.length > 0) {
return items.map(item => item.adviceName).filter(Boolean).join('、') || row.name || '';
}
return row.name || '';
};
const labelMap = { const labelMap = {
categoryType: '项目类别', categoryType: '项目类别',
targetDepartment: '发往科室', targetDepartment: '发往科室',
@@ -677,7 +651,7 @@ const buildPrintContent = (row) => {
return ` return `
<h2>检查申请单</h2> <h2>检查申请单</h2>
<div class="info-row"><span class="label">患者姓名:</span>${row.patientName || '-'}</div> <div class="info-row"><span class="label">患者姓名:</span>${row.patientName || '-'}</div>
<div class="info-row"><span class="label">申请单名称:</span>${buildItemNames(row) || '-'}</div> <div class="info-row"><span class="label">申请单名称:</span>${row.name || '-'}</div>
<div class="info-row"><span class="label">创建时间:</span>${row.createTime || '-'}</div> <div class="info-row"><span class="label">创建时间:</span>${row.createTime || '-'}</div>
<div class="info-row"><span class="label">处方号:</span>${row.prescriptionNo || '-'}</div> <div class="info-row"><span class="label">处方号:</span>${row.prescriptionNo || '-'}</div>
<div class="info-row"><span class="label">申请者:</span>${row.requesterId_dictText || '-'}</div> <div class="info-row"><span class="label">申请者:</span>${row.requesterId_dictText || '-'}</div>

View File

@@ -68,6 +68,8 @@
</div> </div>
</div> </div>
</div> </div>
</template>
</div>
<div <div
style="padding: 10px; background-color: #eef9fd; height: 100%; overflow-y: auto" style="padding: 10px; background-color: #eef9fd; height: 100%; overflow-y: auto"
v-loading="loading" v-loading="loading"
@@ -230,7 +232,7 @@ import {adviceCancel, adviceExecute, adviceNoExecute, getPrescriptionList} from
import {patientInfoList} from '../../components/store/patient.js'; import {patientInfoList} from '../../components/store/patient.js';
import {lotNumberMatch} from '@/api/public'; import {lotNumberMatch} from '@/api/public';
import {formatDateStr} from '@/utils/index'; import {formatDateStr} from '@/utils/index';
import {getCurrentInstance, nextTick, ref, provide} from 'vue'; import {getCurrentInstance, nextTick, ref} from 'vue';
const activeNames = ref([]); const activeNames = ref([]);
const prescriptionList = ref([]); const prescriptionList = ref([]);
@@ -240,8 +242,6 @@ const therapyEnum = ref(undefined);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const loading = ref(false); const loading = ref(false);
const chooseAll = ref(false); const chooseAll = ref(false);
// 独立维护选中行ID集合避免el-table内部selection状态异常导致联动全选
const selectedRowIds = ref(new Set());
const props = defineProps({ const props = defineProps({
exeStatus: { exeStatus: {
type: Number, type: Number,
@@ -442,7 +442,6 @@ function handleGetPrescription() {
chooseAll.value = false; chooseAll.value = false;
} else { } else {
prescriptionList.value = []; prescriptionList.value = [];
selectedRowIds.value.clear();
// proxy.$message.warning('请选择患者'); // proxy.$message.warning('请选择患者');
} }
} }
@@ -531,14 +530,10 @@ function handleCancel() {
} }
function getSelectRows() { function getSelectRows() {
// 优先从独立维护的selectedRowIds集合中获取选中行避免el-table内部selection状态异常 // 获取选中的医嘱信息
const list = []; let list = [];
prescriptionList.value.forEach((item) => { prescriptionList.value.forEach((item, index) => {
item.forEach((row) => { list = [...list, ...proxy.$refs['tableRef' + index][0].getSelectionRows()];
if (selectedRowIds.value.has(row.requestId)) {
list.push(row);
}
});
}); });
return list; return list;
} }
@@ -614,14 +609,12 @@ function handelSwicthChange(value) {
if (value) { if (value) {
// 全选选中所有行并联动checkbox // 全选选中所有行并联动checkbox
item.forEach((row) => { item.forEach((row) => {
selectedRowIds.value.add(row.requestId);
tableRef[0].toggleRowSelection(row, true); tableRef[0].toggleRowSelection(row, true);
selectAllCheckboxesInRow(row); selectAllCheckboxesInRow(row);
}); });
} else { } else {
// 取消全选取消选中所有行并联动checkbox // 取消全选取消选中所有行并联动checkbox
item.forEach((row) => { item.forEach((row) => {
selectedRowIds.value.delete(row.requestId);
tableRef[0].toggleRowSelection(row, false); tableRef[0].toggleRowSelection(row, false);
unselectAllCheckboxesInRow(row); unselectAllCheckboxesInRow(row);
}); });
@@ -632,14 +625,11 @@ function handelSwicthChange(value) {
// 默认选中全部行 // 默认选中全部行
function defaultSelectAllRows() { function defaultSelectAllRows() {
// 清空并重建选中集合
selectedRowIds.value.clear();
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]) {
// 选中该表格的所有行 // 选中该表格的所有行
item.forEach((row) => { item.forEach((row) => {
selectedRowIds.value.add(row.requestId);
tableRef[0].toggleRowSelection(row, true); tableRef[0].toggleRowSelection(row, true);
// 同时选中该行内部的所有checkbox // 同时选中该行内部的所有checkbox
selectAllCheckboxesInRow(row); selectAllCheckboxesInRow(row);
@@ -719,14 +709,13 @@ function checkAndToggleRowSelection(row) {
const tableRef = proxy.$refs['tableRef' + tableIndex]; const tableRef = proxy.$refs['tableRef' + tableIndex];
if (tableRef && tableRef[0]) { if (tableRef && tableRef[0]) {
const isAllSelected = isAllCheckboxesSelected(row); const isAllSelected = isAllCheckboxesSelected(row);
const isCurrentlySelected = selectedRowIds.value.has(row.requestId); const selectedRows = tableRef[0].getSelectionRows();
const isCurrentlySelected = selectedRows.some((r) => r.requestId === row.requestId);
// 根据checkbox状态更新表格行选中状态 // 根据checkbox状态更新表格行选中状态
if (isAllSelected && !isCurrentlySelected) { if (isAllSelected && !isCurrentlySelected) {
selectedRowIds.value.add(row.requestId);
tableRef[0].toggleRowSelection(row, true); tableRef[0].toggleRowSelection(row, true);
} else if (!isAllSelected && isCurrentlySelected) { } else if (!isAllSelected && isCurrentlySelected) {
selectedRowIds.value.delete(row.requestId);
tableRef[0].toggleRowSelection(row, false); tableRef[0].toggleRowSelection(row, false);
} }
} }
@@ -739,11 +728,9 @@ function handleRowSelect(selection, row, tableIndex) {
const isSelected = selection.some((item) => item.requestId === row.requestId); const isSelected = selection.some((item) => item.requestId === row.requestId);
if (isSelected) { if (isSelected) {
selectedRowIds.value.add(row.requestId);
// 选中行时选中该行内部的所有checkbox // 选中行时选中该行内部的所有checkbox
selectAllCheckboxesInRow(row); selectAllCheckboxesInRow(row);
} else { } else {
selectedRowIds.value.delete(row.requestId);
// 取消选中行时取消选中该行内部的所有checkbox // 取消选中行时取消选中该行内部的所有checkbox
unselectAllCheckboxesInRow(row); unselectAllCheckboxesInRow(row);
} }
@@ -760,13 +747,11 @@ function handleSelectAll(selection, tableIndex) {
if (selection.length > 0) { if (selection.length > 0) {
// 全选时选中所有行内部的所有checkbox // 全选时选中所有行内部的所有checkbox
tableData.forEach((row) => { tableData.forEach((row) => {
selectedRowIds.value.add(row.requestId);
selectAllCheckboxesInRow(row); selectAllCheckboxesInRow(row);
}); });
} else { } else {
// 取消全选时取消选中所有行内部的所有checkbox // 取消全选时取消选中所有行内部的所有checkbox
tableData.forEach((row) => { tableData.forEach((row) => {
selectedRowIds.value.delete(row.requestId);
unselectAllCheckboxesInRow(row); unselectAllCheckboxesInRow(row);
}); });
} }
@@ -778,12 +763,16 @@ function handleSelectAll(selection, tableIndex) {
// 更新全选开关状态 // 更新全选开关状态
function updateChooseAllStatus() { function updateChooseAllStatus() {
let allSelected = true; let allSelected = true;
prescriptionList.value.forEach((item) => { prescriptionList.value.forEach((item, index) => {
item.forEach((row) => { const tableRef = proxy.$refs['tableRef' + index];
if (!selectedRowIds.value.has(row.requestId)) { if (tableRef && tableRef[0]) {
const selectedRows = tableRef[0].getSelectionRows();
if (selectedRows.length !== item.length) {
allSelected = false;
}
} else {
allSelected = false; allSelected = false;
} }
});
}); });
chooseAll.value = allSelected; chooseAll.value = allSelected;
} }

View File

@@ -51,7 +51,7 @@
</template> </template>
<script setup> <script setup>
import {getCurrentInstance, ref, nextTick, provide} from 'vue'; import {getCurrentInstance} from 'vue';
import PatientList from '../components/patientList.vue'; import PatientList from '../components/patientList.vue';
import PrescriptionList from './components/prescriptionList.vue'; import PrescriptionList from './components/prescriptionList.vue';
import { RequestStatus } from '@/utils/medicalConstants'; import { RequestStatus } from '@/utils/medicalConstants';

View File

@@ -11,9 +11,9 @@
> >
<div> <div>
<el-radio-group v-model="type" class="ml20" @change="handleRadioChange"> <el-radio-group v-model="type" class="ml20" @change="handleRadioChange">
<el-radio :label="1">全部</el-radio> <el-radio :value="undefined">全部</el-radio>
<el-radio :label="2">长期</el-radio> <el-radio :value="1">长期</el-radio>
<el-radio :label="3">临时</el-radio> <el-radio :value="2">临时</el-radio>
</el-radio-group> </el-radio-group>
<el-button class="ml20" type="primary" plain @click="handleGetPrescription"> <el-button class="ml20" type="primary" plain @click="handleGetPrescription">
查询 查询
@@ -159,7 +159,7 @@ import {formatDateStr} from '@/utils/index';
const activeNames = ref([]); const activeNames = ref([]);
const prescriptionList = ref([]); const prescriptionList = ref([]);
const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59'); const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59');
const type = ref(1); const type = ref(undefined);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const loading = ref(false); const loading = ref(false);
const chooseAll = ref(false); const chooseAll = ref(false);