xiaochan 8 kuukautta sitten
vanhempi
commit
9ce07865e4

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

@@ -136,7 +136,7 @@ import {
   showIframe,
   showIframeIsList,
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
-import { ElMessage, ElNotification } from "element-plus";
+import { ElButton, ElMessage, ElNotification } from "element-plus";
 import { BizException, ExceptionEnum } from "@/utils/BizException";
 import { onBeforeRouteLeave } from "vue-router";
 import { getServerDateApi, getUuid } from "@/api/public-api";

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/emr-right/EmrOutline.vue

@@ -38,7 +38,7 @@ function changeElementById(id: string) {
   currentId.value = id;
   const element = document.getElementById(id);
   if (!isContain(element)) {
-    element.scrollIntoView({
+    element?.scrollIntoView?.({
       block: "center",
       inline: "nearest",
       behavior: "smooth",

+ 2 - 14
src/views/settings/permissions/RoleMenuSettings.vue

@@ -48,6 +48,7 @@
             <el-tree
               :data="reportForms"
               show-checkbox
+              default-expand-all
               node-key="id"
               ref="reportFormsTree"
               :style="{
@@ -107,20 +108,7 @@ const handleClickRole = row => {
     tree.value.setCheckedKeys(res);
   });
   getPermissionsByUserCode(row.id).then(res => {
-    const tmpData = [];
-
-    for (let key in reportFormsTree.value.store.nodesMap) {
-      reportFormsTree.value.store.nodesMap[key].expanded = res.includes(key);
-      const has = reportFormsTree.value.store.nodesMap[key].expanded;
-
-      if (has) {
-        const data = reportFormsTree.value.store.nodesMap[key];
-        if (data.childNodes.length === 0) {
-          tmpData.push(key);
-        }
-      }
-    }
-    reportFormsTree.value.setCheckedKeys(tmpData);
+    reportFormsTree.value.setCheckedKeys(res);
   });
 };