Browse Source

菜单路径修改

xujunjie 1 year ago
parent
commit
ca8aea120c

+ 1 - 0
.umirc.ts

@@ -1,6 +1,7 @@
 import { defineConfig } from '@umijs/max';
 
 export default defineConfig({
+  hash: true,
   antd: {},
   access: {},
   model: {},

+ 3 - 3
src/pages/EqSelfInspection/List/models/patrolRecord.js

@@ -102,11 +102,11 @@ export default {
       // }
     },
     *queryProcessSection({ payload }, { call, put }) {
-      const list = yield call(queryProcessSection, payload);
-      if (list) {
+      const res = yield call(queryProcessSection, payload);
+      if (res) {
         yield put({
           type: 'save',
-          payload: { processList: list },
+          payload: { processList: res.data },
         });
       }
     },

+ 1 - 1
src/pages/EqSelfInspection/index.js

@@ -122,7 +122,7 @@ const EqSelfInspection = (props) => {
                 style={{ cursor: 'pointer', marginRight: 20 }}
                 onClick={() => {
                   history.push(
-                    `/elf-ins-statistics/patrol-route/${projectId}/1/reocrd?JWT-TOKEN=${GetTokenFromUrl()}&isNew=${1}`,
+                    `/self-inspection/list/${projectId}`,
                   );
                 }}
               />

+ 3 - 1
src/pages/Menu/index.js

@@ -1,6 +1,7 @@
 import { useParams } from '@umijs/max';
 import { useState } from 'react';
 import styles from './index.less';
+import { UnityAction } from '@/utils/utils';
 
 const menuList = [
   {
@@ -21,7 +22,7 @@ const menuList = [
   },
   {
     name: '安全管理',
-    path: (projectId) => ``,
+    path: (projectId) => `/safety/${projectId}`,
   },
   {
     name: '任务管理',
@@ -44,6 +45,7 @@ function Menu() {
     const path = item?.path(projectId);
     // history.push(path);
     console.log(path);
+    UnityAction.sendMsg("menuItem", item.name)
   };
 
   return (