xiaochan 1 年之前
父節點
當前提交
719dbf2eac

+ 1 - 2
src/components/zhu-yuan-yi-sheng/YzTag.vue

@@ -12,9 +12,8 @@
   </div>
 </template>
 
-<script setup name="YzTag">
+<script setup>
 import {
-  clearPatInfo,
   frequCodeEnum,
   queryParam,
   tempYzData,

+ 139 - 72
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue

@@ -1,38 +1,21 @@
 <template>
-  <el-popover width="220">
+  <el-popover :width="0">
     <template #reference>
       <el-button :id="emrTutorialGetId('tools')">
         辅助工具
       </el-button>
     </template>
     <template #default>
-      <el-button-group>
-        <el-button @click="open(0)" type="success">医嘱</el-button>
-        <el-button @click="open(1)" type="primary">护理</el-button>
-        <el-button @click="open(2)" type="warning">检验</el-button>
-        <el-button @click="open(3)" type="info">检查</el-button>
-      </el-button-group>
-      <hr/>
-      <el-button-group>
-        <el-button @click="open(4)" text type="success" plain>会诊</el-button>
-        <el-button @click="open(5)" text type="primary" plain>手术</el-button>
-        <el-button @click="open(6)" text type="warning" plain>检验</el-button>
-        <el-button @click="open(7)" text type="info" plain>草药</el-button>
-      </el-button-group>
-      <hr/>
-      <el-button-group>
-        <el-button @click="emrChannelClick(emrChannelEnum.firstPageOfMedicalRecord)" type="success" round>首页
-        </el-button>
-        <el-button @click="emrChannelClick(emrChannelEnum.medicalAdvice)" type="primary" round>医嘱</el-button>
-        <el-button @click="open(8)" type="warning" round>心电</el-button>
-        <el-button @click="open(9)" type="info" round>血糖</el-button>
-      </el-button-group>
-      <hr>
-      <el-button-group>
-        <el-button @click="open(10)" type="success">病理</el-button>
-        <el-button @click="open(11)" type="primary">荧光</el-button>
-        <el-button @click="openWindow " type="warning">影像</el-button>
-      </el-button-group>
+      <template v-for="(value , key) in drawerRange">
+        <el-divider>
+          {{ key }}
+        </el-divider>
+        <div class="div_container">
+          <div v-for="item in value" @click="handelClick(item)">
+            {{ item.name }}
+          </div>
+        </div>
+      </template>
     </template>
   </el-popover>
   <el-drawer v-model="drawer"
@@ -40,6 +23,7 @@
              append-to-body
              @opened="handleDrawerOpened"
              modal-class="change_padding"
+             @closed="currentComp = null"
              destroy-on-close
              size="100%"
              :with-header="false">
@@ -50,53 +34,14 @@
                @click="drawer =false">
       关闭
     </el-button>
-    <emr-order-list v-if="index === 0"
-                    :pat-no="patInfo.inpatientNo"
-                    :times="patInfo.admissTimes"/>
-    <emr-yz-temperature v-if="index === 1"
-                        :pat-no="patInfo.inpatientNo"
-                        :times="patInfo.admissTimes"/>
-    <inspection-report-index
-        style="font-size: 12px;height: 100%"
-        v-if="index === 2"
-        :pat-no="patInfo.inpatientNo"
-        :start="start"
-        :end="end"/>
-    <emr-inspect v-if="index === 3"
-                 @close="close"
-                 :pat-no="patInfo.inpatientNo"
-                 :times="patInfo.admissTimes"/>
-    <emr-group-consultation v-if="index === 4"/>
-    <emr-operation v-if="index === 5"
-                   :pat-no="patInfo.inpatientNo"
-                   :times="patInfo.admissTimes"
-                   @to-fill-in-data="toFillInData"/>
-    <EmrTestV2 :pat-no="patInfo.inpatientNo"
-               v-if="index === 6"
-               is-emr
-               @close="close"/>
-    <emr-herbs v-if="index === 7"
-               @close="close"
-               :pat-no="patInfo.inpatientNo"
-               :times="patInfo.admissTimes"/>
-    <emr-electrocardiogram v-if="index === 8"
-                           :pat-no="patInfo.inpatientNo"/>
-    <BloodSugarQuery v-if="index === 9" :pat-no="patInfo.inpatientNo"
-                     :times="patInfo.admissTimes"/>
-    <pims-web-view v-if="index === 10" :pat-no="patInfo.inpatientNo"/>
-    <div style="width: 100%;height: 100%" v-if="index === 11">
-      <fluorescence-test show-copy :pat-no="patInfo.inpatientNo" :times="patInfo.admissTimes"/>
-    </div>
-
-    <!--    <IframeInspectImage :pat-no="patInfo.inpatientNo"/>-->
 
+    <Component :is="currentComp"/>
   </el-drawer>
-
 </template>
 
-<script setup name='EmrAuxiliaryTools'>
+<script setup lang="ts">
 import EmrOrderList from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrOrderList.vue";
-import {defineProps, onMounted, ref, h} from 'vue'
+import {defineProps, onMounted, ref, h, computed} from 'vue'
 import EmrYzTemperature from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrYzTemperature.vue";
 import {patInfo} from './emr-tools-store'
 import EmrInspect from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrInspect.vue";
@@ -107,7 +52,6 @@ import EmrGroupConsultation from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-t
 import EmrOperation from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrOperation.vue";
 import EmrHerbs from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrHerbs.vue";
 import {
-  emrChannelEnum,
   emrMitt
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
@@ -132,7 +76,6 @@ const props = defineProps({
   }
 })
 
-
 const emits = defineEmits(['toFillInData'])
 
 const end = ref('')
@@ -181,6 +124,112 @@ function openWindow() {
   openPatientImage(patInfo.value.inpatientNo)
 }
 
+const propsPatientInfo = computed(() => {
+  return {
+    patNo: patInfo.value.inpatientNo,
+    times: patInfo.value.admissTimes
+  }
+})
+
+const drawerRange: {
+  [key: string]: {
+    name: string,
+    comp?: () => any,
+    click?: () => any
+  }[]
+} = {
+  "查询": [
+    {
+      name: '检验',
+      comp: () => {
+        return h(InspectionReportIndex, {...propsPatientInfo.value, start: start.value, end: end.value})
+      }
+    },
+    {
+      name: '病理',
+      comp: () => {
+        return h(PimsWebView, {...propsPatientInfo.value})
+      }
+    }, {
+      name: '荧光',
+      comp: () => {
+        return h('div', {style: {width: '100%', height: '100%'}},
+            h(FluorescenceTest, {
+              ...propsPatientInfo.value,
+              showCopy: true
+            }))
+      }
+    }, {
+      name: '影像',
+      click: () => {
+        openWindow()
+      }
+    }, {
+      name: '草药',
+      comp: () => {
+        return h(EmrHerbs, {...propsPatientInfo.value})
+      }
+    }, {
+      name: '心电',
+      comp: () => {
+        return h(EmrElectrocardiogram, {...propsPatientInfo.value})
+      }
+    }, {
+      name: '血糖',
+      comp: () => {
+        return h(BloodSugarQuery, {...propsPatientInfo.value})
+      }
+    }
+  ],
+  "引用": [
+    {
+      name: '医嘱',
+      comp: () => {
+        return h(EmrOrderList, {...propsPatientInfo.value})
+      }
+    },
+    {
+      name: '检查',
+      comp: () => {
+        return h(EmrInspect, {...propsPatientInfo.value, onClose: close})
+      }
+    }, {
+      name: '检验',
+      comp: () => {
+        return h(EmrTestV2, {...propsPatientInfo.value, onClose: close, isEmr: true})
+      }
+    },
+    {
+      name: '护理',
+      comp: () => h(EmrYzTemperature, {...propsPatientInfo.value})
+    },
+    {
+      name: '会诊',
+      comp: () => h(EmrGroupConsultation, {...propsPatientInfo.value})
+    },
+    {
+      name: '手术',
+      comp: () => h(EmrOperation, {...propsPatientInfo.value, onToFillInData: toFillInData})
+    }
+  ],
+}
+
+
+function handelClick(item) {
+  if (item.click) {
+    item.click()
+  } else {
+    setComp(item.comp)
+  }
+}
+
+const currentComp = ref(null)
+
+const setComp = (comp) => {
+  currentComp.value = comp
+  drawer.value = true
+}
+
 onMounted(async () => {
   patInfo.value = props.patInfo
   end.value = formatDate(await getServerDateApi())
@@ -204,4 +253,22 @@ onMounted(async () => {
   top: 0.13rem;
   right: 0.07rem;
 }
+
+.div_container {
+  display: grid;
+  grid-template-columns: 1fr 1fr 1fr 1fr;
+  grid-gap: 10px;
+  width: max-content;
+
+  div {
+    width: 50px;
+    border: 1px solid #000;
+    border-radius: 5px;
+    line-height: 30px;
+    text-align: center;
+    user-select: none;
+    cursor: pointer;
+  }
+
+}
 </style>

+ 6 - 2
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrGroupConsultation.vue

@@ -53,7 +53,6 @@
 <script setup>
 // 电子病历 查询会诊
 import {chaKanHuiZhenShenQing} from "@/api/case-front-sheet";
-import {patInfo} from './emr-tools-store'
 import {getHuanZheXinXi} from "@/api/case-front-sheet/jie-shou-hui-zhen";
 import store from "@/store";
 import {
@@ -64,11 +63,16 @@ import {xcMessage} from "@/utils/xiaochan-element-plus";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
 import XEUtils from 'xe-utils'
 
+const props = defineProps({
+  patNo: String,
+  times: Number
+})
+
 const rightData = ref([])
 
 const hzData = ref({})
 const query = () => {
-  chaKanHuiZhenShenQing(patInfo.value.inpatientNo, patInfo.value.admissTimes).then((res) => {
+  chaKanHuiZhenShenQing(props.patNo, props.times).then((res) => {
     rightData.value = res
   })
 }

+ 25 - 10
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrTestV2/EmrTestV2.vue

@@ -19,7 +19,10 @@ import BacterialCultureTable
   from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrTestV2/BacterialCultureTable.vue";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
 import {copyStrFunc} from "@/utils/public";
+import {emrMitt} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
+import {useElementSize} from "@vueuse/core";
 
+// @ts-ignore
 const props = withDefaults(
     defineProps<{
       patNo: string,
@@ -30,6 +33,10 @@ const props = withDefaults(
     }
 )
 
+const queryDivHeight = ref(null)
+
+const {height: queryHeight} = useElementSize(queryDivHeight)
+
 const emits = defineEmits(['close'])
 const dateRange = ref<string[]>([])
 const sidebarData = ref<SidebarData[]>([])
@@ -61,7 +68,6 @@ const query = () => {
     endDate: end
   }
   getNormal(data).then(res => {
-    console.log('getNormal', res)
     sidebarData.value = res
   })
 }
@@ -90,7 +96,6 @@ const sidebarRowClick = (row: SidebarData) => {
       return
     }
 
-    console.log(res)
     inspectionHeader.value = res.order
 
     nextTick(() => {
@@ -161,14 +166,23 @@ const appendCopy = () => {
   }
 }
 
-const copyClick = () => {
+
+const copyAndPaste = (paste = false) => {
   if (props.isEmr) {
     const temp = {
       content: copyData,
       plainText: '检验粘贴不要使用(文本粘贴)。'
     }
-    window.localStorage.setItem("clipBoardData", JSON.stringify(temp))
-    xcMessage.success('复制成功,不要使用(文本粘贴)。')
+
+    if (paste) {
+      const edit = emrMitt.emit('editor')
+      edit.execute('insertContents', {
+        value: [...temp.content]
+      })
+    } else {
+      window.localStorage.setItem("clipBoardData", JSON.stringify(temp))
+      xcMessage.success('复制成功,不要使用(文本粘贴)。')
+    }
   } else {
     copyStrFunc(copyDataStr)
   }
@@ -192,7 +206,7 @@ onMounted(async () => {
     <template #default="{ height, width }">
       <div class="test-aside">
         <div style="width: 220px">
-          <div class="test_query_header">
+          <div class="test_query_header" ref="queryDivHeight">
             <el-date-picker v-model="dateRange"
                             :shortcuts="shortcuts"
                             style="width: 180px"
@@ -200,13 +214,14 @@ onMounted(async () => {
             <br/>
             <el-button-group>
               <el-button @click="query" type="primary">查询</el-button>
-              <el-button @click="appendCopy" type="info">追加复制</el-button>
-              <el-button @click="copyClick" type="success">确认复制</el-button>
+              <el-button @click="appendCopy" type="info">复制</el-button>
+              <el-button @click="copyAndPaste(false)" type="success">确认复制</el-button>
+              <el-button v-if="props.isEmr" @click="copyAndPaste(true)" type="success">复制粘贴</el-button>
             </el-button-group>
           </div>
           <xc-table :local-data="sidebarData"
                     @row-click="sidebarRowClick"
-                    :final-height="height - 24 - 50"
+                    :final-height="height  - 20 - 24 - queryHeight"
                     layout="total, prev, pager, next"
                     small>
             <el-table-column prop="examPurpose" label="项目名称" show-overflow-tooltip></el-table-column>
@@ -305,7 +320,7 @@ onMounted(async () => {
   height: 100%;
 
   .test_query_header {
-    height: 50px;
+    height: max-content;
   }
 }
 

+ 2 - 2
src/views/examination/InspectionReportIndex.vue

@@ -199,8 +199,8 @@
   </page-layer>
 </template>
 
-<script setup>
-import {computed, onActivated, reactive, ref} from 'vue'
+<script setup lang="ts">
+import {computed, onActivated, reactive, ref, onMounted} from 'vue'
 import {shortcuts} from '@/data/shortcuts'
 import {queryInspectionDetail, queryInspectionsIndex} from '@/api/inspections'
 import store from '@/store'