Przeglądaj źródła

菜单bug解决

cz 1 rok temu
rodzic
commit
eea50510fa

+ 11 - 17
src/components/headerBar/header-bar.vue

@@ -668,24 +668,18 @@ onMounted(() => {
         isCommonsBanner: false,
       };
     });
-    sidebarRoutersCopy.value = proxy.handleTree(res.data, "menuId");
-    if (sidebarRoutersCopy.value && sidebarRoutersCopy.value.length > 0) {
-      // openLeftBaner(sidebarRoutersCopy.value[0], 0);
-    }
-    //循环删除 i.status != 0 || i.visible != 0 的元素
-    sidebarRoutersCopy.value.map((item) => {
-      if (item.children) {
-        item.children.map((j) => {
-          if (j.children) {
-            j.children.map((n) => {
-              if (n.status != 0 || n.visible != 0 || n.type != 1) {
-                j.children.splice(j.children.indexOf(n), 1);
-              }
-            });
-          }
-        });
+
+    let newArr = [];
+    for (let i = 0; i < res.data.length; i++) {
+      const menu = res.data[i];
+      if (menu.status == "0" && menu.visible == "0" && menu.type == 1) {
+        newArr.push(menu);
       }
-    });
+    }
+    sidebarRoutersCopy.value = proxy.handleTree(newArr, "menuId");
+    // if (sidebarRoutersCopy.value && sidebarRoutersCopy.value.length > 0) {
+    // openLeftBaner(sidebarRoutersCopy.value[0], 0);
+    // }
   });
   getCollectData();
   proxy.get("/statistics/workStatistics").then((res) => {

+ 10 - 0
src/router/index.js

@@ -82,6 +82,16 @@ export const constantRoutes = [{
         },
       },
       {
+        path: "/process/processConfig/processChart",
+        component: () => import("@/views/process/processConfig/processChart.vue"),
+        name: "ProcessChart",
+        meta: {
+          title: "流程配置图",
+          icon: "dashboard",
+          affix: false
+        },
+      },
+      {
         path: "/sampleDetails",
         component: () => import("@/components/contractCom/contractDetailsOne.vue"),
         name: "sampleDetails",

+ 5 - 3
src/views/process/processConfig/index.vue

@@ -13,9 +13,10 @@
 					{
 						text: '添加流程',
 						action: () => openModal('add'),
-						disabled: !sourceList.pagination.tenantId,
+					
 					},
 				]" @get-list="getList">
+        <!-- disabled: !sourceList.pagination.tenantId, -->
         <template #slotName="{ item }">
           {{ item.createTime }}
         </template>
@@ -69,6 +70,7 @@ const sourceList = ref({
     total: 3,
     pageNum: 1,
     pageSize: 10,
+    tenantId: "000000",
   },
 });
 let dialogVisible = ref(false);
@@ -305,7 +307,7 @@ const submitForm = () => {
     proxy
       .post("/flowDefinition/" + modalType.value, {
         ...formData.data,
-        tenantId: sourceList.value.pagination.tenantId,
+        tenantId: "000000",
       })
       .then((res) => {
         ElMessage({
@@ -329,7 +331,7 @@ const getDtl = (row) => {
   formData.data = { ...row };
 
   router.push({
-    path: "processChart",
+    name: "ProcessChart",
     query: {
       id: row.id,
       flowInfoId: row.flowInfoId,