Browse Source

护送人员添加默认选项

lighter 2 months ago
parent
commit
6349ee3d38

+ 6 - 1
src/api/medical-advice/patient-info.js

@@ -102,6 +102,12 @@ export function queryIsPreBed(data) {
     })
 }
 
+export function getDefaultHsryList() {
+    return request({
+        url: '/medicalAdvice/adjustBed/getDefaultHsryList',
+        method: 'get',
+    })
+}
 
 export function queryBabyInfo(data) {
     return request({
@@ -178,4 +184,3 @@ export function createPatientDoor(data) {
     })
 }
 
-

+ 1 - 1
src/auto-imports.d.ts

@@ -65,6 +65,6 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }

+ 5 - 2
src/components/search/Index.vue

@@ -140,6 +140,9 @@ const props = defineProps({
   showMallType: {
     type: Boolean,
     default: false
+  },
+  defaultOptions: {
+    type: Array,
   }
 })
 
@@ -163,7 +166,7 @@ const params = reactive({
   content: '',
 })
 const data = reactive({
-  list: [],
+  list: props.defaultOptions || [],
   totalSize: 0,
 })
 
@@ -183,7 +186,7 @@ const executeSearch = () => {
       resultRef.value.setCurrentRow(data.list[currentIndex.value])
     })
   } else {
-    data.list = []
+    data.list = props.defaultOptions || []
     data.totalSize = 0
   }
 }

+ 13 - 3
src/views/medical-advice/patient-info/AdjustBed.vue

@@ -371,10 +371,11 @@
   <Search
       v-if="showSearchPh"
       width="500px"
-      title="请选择护人员"
+      title="请选择护人员"
       target="physician"
-      tip="提示:如无护人员,请选择【自助】(拼音为‘zz’,编码为‘99999’)"
+      tip="提示:如无护人员,请选择【自助】(编码为‘99999’)"
       :show-emp-dept="true"
+      :default-options="defaultHsry"
       @close="showSearchPh = false"
       @click-item="handleSelectPh"
   />
@@ -392,7 +393,10 @@ import {
   clearBed,
   addBed,
   saveBed,
-  queryIsPreBed, queryPreAdmiss, receivePatient,
+  queryIsPreBed,
+  queryPreAdmiss,
+  receivePatient,
+  getDefaultHsryList
 } from "@/api/medical-advice/patient-info";
 import { getAllWards } from "@/api/zhu-yuan-yi-sheng/resident-doctor";
 import { clone } from "@/utils/clone";
@@ -401,6 +405,8 @@ import { BizException, ExceptionEnum } from "@/utils/BizException";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
 import Search from '@/components/search/Index.vue'
 
+const defaultHsry = ref([])
+
 const user = useUserStore().userInfo
 const getRoles = user.roles;
 const centerDialogVisible = ref(false);
@@ -695,6 +701,10 @@ onMounted(() => {
   } else {
     queryBedMiInfo();
   }
+
+  getDefaultHsryList().then(res => {
+    defaultHsry.value = res
+  })
 });
 </script>