From d09fe6aa593b974119628baf5e91bdfd0de7c378 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期四, 10 四月 2025 10:42:26 +0800 Subject: [PATCH] 翻译 设备状态信息 --- src/views/ecg/queue/index.vue | 189 +++++++++++++++++++++++++++++++++------------- 1 files changed, 134 insertions(+), 55 deletions(-) diff --git a/src/views/ecg/queue/index.vue b/src/views/ecg/queue/index.vue index a0ef71a..d0c5855 100644 --- a/src/views/ecg/queue/index.vue +++ b/src/views/ecg/queue/index.vue @@ -49,7 +49,7 @@ class="!w-240px" > <el-option - v-for="dict in getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE)" + v-for="dict in checkTypeStore.getCheckTypeOptions()" :key="dict.value" :label="dict.label" :value="dict.value" @@ -67,6 +67,7 @@ </el-form-item> <el-form-item label="鎺掗槦鐘舵��" prop="status"> <el-select + multiple v-model="queryParams.status" placeholder="璇烽�夋嫨鎺掗槦鐘舵��" clearable @@ -98,20 +99,10 @@ class="!w-240px" /> </el-form-item> - <el-form-item label="鍒涘缓鏃堕棿" prop="createTime"> - <el-date-picker - v-model="queryParams.createTime" - value-format="YYYY-MM-DD HH:mm:ss" - type="daterange" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" - class="!w-220px" - /> - </el-form-item> <el-form-item> <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 鎼滅储</el-button> <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 閲嶇疆</el-button> +<!-- <el-button type="primary" plain @@ -120,6 +111,8 @@ > <Icon icon="ep:plus" class="mr-5px" /> 鏂板 </el-button> +--> +<!-- <el-button type="success" plain @@ -129,6 +122,7 @@ > <Icon icon="ep:download" class="mr-5px" /> 瀵煎嚭 </el-button> +--> </el-form-item> </el-form> </ContentWrap> @@ -136,26 +130,88 @@ <!-- 鍒楄〃 --> <ContentWrap> <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> - <el-table-column label="id" align="center" prop="id" /> + <el-table-column label="鎿嶄綔" align="center" min-width="120px"> + <template #default="scope"> +<!-- <el-button + link + type="primary" + @click="openAppointmentForm('preview', scope.row.patId, scope.row.bookCheckType)" + v-hasPermi="['ecg:appointment:preview']" + > + 鏌ョ湅 + </el-button>--> + <!-- + <el-button + link + type="danger" + @click="handleDelete(scope.row.id)" + v-hasPermi="['ecg:queue:delete']" + > + 鍒犻櫎 + </el-button> + --> + <el-button + link + type="danger" + @click="handleJump(scope.row)" + v-if="scope.row.status === 10" + v-hasPermi="['ecg:queue:jump']" + > + {{scope.row.jumpFlag === 0? "鍔犳��" : "鍙栨秷鍔犳��"}} + </el-button> + <el-button + link + type="danger" + @click="recall(scope.row)" + v-if="scope.row.status === 3 || scope.row.status === 5 || scope.row.status === 7" + v-hasPermi="['ecg:queue:recall']" + > + 鍙洖 + </el-button> + <el-button + link + type="danger" + @click="passWaitingPatient(scope.row)" + v-if="scope.row.status === 10" + v-hasPermi="['ecg:queue:pass']" + > + 杩囧彿 + </el-button> + </template> + </el-table-column> +<!-- <el-table-column label="id" align="center" prop="id" />--> + <el-table-column label="灏辫瘖娴佹按鍙�" align="center" prop="episodeId" min-width="110px"/> + <el-table-column label="鐢宠鍙�" align="center" prop="applyNo" min-width="110px"/> <el-table-column label="鎮h�呯紪鍙�" align="center" prop="patId" /> - <el-table-column label="鎮h�呭鍚�" align="center" prop="patName" /> - <el-table-column label="鎮h�呮�у埆" align="center" prop="patGender" /> - <el-table-column label="棰勭害鏃舵" align="center" prop="bookTimeslot" > + <el-table-column label="鎮h�呭鍚�" align="center" min-width="160px"> + <template #default="scope"> + {{scope.row.patName}} ({{genderFormat(scope.row.patGender)}}) + <dict-tag :type="DICT_TYPE.ECG_PAT_SOURCE" :value="scope.row.patDetails?.source" /> + </template> + </el-table-column> + <el-table-column label="妫�鏌ョ被鍨�" align="center" prop="bookCheckType" min-width="100px"> + <template #default="scope"> + {{checkTypeStore.getCheckTypeName(scope.row.bookCheckType)}} + </template> + </el-table-column> + <el-table-column label="鎮h�呰鎯�" align="center" prop="patDetails" min-width="300px"> + <template #default="scope"> + <span>{{scope.row.patDetails?.mobile}} {{scope.row.patDetails?.wardDesc}} {{scope.row.patDetails?.bedNo}}</span> + </template> + </el-table-column> + <el-table-column label="棰勭害鏃舵" align="center" prop="bookTimeslot" min-width="100px"> <template #default="scope"> <dict-tag :type="DICT_TYPE.ECG_BOOK_TIMESLOT" :value="scope.row.bookTimeslot" /> </template> </el-table-column> - <el-table-column label="妫�鏌ョ被鍨�" align="center" prop="bookCheckType" > - <template #default="scope"> - <dict-tag :type="DICT_TYPE.ECG_CHECK_TYPE" :value="scope.row.bookCheckType" /> - </template> - </el-table-column> - <el-table-column label="鎺掗槦搴忓彿" align="center" prop="seqNum" /> <el-table-column label="鐘舵��" align="center" prop="status" > <template #default="scope"> <dict-tag :type="DICT_TYPE.ECG_QUEUE_STATUS" :value="scope.row.status" /> </template> </el-table-column> + <el-table-column label="棰勭害鍙�" align="center" prop="bookSeqNum" /> + <el-table-column label="鎺掗槦鍙�" align="center" prop="seqNum" /> + <el-table-column label="VIP" align="center" prop="isVip" /> <el-table-column label="杩囧彿鏍囪" align="center" prop="passed" /> <el-table-column label="杩囨湡鏍囪" align="center" prop="expired" /> <el-table-column label="璇婂缂栧彿" align="center" prop="roomId" /> @@ -168,35 +224,6 @@ :formatter="dateFormatter" width="180px" /> - <el-table-column label="鎿嶄綔" align="center" min-width="120px"> - <template #default="scope"> - <el-button - link - type="primary" - @click="openForm('update', scope.row.id)" - v-hasPermi="['ecg:queue:update']" - > - 缂栬緫 - </el-button> - <el-button - link - type="danger" - @click="handleDelete(scope.row.id)" - v-hasPermi="['ecg:queue:delete']" - > - 鍒犻櫎 - </el-button> - <el-button - link - type="danger" - @click="handleJump(scope.row)" - v-if="scope.row.status === 10" - v-hasPermi="['ecg:queue:jump']" - > - {{scope.row.jumpFlag === 0? "鎻掗槦" : "鍙栨秷鎻掗槦"}} - </el-button> - </template> - </el-table-column> </el-table> <!-- 鍒嗛〉 --> <Pagination @@ -208,21 +235,29 @@ </ContentWrap> <!-- 琛ㄥ崟寮圭獥锛氭坊鍔�/淇敼 --> - <queueForm ref="formRef" @success="getList" /> + <!-- <queueForm ref="formRef" @success="getList" />--> + + <!-- 琛ㄥ崟寮圭獥锛氭坊鍔�/淇敼 --> + <AppointmentForm ref="formRef" @event_appointment_success="getList" /> </template> <script setup lang="ts"> import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import { QueueApi, QueueVO } from '@/api/ecg/queue' -import queueForm from './QueueForm.vue' import {DICT_TYPE, getIntDictOptions} from '@/utils/dict' +import {DoctorApi, PatientVO} from "@/api/ecg/doctor"; +import {useCheckTypeStore} from "@/store/modules/checkType"; +import AppointmentForm from "@/views/ecg/appointment/AppointmentForm.vue"; +import {genderFormat} from "@/utils/stringUtil"; /** 鎺掗槦 鍒楄〃 */ defineOptions({ name: 'queue' }) const message = useMessage() // 娑堟伅寮圭獥 const { t } = useI18n() // 鍥介檯鍖� + +const checkTypeStore = useCheckTypeStore(); const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑 const list = ref<QueueVO[]>([]) // 鍒楄〃鐨勬暟鎹� @@ -233,15 +268,15 @@ patId: undefined, patName: undefined, patGender: undefined, + patDetails: undefined, bookTimeslot: undefined, bookCheckType: undefined, seqNum: undefined, - status: undefined, + status: [], passed: undefined, expired: undefined, roomId: undefined, bedNo: undefined, - createTime: [] }) const queryFormRef = ref() // 鎼滅储鐨勮〃鍗� const exportLoading = ref(false) // 瀵煎嚭鐨勫姞杞戒腑 @@ -275,6 +310,9 @@ const openForm = (type: string, id?: number) => { formRef.value.open(type, id) } +const openAppointmentForm = (type: string, patId: string, checkType: number) => { + formRef.value.openByQueue(type, patId, checkType) +} /** 鍒犻櫎鎸夐挳鎿嶄綔 */ const handleDelete = async (id: number) => { @@ -304,6 +342,42 @@ } catch {} } +const passWaitingPatient = async (item: QueueVO) => { + const patientVO: PatientVO = { + patId: item.patId, + checkType: item.bookCheckType, + } + + const data = await DoctorApi.passWaitingPatient(patientVO); + message.info(data) + // 鍒锋柊鍒楄〃 + await getList() +} + +const recall = async (item: QueueVO) => { + const patientVO: PatientVO = { + roomId: item.roomId, + bedNo: item.bedNo, + patId: item.patId, + checkType: item.bookCheckType, + //jumpFlag: 0, + roomId_operator: item.roomId, // 闃熷垪鐣岄潰 鍙洖鎿嶄綔鏃� 淇濇寔鍘熸潵鐨勫伐浣� + bedNo_operator: item.bedNo, // 闃熷垪鐣岄潰 鍙洖鎿嶄綔鏃� 淇濇寔鍘熸潵鐨勫伐浣� + } + + let data = "" + if (item.status === 3) // 鎺掗槦涓� 鎮h�� 杩囧彿 + data = await DoctorApi.recallPassWaitingPatient(patientVO); + else if (item.status === 5) // 甯歌銆侀鐢� 杩囧彿 + data = await DoctorApi.recallPatient(patientVO); + else if (item.status === 7) + data = await DoctorApi.recallInstallPatient(patientVO); + + message.info(data) + // 鍒锋柊鍒楄〃 + await getList() +} + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ const handleExport = async () => { try { @@ -323,4 +397,9 @@ onMounted(() => { getList() }) + +onActivated(() => { + console.info("queue onActivated...") + handleQuery() +}) </script> -- Gitblit v1.9.3