Ver código fonte

电子病历

DESKTOP-0GD05B0\Administrator 2 anos atrás
pai
commit
a7c72f5c36

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

@@ -86,7 +86,7 @@ let categoryCode = $ref('')
 // 文档 id 唯一值
 let documentId = $ref('')
 let patientId = $ref('')
-let categroyId = $ref('')
+let categoryId = $ref('')
 let templateName = $ref('')
 let caseHistoryUrl = $ref('')
 let openAssistant = $ref({
@@ -137,13 +137,14 @@ const clickSaveData = async () => {
   }).then(({value}) => {
     data.name = value
     currentEmr.value.saveDocument(data, async () => {
-
       isEditorChange = false
       emrSidebarRef.value.queryData()
-      updateCaseHistoryUrl({
-        emrDocumentId: '',
-        code: '',
-        emrCategoryCode: '',
+      emptyEditor()
+      await updateCaseHistoryUrl({
+        documentId: data.emrDocumentId,
+        categoryCode: categoryCode,
+        name: templateName,
+        categoryId: categoryId
       })
     }, (err) => {
       documentId = err
@@ -193,7 +194,7 @@ const clickDelete = () => {
   }).then(() => {
     currentEmr.value.deleteDocument(documentId, function () {
       emrSidebarRef.value.queryData()
-      updateCaseHistoryUrl({})
+      emptyEditor()
     });
   }).catch(() => {
 
@@ -211,7 +212,7 @@ const whetherThereIsAMedicalRecordId = () => {
  */
 const resetData = () => {
   checkEmrChange(() => {
-    updateCaseHistoryUrl({})
+    emptyEditor()
     emrSidebarRef.value.queryHistory(tempTimes);
   })
 }
@@ -262,9 +263,18 @@ const updateCaseHistoryUrl = async (val) => {
   documentId = val.documentId;
   categoryCode = val.categoryCode
   templateName = val.name
-  categroyId = val.categoryId
+  categoryId = val.categoryId
   await queryingBasicPatientInformation()
-  caseHistoryUrl = `/emr/runtime/?documentId=${documentId}&categoryCode=${categoryCode}&categoryId=${categroyId}&patientId=${patientId}#/`
+  caseHistoryUrl = `/emr/runtime/?documentId=${documentId}&categoryCode=${categoryCode}&categoryId=${categoryId}&patientId=${patientId}#/`
+}
+
+const emptyEditor = () => {
+  isEditorChange = false
+  documentId = ''
+  categoryCode = ''
+  templateName = ''
+  categoryId = ''
+  caseHistoryUrl = `/emr/runtime/#/editor`
 }
 
 /**
@@ -286,7 +296,7 @@ const positioningTime = (val, code) => {
 const monitorPageRefresh = (event) => {
   if (isEditorChange) {
     event.preventDefault();
-    return event.returnValue = "是否确实要退出?还有为保存的数据";
+    return event.returnValue = "是否确实要退出?还有未保存的数据。";
   }
 }
 
@@ -480,6 +490,7 @@ onMounted(() => {
   nextTick(async () => {
     emrSidebarRef.value.queryData()
     patientId = props.huanZheXinXi.inpatientNo
+    await queryingBasicPatientInformation()
     currentEmr.value = new EMRInteractive(patientData, emrEvent);
     emrSnippetRef.value.setPatientData(patientData)
     emrRef.value.parentElement.emr = currentEmr.value

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

@@ -126,7 +126,8 @@ export function EMRInteractive(data, editorEvent) {
     this.printDocument = (showPreview, docs = null) => {
         this.editor && this.editor.execute("print", {
             value: {
-                showPreview
+                showPreview: true,
+                mode: 'backend'
             }
         })
     };