소스 검색

优化电子病历

DESKTOP-0GD05B0\Administrator 2 년 전
부모
커밋
f3cc6a8f9d

+ 24 - 14
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrHerbs.vue

@@ -46,7 +46,8 @@
       </el-table>
       <template #footer>
         <el-button type="danger" @click="xiangQing.dialog = false">关闭</el-button>
-        <el-button @click="copyClick" type="success">复制</el-button>
+        <el-button @click="copyClick" type="success">复制选中</el-button>
+        <el-button @click="copyAllClick" type="success">复制全部</el-button>
       </template>
     </el-dialog>
     <el-table :data="caoYaoShuJu.data"
@@ -155,27 +156,36 @@ const handleCurrentChange = (val) => {
 
 const tableRef = ref(null)
 
+const copyFunc = (data) => {
+  let str = ''
+  let v = xiangQing.value.yizhu
+  let length = data.length
+  data.forEach((item, index) => {
+    str += item.chargeCodeName + item.quantity + 'g'
+    if (length !== index + 1) {
+      str += '  '
+    }
+  })
+  str += '。'
+  str += v.cyJssm + ',' + '日' + v.cyMtjs + '剂' + ',分' + v.cyFfcs + '次' + ',' + v.cyFysmName + '。'
+  emrCopyFunc(str)
+  emits('close')
+}
+
 const copyClick = () => {
   let temp = tableRef.value.getSelectionRows()
   if (listIsBlank(temp)) {
     xcMessage.error('请选择数据。')
   } else {
-    let str = ''
-    let v = xiangQing.value.yizhu
-    let length = temp.length
-    temp.forEach((item, index) => {
-      str += item.chargeCodeName + item.quantity + 'g'
-      if (length !== index + 1) {
-        str += '  '
-      }
-    })
-    str += '。'
-    str += v.cyJssm + ',' + '日' + v.cyMtjs + '剂' + ',分' + v.cyFfcs + '次' + ',' + v.cyFysmName + '。'
-    emrCopyFunc(str)
-    emits('close')
+    copyFunc(temp)
   }
 }
 
+
+const copyAllClick = () => {
+  copyFunc(xiangQing.value.data)
+}
+
 onMounted(() => {
   dianJiChaXunYiZhu(0)
 })

+ 1 - 2
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrTest.vue

@@ -135,9 +135,8 @@ import {onMounted, ref} from "vue";
 import XcTableV3 from "@/components/xiao-chan/xc-table-v3/XcTableV3.vue";
 import {XcColumn} from "@/components/xiao-chan/xc-table-v3/XcColumn";
 import {xcMessage} from '@/utils/xiaochan-element-plus'
-import TestDescribe from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/test-describe.vue";
+import TestDescribe from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/TestDescribe.vue";
 import {getDateRangeFormatDate} from '@/utils/date'
-import {getCriticalValueByPatInfo} from '@/api/zhu-yuan-yi-sheng/critical-value'
 
 const emits = defineEmits(['close'])
 const sidebarList = ref()

+ 0 - 0
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/test-describe.vue → src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/TestDescribe.vue


+ 0 - 1
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/emr-tools-store.ts

@@ -1,4 +1,3 @@
 import {ref} from 'vue'
 
 export const patInfo = ref()
-export const emrData = ref()

+ 4 - 1
src/components/zhu-yuan-yi-sheng/emr/web-socket/EmrWebSocket.vue

@@ -12,7 +12,8 @@
       ref="dialogRef"
       :current-editor-user="props.currentEditorUser"
       @closed="dialog = false"
-      :user-list="userList" :sid="sid"/>
+      :user-list="userList"
+      :sid="sid"/>
 
 
   <el-dialog v-model="errDialog" title="与服务器断开连接"
@@ -186,6 +187,7 @@ const documentChange = (id) => {
 }
 
 const initDocumentSocket = () => {
+  if (documentSid == null) return
   let temp = SOCKET_URL + documentSid
 
   documentSocket = new WebSocket(temp)
@@ -204,6 +206,7 @@ const clearDocument = () => {
   if (documentSocket != null) {
     documentSocket.close()
     documentSocket = null
+    documentSid = null
   }
 }
 

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

@@ -87,9 +87,9 @@ let pathList = $ref([
           state: 1
         };
         let te = JSON.stringify(query)
-        window.open(window.location.origin + '/myEmrEditor/' + window.btoa(te), '_blank');
+        window.open(window.location.origin + '/myEmrEditor/' + window.btoa(te) + '/refresh', '_blank');
       } else {
-        window.open(window.location.origin + '/myEmrEditor/', '_blank');
+        window.open(window.location.origin + '/myEmrEditor/refresh', '_blank');
       }
     }
   },

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

@@ -1572,13 +1572,18 @@ const closeWebSocket = () => {
   emrSocket.value.clearSocket()
 }
 
+const changeClear = () => {
+  isEditorChange = false
+}
+
 defineExpose({
   closeBothSides,
   headerRef,
   headerRefOld,
   turnOnConciseMode,
   exitConciseMode,
-  closeWebSocket
+  closeWebSocket,
+  changeClear
 })
 
 </script>

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

@@ -228,9 +228,11 @@ const openOrCloseMode = (val) => {
 const channel = new BroadcastChannel('login-channel');
 channel.addEventListener('message', (event) => {
   if (navigator.userAgent.indexOf("Firefox") !== -1 || navigator.userAgent.indexOf("Chrome") !== -1) {
+    emrMainRef.value.changeClear()
     window.location.href = "about:blank";
     window.close();
   } else {
+    emrMainRef.value.changeClear()
     window.opener = null;
     window.open("", "_self");
     window.close();

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

@@ -115,7 +115,7 @@ export function getEmrUrl(patNo, times, state = 3) {
         patNo, times, state: state, maxTimes: 1
     }
     let temp = JSON.stringify(query)
-    return window.location.origin + '/myEmrEditor/' + window.btoa(temp)
+    return window.location.origin + '/myEmrEditor/' + window.btoa(temp) + '/refresh'
 }
 
 /**
@@ -129,7 +129,7 @@ export function getInEmrUrl(patNo, times) {
         patNo, times, state: 2, maxTimes: 1
     }
     let temp = JSON.stringify(query)
-    return window.location.origin + '/myEmrEditor/' + window.btoa(temp)
+    return window.location.origin + '/myEmrEditor/' + window.btoa(temp) + '/refresh'
 }
 
 let EMR_COPY = 'emrCopy'
@@ -175,7 +175,7 @@ export const emrClipBoardData = (val) => {
     }
 }
 
-export function emrCopyFunc(str){
+export function emrCopyFunc(str) {
     let copyData = {
         content: [{type: 'text', str}],
         plainText: str,