| | |
| | | <!-- 当前患者: {{patient?.patId}} {{isStringEmpty(patient?.patName)?'无':patient.patName}}--> |
| | | |
| | | <el-form |
| | | class="patient-compact-form" |
| | | ref="formRef" |
| | | :model="formData" |
| | | :rules="formRules" |
| | | label-width="100px" |
| | | v-loading="formLoading" |
| | | |
| | | > |
| | | <el-form-item label="检查项目" prop=""> |
| | | {{formData?.checkType && getCheckTypeName(formData?.checkType)}} |
| | | </el-form-item> |
| | | <el-form-item label="患者编号" prop="patId"> |
| | | <el-input v-model="formData.patId" placeholder="请输入患者编号" @input="getRentInfoByPatId" /> |
| | | <Barcode v-if="displayBarCode" :value="displayBarCode" :width=100 /> |
| | | <el-button @click="copyBarcode()">复制</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="患者名称" prop="patName"> |
| | | <el-input v-model="formData.patName" placeholder="请输入患者名称" /> |
| | | </el-form-item> |
| | | <!-- ===== 编辑区(需要录入的字段)===== --> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="检查项目" prop=""> |
| | | {{getCheckTypeName(formData.checkType)}} |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="患者编号" prop="patId"> |
| | | <el-input v-model="formData.patId" placeholder="请输入患者编号" @input="getRentInfoByPatId" /> |
| | | <Barcode v-if="displayBarCode" :value="displayBarCode" :width=100 /> |
| | | <el-button @click="copyBarcode()">复制</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="设备编号" prop="devId"> |
| | | <el-input v-model="formData.devId" placeholder="请输入设备编号" @input="getDevInfo"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="患者描述" prop="patDeptDesc"> |
| | | <dict-tag v-if="formData.patDetails?.source" :type="DICT_TYPE.ECG_PAT_SOURCE" :value="formData.patDetails?.source" /> |
| | | {{formData?.patDetails?.deptDesc}} {{formData?.patDetails?.wardDesc}} {{formData?.patDetails?.bedNo}} |
| | | </el-form-item> |
| | | <el-form-item label="设备编号" prop="devId"> |
| | | <el-input v-model="formData.devId" placeholder="请输入设备编号" @input="getDevInfo"/> |
| | | </el-form-item> |
| | | <el-form-item label="设备描述" prop=""> |
| | | {{ devInfo?.brand||'-' }} {{ devInfo?.model||'-' }} {{ tranlateDevState(devInfo?.state) }} |
| | | </el-form-item> |
| | | <el-form-item label="领用时间" prop="rentTime"> |
| | | <el-date-picker |
| | | v-model="formData.rentTime" |
| | | type="date" |
| | | value-format="x" |
| | | placeholder="选择领用时间" |
| | | /> |
| | | </el-form-item> |
| | | <!-- ===== 患者信息(需求1:18 项统一展示,一行四列)===== |
| | | 后端 DevRentRespVO 已从预约单平铺回填,setPatient 已赋值到 formData --> |
| | | <PatientInfoBlock :data="formData" check-type-field="checkType" :span="6" /> |
| | | |
| | | <!-- ===== 设备信息(一行四列)===== |
| | | 设备编号在上方编辑区已录入,此处只读展示其余设备字段 --> |
| | | <DeviceInfoBlock :data="formData" :device="devInfo" time-label-mode="ready" :span="6"> |
| | | <template #rentTime> |
| | | <el-date-picker |
| | | v-model="formData.rentTime" |
| | | type="date" |
| | | value-format="x" |
| | | placeholder="选择领用时间" |
| | | /> |
| | | </template> |
| | | </DeviceInfoBlock> |
| | | |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="formData.remark" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | --> |
| | | |
| | | </el-form> |
| | | <el-button @click="submitForm" type="primary" :disabled="formLoading">领用完成</el-button> |
| | | <div class="patient-actions"> |
| | | <el-button size="small" @click="submitForm" type="primary" :disabled="formLoading">领用完成</el-button> |
| | | <el-checkbox style="margin-left:10px" label="自动 " v-model="autoPrint" /> |
| | | <el-button @click="printBill(formData.patId!, formData.checkType!)">打印小票</el-button> |
| | | <el-button @click="cancelReady" :disabled="formLoading">放弃领用</el-button> |
| | | <el-button @click="resetForm()">重 置</el-button> |
| | | <el-button v-if="needAutoFeeConfirm(formData.checkType)" @click="feeConfirm" :disabled="formLoading">确费</el-button> |
| | | <el-button v-if="needAutoFeeConfirm(formData.checkType)" @click="feeCancel" :disabled="formLoading">取消确费</el-button> |
| | | <el-button size="small" @click="printBill(formData.patDetails?.appointmentId)">打印小票</el-button> |
| | | <el-button size="small" @click="cancelReady" :disabled="formLoading">放弃领用</el-button> |
| | | <el-button size="small" @click="resetForm()">重 置</el-button> |
| | | <el-button size="small" v-if="needAutoFeeConfirm(formData.checkType)" @click="feeConfirm" :disabled="formLoading">确费</el-button> |
| | | <el-button size="small" v-if="needAutoFeeConfirm(formData.checkType)" @click="feeCancel" :disabled="formLoading">取消确费</el-button> |
| | | </div> |
| | | |
| | | <!-- 医生装机列表 --> |
| | | <ContentWrap> |
| | | <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @row-click="onRowClick" > |
| | | <!-- <el-table-column label="id" align="center" prop="id" />--> |
| | | <!-- 【本次需求】操作功能区与已完成记录之间的标题栏 --> |
| | | <div class="records-title"> |
| | | <span class="records-title__bar"></span> |
| | | <span class="records-title__text">已完成列表</span> |
| | | </div> |
| | | <div class="records-host"> |
| | | <ContentWrap class="records-wrap"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="list" |
| | | :stripe="true" |
| | | :show-overflow-tooltip="true" |
| | | @row-click="onRowClick" |
| | | > |
| | | <!-- 需求11(修正):「撤销」作为**已完成领用记录列表的第一列**(表头插槽), |
| | | 只出现一次,作用于最近一位已完成患者,语义与后端 lastFinishedPatient 一致。 --> |
| | | <el-table-column label="撤销" align="center" width="90px" fixed="left"> |
| | | <template #header> |
| | | <el-button |
| | | link |
| | | type="warning" |
| | | :disabled="undoDisabled" |
| | | :loading="undoLoading" |
| | | @click="$emit('event_undo_finish')" |
| | | > |
| | | 撤销 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="确费" align="center" prop="paid"> |
| | | <template #default="scope"> |
| | | {{scope.row.paid == 1 ? "已确费" : ""}} |
| | |
| | | </el-table-column> |
| | | <el-table-column label="领用情况" align="center" prop="cancelled" > |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.jobType === 5">"已领用"</span> |
| | | <!-- 【本需求】完成被撤销过:该条记录显示「已撤销」;再次完成时后端 undone 自动变回 false --> |
| | | <el-tag v-if="scope.row.undone" type="danger" size="small">已撤销</el-tag> |
| | | <span v-else-if="scope.row.jobType === 5">"已领用"</span> |
| | | <span v-if="scope.row.jobType === 30">"已放弃"</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-table-column> |
| | | --> |
| | | </el-table> |
| | | </ContentWrap> |
| | | <!-- 分页 --> |
| | | <Pagination |
| | | :total="total" |
| | |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | </ContentWrap> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | |
| | | import {AppointmentApi, AppointmentVO} from "@/api/ecg/appointment"; |
| | | import {useCheckTypeStore} from '@/store/modules/checkType' |
| | | import {calGender, getBookBeginTime} from "@/utils"; |
| | | import {DICT_TYPE} from "@/utils/dict"; |
| | | import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' |
| | | import {tranlateDevState} from "@/utils/statusFormatter"; |
| | | import {getCheckTypeName} from "../../../../utils/checkTypeFormatter"; |
| | | import {getCheckTypeName, needAutoFeeConfirm, needDevReady} from "../../../../utils/checkTypeFormatter"; |
| | | import { useRoomStore } from '@/store/modules/room' |
| | | // 需求1:患者信息 18 项统一展示块 |
| | | import PatientInfoBlock from "@/views/ecg/doctor/components/PatientInfoBlock.vue"; |
| | | import DeviceInfoBlock from "@/views/ecg/doctor/components/DeviceInfoBlock.vue"; |
| | | |
| | | /** 设备领用 表单 */ |
| | | defineComponent({ name: 'DevReadyPanel' }) |
| | |
| | | room: { |
| | | type: Object as PropType<RoomBedVO>, |
| | | required: true |
| | | }, |
| | | /** 需求11:记录列表第一列「撤销」按钮的禁用态(由父页面控制) */ |
| | | undoDisabled: { |
| | | type: Boolean, |
| | | required: false, |
| | | default: false |
| | | }, |
| | | /** 需求11:记录列表第一列「撤销」按钮的 loading(由父页面控制) */ |
| | | undoLoading: { |
| | | type: Boolean, |
| | | required: false, |
| | | default: false |
| | | } |
| | | }) |
| | | |
| | | const emit = defineEmits(['event_dev_ready']) // 定义 success 事件,用于操作成功后的回调 |
| | | const emit = defineEmits(['event_dev_ready', 'event_undo_finish']) |
| | | |
| | | const { t } = useI18n() // 国际化 |
| | | const message = useMessage() // 消息弹窗 |
| | | |
| | | const dialogVisible = ref(false) // 弹窗的是否展示 |
| | | |
| | | const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
| | | |
| | |
| | | |
| | | const checkTypeStore = useCheckTypeStore() |
| | | |
| | | const formData = ref<Partial<DevRentVO>>({ |
| | | const formData = ref<DevRentVO>({ |
| | | id: undefined, |
| | | devId: undefined, |
| | | patId: undefined, |
| | |
| | | |
| | | const displayBarCode = ref<string> () |
| | | |
| | | const needAutoFeeConfirm = (checkType: number | null | undefined) => { |
| | | if (checkType == null) |
| | | return false |
| | | |
| | | return checkTypeStore.getExpenseRecognition(checkType) |
| | | } |
| | | |
| | | const getRentInfoByPatId = () => { |
| | | const tempPatId = formData.value.patId; |
| | | resetForm() |
| | |
| | | |
| | | // 根据患者或设备, 获取 Free的租赁 |
| | | const getFreeRentInfo = async (devRentVO) => { |
| | | if ((devRentVO.devId == null || devRentVO.devId === '') && (devRentVO.patId == null || devRentVO.patId === '') ) |
| | | return |
| | | |
| | | const data = await DevRentApi.getFreeRent(devRentVO) |
| | | if (null === data) |
| | | return |
| | | |
| | | // formDate 对应 DevRent |
| | | formData.value = data |
| | | // ⚠️ 原实现是整体替换 formData,会把患者信息冲成 null: |
| | | // 实测 GET /ecg/dev-rent/get 的响应里,除 patName 外的患者字段全是 null |
| | | // (dev_rent 表不存这些列,且该路径未从 appointment 回填)。 |
| | | // 故改为「只覆盖非空字段」,保留已回填的患者信息(PatientInfoBlock 依赖)。 |
| | | const _merged = { ...formData.value } as Record<string, any> |
| | | Object.keys(data as Record<string, any>).forEach((k) => { |
| | | const v = (data as Record<string, any>)[k] |
| | | if (v !== null && v !== undefined && v !== '') _merged[k] = v |
| | | }) |
| | | formData.value = _merged as typeof formData.value |
| | | |
| | | // 领用时间 采用当前时间 |
| | | formData.value.rentTime = new Date().getTime() |
| | |
| | | |
| | | /** 提交表单 */ |
| | | const submitForm = async () => { |
| | | // ========================================================================== |
| | | // 【守卫】「设备领用」只受理**需要设备领用**的检查项目。 |
| | | // |
| | | // 背景:`check_type.need_dev_ready`(是否需要设备领用)在后端**从未被校验**, |
| | | // 医生可在本页手动输入患者编号,把**常规心电图(ct=100) / 常规心电向量图(ct=1100)** |
| | | // 这类 needDevReady=0 的患者拉进来并点「领用完成」, |
| | | // 表现为"常规心电图、心电向量图患者出现在设备领用模块"的混乱。 |
| | | // |
| | | // 实测(真实接口):119/D1 等设备准备工位的 get-to-be-installed-list 返回空, |
| | | // 说明**自动分流是按工位 checkTypes 过滤的、没有问题**; |
| | | // 混乱来自"人工把不属于本流程的患者拉进来"。 |
| | | // ========================================================================== |
| | | if (formData.value.checkType != null && !needDevReady(formData.value.checkType)) { |
| | | const ctName = getCheckTypeName(formData.value.checkType) || String(formData.value.checkType) |
| | | message.warning( |
| | | `「${ctName}」不需要设备领用,不能在设备领用模块办理。` + |
| | | `请确认是否应到「叫号检查」页面处理该患者。` |
| | | ) |
| | | return |
| | | } |
| | | |
| | | // 校验表单 |
| | | await formRef.value.validate() |
| | | // 提交请求 |
| | |
| | | await DevRentApi.devReady(formData.value) |
| | | |
| | | if (autoPrint.value && formData.value.patId && formData.value.checkType) { |
| | | printBill(formData.value.patId, formData.value.checkType) |
| | | printBill(formData.value.patDetails?.appointmentId) |
| | | } |
| | | |
| | | // 自动确费 |
| | |
| | | feeConfirm() |
| | | } |
| | | |
| | | dialogVisible.value = false |
| | | // 发送操作成功的事件 |
| | | emit('event_dev_ready') |
| | | resetForm() |
| | | getList() |
| | | |
| | | // 发送操作成功的事件 |
| | | emit('event_dev_ready') |
| | | message.success(t('操作完成')) |
| | | } finally { |
| | | formLoading.value = false |
| | |
| | | checkType: undefined, |
| | | rentTime: new Date().getTime(), |
| | | returnTime: undefined, |
| | | tolerance: undefined, |
| | | remark: undefined, |
| | | patDetails: undefined, |
| | | paid: undefined, |
| | | // 需求1:PatientInfoBlock 依赖的平铺字段,先初始化为 undefined, |
| | | // 随后由 setPatient 从 QueueVO 赋值(不初始化会读不到属性) |
| | | applyNo: undefined, |
| | | episodeId: undefined, |
| | | patGender: undefined, |
| | | patBirthday: undefined, |
| | | registerDate: undefined, |
| | | doctor: undefined, |
| | | doctorTime: undefined, |
| | | patSrc: undefined, |
| | | patMobile: undefined, |
| | | patPhone: undefined, |
| | | patWardDesc: undefined, |
| | | patBedNo: undefined, |
| | | medicalCard: undefined, |
| | | doctorAdviceNo: undefined, |
| | | outpatientNo: undefined, |
| | | patIdentityId: undefined, |
| | | status: undefined, |
| | | seqNum: undefined, |
| | | } |
| | | formRef.value?.resetFields() |
| | | |
| | |
| | | formData.value.patId = queueVO?.patId |
| | | formData.value.patName = queueVO?.patName |
| | | formData.value.checkType = queueVO?.bookCheckType |
| | | getFreeRentInfo(formData.value) |
| | | formData.value.tolerance = queueVO?.tolerance // 多耐药,后端从预约单补齐 |
| | | // 需求1:以下平铺字段由后端从预约单回填到 QueueRespVO, |
| | | // 必须显式赋值给 formData,否则模板里读不到(原先只赋值了上面 6 个)。 |
| | | formData.value.patGender = queueVO?.patGender |
| | | formData.value.patBirthday = queueVO?.patBirthday |
| | | formData.value.registerDate = queueVO?.registerDate |
| | | formData.value.doctor = queueVO?.doctor |
| | | formData.value.doctorTime = queueVO?.doctorTime |
| | | formData.value.patSrc = queueVO?.patSrc |
| | | // 【本次修复】条码/打印小票依赖 patDetails(含 source/appointmentId), |
| | | // 队列行本就带着它;原先只在 getFreeRentInfo() 查到"待检查单"时才赋值, |
| | | // 导致绝大多数情况下 patDetails 为 undefined → 条码不显示。 |
| | | formData.value.patDetails = queueVO?.patDetails |
| | | formData.value.patMobile = queueVO?.patMobile |
| | | formData.value.patPhone = queueVO?.patPhone |
| | | formData.value.patWardDesc = queueVO?.patWardDesc |
| | | formData.value.patBedNo = queueVO?.patBedNo |
| | | formData.value.medicalCard = queueVO?.medicalCard |
| | | formData.value.outpatientNo = queueVO?.outpatientNo |
| | | // 需求1:医嘱号(此前 3 个面板都遗漏了该字段的赋值,导致 PatientInfoBlock 恒显示 '-') |
| | | formData.value.doctorAdviceNo = queueVO?.doctorAdviceNo |
| | | formData.value.patIdentityId = queueVO?.patIdentityId |
| | | getFreeRentInfo(formData.value) // 待检查的信息 @ dev_rent 表 |
| | | copyBarcode() |
| | | } |
| | | defineExpose({ setPatient }) // 提供 setPatient 方法,用于设置患者 |
| | | defineExpose({ setPatient, getList: () => getList() }) // 提供 setPatient 方法,用于设置患者 |
| | | |
| | | |
| | | const loading = ref(true) // 列表的加载中 |
| | | const list = ref<JobRecordVO[]>([]) // 列表的数据 |
| | | const total = ref(0) // 列表的总页数 |
| | | // 当前诊室信息(用于取诊室开展的检查项目做兜底,见 syncRoomCheckTypes) |
| | | const roomStore = useRoomStore() |
| | | |
| | | |
| | | const queryParams = reactive({ |
| | | pageNo: 1, |
| | | pageSize: 10, |
| | |
| | | jobTime: [curDayStart(), curDayEnd()], |
| | | summary: undefined, |
| | | remark: undefined, |
| | | createTime: [] |
| | | createTime: [], |
| | | // ======================================================================== |
| | | // 按**当前诊室开展的检查项目**隔离已完成记录。 |
| | | // |
| | | // 背景:`job_record` 表只有 doc_id + check_type,**没有 room_id**; |
| | | // 而 /ecg/job-record/doctor-page 是强制按登录医生查"自己的记录"。 |
| | | // 于是同一医生在多个诊室坐诊时(如 1号门诊 ct=[100,1100]、6号门诊 ct=[400] 平板运动心电), |
| | | // 叫号检查页会把**多个诊室的记录混在一起**显示 —— 正是用户反馈的现象。 |
| | | // |
| | | // 由各页面(Routine.vue / index.vue / DevInstall.vue)在 onMounted 时 |
| | | // 用当前诊室的 checkTypes 赋值,并在每次查询前同步,确保切诊室后立即生效。 |
| | | // ======================================================================== |
| | | checkTypes: undefined as number[] | undefined |
| | | }) |
| | | |
| | | /** |
| | | * 把「当前诊室开展的检查项目」同步到查询条件,实现已完成记录按诊室隔离。 |
| | | * 见 queryParams.checkTypes 的说明。 |
| | | */ |
| | | const syncRoomCheckTypes = () => { |
| | | // 优先用页面传入的诊室信息;为空时回退到 store(更可靠,见 TitlePanel 同处说明) |
| | | const fromProp = props.room?.checkTypes |
| | | const types = (Array.isArray(fromProp) && fromProp.length > 0) |
| | | ? fromProp |
| | | : roomStore.room?.checkTypes |
| | | queryParams.checkTypes = (Array.isArray(types) && types.length > 0) ? [...types] : undefined |
| | | } |
| | | |
| | | |
| | | /** 查询列表 */ |
| | | const getList = async () => { |
| | | // 查询前同步当前诊室开展的检查项目,保证只显示本诊室的记录 |
| | | syncRoomCheckTypes() |
| | | loading.value = true |
| | | try { |
| | | const data = await JobRecordApi.getJobRecordDoctorPage(queryParams) |
| | |
| | | devInfo.value.state = data.devState |
| | | } |
| | | |
| | | const printBill = async (patId: string, checkType: number, printMode?: number) => { |
| | | const printBill = async (appointmentId: number | null | undefined, printMode?: number) => { |
| | | if ( appointmentId == null ) |
| | | return |
| | | |
| | | const curAppointment: AppointmentVO = await AppointmentApi.getCurAppointmentByPatIdAndCheckType( patId, checkType ) |
| | | console.info( curAppointment ) |
| | | const curAppointment: AppointmentVO = await AppointmentApi.getAppointment( appointmentId ) |
| | | |
| | | // 引入后使用示例 |
| | | hiprint.init({ |
| | |
| | | |
| | | const feeConfirm = async () => { |
| | | if (formData.value.id == null) { |
| | | message.error(t('请先领用')) |
| | | message.error('请先领用') |
| | | return |
| | | } |
| | | |
| | | const result = await DevRentApi.feeConfirm(formData.value.id) |
| | | if (0 === result) |
| | | message.success(t('确费操作成功')) |
| | | try { |
| | | const result = await DevRentApi.feeConfirm(formData.value.id) |
| | | if (0 === result) { |
| | | //message.success('确费操作成功') |
| | | } |
| | | } catch (err) { |
| | | // 框架 会给出 后台的 错误信息 |
| | | } |
| | | } |
| | | |
| | | const feeCancel = async () => { |
| | | if (formData.value.id == null) { |
| | | message.error(t('请先领用')) |
| | | message.error('请先领用') |
| | | return |
| | | } |
| | | |
| | | const result = await DevRentApi.feeCancel(formData.value.id) |
| | | if (0 === result) |
| | | message.success(t('操作成功')) |
| | | try { |
| | | const result = await DevRentApi.feeCancel(formData.value.id) |
| | | if (0 === result) { |
| | | //message.success('确费取消成功') |
| | | } |
| | | } catch (err) { |
| | | // 框架 会给出 后台的 错误信息 |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取条形码,显示与否 同一个值 |
| | | */ |
| | | const getDisplayBarcode = (): string => { |
| | | if (!formData.value.checkType) |
| | | if (formData.value.checkType == null) |
| | | return "" |
| | | |
| | | const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType!) |
| | | if (formData.value.patDetails == null || formData.value.patDetails.source == null || |
| | | !displayBarcode.includes( formData.value.patDetails.source )) |
| | | // 【本次修复】「患者条码显示」未配置(null/空)→ 不显示(按现场确认口径) |
| | | const displayBarcode: number[] | undefined = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType) |
| | | if (displayBarcode == null || displayBarcode.length === 0) |
| | | return "" |
| | | |
| | | // 【本次修复】来源优先取 patDetails.source,缺失时回退到平铺的 patSrc |
| | | const patSource = formData.value.patDetails?.source ?? formData.value.patSrc |
| | | if (patSource == null) |
| | | return "" |
| | | |
| | | if (!displayBarcode.map(Number).includes(Number(patSource))) |
| | | return "" |
| | | |
| | | return getBarcode() |
| | | } |
| | | |
| | | const getBarcode = (): string => { |
| | | if (!formData.value.checkType) |
| | | if (formData.value.checkType == null) |
| | | return "" |
| | | |
| | | const patSource = formData.value.patDetails?.source |
| | | const patSource = formData.value.patDetails?.source ?? formData.value.patSrc |
| | | if (patSource == null) |
| | | return "" |
| | | |
| | | if (1 === patSource || 2 === patSource) |
| | | // 门诊/急诊 → 申请单号;住院/体检 → 就诊流水号 |
| | | if (1 === Number(patSource) || 2 === Number(patSource)) |
| | | return formData.value.applyNo??"" |
| | | else if (3 === patSource || 4 === patSource) |
| | | else if (3 === Number(patSource) || 4 === Number(patSource)) |
| | | return formData.value.episodeId??"" |
| | | |
| | | return "" |
| | |
| | | |
| | | const copyBarcode = async () => { |
| | | displayBarCode.value = getDisplayBarcode() |
| | | await navigator.clipboard.writeText( getBarcode() ); |
| | | |
| | | const barCode = getBarcode() |
| | | if (isStringEmpty(barCode)) |
| | | return |
| | | |
| | | await navigator.clipboard.writeText( barCode ); |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | /* 【本次需求】「已完成列表」标题栏:左侧主色竖线 + 加粗小标题,紧凑高度不挤压表格 */ |
| | | .records-title { |
| | | display: flex; |
| | | align-items: center; |
| | | flex: none; |
| | | gap: 6px; |
| | | padding: 2px 0 6px; |
| | | |
| | | &__bar { |
| | | width: 3px; |
| | | height: 14px; |
| | | background-color: var(--el-color-primary); |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | &__text { |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | color: var(--el-text-color-primary); |
| | | } |
| | | } |
| | | /* ========================================================================== |
| | | 需求:表单内容挤占了下方记录表格的空间 —— 压缩行间距。 |
| | | Element Plus 默认 `.el-form-item { margin-bottom: 18px }`; |
| | | 本页表单含 18 项患者信息(4 列 = 5 行)+ 9 项设备信息, |
| | | 仅间距就要上百 px,把 el-table 挤到看不见。 |
| | | 这里统一压到 4px。注意 :deep 是必需的(el-form-item 是本组件的子组件渲染)。 |
| | | ========================================================================== */ |
| | | .patient-compact-form :deep(.el-form-item) { |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | /* ========================================================================== |
| | | 患者信息固定在内容区顶部。 |
| | | 内容区自身不滚动(滚动条在记录表格上),因此**不需要 position:sticky** —— |
| | | 直接作为 flex 的固定项(flex:none)即可始终留在顶部。 |
| | | 背景不透明,保证与下方记录表格视觉分离。 |
| | | ========================================================================== */ |
| | | :deep(.doctor-page__content) > .patient-compact-form { |
| | | flex: none; |
| | | padding-bottom: 4px; |
| | | background-color: var(--el-bg-color); |
| | | border-bottom: 1px solid var(--el-border-color-lighter); |
| | | } |
| | | |
| | | |
| | | |
| | | /* ========================================================================== |
| | | 患者信息固定在内容区顶部。 |
| | | 内容区(.doctor-page__content)自身滚动,所以这里必须用 position:sticky |
| | | 才能让 18 项患者信息在记录列表滚动时保持可见。 |
| | | 背景不透明,避免滚动内容从表单项间隙透出。 |
| | | ========================================================================== */ |
| | | :deep(.doctor-page__content) > .patient-compact-form { |
| | | position: sticky; |
| | | top: 0; |
| | | z-index: 3; |
| | | padding-bottom: 4px; |
| | | background-color: var(--el-bg-color); |
| | | border-bottom: 1px solid var(--el-border-color-lighter); |
| | | } |
| | | |
| | | /* ========================================================================== |
| | | 患者操作功能块:位于「患者信息」与「已完成记录列表」之间,独立成块。 |
| | | 需求:各功能按钮(检查完成 / 放弃检查 / 重置 / 知情同意书 …)**排在一行**。 |
| | | 做法:flex + gap,并 **禁止换行**(flex-wrap:nowrap); |
| | | 按钮用 size="small" 以容纳全部按钮;即使宽度不足也不折行。 |
| | | 上下边框 + 底色,使它与患者信息、记录列表在视觉上分区。 |
| | | ========================================================================== */ |
| | | .patient-actions { |
| | | display: flex; |
| | | flex: none; |
| | | /* 按钮多时允许换行,避免挤在一行(检查页最多 6 个按钮) */ |
| | | flex-wrap: wrap; |
| | | gap: 8px; |
| | | align-items: center; |
| | | /* |
| | | 【本次需求】操作功能区做一点视觉区分,方便医生一眼定位: |
| | | 极浅的主色底 + 细边框 + 左侧 3px 主色竖条(与「▎已完成列表」标题条同款语言)。 |
| | | 只做"稍有区分",不改按钮本身的尺寸/颜色/顺序。 |
| | | */ |
| | | padding: 8px 10px; |
| | | margin: 2px 0 10px; |
| | | background-color: var(--el-color-primary-light-9); |
| | | border: 1px solid var(--el-color-primary-light-7); |
| | | border-left: 3px solid var(--el-color-primary); |
| | | border-radius: 4px; |
| | | |
| | | /* Element Plus 给相邻 el-button 默认加了 margin-left:12px,会与 gap 叠加,清掉 */ |
| | | :deep(.el-button + .el-button) { |
| | | margin-left: 0; |
| | | } |
| | | } |
| | | </style> |