xiaochan преди 1 година
родител
ревизия
98ce7a9ba1

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

@@ -517,26 +517,24 @@ const emrEvent = {
       }
     }
 
-    if (stringIsBlank(createId) || createId === userInfoStore.value.code) {
-      editor.setApplicationContext({
-        endpoints: {
-          app: "/bdp/dataservice/api",
-          his: import.meta.env.VITE_BASE_URL,
-        },
-        input: {
-          user: userInfoStore.value.code,
+    editor.setApplicationContext({
+      endpoints: {
+        app: "/bdp/dataservice/api",
+        his: import.meta.env.VITE_BASE_URL,
+      },
+      input: {
+        user: userInfoStore.value.code,
+        name: userInfoStore.value.name
+      },
+      login: {
+        token: userInfoStore.value.token,
+        user: {
+          id: userInfoStore.value.code,
           name: userInfoStore.value.name
-        },
-        login: {
-          token: userInfoStore.value.token,
-          user: {
-            id: userInfoStore.value.code,
-            name: userInfoStore.value.name
-          }
-        },
-        data: patientData.value
-      }, true)
-    }
+        }
+      },
+      data: (stringIsBlank(createId) || createId === userInfoStore.value.code) ? patientData.value : {}
+    }, true)
   },
   'contentchange': (e, op) => {
     if (op.batch.type === 'persist') return
@@ -1269,7 +1267,6 @@ const reQueryPatientInformation = () => {
   if (readonlyPattern()) return;
   // 如果病历是空的 且创建人不是自己不触发
   if (stringIsBlank(createId) || createId !== userInfoStore.value.code) return;
-
   // 如果没有文档 id 就说明是新建的,extractData如果是空就不用调用,不然他会使用 getAppContext 里面的数据
   if (getId() && extractData.value) {
     editor.setValues(extractData.value, true, true)
@@ -1753,7 +1750,6 @@ const hisSaveEmrInit = () => {
 }
 
 
-
 let hisSaveEmr: UseEmrInitReturn = {}
 
 onMounted(async () => {

+ 1 - 1
src/views/settings/permissions/UserRoleSettings.vue

@@ -135,7 +135,7 @@ import PageLayer from "@/layout/PageLayer";
 const windowSize = store.state.app.windowSize
 const tableHeight = windowSize.h - 10
 
-const competence = needRule(1)
+const competence = needRule(1, 62)
 
 const depts = ref([])
 const users = ref([])