فهرست منبع

电子病历双屏模式

DESKTOP-0GD05B0\Administrator 2 سال پیش
والد
کامیت
4ae7352e8b

+ 35 - 26
src/components/zhu-yuan-yi-sheng/emr/EmrSidebar.vue

@@ -1,30 +1,38 @@
 <template>
-  <el-input v-model="filterText" placeholder="节点过滤" @input="filterChange" clearable/>
-  <el-radio-group v-model="templateType" @change="typeChange">
-    <el-radio-button :disabled="!editor" :label="0">全院模板</el-radio-button>
-    <el-radio-button :disabled="!editor" :label="1">科室模板</el-radio-button>
-    <el-radio-button :label="2">患者数据</el-radio-button>
-  </el-radio-group>
-  <div :style="{maxHeight : maxHeight - 100 + 'px'}" style="overflow: auto;max-width: 294px" class="down-tree">
-    <el-tree :data="treeData"
-             :props="defaultProps"
-             @node-click="handleNodeClick"
-             node-key="_id"
-             ref="treeRef"
-             highlight-current
-             :filter-node-method="filterNode"
-             default-expand-all>
-      <template #default="{ node, data }">
-        <el-icon v-if="data.submit">
-          <Lock/>
-        </el-icon>
-        <el-icon v-else>
-          <Folder v-if="data.children"/>
-          <Document v-else/>
-        </el-icon>
+  <div style="width: 215px">
+    <el-input v-model="filterText" placeholder="节点过滤"
+              style="width: 100%"
+              @input="filterChange" clearable/>
+    <el-radio-group v-model="templateType" @change="typeChange">
+      <el-radio-button :disabled="!editor" :label="0">全院模板</el-radio-button>
+      <el-radio-button :disabled="!editor" :label="1">科室模板</el-radio-button>
+      <el-radio-button :label="2">患者数据</el-radio-button>
+    </el-radio-group>
+    <div :style="{maxHeight : maxHeight - 100 + 'px'}"
+         style="overflow: auto; "
+         class="down-tree">
+      <el-tree :data="treeData"
+               :props="defaultProps"
+               @node-click="handleNodeClick"
+               node-key="_id"
+               ref="treeRef"
+               highlight-current
+               :filter-node-method="filterNode"
+               default-expand-all>
+        <template #default="{ node, data }">
+          <el-icon v-if="data.submit">
+            <Lock/>
+          </el-icon>
+          <el-icon v-else>
+            <Folder v-if="data.children"/>
+            <Document v-else/>
+          </el-icon>
+          <span :title="data.name">
         {{ data.name }}
-      </template>
-    </el-tree>
+        </span>
+        </template>
+      </el-tree>
+    </div>
   </div>
 </template>
 
@@ -49,7 +57,7 @@ const props = defineProps({
 
 let editor = emrConfig.value.editor
 
-const emit = defineEmits(['nodeClick', 'typeChange'])
+const emit = defineEmits(['nodeClick', 'typeChange', 'patientMedicalRecord'])
 
 let returnData = $ref({
   emrTree: [],
@@ -204,6 +212,7 @@ const queryData = () => {
   getPatientDataTree(props.huanZheXinXi.inpatientNo, props.huanZheXinXi.admissTimes).then((res) => {
     if (res?.length > 0) {
       templateType = 2
+      emit('patientMedicalRecord')
     }
     returnData.patientTree = res
   })

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

@@ -0,0 +1,54 @@
+<template>
+  <div ref="dualScreenRef"
+       class="dual-screen">
+    <iframe
+        :src="dualScreenSrc"
+        height="100%"
+        width="100%"
+        ref="emrRef"
+    />
+  </div>
+</template>
+
+<script setup name='EmrDualScreen'>
+import {dualScreenSrc} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+
+const dualScreenRef = ref(null)
+const emrRef = ref(null)
+const zIndex = ref(0)
+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);
+  }
+  zIndex.value = [...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)
+  await nextTick();
+  window.addEventListener("message", handleMessage)
+  iframeWindow = emrRef.value.contentWindow;
+})
+
+</script>
+
+<style scoped lang="scss">
+.dual-screen {
+  position: fixed;
+  top: 0;
+  right: 0;
+  width: 50%;
+  height: 100%;
+  background-color: white;
+  z-index: 99;
+}
+</style>

+ 69 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/OrderProgress.vue

@@ -0,0 +1,69 @@
+<template>
+  <div class="order__progress" v-show="isShow()">
+    <div>
+      X
+    </div>
+    <div class="steps__mian">
+      <el-steps direction="vertical" :active="active">
+        <el-step v-for="(item,index) in stepList"
+                 :title="item"
+                 :description="descriptionFunc(index)"/>
+      </el-steps>
+    </div>
+  </div>
+</template>
+
+<script setup name='OrderProgress'>
+import {yiZhuData} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+
+let stepList = ['录入医嘱', '确认医嘱', '执行医嘱', '停止医嘱']
+let descriptionList = $ref([])
+let active = $ref(1)
+
+const isShow = () => {
+  // if (yiZhuData.value.actOrderNo > 0 && yiZhuData.value.statusFlag > 1) {
+  //   return true
+  // }
+  return false
+}
+
+const descriptionFunc = (index) => {
+  return descriptionList[index]
+}
+const fillOrder = (val) => {
+  descriptionList = []
+  active = parseInt(val.statusFlag)
+  if (val.statusFlag === '4') {
+    active = 3
+  } else if (val.statusFlag === '5') {
+    active = 4
+  }
+
+  descriptionList.push(val.enterOperName + '\n' + val.enterTime)
+  if (val.confirmTime) {
+    descriptionList.push(val.signerName + ' ' + val.confirmTime)
+  }
+}
+
+defineExpose({
+  fillOrder
+})
+
+</script>
+
+<style scoped lang="scss">
+.order__progress {
+  width: 190px;
+  height: 100%;
+  top: 0;
+  right: 0;
+  position: fixed;
+
+  background-color: white;
+  z-index: 999;
+
+  .steps__mian {
+    height: calc(100% - 40%);
+  }
+}
+</style>

+ 31 - 5
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -1,14 +1,17 @@
 <template>
+  <emr-dual-screen v-if="isOpenDualScreen"/>
   <div style="color:#000;">
     <div class="yz__header">
       <huan-zhe-xin-xi v-show="basicPatientInformation"
                        :huan-zhe-xin-xi="patientInfo"/>
     </div>
     <div class="yz__main" style="overflow: auto">
-      <div style="width: 158px">
+      <div style="width: 158px" v-show="!isOpenDualScreen">
         <patient-list/>
       </div>
-      <div ref="mainRef" class="resident_doctor__main">
+      <div ref="mainRef" class="resident_doctor__main"
+           :style="{width: isOpenDualScreen ? '50%' : '100%'}">
+
         <div class="tag">
           <div v-for="(item,index) in pathList"
                :style="currentPagePosition(item.path)"
@@ -37,7 +40,12 @@ import {computed, ref, watch} from "vue";
 import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
 import router from "@/router";
 import {
-  huanZheXinXi as patientInfo, jcTree, jyTree, winsize,
+  dualScreenSrc,
+  huanZheXinXi as patientInfo,
+  isOpenDualScreen,
+  jcTree,
+  jyTree,
+  winsize,
   youWuXuanZheHuanZhe
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import PatientList from "@/components/zhu-yuan-yi-sheng/public/PatientList";
@@ -47,6 +55,8 @@ 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-init";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -84,6 +94,14 @@ 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) {
@@ -138,6 +156,14 @@ const currentPagePosition = (val) => {
       color: '#fff'
     }
   }
+
+  if (val === 'dualScreen') {
+    return {
+      backgroundColor: '#E6A23C',
+      color: '#fff'
+    }
+  }
+
 }
 
 // 点击下载操作指南,先查询一遍最新的。
@@ -195,9 +221,9 @@ onMounted(async () => {
     width: 100%;
 
     div {
-      padding: 5px 20px;
+      padding: 5px;
       border: 1px solid;
-      cursor: default;
+      cursor: pointer;
     }
 
     .download {

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/HuiZhenShenQing.vue

@@ -56,7 +56,7 @@
                  closable
                  v-model="tabs"
                  @tab-remove="tabRemove">
-          <el-tab-pane label="打印会诊详情"
+          <el-tab-pane label="会诊详情"
                        :name="0"
                        style="width: 1123px;height: 500px;overflow: auto">
             <da-ying-hui-zhen ref="daYingHuiZhenRef" :lai-yuan="2"/>

+ 220 - 159
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/EmrMain.vue

@@ -74,172 +74,188 @@
           <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-header>
     <el-container>
-      <el-aside style="background-color: white">
-        <emr-sidebar @nodeClick="nodeClick" ref="emrSidebarRef"
+      <div :class="foldBothSides.isLeft ? 'emr-template-open' : 'emr-template-put-away' ">
+        <emr-sidebar @nodeClick="nodeClick"
+                     @patient-medical-record="foldBothSides.isLeft = true"
+                     v-show="foldBothSides.isLeft"
+                     ref="emrSidebarRef"
                      :max-height="maxHeight"
                      :huan-zhe-xin-xi="props.huanZheXinXi"/>
-      </el-aside>
-      <el-main v-loading="loaded">
-        <el-row>
-          <el-col :span="20">
-            <div style="height: 30px" @mousewheel="mousewheel($event)">
-              <el-scrollbar ref="tootScrollRef" @scroll="scroll">
-                <div class="tool_emr">
-                  <el-select style="width: 150px;"
-                             @change="textStyleFunc.fontFamily()"
-                             v-model="emrStyle.fontFamily">
-                    <el-option v-for="item in availableFonts"
-                               :value="item.font"
-                               :label="item.text">
+      </div>
+      <div class="emr-editor">
+        <div style="height: 30px" @mousewheel="mousewheel($event)">
+          <el-scrollbar ref="tootScrollRef" @scroll="scroll">
+            <div class="tool_emr">
+              <el-select style="width: 150px;"
+                         @change="textStyleFunc.fontFamily()"
+                         v-model="emrStyle.fontFamily">
+                <el-option v-for="item in availableFonts"
+                           :value="item.font"
+                           :label="item.text">
                   <span :style="{'fontFamily':item.font }">
                     {{ item.text }}
                   </span>
-                    </el-option>
-                  </el-select>
-                  <el-select style="width: 70px;"
-                             @change="textStyleFunc.fontSize()"
-                             v-model="emrStyle.fontSize">
-                    <el-option v-for="item in fontSizes"
-                               :value="item.code"
-                               :label="item.name"/>
-                  </el-select>
-                  <el-divider direction="vertical"/>
-                  <el-button-group>
-                    <el-button @click="styleFunc('fontSizeAdjust','increase')"
-                               title="放大字体">
-                      +
-                    </el-button>
-                    <el-button @click="styleFunc('fontSizeAdjust','decrease')"
-                               title="缩小字体">
-                      -
-                    </el-button>
-                  </el-button-group>
-                  <el-divider direction="vertical"/>
-                  <el-button-group>
-                    <el-button
-                        title="字体加粗"
-                        :class="buttonClass('fontWeight','bold')"
-                        @click="textStyleFunc.fontWeight()">
-                      <i class="iconfont icon-jiacu"></i>
-                    </el-button>
-                    <el-button
-                        title="斜体"
-                        :class="buttonClass('fontStyle','oblique')"
-                        @click="textStyleFunc.fontStyle()">
-                      <i class="iconfont icon-xieti"></i>
-                    </el-button>
-                    <el-button
-                        title="下划线"
-                        :class="buttonClass('underline')"
-                        @click="textStyleFunc.underline()">
-                      <i class="iconfont icon-xiahuaxian"></i>
-                    </el-button>
-                    <el-button
-                        title="删除线"
-                        :class="buttonClass('lineThrough')"
-                        @click="textStyleFunc.lineThrough()">
-                      <i class="iconfont icon-shanchuxian"></i>
+                </el-option>
+              </el-select>
+              <el-select style="width: 70px;"
+                         @change="textStyleFunc.fontSize()"
+                         v-model="emrStyle.fontSize">
+                <el-option v-for="item in fontSizes"
+                           :value="item.code"
+                           :label="item.name"/>
+              </el-select>
+              <el-divider direction="vertical"/>
+              <el-button-group>
+                <el-button @click="styleFunc('fontSizeAdjust','increase')"
+                           title="放大字体">
+                  +
+                </el-button>
+                <el-button @click="styleFunc('fontSizeAdjust','decrease')"
+                           title="缩小字体">
+                  -
+                </el-button>
+              </el-button-group>
+              <el-divider direction="vertical"/>
+              <el-button-group>
+                <el-button
+                    title="字体加粗"
+                    :class="buttonClass('fontWeight','bold')"
+                    @click="textStyleFunc.fontWeight()">
+                  <i class="iconfont icon-jiacu"></i>
+                </el-button>
+                <el-button
+                    title="斜体"
+                    :class="buttonClass('fontStyle','oblique')"
+                    @click="textStyleFunc.fontStyle()">
+                  <i class="iconfont icon-xieti"></i>
+                </el-button>
+                <el-button
+                    title="下划线"
+                    :class="buttonClass('underline')"
+                    @click="textStyleFunc.underline()">
+                  <i class="iconfont icon-xiahuaxian"></i>
+                </el-button>
+                <el-button
+                    title="删除线"
+                    :class="buttonClass('lineThrough')"
+                    @click="textStyleFunc.lineThrough()">
+                  <i class="iconfont icon-shanchuxian"></i>
+                </el-button>
+                <el-button
+                    title="上标"
+                    :class="buttonClass('super')"
+                    @click="textStyleFunc.super()">
+                  <i class="iconfont icon-zitishangbiao"></i>
+                </el-button>
+                <el-button
+                    title="下标"
+                    :class="buttonClass('sub')"
+                    @click="textStyleFunc.sub()">
+                  <i class="iconfont icon-zitixiabiao"></i>
+                </el-button>
+              </el-button-group>
+              <div class="color_picker"
+                   title="字体颜色">
+                <i class="iconfont icon-zitiyanse"></i>
+                <el-color-picker v-model="emrStyle.color"
+                                 @change="textStyleFunc.color()"
+                                 :predefine="predefineColors"/>
+              </div>
+              <div class="color_picker"
+                   title="背景颜色">
+                <i class="iconfont icon-beijingyanse"></i>
+                <el-color-picker v-model="emrStyle.backgroundColor"
+                                 @change="textStyleFunc.backgroundColor()"
+                                 :predefine="predefineColors"/>
+              </div>
+              <el-divider direction="vertical"/>
+              <el-button-group>
+                <el-popover
+                    :width="0"
+                    trigger="click">
+                  <template #reference>
+                    <el-button title="无序列表">
+                      <i class="iconfont icon-wuxuliebiao"></i>
                     </el-button>
-                    <el-button
-                        title="上标"
-                        :class="buttonClass('super')"
-                        @click="textStyleFunc.super()">
-                      <i class="iconfont icon-zitishangbiao"></i>
+                  </template>
+                  <emr-unordered-list list-type="disorder" @click-list="textStyleFunc.unorderedList"/>
+                </el-popover>
+                <el-popover
+                    :width="0"
+                    trigger="click">
+                  <template #reference>
+                    <el-button title="有序列表">
+                      <i class="iconfont icon-youxuliebiao"></i>
                     </el-button>
-                    <el-button
-                        title="下标"
-                        :class="buttonClass('sub')"
-                        @click="textStyleFunc.sub()">
-                      <i class="iconfont icon-zitixiabiao"></i>
-                    </el-button>
-                  </el-button-group>
-                  <div class="color_picker"
-                       title="字体颜色">
-                    <i class="iconfont icon-zitiyanse"></i>
-                    <el-color-picker v-model="emrStyle.color"
-                                     @change="textStyleFunc.color()"
-                                     :predefine="predefineColors"/>
-                  </div>
-                  <div class="color_picker"
-                       title="背景颜色">
-                    <i class="iconfont icon-beijingyanse"></i>
-                    <el-color-picker v-model="emrStyle.backgroundColor"
-                                     @change="textStyleFunc.backgroundColor()"
-                                     :predefine="predefineColors"/>
-                  </div>
-                  <el-divider direction="vertical"/>
-                  <el-button-group>
-                    <el-popover
-                        :width="0"
-                        trigger="click">
-                      <template #reference>
-                        <el-button title="无序列表">
-                          <i class="iconfont icon-wuxuliebiao"></i>
-                        </el-button>
-                      </template>
-                      <emr-unordered-list list-type="disorder" @click-list="textStyleFunc.unorderedList"/>
-                    </el-popover>
-                    <el-popover
-                        :width="0"
-                        trigger="click">
-                      <template #reference>
-                        <el-button title="有序列表">
-                          <i class="iconfont icon-youxuliebiao"></i>
-                        </el-button>
-                      </template>
-                      <emr-unordered-list list-type="orderly" @click-list="textStyleFunc.orderedList"/>
-                    </el-popover>
-                  </el-button-group>
-                  <el-divider direction="vertical"/>
-                  <el-button-group>
-                    <el-button title="左对齐"
-                               @click="textStyleFunc.alignment('left')">
-                      <i class="iconfont icon-zuoduiqi"></i>
-                    </el-button>
-                    <el-button title="居中对其"
-                               @click="textStyleFunc.alignment('center')">
-                      <i class="iconfont icon-juzhongduiqi"></i>
-                    </el-button>
-                    <el-button title="右对齐"
-                               @click="textStyleFunc.alignment('right')">
-                      <i class="iconfont icon-youduiqi"></i>
-                    </el-button>
-                    <el-button title="两端对齐"
-                               @click="textStyleFunc.alignment('justify')">
-                      <i class="iconfont icon-zuoyouduiqi"></i>
-                    </el-button>
-                  </el-button-group>
-                  <el-divider direction="vertical"/>
-                  <el-button-group>
-                    <el-button title="增加缩进"
-                               @click="textStyleFunc.indent(1)">
-                      <i class="iconfont icon-yousuojin"></i>
-                    </el-button>
-                    <el-button title="减小缩进"
-                               @click="textStyleFunc.indent(-1)">
-                      <i class="iconfont icon-zuosuojin"></i>
-                    </el-button>
-                  </el-button-group>
-                </div>
-              </el-scrollbar>
-            </div>
-            <div class="emr-iframe">
-              <iframe ref="emrRef"
-                      :height="maxHeight - 100 + 'px' "
-                      :src="caseHistoryUrl"/>
+                  </template>
+                  <emr-unordered-list list-type="orderly" @click-list="textStyleFunc.orderedList"/>
+                </el-popover>
+              </el-button-group>
+              <el-divider direction="vertical"/>
+              <el-button-group>
+                <el-button title="左对齐"
+                           @click="textStyleFunc.alignment('left')">
+                  <i class="iconfont icon-zuoduiqi"></i>
+                </el-button>
+                <el-button title="居中对其"
+                           @click="textStyleFunc.alignment('center')">
+                  <i class="iconfont icon-juzhongduiqi"></i>
+                </el-button>
+                <el-button title="右对齐"
+                           @click="textStyleFunc.alignment('right')">
+                  <i class="iconfont icon-youduiqi"></i>
+                </el-button>
+                <el-button title="两端对齐"
+                           @click="textStyleFunc.alignment('justify')">
+                  <i class="iconfont icon-zuoyouduiqi"></i>
+                </el-button>
+              </el-button-group>
+              <el-divider direction="vertical"/>
+              <el-button-group>
+                <el-button title="增加缩进"
+                           @click="textStyleFunc.indent(1)">
+                  <i class="iconfont icon-yousuojin"></i>
+                </el-button>
+                <el-button title="减小缩进"
+                           @click="textStyleFunc.indent(-1)">
+                  <i class="iconfont icon-zuosuojin"></i>
+                </el-button>
+              </el-button-group>
             </div>
-          </el-col>
-          <el-col :span="4" style="background-color: white">
-            <emr-snippet @node-click="clickSnippet"
-                         ref="emrSnippetRef"
-                         :max-height="maxHeight"
-                         :patientData="patientData"/>
-          </el-col>
-        </el-row>
-      </el-main>
+          </el-scrollbar>
+        </div>
+        <div class="emr-iframe">
+          <iframe ref="emrRef"
+                  :height="maxHeight - 100 + 'px' "
+                  :src="caseHistoryUrl"/>
+        </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>
+
     </el-container>
 
     <xc-dialog-v2 v-model="drgData.dialog" title="DRG预分组" :maximize="true">
@@ -264,8 +280,8 @@ import store from "@/store";
 import {onBeforeRouteLeave} from "vue-router";
 import {getUuid} from "@/api/public-api";
 import {
-  deletePatientEmrByDocumentId,
-  getDrgIntelligentGrouping, getExtractDataElement, insertEmrData,
+  getDrgIntelligentGrouping,
+  getExtractDataElement,
   submitMedicalRecord
 } from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import {useDocumentVisibility} from "@vueuse/core";
@@ -284,6 +300,9 @@ const props = defineProps({
   },
   visitor: {
     type: Boolean
+  },
+  isDualScreen: {
+    type: Boolean
   }
 })
 
@@ -329,6 +348,11 @@ let createId = null;
 // 获取提取到的数据。
 let extractData = {}
 
+let foldBothSides = $ref({
+  isLeft: true,
+  isRight: true,
+})
+
 let emrStyle = $ref({
   // 字体样式
   fontFamily: '"Microsoft YaHei"',
@@ -1087,7 +1111,6 @@ onMounted(() => {
       emrSnippetRef.value.setPatientData(patientData)
     }
     doctorLevelFunc()
-
     emrRef.value.parentElement.emr = currentEmr.value
     window.addEventListener('beforeunload', monitorPageRefresh, {capture: true})
   })
@@ -1111,6 +1134,14 @@ onBeforeRouteLeave((to, from, next) => {
   })
 })
 
+const closeBothSides = () => {
+  foldBothSides.isLeft = false
+  foldBothSides.isRight = false
+}
+
+defineExpose({
+  closeBothSides
+})
 
 </script>
 
@@ -1145,4 +1176,34 @@ onBeforeRouteLeave((to, from, next) => {
 
   background-color: white;
 }
+
+.emr-template-open {
+  width: 215px;
+  background-color: white;
+}
+
+.emr-template-put-away {
+  width: 10px;
+  background-color: white;
+}
+
+.emr-editor {
+  padding: 0 5px;
+  overflow: hidden;
+  display: block;
+  flex: 1;
+  flex-basis: auto;
+  box-sizing: border-box;
+}
+
+.emr-fragment-open {
+  width: 180px;
+  background-color: white;
+}
+
+.emr-fragment-put-away {
+  width: 10px;
+  background-color: white;
+}
+
 </style>

+ 32 - 16
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/Home.vue

@@ -1,21 +1,28 @@
 <template>
   <div ref="headerRef">
-    住院号:
-    <el-input v-model="query.patNo" @keydown.enter="getMaxTimes" style="width: 120px"/>
-    次数 ({{ query.maxTimes }}) :
-    <el-input-number v-model="query.times" @keydown.enter="disPatients"/>
-    <el-button @click="disPatients">出院患者</el-button>
-    <el-button @click="allPatientsInTheHospital">全院患者</el-button>
-    <el-button @click="patientListDrawer = !patientListDrawer">患者列表</el-button>
-    出院天数:{{ dischargeDays }}
-    <span style="color: red">出院七天后就无法编辑患者病历</span>
+    <div v-show="!isDualScreen">
+      住院号:
+      <el-input v-model="query.patNo" @keydown.enter="getMaxTimes" style="width: 120px"/>
+      次数 ({{ query.maxTimes }}) :
+      <el-input-number v-model="query.times" @keydown.enter="disPatients"/>
+      <el-button @click="disPatients">出院患者</el-button>
+      <el-button @click="allPatientsInTheHospital">全院患者</el-button>
+      <el-button @click="patientListDrawer = !patientListDrawer">患者列表</el-button>
+      出院天数:{{ dischargeDays }}
+      <span style="color: red">出院七天后就无法编辑患者病历</span>
+    </div>
   </div>
   <div v-if="show">
     <div ref="divRef">
-      <huan-zhe-xin-xi :huan-zhe-xin-xi="patientInfo" @isShow="patientInfoIsShow"/>
+      <huan-zhe-xin-xi v-show="!isDualScreen"
+                       :huan-zhe-xin-xi="patientInfo"
+                       @isShow="patientInfoIsShow"/>
     </div>
-    <emr-main :huan-zhe-xin-xi="patientInfo"
-              :max-height="maxHeight"/>
+    <emr-main
+        ref="emrMainRef"
+        :huan-zhe-xin-xi="patientInfo"
+        :max-height="maxHeight"
+        :is-dual-screen="isDualScreen"/>
   </div>
   <emr-patient-list @rowClick="listRowClick" v-model="patientListDrawer"/>
 </template>
@@ -38,6 +45,7 @@ import EmrPatientList from "@/components/zhu-yuan-yi-sheng/emr/EmrPatientList.vu
 
 const divRef = ref(null)
 const headerRef = ref(null)
+const emrMainRef = ref(null)
 // 最大高度
 let maxHeight = $ref()
 // 是否显示页面
@@ -46,8 +54,11 @@ let show = $ref(false)
 let patientInfo = $ref({})
 // 距离今天的出院天数
 let dischargeDays = $ref(0)
-//
+// 患者列表 list
 let patientListDrawer = $ref(false)
+// 是否是双屏
+let isDualScreen = $ref(false)
+
 
 // 获取最大住院次数
 const getMaxTimes = () => {
@@ -106,13 +117,11 @@ const queryDisPatient = async () => {
   patientInfo = await getDisPatient(query.value.patNo, query.value.times)
   dischargeDays = subtractTime(await getServerDateApi(), patientInfo.disDate)
   // 如果患者的出院时间大于 7 天就只能看病历和打印病历了
-  emrConfig.value.editor = dischargeDays < 7;
+  emrConfig.value.editor = dischargeDays <= 7;
   // 如果超过了七天就去查看是否有申请编辑
   if (!emrConfig.value.editor) {
     emrConfig.value.editor = await isDisReqEdit(query.value.patNo + '_' + query.value.times)
-    console.log(emrConfig.value.editor)
   }
-
   show = true;
 }
 
@@ -162,7 +171,14 @@ const patientInfoIsShow = (flag, height) => {
 }
 
 onMounted(async () => {
+  await nextTick()
   await routerFunc()
+  //向父项目传值
+  window.parent.postMessage("电子病历加载完成。", "*");
+  window.dualScreenMode = () => {
+    isDualScreen = true
+    emrMainRef.value.closeBothSides()
+  }
 })
 
 

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

@@ -120,11 +120,12 @@ export const emrConfig = ref({
 })
 
 
-export function getEmrUrl(patNo, times) {
+// 默认查询的是全部的患者  state == 1 自己科室的患者
+export function getEmrUrl(patNo, times, state = 3) {
     let query = {
         patNo,
         times,
-        state: 3,
+        state: state,
         maxTimes: 1
     }
     let temp = JSON.stringify(query)

+ 7 - 7
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianChaShenQing.vue

@@ -1,19 +1,19 @@
 <template>
-  <el-container>
+  <el-container style="width: 1400px;">
     <el-header style="height: 30px">
-      检查名称:
+      名称:
       <el-autocomplete v-model="orderName" :fetch-suggestions="querySearchAsync" clearable style="width: 120px"
                        @keyup.enter="dianJiChaXunHuanZheJianCha(0)"></el-autocomplete>
-      申请时间:
+
       <el-date-picker
           v-model="dateRange"
           :shortcuts="shortcuts"
-          end-placeholder="结束日期"
+          end-placeholder="申请结束"
           placeholder="选择日期"
           range-separator="至"
           size="small"
-          start-placeholder="开始日期"
-          style="width: 280px"
+          start-placeholder="申请开始"
+          style="width: 220px"
           type="daterange"/>
       <el-button icon="Search" type="primary" @click="dianJiChaXunHuanZheJianCha(0)">查询</el-button>
       <el-divider direction="vertical"></el-divider>
@@ -21,7 +21,7 @@
       <el-button icon="Check" type="primary" @click="saveTemplate"
                  :disabled="addCheckList.length ===0">存为模板
       </el-button>
-      搜索检查
+      搜索:
       <xc-combo-grid :query-data-func="getJcItem" @rowClick="searchAdd">
         <el-table-column label="编码" prop="code"/>
         <el-table-column width="240" label="名称" prop="name"/>

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianYanShenQing.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-container>
+  <el-container style="width: max-content">
     <el-header style="height: 30px">
       检验名称:
       <el-autocomplete

+ 7 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js

@@ -6,7 +6,6 @@ import {BizException, ExceptionEnum} from "@/utils/BizException";
 import {ref} from "vue";
 import {getServerDateApi} from "@/api/public-api";
 import {getFormatDatetime} from "@/utils/date";
-import {huoQuXiangMu} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 
 // 患者信息
 export const huanZheXinXi = ref({})
@@ -296,6 +295,11 @@ export const drugManual = ref({
     }
 })
 
+export const isOpenDualScreen = ref(false)
+// 双屏模式的 src
+export const dualScreenSrc = ref('')
+
+
 export let tableHeader = [
     {label: '编码', prop: 'orderCode'},
     {label: '名称', prop: 'orderName', width: 220},
@@ -315,3 +319,5 @@ export let tableHeader = [
 ]
 
 
+
+

+ 14 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -21,6 +21,7 @@
       <button @click="confirmAssociationClick">关联</button>
       <button @click="openRationalDrugUse">合理用药</button>
       <button @click="allergen.open()">患者过敏原信息维护</button>
+      <button @click="openDualScreen">双屏模式</button>
     </div>
     <yz-editor :patient-info="huanZheXinXi"
                ref="yzEditorRef"
@@ -61,6 +62,8 @@
     <AllergenEntry v-if="allergen.dialog"
                    :pat-no="huanZheXinXi.inpatientNo"
                    @close="allergen.dialog = false"/>
+
+    <order-progress ref="orderProgressRef"/>
   </div>
 
 </template>
@@ -82,7 +85,7 @@ import {
   clickOnThePatient,
   drugManual,
   associateOrders,
-  clearAssociate, youWuXuanZheHuanZhe
+  clearAssociate, youWuXuanZheHuanZhe, isOpenDualScreen, dualScreenSrc
 } from '../public-js/zhu-yuan-yi-sheng'
 import store from '@/store'
 import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
@@ -102,6 +105,8 @@ import XcDialog from "@/components/xiao-chan/dialog/XcDialog";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
 import YaoPingXiangQing from "@/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue";
 import AllergenEntry from "@/components/zhu-yuan-yi-sheng/AllergenEntry.vue";
+import OrderProgress from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/OrderProgress.vue";
+import {getEmrUrl} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -121,6 +126,8 @@ let allergen = $ref({
 
 // 医嘱查询
 const yzQueryRef = ref(null)
+// 医嘱进度
+const orderProgressRef = ref(null)
 
 // 医嘱编辑
 const yzEditorRef = ref(null)
@@ -163,6 +170,7 @@ const openRationalDrugUse = () => {
 // 表格
 let tableRef = ref(null)
 const rowClick = (val) => {
+  orderProgressRef.value.fillOrder(val)
   if (associateOrders.value.actOrderNo) {
     let index = associateOrders.value.associatedGroup.indexOf(val.actOrderNo)
     if (associateOrders.value.actOrderNo === val.actOrderNo) {
@@ -393,10 +401,13 @@ const confirmAssociationClick = () => {
       yzQueryRef.value.queryYz()
     })
   }).catch(() => {
-
   })
+}
 
-
+const openDualScreen = () => {
+  if (youWuXuanZheHuanZhe()) return
+  isOpenDualScreen.value = !isOpenDualScreen.value
+  dualScreenSrc.value = getEmrUrl(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes, 1)
 }
 
 watch(() => router.currentRoute.value, () => {