浏览代码

电子病历简洁模式

DESKTOP-0GD05B0\Administrator 2 年之前
父节点
当前提交
313921ef5c

+ 0 - 78
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/EmrDualScreen.vue

@@ -1,78 +0,0 @@
-<template>
-  <div ref="dualScreenRef"
-       class="dual-screen">
-    <div class="close" @click="isOpenDualScreen = false">
-      X
-    </div>
-
-    <iframe
-        :src="dualScreenSrc"
-        height="100%"
-        width="100%"
-        ref="emrRef"/>
-  </div>
-</template>
-
-<script setup name='EmrDualScreen'>
-import {dualScreenSrc, isOpenDualScreen} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
-import router from "@/router";
-import {watch} from "vue";
-
-const dualScreenRef = ref(null)
-const emrRef = ref(null)
-let iframeWindow = null;   //iframe的window对象
-
-
-// 监听页面加载完成
-const handleMessage = (event) => {
-  // 触发页面元素
-  iframeWindow.dualScreenMode()
-}
-
-
-onMounted(async () => {
-  const body = document.querySelector("body");
-  if (body.append) {
-    body.append(dualScreenRef.value);
-  } else {
-    body.appendChild(dualScreenRef.value);
-  }
-  await nextTick();
-  window.addEventListener("message", handleMessage)
-  iframeWindow = emrRef.value.contentWindow;
-})
-
-watch(() => router.currentRoute.value.path, () => {
-  let path = router.currentRoute.value.path
-  if (path === '/login') {
-    isOpenDualScreen.value = false
-  }
-}, {deep: true})
-
-</script>
-
-<style scoped lang="scss">
-.dual-screen {
-  position: fixed;
-  top: 0;
-  right: 0;
-  width: 50%;
-  height: 100%;
-  background-color: white;
-  z-index: 99;
-
-  .close {
-    text-align: center;
-    position: absolute;
-    border-radius: 5px;
-    height: 20px;
-    width: 20px;
-    right: 0;
-    background-color: red;
-    box-shadow: var(--el-box-shadow-light);
-    cursor: pointer;
-    color: white;
-  }
-
-}
-</style>

+ 2 - 16
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -1,5 +1,4 @@
 <template>
-  <emr-dual-screen v-if="isOpenDualScreen"/>
   <emr-control-rule/>
   <div style="color:#000;">
     <div class="yz__header">
@@ -7,11 +6,10 @@
           :huan-zhe-xin-xi="patientInfo"/>
     </div>
     <div class="yz__main" style="overflow: auto">
-      <div style="width: 158px" v-show="!isOpenDualScreen">
+      <div style="width: 158px">
         <patient-list/>
       </div>
-      <div ref="mainRef" class="resident_doctor__main"
-           :style="{width: isOpenDualScreen ? '50%' : '100%'}">
+      <div ref="mainRef" class="resident_doctor__main">
 
         <div class="tag">
           <div v-for="(item,index) in pathList"
@@ -41,9 +39,7 @@ import {computed, ref} from "vue";
 import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
 import router from "@/router";
 import {
-  dualScreenSrc,
   huanZheXinXi as patientInfo,
-  isOpenDualScreen,
   jcTree,
   jyTree,
   winsize,
@@ -56,8 +52,6 @@ import {ElMessageBox} from "element-plus";
 import {getOperationGuide} from "@/api/public-api";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
 import {isDev} from "@/utils/public";
-import EmrDualScreen from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/EmrDualScreen.vue";
-import {getEmrUrl} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
 import EmrControlRule from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/emrControlRule.vue";
 
 const windowSize = computed(() => {
@@ -84,14 +78,6 @@ let pathList = $ref([
   {path: '/inpatient/zhuYuanYiSheng/jianYanShenQing', title: '检验'},
   {path: '/inpatient/zhuYuanYiSheng/shouShuShenQing', title: '手术'},
   {path: '/inpatient/zhuYuanYiSheng/caoYaoYiZhu', title: '草药'},
-  {
-    path: 'dualScreen',
-    title: '双屏', func: () => {
-      if (youWuXuanZheHuanZhe()) return
-      isOpenDualScreen.value = !isOpenDualScreen.value
-      dualScreenSrc.value = getEmrUrl(patientInfo.value.inpatientNo, patientInfo.value.admissTimes, 1)
-    }
-  },
   {
     title: '病历', func: () => {
       if (patientInfo.value.inpatientNo) {

+ 278 - 169
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue

@@ -1,129 +1,139 @@
 <template>
   <el-container>
-    <el-header>
-      <el-button-group>
-        <el-button :disabled="!emrConfig.editor"
-                   type="success"
-                   icon="CircleCheck"
-                   @click="clickSaveData">
-          保存
-        </el-button>
-        <el-button
-            type="primary"
-            title="提交不是保存"
-            @click="clickToSubmitTheMedicalRecord"
-            :disabled="!documentId || !emrConfig.editor">
-          提交病历
-        </el-button>
-        <el-button :disabled="!emrConfig.editor"
-                   icon="Delete" type="danger"
-                   @click="clickDelete">
-          删除
-        </el-button>
-        <el-button @click="recoveryDialog = true">
-          恢复
-        </el-button>
-      </el-button-group>
-      <el-divider direction="vertical"/>
-      <el-button-group>
-        <!--  工具   -->
-        <emr-auxiliary-tools :pat-info="props.huanZheXinXi"
-                             @to-fill-in-data="clickToFillInData"
-                             :emr-data="patientData"/>
-        <el-button @click="drgIntelligentGrouping"
-                   type="primary"
-                   title="drg的预分组">
-          DRG分组
-        </el-button>
-      </el-button-group>
-      <el-divider direction="vertical"/>
-      <!--   恢复到上一次保存的状态   -->
-      <historical-emr v-if="recoveryDialog"
-                      @closed="recoveryDialog = false"
-                      :docunent-id="documentId"
-                      @restore-data="restoreData"/>
-      <el-button-group>
-        <!--        页面打印支持病历续打,但是可能会出现打印错误,<br/>如果页面打印无法使用请用服务打印,服务打印也不行请换win10电脑打印。-->
-        <el-button type="primary" icon="Printer" @click="frontEndPrinting"
-                   title="页面打印支持病历续打,但是可能会出现打印错误,<br/>如果页面打印无法使用请用服务打印,服务打印也不行请换win10电脑打印。">
-          页面
-        </el-button>
-        <el-button type="primary" icon="Printer" @click="servicePrint"
-                   title="服务打印慢,但是不会出现页面打印错误,不支持病历续打。">
-          服务
-        </el-button>
-      </el-button-group>
-      <el-divider direction="vertical"/>
-      <el-button-group>
-        <el-button type="primary" icon="ZoomIn" @click="zoomFunc(0.1)"
-                   title="放大病历">
-        </el-button>
-        <el-button type="primary" icon="ZoomOut" @click="zoomFunc(-0.1)"
-                   title="缩小病历">
-        </el-button>
-      </el-button-group>
-
-      <el-divider direction="vertical"/>
-      <el-select v-model="reviewMode"
-                 style="width: 60px; "
-                 @change="isRevisionMode"
-                 title="审阅模式">
-        <el-option :value="0" label="关闭"
-                   title="页面上不显示修改记录"/>
-        <el-option :value="1" label="开启"
-                   title="病历右侧会以列表的形式显示 添加,删除,更新的记录"/>
-        <el-option :value="2" label="嵌入"
-                   title="嵌入病历显示修改记录,新增的记录会用背景颜色标记,删除的记录 通过画删除线标记"/>
-      </el-select>
-      <el-button-group>
-        <el-button icon="RefreshLeft"
-                   @click="clickUndo('undo')"
-                   title="撤销"/>
-        <el-button icon="RefreshRight"
-                   @click="clickUndo('redo')"
-                   title="重做"/>
-      </el-button-group>
-      <el-button-group>
-        <el-button title="仅在病程记录中生效,根据病程记录的时间来进行排序,从小到大。"
-                   icon="SortDown"
-                   @click="diseaseCourseSequencing"/>
-        <el-button title="为页面添加分页标识符,分页符后强制为新页面。" @click="paginationSymbol">
-          <i class="iconfont icon-chaifenyemian"></i>
-        </el-button>
-      </el-button-group>
-      <el-divider direction="vertical"/>
-      <el-button-group>
-        <el-button title="收起左边模板"
-                   @click="foldBothSides.isLeft= !foldBothSides.isLeft">
-          <el-icon>
-            <Fold/>
-          </el-icon>
-        </el-button>
-        <el-button title="收起右边片段"
-                   @click="foldBothSides.isRight= !foldBothSides.isRight">
-          <el-icon>
-            <Expand/>
-          </el-icon>
-        </el-button>
-      </el-button-group>
-      <el-divider direction="vertical"/>
-      <el-checkbox v-model="autoSave" label="自动保存" @change="autoSaveChange"/>
-      <el-divider direction="vertical"/>
+    <el-header v-show="!completeModeSwitch">
+      <div ref="headerRefOld"/>
+      <div ref="headerRef">
+        <el-button-group>
+          <el-button :disabled="!emrConfig.editor"
+                     type="success"
+                     icon="CircleCheck"
+                     @click="clickSaveData">
+            保存
+          </el-button>
+          <el-button
+              type="primary"
+              title="提交不是保存"
+              @click="clickToSubmitTheMedicalRecord"
+              :disabled="!documentId || !emrConfig.editor">
+            提交病历
+          </el-button>
+          <el-button :disabled="!emrConfig.editor"
+                     icon="Delete" type="danger"
+                     @click="clickDelete">
+            删除
+          </el-button>
+          <el-button @click="recoveryDialog = true">
+            恢复
+          </el-button>
+        </el-button-group>
+        <el-divider direction="vertical"/>
+        <el-button-group>
+          <!--  工具   -->
+          <emr-auxiliary-tools :pat-info="props.huanZheXinXi"
+                               @to-fill-in-data="clickToFillInData"
+                               :emr-data="patientData"/>
+          <el-button @click="drgIntelligentGrouping"
+                     type="primary"
+                     title="drg的预分组">
+            DRG分组
+          </el-button>
+        </el-button-group>
+        <el-divider direction="vertical"/>
+        <!--   恢复到上一次保存的状态   -->
+        <historical-emr v-if="recoveryDialog"
+                        @closed="recoveryDialog = false"
+                        :docunent-id="documentId"
+                        @restore-data="restoreData"/>
+        <el-button-group>
+          <!--        页面打印支持病历续打,但是可能会出现打印错误,<br/>如果页面打印无法使用请用服务打印,服务打印也不行请换win10电脑打印。-->
+          <el-button type="primary" icon="Printer" @click="frontEndPrinting"
+                     title="页面打印支持病历续打,但是可能会出现打印错误,<br/>如果页面打印无法使用请用服务打印,服务打印也不行请换win10电脑打印。">
+            页面
+          </el-button>
+          <el-button type="primary" icon="Printer" @click="servicePrint"
+                     title="服务打印慢,但是不会出现页面打印错误,不支持病历续打。">
+            服务
+          </el-button>
+        </el-button-group>
+        <el-divider direction="vertical"/>
+        <el-button-group>
+          <el-button type="primary" icon="ZoomIn" @click="zoomFunc(0.1)"
+                     title="放大病历">
+          </el-button>
+          <el-button type="primary" icon="ZoomOut" @click="zoomFunc(-0.1)"
+                     title="缩小病历">
+          </el-button>
+        </el-button-group>
+
+        <el-divider direction="vertical"/>
+        <el-select v-model="reviewMode"
+                   style="width: 60px; "
+                   @change="isRevisionMode"
+                   title="审阅模式">
+          <el-option :value="0" label="关闭"
+                     title="页面上不显示修改记录"/>
+          <el-option :value="1" label="开启"
+                     title="病历右侧会以列表的形式显示 添加,删除,更新的记录"/>
+          <el-option :value="2" label="嵌入"
+                     title="嵌入病历显示修改记录,新增的记录会用背景颜色标记,删除的记录 通过画删除线标记"/>
+        </el-select>
+        <el-button-group>
+          <el-button icon="RefreshLeft"
+                     @click="clickUndo('undo')"
+                     title="撤销"/>
+          <el-button icon="RefreshRight"
+                     @click="clickUndo('redo')"
+                     title="重做"/>
+        </el-button-group>
+        <el-button-group>
+          <el-button title="仅在病程记录中生效,根据病程记录的时间来进行排序,从小到大。"
+                     icon="SortDown"
+                     @click="diseaseCourseSequencing"/>
+          <el-button title="为页面添加分页标识符,分页符后强制为新页面。" @click="paginationSymbol">
+            <i class="iconfont icon-chaifenyemian"></i>
+          </el-button>
+        </el-button-group>
+        <el-divider direction="vertical" v-show="!completeModeSwitch"/>
+        <el-button-group v-show="!completeModeSwitch">
+          <el-button title="收起左边模板"
+                     @click="foldBothSides.isLeft= !foldBothSides.isLeft">
+            <el-icon>
+              <Fold/>
+            </el-icon>
+          </el-button>
+          <el-button title="收起右边片段"
+                     @click="foldBothSides.isRight= !foldBothSides.isRight">
+            <el-icon>
+              <Expand/>
+            </el-icon>
+          </el-button>
+        </el-button-group>
+        <el-divider direction="vertical"/>
+        <el-checkbox v-model="autoSave" label="自动保存" @change="autoSaveChange"/>
+        <el-divider direction="vertical"/>
+      </div>
     </el-header>
     <el-container>
-      <div :class="foldBothSides.isLeft ? 'emr-template-open' : 'emr-template-put-away' ">
-        <emr-sidebar @nodeClick="nodeClick"
-                     @open-and-save-the-medical-record="openAndSaveTheMedicalRecord"
-                     @patient-medical-record="foldBothSides.isLeft = true"
-                     v-show="foldBothSides.isLeft"
-                     ref="emrSidebarRef"
-                     :doctor-grade="doctorLevel"
-                     :extract-data="extractData"
-                     :patientData="patientData"
-                     :max-height="maxHeight"
-                     :huan-zhe-xin-xi="props.huanZheXinXi"/>
+      <div class="modLeftRef" v-show="completeModeSwitch">
+        <div ref="modLeftRef" class="refDiv"></div>
+      </div>
+      <div v-show="!completeModeSwitch"
+           :class="foldBothSides.isLeft ? 'emr-template-open' : 'emr-template-put-away' "
+           ref="leftRefOld">
+        <div ref="leftRef">
+          <emr-sidebar @nodeClick="nodeClick"
+                       @open-and-save-the-medical-record="openAndSaveTheMedicalRecord"
+                       @patient-medical-record="foldBothSides.isLeft = true"
+                       v-show="foldBothSides.isLeft"
+                       ref="emrSidebarRef"
+                       :doctor-grade="doctorLevel"
+                       :extract-data="extractData"
+                       :patientData="patientData"
+                       :max-height="maxHeight"
+                       :huan-zhe-xin-xi="props.huanZheXinXi"/>
+        </div>
       </div>
-      <div class="emr-editor">
+      <div class="emr-editor" :style="{marginTop: completeModeSwitch ? '10px' : 0}">
         <div style="height: 30px" @mousewheel="mousewheel($event)">
           <el-scrollbar ref="tootScrollRef" @scroll="scroll">
             <div class="tool_emr">
@@ -267,58 +277,77 @@
         </div>
         <div class="emr-iframe">
           <div>
-            <el-button @click="showIframe  =1" :type="showIframe === 1 ? 'primary' : ''">正在编辑</el-button>
-            <el-button @click="showIframe  =2" :type="showIframe === 2? 'primary' : ''">已保存病历</el-button>
+            <el-button @click="showIframe  = 1" :type="showIframe === 1 ? 'primary' : ''">正在编辑</el-button>
+            <el-button @click="showIframe  = 2" :type="showIframe === 2? 'primary' : ''">已保存病历</el-button>
+            <el-button @click="showIframe  = 3" :type="showIframe === 3? 'primary' : ''">同时打开</el-button>
           </div>
-          <div v-show="showIframe === 1">
-            <div style="position: relative">
-              <emr-popup ref="popupRef"
-                         @fill-data="popupFunc.fillData"/>
-
-              <emr-web-socket :pat-info="props.huanZheXinXi"
-                              :current-editor-user="currentEditorUser"
-                              ref="emrSocket"/>
-
-              <div class="creator_prompt">
-                <div>
-                  创建:{{ createName }}
-                  <br>
-                  当前:{{ userData.name }}
-                  <br>
-                  现编辑:{{ currentEditorUser?.name }}
-                </div>
+          <div style="display: flex;width: 100%">
+            <div :style="{width: showIframe === 3 ? '50%' : '100%'}"
+                 v-show="showIframe === 1 || showIframe === 3">
+              <div style="position: relative">
+                <emr-popup ref="popupRef"
+                           @fill-data="popupFunc.fillData"/>
+
+                <emr-web-socket :pat-info="props.huanZheXinXi"
+                                :current-editor-user="currentEditorUser"
+                                ref="emrSocket"/>
+
+                <div class="creator_prompt">
+                  <div>
+                    创建:{{ createName }}
+                    <br>
+                    当前:{{ userData.name }}
+                    <br>
+                    现编辑:{{ currentEditorUser?.name }}
+                  </div>
+
+                  <div>
+                    等级:{{ createLevel }}
+                    <br>
+                    等级:{{ doctorLevel }}
+                    <br>
+                    科室:{{ currentEditorUser?.deptName }}
+                  </div>
+
+                  <div class="edit_mode">
+                    模式:{{ editorMod ? '只读' : '编辑' }}
+                  </div>
 
-                <div>
-                  等级:{{ createLevel }}
-                  <br>
-                  等级:{{ doctorLevel }}
-                  <br>
-                  科室:{{ currentEditorUser?.deptName }}
                 </div>
-
-                <div class="edit_mode">
-                  模式:{{ editorMod ? '只读' : '编辑' }}
+                <iframe ref="emrRef"
+                        :height="iframeHeight() "
+                        :src="caseHistoryUrl"/>
+              </div>
+            </div>
+            <div :style="{width: showIframe === 3 ? '50%' : '100%'}"
+                 v-show="showIframe === 2 || showIframe === 3">
+              <div style="position:relative;">
+                <div style="position:absolute;top: 0;left: 0">
+                  此病历为只读
                 </div>
-
+                <iframe :height="iframeHeight()"
+                        :src="saveDocumentId"/>
               </div>
-              <iframe ref="emrRef"
-                      :height="maxHeight - 110 + 'px' "
-                      :src="caseHistoryUrl"/>
+
             </div>
           </div>
-          <div v-show="showIframe ===2 ">
-            <iframe :height="maxHeight - 110 + 'px' "
-                    :src="saveDocumentId"/>
-          </div>
         </div>
       </div>
-      <div :class="foldBothSides.isRight ? 'emr-fragment-open' : 'emr-fragment-put-away' ">
-        <emr-snippet
-            v-show="foldBothSides.isRight"
-            @node-click="clickSnippet"
-            ref="emrSnippetRef"
-            :max-height="maxHeight"
-            :patientData="patientData"/>
+      <div class="modRightRef" v-show="completeModeSwitch">
+        <div ref="modRightRef" class="refDiv"></div>
+      </div>
+
+      <div v-show="!completeModeSwitch"
+           :class="foldBothSides.isRight ? 'emr-fragment-open' : 'emr-fragment-put-away' "
+           ref="rightRefOld">
+        <div ref="rightRef">
+          <emr-snippet
+              v-show="foldBothSides.isRight"
+              @node-click="clickSnippet"
+              ref="emrSnippetRef"
+              :max-height="maxHeight"
+              :patientData="patientData"/>
+        </div>
       </div>
 
     </el-container>
@@ -349,7 +378,12 @@ import EmrSidebar from "@/components/zhu-yuan-yi-sheng/emr/EmrSidebar.vue";
 import {
   EMRInteractive,
   emrConfig,
-  fontSizes, availableFonts, copyEnum, getEmrCopy, delEmrCopy
+  fontSizes,
+  availableFonts,
+  copyEnum,
+  getEmrCopy,
+  delEmrCopy,
+  completeModeSwitch
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
 import {ElMessage, ElMessageBox} from "element-plus";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
@@ -377,6 +411,7 @@ import {createRestrictions} from "@/api/zhu-yuan-yi-sheng/emr-control-rule";
 import {needRule} from "@/utils/public";
 import {isThereADoctorEditing} from "@/api/zhu-yuan-yi-sheng/emr-socket";
 
+
 const props = defineProps({
   huanZheXinXi: {
     type: Object,
@@ -387,9 +422,6 @@ const props = defineProps({
   visitor: {
     type: Boolean
   },
-  isDualScreen: {
-    type: Boolean
-  }
 })
 
 const currentEmr = ref(null)
@@ -1471,6 +1503,7 @@ onMounted(async () => {
     }
   })
   autoSaveFunc()
+
 })
 
 onDeactivated(() => {
@@ -1489,8 +1522,42 @@ const closeBothSides = () => {
   foldBothSides.isRight = false
 }
 
+const iframeHeight = () => {
+  if (completeModeSwitch.value) {
+    return props.maxHeight - (10 + 30 + 24) + 20 + 'px'
+  } else {
+    return props.maxHeight - 110 + 'px'
+  }
+}
+
+const headerRef = ref(null)
+const headerRefOld = ref(null)
+
+const modLeftRef = ref(null)
+const leftRefOld = ref(null)
+const leftRef = ref(null)
+
+const modRightRef = ref(null)
+const rightRef = ref(null)
+const rightRefOld = ref(null)
+
+
+const turnOnConciseMode = () => {
+  modLeftRef.value.appendChild(leftRef.value)
+  modRightRef.value.appendChild(rightRef.value)
+}
+
+const exitConciseMode = () => {
+  leftRefOld.value.appendChild(leftRef.value)
+  rightRefOld.value.appendChild(rightRef.value)
+}
+
 defineExpose({
-  closeBothSides
+  closeBothSides,
+  headerRef,
+  headerRefOld,
+  turnOnConciseMode,
+  exitConciseMode
 })
 
 </script>
@@ -1596,4 +1663,46 @@ defineExpose({
 
 }
 
+.modLeftRef {
+  position: fixed;
+  height: 100%;
+  width: 20px;
+  z-index: 10;
+
+  .refDiv {
+    display: none;
+  }
+
+  &:hover {
+    width: max-content;
+    background-color: white;
+
+    .refDiv {
+      display: block;
+    }
+  }
+}
+
+
+.modRightRef {
+  position: fixed;
+  height: 100%;
+  width: 20px;
+  z-index: 10;
+  right: 0;
+
+  .refDiv {
+    display: none;
+  }
+
+  &:hover {
+    width: max-content;
+    background-color: white;
+
+    .refDiv {
+      display: block;
+    }
+  }
+}
+
 </style>

+ 60 - 18
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/Home.vue

@@ -1,6 +1,9 @@
 <template>
-  <div ref="headerRef">
-    <div v-show="!isDualScreen">
+  <div class="modHeaderRef" v-show="conciseMode">
+    <div ref="modHeaderRef" class="modHeaderDiv"/>
+  </div>
+  <div ref="headerRefOld">
+    <div ref="headerRef">
       <emr-select-pat :pat-info="patientInfo" v-if="emrConfig.editor" @selected="selected"/>
       住院号:
       <el-input v-model="query.patNo" style="width: 120px" @blur="query.patNo = $event.target.value.trim()"/>
@@ -8,22 +11,25 @@
       <emr-leave-hospital-patient @rowClick="disPatients"/>
       <el-button @click="allPatientsInTheHospital" :disabled="query.state === 4">全院患者</el-button>
       <el-button @click="patientListDrawer = !patientListDrawer">患者列表</el-button>
+      <el-checkbox v-model="conciseMode" @change="openOrCloseMode" label="简洁模式"/>
       出院天数:{{ dischargeDays }}
       <span style="color: red">出院七天后就无法编辑患者病历</span>
-<!--      <el-checkbox label="简洁模式"/>-->
     </div>
   </div>
+
   <div v-if="show">
-    <div ref="divRef">
-      <huan-zhe-xin-xi v-show="!isDualScreen"
-                       :huan-zhe-xin-xi="patientInfo"
-                       @isShow="patientInfoIsShow"/>
+    <div ref="patInfoRefOld">
+      <div ref="patInfoRef">
+        <huan-zhe-xin-xi
+            :huan-zhe-xin-xi="patientInfo"
+            @isShow="patientInfoIsShow"/>
+      </div>
     </div>
+
     <emr-main
         ref="emrMainRef"
         :huan-zhe-xin-xi="patientInfo"
-        :max-height="maxHeight"
-        :is-dual-screen="isDualScreen"/>
+        :max-height="maxHeight"/>
   </div>
   <emr-patient-list @rowClick="listRowClick" v-model="patientListDrawer"/>
 
@@ -48,6 +54,8 @@ import {isDisReqEdit} from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import {getOperationGuide, getServerDateApi} from "@/api/public-api";
 import {subtractTime} from "@/utils/date";
 import {
+  completeModeSwitch,
+  conciseMode,
   emrConfig,
   query,
   resolveRoute
@@ -58,8 +66,13 @@ import EmrSelectPat from "@/components/zhu-yuan-yi-sheng/EmrSelectPat.vue";
 import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
 import {repeatedlyOpenTheSamePatient} from "@/api/zhu-yuan-yi-sheng/emr-socket";
 
-const divRef = ref(null)
+const patInfoRef = ref(null)
+const patInfoRefOld = ref(null)
+
 const headerRef = ref(null)
+const headerRefOld = ref(null)
+
+const modHeaderRef = ref(null)
 const emrMainRef = ref(null)
 // 最大高度
 let maxHeight = $ref()
@@ -71,8 +84,7 @@ let patientInfo = $ref({})
 let dischargeDays = $ref(0)
 // 患者列表 list
 let patientListDrawer = $ref(false)
-// 是否是双屏
-let isDualScreen = $ref(false)
+
 
 let dialog = $ref(true)
 
@@ -190,6 +202,22 @@ const 操作指南 = (val) => {
   })
 }
 
+const openOrCloseMode = (val) => {
+  if (val) {
+    modHeaderRef.value.appendChild(headerRef.value);
+    modHeaderRef.value.appendChild(patInfoRef.value);
+    modHeaderRef.value.appendChild(emrMainRef.value.headerRef);
+    emrMainRef.value.turnOnConciseMode();
+  } else {
+    headerRefOld.value.appendChild(headerRef.value)
+    patInfoRefOld.value.appendChild(patInfoRef.value)
+    emrMainRef.value.headerRefOld.appendChild(emrMainRef.value.headerRef)
+    emrMainRef.value.exitConciseMode();
+  }
+  completeModeSwitch.value = val
+}
+
+
 onMounted(async () => {
   let temp = localStorage.getItem("电子病历限制")
   if (temp !== null) {
@@ -197,17 +225,31 @@ onMounted(async () => {
   }
   await nextTick();
   await routerFunc()
-  //向父项目传值
-  window.parent.postMessage("电子病历加载完成。", "*");
-  window.dualScreenMode = () => {
-    isDualScreen = true
-    emrMainRef.value.closeBothSides()
-  }
 })
 
 
 </script>
 
 <style scoped lang="scss">
+.modHeaderRef {
+  height: 10px;
+  width: 100%;
+  position: fixed;
+  top: 0;
+  z-index: 10;
+
+  .modHeaderDiv {
+    display: none;
+    padding: 10px;
+  }
 
+  &:hover {
+    height: max-content;
+    background-color: white;
+
+    .modHeaderDiv {
+      display: block;
+    }
+  }
+}
 </style>

+ 3 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init.js

@@ -105,6 +105,9 @@ export const query = ref({
     state: 0
 })
 
+export const conciseMode = ref(false)
+export const completeModeSwitch = ref(false)
+
 export function resolveRoute(val) {
     query.value = JSON.parse(window.atob(val))
 }

+ 0 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js

@@ -294,10 +294,6 @@ export const drugManual = ref({
     }
 })
 
-export const isOpenDualScreen = ref(false)
-// 双屏模式的 src
-export const dualScreenSrc = ref('')
-
 
 export let tableHeader = [
     {label: '编码', prop: 'orderCode'},

+ 1 - 8
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -23,7 +23,6 @@
       <button @click="confirmAssociationClick" title="关联医嘱">关联</button>
       <button @click="openRationalDrugUse" title="进入到合理用药的页面">合理用药</button>
       <button @click="allergen.open()" title="患者过敏源信息维护">患者过敏源信息维护</button>
-      <button @click="openDualScreen" title="双屏模式">双屏模式</button>
     </div>
     <div style="height: 5px"/>
     <yz-editor :patient-info="huanZheXinXi"
@@ -94,7 +93,7 @@ import {
   clickOnThePatient,
   drugManual,
   associateOrders,
-  clearAssociate, youWuXuanZheHuanZhe, isOpenDualScreen, dualScreenSrc
+  clearAssociate, youWuXuanZheHuanZhe
 } from '../public-js/zhu-yuan-yi-sheng'
 import store from '@/store'
 import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
@@ -434,12 +433,6 @@ const confirmAssociationClick = () => {
   })
 }
 
-const openDualScreen = () => {
-  if (youWuXuanZheHuanZhe()) return
-  isOpenDualScreen.value = !isOpenDualScreen.value
-  dualScreenSrc.value = getEmrUrl(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes, 1)
-}
-
 const duplicateAndPaste = async () => {
   await yzQueryRef.value.queryYz()
   tableRef.value.scrollToTheEnd()