eight
2024-08-28 bd32d8b406d90e72ba97273c0862adeb67d39073
update
已修改3个文件
54 ■■■■ 文件已修改
src/api/ecg/queue/index.ts 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/index.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/room/RoomLoginSelect.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ecg/queue/index.ts
@@ -70,11 +70,16 @@
    return await request.get({ url: `/ecg/queue/bed-close`, params })
  },
  // 医生暂停,接收患者
  // 医生暂停,暂时不接收患者
  bedDoctorPause: async (params) => {
    return await request.get({ url: `/ecg/queue/bed-doctor-pause`, params })
  },
  // 医生恢复,恢复接收患者
  bedDoctorResume: async (params) => {
    return await request.get({ url: `/ecg/queue/bed-doctor-resume`, params })
  },
  // 医生入座,
  bedDoctorOn: async (params) => {
    return await request.get({ url: `/ecg/queue/bed-doctor-on`, params })
src/views/ecg/doctor/index.vue
@@ -3,13 +3,13 @@
import QueuePanel from "@/views/ecg/doctor/components/QueuePanel.vue";
import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor';
import {useUserStore} from "@/store/modules/user";
import {queueVO} from "@/api/ecg/queue";
import {queueApi, queueVO} from "@/api/ecg/queue";
const userStore = useUserStore();
const roomBedVO: RoomBedVO = {
    roomId: userStore.room.roomId,
    bedNo: userStore.room.bedNo
    roomId: userStore.room!.roomId,
    bedNo: userStore.room!.bedNo
}
const patientStat = ref<PatientStatisticVO>({
@@ -19,40 +19,33 @@
    queuingNum: 0
})
let state: 'normal' | 'paused' = "normal";
const state = ref<boolean>(true)
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
  list.value = await DoctorApi.finishNextPatient(roomBedVO)
  patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO)
}
const passNextPatient = async () => {
    const data = await DoctorApi.passNextPatient(roomBedVO)
    list.value = data
    const data2 = await DoctorApi.getPatientStatistic(roomBedVO)
    patientStat.value = data2
  list.value = await DoctorApi.passNextPatient(roomBedVO)
  patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO)
}
const getPatientList = async () => {
    const data = await DoctorApi.getPatientList(roomBedVO)
    list.value = data
    const data2 = await DoctorApi.getPatientStatistic(roomBedVO)
    patientStat.value = data2
  list.value = await DoctorApi.getPatientList(roomBedVO)
  patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO)
}
const pause = async () => {
  state = 'paused'
const pauseQueue = async () => {
  state.value = false
  queueApi.bedDoctorPause(roomBedVO)
}
const resume = async () => {
  state = 'normal'
const resumeQueue = async () => {
  state.value = true
  queueApi.bedDoctorResume(roomBedVO)
}
/** 初始化 **/
@@ -75,11 +68,11 @@
        <QueuePanel :queue="list"/>
      </el-aside>
    </el-container>
    <el-container style="justify-content: center;">
    <el-container style="justify-content: center; margin-top: 30px">
      <el-button type="primary" @click="finishNextPatient">叫号</el-button>
      <el-button type="primary" @click="passNextPatient">过号</el-button>
      <el-button v-if="state==='normal'" type="primary" @click="pause">暂停</el-button>
      <el-button v-else type="primary" @click="resume">恢复</el-button>
      <el-button v-if="state" type="primary" @click="pauseQueue">暂停</el-button>
      <el-button v-else type="primary" @click="resumeQueue">恢复</el-button>
    </el-container>
  </el-container>
</template>
src/views/ecg/room/RoomLoginSelect.vue
@@ -190,7 +190,7 @@
    });
    return
  }
  if (isStringEmpty(route.redirectedFrom?.fullPath))
    push({ path: "/"})
  else if(route.redirectedFrom?.fullPath === "/roomselect" )