eight
2024-08-21 a2346b299c8537318fbc245e3325b7a499ecce4e
update
已修改4个文件
53 ■■■■■ 文件已修改
src/api/ecg/doctor/index.ts 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/components/QueuePanel.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/components/TitlePanel.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ecg/doctor/index.ts
@@ -5,6 +5,13 @@
  bedNo: string // 诊疗床编号
}
export interface PatientStatisticVO {
  finishedNum: number
  readyNum: number
  passedNum: number
  queuingNum: number
}
// 医生 API
export const DoctorApi = {
@@ -21,6 +28,11 @@
  // 取初始患者列表
  getPatientList: async (params: RoomBedVO) => {
    return await request.get({ url: `/ecg/doctor/get-patient-list`, params })
  },
  // 取患者统计
  getPatientStatistic: async (params: RoomBedVO) => {
    return await request.get({ url: `/ecg/doctor/get-patient-statistic`, params })
  }
}
src/views/ecg/doctor/components/QueuePanel.vue
@@ -26,7 +26,6 @@
<div v-for="(item, index) in queue" :key="index">
  {{item.patName}}
  <dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="item.patGender" />
  {{item.roomId}}
  {{item.roomName}}
  {{item.bedNo}}
  <dict-tag :type="DICT_TYPE.ECG_CHECK_TYPE" :value="item.bookCheckType" />
src/views/ecg/doctor/components/TitlePanel.vue
@@ -1,7 +1,7 @@
<script setup lang="ts">
import {defineComponent, PropType} from "vue";
import {useUserStore} from "@/store/modules/user";
import {RoomBedVO} from "@/api/ecg/doctor";
import {PatientStatisticVO, RoomBedVO} from "@/api/ecg/doctor";
const userStore = useUserStore();
@@ -15,26 +15,18 @@
}
const  props = defineProps({
  room: {
    type: String,
  patientStatistic: {
    type: Object as PropType<PatientStatisticVO>,
    required: true
  }
  /*,
  bedList: {
    type: Array as PropType<RoomVO[]>,
    required: true
  },
  modelValue: {
    type: Object as PropType<RoomVO>,
    required: true
  }
*/
})
</script>
<template>
已就诊{{10}}  准备中{{3}}  过号{{2}} 排队中{{100}}   诊室{{roomBedVO.roomId}} 工位{{roomBedVO.bedNo}}
已就诊{{patientStatistic.finishedNum}}  准备中{{patientStatistic.readyNum}}
  过号{{patientStatistic.passedNum}} 排队中{{patientStatistic.queuingNum}}
  诊室{{roomBedVO.roomId}} 工位{{roomBedVO.bedNo}}
</template>
<style scoped lang="scss">
src/views/ecg/doctor/index.vue
@@ -1,7 +1,7 @@
<script setup lang="ts">
import TitlePanel from "@/views/ecg/doctor/components/TitlePanel.vue";
import QueuePanel from "@/views/ecg/doctor/components/QueuePanel.vue";
import { DoctorApi, RoomBedVO } from '@/api/ecg/doctor';
import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor';
import {useUserStore} from "@/store/modules/user";
import {queueVO} from "@/api/ecg/queue";
@@ -12,21 +12,37 @@
    bedNo: userStore.room.bedNo
}
const patientStat = ref<PatientStatisticVO>({
    finishedNum: 0,
    readyNum: 0,
    passedNum: 0,
    queuingNum: 0
})
const list = ref<queueVO[]>([])
const finishNextPatient = async () => {
  const data = await DoctorApi.finishNextPatient(roomBedVO)
  list.value = data
  const data2 = await DoctorApi.getPatientStatistic(roomBedVO)
  patientStat.value = data2
}
const passNextPatient = async () => {
    const data = await DoctorApi.passNextPatient(roomBedVO)
    list.value = data
    const data2 = await DoctorApi.getPatientStatistic(roomBedVO)
    patientStat.value = data2
}
const getPatientList = async () => {
    const data = await DoctorApi.getPatientList(roomBedVO)
    list.value = data
    const data2 = await DoctorApi.getPatientStatistic(roomBedVO)
    patientStat.value = data2
}
/** 初始化 **/
@@ -39,7 +55,7 @@
<template>
  <el-container>
    <el-header style="background-color: var(--el-color-primary-light-7); font-size: 24px">
      <TitlePanel room="A208"/>
      <TitlePanel :patientStatistic="patientStat" />
    </el-header>
    <el-container>
      <el-main>