Explorar el Código

优化和新增电子病历操作

xiaochan hace 2 años
padre
commit
6755933f43

+ 1 - 1
src/components/query-components/XcPageTable.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import {defineProps, defineEmits, computed, h, onMounted} from 'vue'
+import {computed, h, onMounted} from 'vue'
 import {componentType} from "./page-help-type";
 import {useVModels} from "@vueuse/core";
 import * as el from 'element-plus'

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

@@ -322,6 +322,8 @@ import {ref, onMounted, nextTick, watch, computed} from 'vue'
 import {useCompRef} from "@/utils/useCompRef";
 import {ElInput} from "element-plus";
 import {appStore} from "@/utils/store-public";
+import emrEditorMounted
+  from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-editor-mounted";
 
 const props = defineProps({
   huanZheXinXi: {
@@ -440,6 +442,11 @@ const emrEvent = {
     if (!isCourse()) {
       openTheTraceByUser(createId);
     }
+    // 不是只读就触发
+    if (editor.getEditorMode() !== 'readonly') {
+      emrEditorMounted(categoryCode.value, editor, patientData.value)
+    }
+
   },
 
   'contentchange': (e, op) => {

+ 31 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-editor-mounted.ts

@@ -0,0 +1,31 @@
+const emrEditorMounted = (code: string, editor: any, patInfo: any) => {
+    if (!editorFunc[code]) return
+    try {
+        editorFunc[code](editor, patInfo)
+    } catch (e) {
+        console.error('emrEditorMounted 出错', e)
+    }
+}
+
+interface EditorFunc {
+    [key: string]: (editor: any, patInfo: any) => void
+}
+
+const editorFunc: EditorFunc = {
+    "9dc6fa005e4911edbb0eab416e27b81a": (editor, patInfo) => {
+        let component = editor.getNodes('费用表格')[0].target
+        component.setValue([
+            {
+                dataIndex: '乙类药品',
+                value: [
+                    ['', '测试1', '123', '', '10%', '', ''],
+                    ['', '测试2', '123', '', '10%', '', ''],
+                    ['', '测试3', '123', '', '10%', '', ''],
+                    ['', '测试4', '123', '', '10%', '', ''],
+                ]
+            }
+        ])
+    }
+}
+
+export default emrEditorMounted

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/table/CopyTableDataOrder.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import {defineEmits, defineProps, onMounted, ref} from 'vue'
+import {onMounted, ref} from 'vue'
 import {useVModels} from "@vueuse/core";
 import {
   huanZheXinXi,

+ 1 - 1
src/views/utilities/page-editor-help/components/PageHelpColumns.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import {defineProps, defineEmits, ref, onMounted, watch, computed, nextTick} from 'vue'
+import {ref, onMounted, watch, computed, nextTick} from 'vue'
 import {componentType} from "@/components/query-components/page-help-type";
 import {useVModels, useWindowSize} from "@vueuse/core";
 import XcElOption from "@/components/xiao-chan/xc-el-option/XcElOption.vue";

+ 1 - 1
src/views/utilities/page-editor-help/components/PageHelpTable.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import {defineProps, defineEmits, ref, onMounted} from 'vue'
+import {ref, onMounted} from 'vue'
 import {componentType} from "@/components/query-components/page-help-type";
 import {useVModels} from "@vueuse/core";
 import * as monaco from "monaco-editor";