eight
2024-08-20 1f4db481c48e6beb5c787f126576e63363b10a13
update
已添加5个文件
已修改3个文件
174 ■■■■■ 文件已修改
src/api/ecg/doctor/index.ts 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ecg/queue/index.ts 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/permission.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/stringUtil.ts 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/components/QueuePanel.vue 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/components/TitlePanel.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/index.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/room/RoomLoginSelect.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ecg/doctor/index.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
import request from '@/config/axios'
export interface RoomBedVO {
  roomId: number // è¯Šå®¤ç¼–号
  bedNo: string // è¯Šç–—床编号
}
// åŒ»ç”Ÿ API
export const DoctorApi = {
  // ä¸‹ä¸€ä½æ‚£è€…
  nextPatient: async (params: RoomBedVO) => {
    return await request.get({ url: `/ecg/doctor/nextpatient`, params })
  }
}
src/api/ecg/queue/index.ts
@@ -5,16 +5,16 @@
  id: number // id
  patId: string // æ‚£è€…编号
  patName: string // æ‚£è€…姓名
  patGender: boolean // æ‚£è€…性别
  patGender: number // æ‚£è€…性别
  bookTimeslot: number // é¢„约时间段
  bookCheckType: boolean // é¢„约检查类型
  bookCheckType: number // é¢„约检查类型
  seqNum: number // æŽ’队序号
  status: number // 10:排队中 20:候诊准备 30:就诊中 40:就诊完成 50:过号 60:过期
  passed: boolean // è¿‡å·æ ‡è®°
  expired: boolean // é¢„约过期标记
  roomId: number // è¯Šå®¤ç¼–号
  roomName: string // è¯Šå®¤åç§°
  bedNum: string // è¯Šç–—床编号
  bedNo: string // è¯Šç–—床编号
}
// æŽ’队 API
src/permission.ts
@@ -83,7 +83,7 @@
        // æ–°å¢žã€è¯Šå®¤é€‰æ‹©ã€‘逻辑
        if (userStore.getRoles.includes("doctor") && !userStore.getIsSetRoom ) {
          next({path: "/login-room-select"})
          next({path: `/login-room-select?redirect=${to.fullPath}`})
        }
        // <<<【诊室选择】<<<
        else {
src/utils/stringUtil.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
export function isStringEmpty(value: string | null | undefined): boolean {
  return !value || value.trim() === '';
}
src/views/ecg/doctor/components/QueuePanel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
<script setup lang="ts">
import {defineComponent, PropType} from "vue";
import { queueApi, queueVO } from '@/api/ecg/queue'
import {DICT_TYPE} from "@/utils/dict";
defineComponent({
  name: 'QueuePanel'
})
const  props = defineProps({
  queue: {
    type: Array as PropType<queueVO[]>,
    required: true
  }
  /*,
  modelValue: {
    type: Object as PropType<RoomVO>,
    required: true
  }
*/
})
</script>
<template>
<div v-for="(item, index) in queue" :key="index">
  {{item.patName}}
  {{item.patGender==1 ? "男" : "女"}}
  {{item.roomId}}
  {{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" />
</div>
</template>
<style scoped lang="scss">
</style>
src/views/ecg/doctor/components/TitlePanel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
<script setup lang="ts">
import {defineComponent, PropType} from "vue";
import {useUserStore} from "@/store/modules/user";
import {RoomBedVO} from "@/api/ecg/doctor";
const userStore = useUserStore();
defineComponent({
  name: 'TitlePanel'
})
const roomBedVO: RoomBedVO = {
  roomId: userStore.room.roomId,
  bedNo: userStore.room.bedNo
}
const  props = defineProps({
  room: {
    type: String,
    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}}
</template>
<style scoped lang="scss">
</style>
src/views/ecg/doctor/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
<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 {useUserStore} from "@/store/modules/user";
import {queueVO} from "@/api/ecg/queue";
const userStore = useUserStore();
const roomBedVO: RoomBedVO = {
    roomId: userStore.room.roomId,
    bedNo: userStore.room.bedNo
}
const list = ref<queueVO[]>([])
const nextPatient = async () => {
  const data = await DoctorApi.nextPatient(roomBedVO)
  list.value = data
}
const finishPatient = async () => {
}
/** åˆå§‹åŒ– **/
onMounted(() => {
  nextPatient()
})
</script>
<template>
  <el-container>
    <el-header style="background-color: var(--el-color-primary-light-7); font-size: 24px">
      <TitlePanel room="A208"/>
    </el-header>
    <el-container>
      <el-main>
        è£…机界面
      </el-main>
      <el-aside width="300px" style="background-color: var(--el-color-primary-light-7);">
        <QueuePanel :queue="list"/>
      </el-aside>
    </el-container>
    <el-container style="justify-content: center;">
      <el-button type="primary" @click="finishPatient">完成</el-button>
      <el-button type="primary" @click="nextPatient">下一位</el-button>
    </el-container>
  </el-container>
</template>
<style scoped lang="scss">
</style>
src/views/ecg/room/RoomLoginSelect.vue
@@ -16,10 +16,14 @@
import {useUserStore} from "@/store/modules/user";
import {CACHE_KEY, useCache} from "@/hooks/web/useCache";
import {ElMessage} from "element-plus";
const { currentRoute, push } = useRouter()
import {isStringEmpty}  from "@/utils/stringUtil"
const {  push } = useRouter()
const { wsCache } = useCache()
defineOptions({ name: 'RoomLoginSelect' })
const route = useRoute();
const userStore = useUserStore()
@@ -52,7 +56,10 @@
  }
  userStore.setRoomInfoAction(curSel.value)
  if (isStringEmpty(route.redirectedFrom?.fullPath))
  push({ path: "/"})
  else
    push({ path: route.redirectedFrom?.fullPath})
}
const test = () => {