eight
2024-11-26 3418a10025716ed4b14f96cb4c52b5ce0875e563
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<script setup lang="ts">
import {defineComponent, PropType} from "vue";
import { QueueVO } from '@/api/ecg/queue'
import {DICT_TYPE} from "@/utils/dict";
import {PatientVO, DoctorApi, RoomBedVO} from "@/api/ecg/doctor";
import {useCheckTypeStore} from "@/store/modules/checkType";
 
defineComponent({
  name: 'QueuePanel'
})
 
const emit = defineEmits(['event_RecallFinish']) // 定义 success 事件,用于操作成功后的回调
 
const checkTypeStore = useCheckTypeStore();
 
const message = useMessage() // 消息弹窗
 
const  props = defineProps({
  queue: {
    type: Array as PropType<QueueVO[]>,
    required: true
  },
  room: {
    type: Object as PropType<RoomBedVO>,
    required: true
  }
})
 
const recall = async (item) => {
  const patientVO: PatientVO = {
    roomId: item.roomId,
    bedNo: item.bedNo,
    patId: item.patId,
    checkType: item.bookCheckType,
    //jumpFlag: 0,
    roomId_operator: props.room.roomId,
    bedNo_operator: props.room.bedNo,
  }
 
  let data = ""
  if (item.status === 5) // 常规、领用 过号
    data = await DoctorApi.recallPatient(patientVO);
  else if (item.status === 7)
    data = await DoctorApi.recallInstallPatient(patientVO);
 
  emit("event_RecallFinish") // 召回完成
  message.info(data)
}
 
</script>
 
<template>
<div v-for="(item, index) in queue" :key="index">
  <span style="display:inline-block; width:120px;"> {{item.seqNum}} &nbsp; {{item.bookSeqNum}} &nbsp; {{item.patName}}{{item.passed === 0 ? "":"*"}} </span>
  <dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="item.patGender" />
<!--  {{item.roomName}} {{item.bedNo}}-->
  {{checkTypeStore.getCheckTypeName(item.bookCheckType)}}
  <dict-tag :type="DICT_TYPE.ECG_QUEUE_STATUS" :value="item.status" />
  <el-button v-if="item.status === 5 || item.status === 7" @click="recall(item)"> 召回 </el-button>
</div>
</template>
 
<style scoped lang="scss">
div {
  padding-left: 5px;
  padding-bottom: 5px;
}
 
</style>