DESKTOP-0GD05B0\Administrator il y a 2 ans
Parent
commit
79a2614ba8

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

@@ -518,8 +518,6 @@ const emrEvent = {
     doctorLevelFunc()
     // 设置 编辑器的模式
     setEditorModeFun()
-    console.log(editor.getEditorMode())
-
     // 设置病程记录中的跳转锚点
     await courseSegmentLocking()
     // 设置病程记录跳转
@@ -536,9 +534,6 @@ const emrEvent = {
     reQueryPatientInformation()
     // 每一个病历只能一个人编辑
     await editJudgment()
-    console.log(editor.getEditorMode())
-
-
   },
 
   'contentchange': (e, op) => {
@@ -1036,7 +1031,10 @@ const courseSegmentLocking = async () => {
         if (emrConfig.value.editor) {
           let editorCode = values['编辑者']?.value[0]?.code;
           if (editorCode) {
-            if (doctorLevel === 1) {
+            if (editorCode === loginUserCode) {
+              node.view.setReadonly(false);
+              node.view.setDeletable(true);
+            } else if (doctorLevel === 1) {
               if (editorCode !== loginUserCode) {
                 node.view.setReadonly(true);
                 node.view.setDeletable(false);
@@ -1044,8 +1042,7 @@ const courseSegmentLocking = async () => {
                 node.view.setReadonly(false);
                 node.view.setDeletable(true);
               }
-            }
-            if (doctorLevel === 2) {
+            } else if (doctorLevel === 2) {
               if (editorCode === extractFields('主任医生编码')) {
                 node.view.setReadonly(true);
                 node.view.setDeletable(false);
@@ -1053,8 +1050,7 @@ const courseSegmentLocking = async () => {
                 node.view.setReadonly(false);
                 node.view.setDeletable(true);
               }
-            }
-            if (doctorLevel === 3) {
+            } else if (doctorLevel === 3) {
               node.view.setReadonly(false);
               node.view.setDeletable(true);
             }