eight
2024-10-14 a3fd8c61c63f5ea5624371d8726fb141c336de38
src/views/ecg/doctor/components/QueuePanel.vue
@@ -1,15 +1,20 @@
<script setup lang="ts">
import {defineComponent, PropType} from "vue";
import { queueApi, queueVO } from '@/api/ecg/queue'
import { QueueVO } from '@/api/ecg/queue'
import {DICT_TYPE} from "@/utils/dict";
import {PatientVO, DoctorApi} from "@/api/ecg/doctor";
defineComponent({
  name: 'QueuePanel'
})
const emit = defineEmits(['event_RecallFinish']) // 定义 success 事件,用于操作成功后的回调
const message = useMessage() // 消息弹窗
const  props = defineProps({
  queue: {
    type: Array as PropType<queueVO[]>,
    type: Array as PropType<QueueVO[]>,
    required: true
  }
  /*,
@@ -20,20 +25,36 @@
*/
})
const recall = async (item) => {
  const patientVO: PatientVO = {
    roomId: item.roomId,
    bedNo: item.bedNo,
    patId: item.patId,
    jumpFlag: 0
  }
  const data = await DoctorApi.recallPatient(patientVO);
  emit("event_RecallFinish")
  message.info(data)
}
</script>
<template>
<div v-for="(item, index) in queue" :key="index">
  {{item.patName}}
  {{item.patGender==1 ? "男" : "女"}}
  {{item.roomId}}
  {{item.roomName}}
  {{item.bedNo}}
  <span style="display:inline-block; width:70px;"> {{item.seqNum}} &nbsp; {{item.patName}}{{item.passed === 0 ? "":"*"}} </span>
  <dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="item.patGender" />
<!--  {{item.roomName}} {{item.bedNo}}-->
  <dict-tag :type="DICT_TYPE.ECG_CHECK_TYPE" :value="item.bookCheckType" />
  <dict-tag :type="DICT_TYPE.ECG_QUEUE_STATUS" :value="item.status" />
  <el-button v-if="item.status === 5" @click="recall(item)"> 召回 </el-button>
</div>
</template>
<style scoped lang="scss">
div {
  padding-left: 5px;
  padding-bottom: 5px;
}
</style>