| | |
| | | </div> |
| | | <div class="records-host"> |
| | | <ContentWrap class="records-wrap"> |
| | | <div class="records-scroll"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="list" |
| | | :stripe="true" |
| | | :show-overflow-tooltip="true" |
| | | highlight-current-row |
| | | @current-change="onCurrentRowChange" |
| | | @row-click="onRowClick" |
| | | > |
| | | <!-- 需求11(修正):「撤销」作为**已完成领用记录列表的第一列**(表头插槽), |
| | |
| | | type="warning" |
| | | :disabled="undoDisabled" |
| | | :loading="undoLoading" |
| | | @click="$emit('event_undo_finish')" |
| | | title="先在下方点选一条完成记录,再点此撤销" |
| | | @click="undoSelected" |
| | | > |
| | | 撤销 |
| | | </el-button> |
| | |
| | | <span v-else-if="scope.row.jobType === 5">"已领用"</span> |
| | | <span v-if="scope.row.jobType === 30">"已放弃"</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- 【2026-11-25 需求】同一患者可能有多个检查项目,已完成列表列出来才能区分/精确撤销 --> |
| | | <el-table-column label="检查项目" align="center" width="150"> |
| | | <template #default="scope">{{ getCheckTypeName(scope.row.checkType) }}</template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="作业类型" align="center" prop="jobType" />--> |
| | | <!-- <el-table-column label="医生编号" align="center" prop="docId" />--> |
| | |
| | | </el-table-column> |
| | | --> |
| | | </el-table> |
| | | </div> |
| | | </ContentWrap> |
| | | <!-- 分页 --> |
| | | <Pagination |
| | |
| | | import {calGender, getBookBeginTime} from "@/utils"; |
| | | import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' |
| | | import {tranlateDevState} from "@/utils/statusFormatter"; |
| | | import { copyText } from '@/utils/copyText' |
| | | import {getCheckTypeName, needAutoFeeConfirm, needDevReady} from "../../../../utils/checkTypeFormatter"; |
| | | import { useRoomStore } from '@/store/modules/room' |
| | | // 需求1:患者信息 18 项统一展示块 |
| | |
| | | `「${ctName}」不需要设备领用,不能在设备领用模块办理。` + |
| | | `请确认是否应到「叫号检查」页面处理该患者。` |
| | | ) |
| | | return |
| | | return false |
| | | } |
| | | |
| | | // 校验表单 |
| | |
| | | // 发送操作成功的事件 |
| | | emit('event_dev_ready') |
| | | message.success(t('操作完成')) |
| | | return true |
| | | } finally { |
| | | formLoading.value = false |
| | | } |
| | |
| | | formData.value.patIdentityId = queueVO?.patIdentityId |
| | | getFreeRentInfo(formData.value) // 待检查的信息 @ dev_rent 表 |
| | | } |
| | | defineExpose({ setPatient, getList: () => getList() }) // 提供 setPatient 方法,用于设置患者 |
| | | /** |
| | | * 【叫号自动完成】供父页面点「叫号」时先自动完成当前患者(等同点「领用完成」)。 |
| | | */ |
| | | const completeCurrent = async (): Promise<boolean> => { |
| | | try { |
| | | return (await submitForm()) === true |
| | | } catch (e) { |
| | | console.warn('[DevReadyPanel] 自动「领用完成」失败', e) |
| | | return false |
| | | } |
| | | } |
| | | defineExpose({ setPatient, getList: () => getList(), completeCurrent }) // 提供 setPatient 方法,用于设置患者 |
| | | |
| | | |
| | | const loading = ref(true) // 列表的加载中 |
| | |
| | | const data = await JobRecordApi.getJobRecordDoctorPage(queryParams) |
| | | list.value = data.list |
| | | total.value = data.total |
| | | // 列表刷新后旧的选中行已失效,清掉,避免「撤销」作用到上一屏的记录 |
| | | selectedRecord.value = undefined |
| | | } finally { |
| | | loading.value = false |
| | | } |
| | | } |
| | | |
| | | /** 【2026-11-25 需求】已完成列表的选中行:撤销前先点选一条,撤销作用在选中记录上 */ |
| | | const selectedRecord = ref<any>() |
| | | const onCurrentRowChange = (row: any) => { |
| | | selectedRecord.value = row || undefined |
| | | } |
| | | |
| | | /** 撤销:只撤销当前选中的那条完成记录(未选中时提示,不再默认撤销"最近一条") */ |
| | | const undoSelected = () => { |
| | | if (!selectedRecord.value) { |
| | | message.warning('请先在「已完成列表」中点选一条记录,再点「撤销」') |
| | | return |
| | | } |
| | | emit('event_undo_finish', { |
| | | ...selectedRecord.value, |
| | | checkTypeName: getCheckTypeName(selectedRecord.value.checkType) |
| | | }) |
| | | } |
| | | |
| | | const onRowClick = (cur) => { |
| | |
| | | |
| | | const copyBarcode = async () => { |
| | | if (!barcodeContent.value) return |
| | | await navigator.clipboard.writeText(barcodeContent.value) |
| | | // 【兼容 Chrome 85 / http 访问】非安全上下文下 navigator.clipboard 不可用,用兼容实现 |
| | | const ok = await copyText(barcodeContent.value) |
| | | if (ok) { |
| | | message.success('已复制') |
| | | } else { |
| | | message.warning('当前浏览器不支持自动复制,请手动选中复制') |
| | | } |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | |
| | | } |
| | | |
| | | &__text { |
| | | font-size: 14px; |
| | | font-size: 15px; |
| | | font-weight: 600; |
| | | color: var(--el-text-color-primary); |
| | | } |
| | |
| | | margin-left: 0; |
| | | } |
| | | } |
| | | |
| | | /* ========================================================================== |
| | | 【2026-11-25 需求】已完成列表:只显示 4 行左右,超过就出现纵向滚动条 |
| | | (实测行高 40px、表头 63px → 63 + 4×40 + 2 = 225px)。 |
| | | ========================================================================== */ |
| | | .records-scroll { |
| | | max-height: 225px; |
| | | min-height: 120px; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | |
| | | :deep(.el-table__header-wrapper) { |
| | | position: sticky; |
| | | top: 0; |
| | | z-index: 2; |
| | | background-color: var(--el-bg-color); |
| | | } |
| | | } |
| | | </style> |