Yansen 2 年前
父节点
当前提交
4777debbe0
共有 2 个文件被更改,包括 54 次插入74 次删除
  1. 4
    2
      src/App.jsx
  2. 50
    72
      src/routes/routes.jsx

+ 4
- 2
src/App.jsx 查看文件

1
 import React from 'react';
1
 import React from 'react';
2
 import 'dayjs/locale/zh-cn';
2
 import 'dayjs/locale/zh-cn';
3
 import locale from 'antd/locale/zh_CN';
3
 import locale from 'antd/locale/zh_CN';
4
-import { ConfigProvider } from 'antd';
4
+import { ConfigProvider, App } from 'antd';
5
 import Router from './routes/Router'
5
 import Router from './routes/Router'
6
 import { useModel } from './store';
6
 import { useModel } from './store';
7
 
7
 
14
 
14
 
15
   return (
15
   return (
16
     <ConfigProvider locale={locale} theme={theme}>
16
     <ConfigProvider locale={locale} theme={theme}>
17
-      <Router />
17
+      <App>
18
+        <Router />
19
+      </App>
18
     </ConfigProvider>
20
     </ConfigProvider>
19
   );
21
   );
20
 }
22
 }

+ 50
- 72
src/routes/routes.jsx 查看文件

48
 
48
 
49
 export const authRoutes = [
49
 export const authRoutes = [
50
   {
50
   {
51
-    path: 'index',
52
-    element: <Index />,
51
+    path: "check",
52
+    element: <CheckList />,
53
+    meta: {
54
+      title: '模拟测评',
55
+      icon: <ProjectOutlined />,
56
+    }
53
   },
57
   },
54
   {
58
   {
55
-    path: "check",
59
+    path: "comm",
56
     element: <Outlet />,
60
     element: <Outlet />,
57
     meta: {
61
     meta: {
58
-      title: '模拟测评',
62
+      title: '基础字典',
59
       icon: <ProjectOutlined />,
63
       icon: <ProjectOutlined />,
60
       menuType: 'group',
64
       menuType: 'group',
61
       // permission: 'form',
65
       // permission: 'form',
62
     },
66
     },
63
     children: [
67
     children: [
68
+      
64
       {
69
       {
65
-        index: true,
66
-        element: <CheckList />,
70
+        path: "locType/list",
71
+        element: <LocTypeList />,
72
+        meta: {
73
+          title: '点位分类',
74
+          // icon: <AppstoreOutlined />,
75
+          // permission: 'form',
76
+        },
67
       },
77
       },
68
       {
78
       {
69
-        path: "list",
70
-        element: <CheckList />,
79
+        path: "locType/edit",
80
+        element: <LocTypeEdit />,
71
         meta: {
81
         meta: {
72
-          title: '测评列表',
73
-        }
82
+          hideInMenu: true,
83
+          title: '点位分类编辑',
84
+          // icon: <AppstoreOutlined />,
85
+          // permission: 'form',
86
+        },
74
       },
87
       },
88
+
75
       {
89
       {
76
-        path: "edit",
77
-        element: <CheckEdit />,
90
+        path: "issueType/list",
91
+        element: <IssueTypeList />,
78
         meta: {
92
         meta: {
79
-          title: '测评维护',
80
-        }
81
-      }
93
+          title: '问题分类',
94
+          // icon: <AppstoreOutlined />,
95
+          // permission: 'form',
96
+        },
97
+      },
98
+      {
99
+        path: "issueType/edit",
100
+        element: <IssueTypeEdit />,
101
+        meta: {
102
+          hideInMenu: true,
103
+          title: '问题分类编辑',
104
+          // icon: <AppstoreOutlined />,
105
+          // permission: 'form',
106
+        },
107
+      },
108
+      {
109
+        path: "question/list",
110
+        element: <QuestionList />,
111
+        meta: {
112
+          title: '点位问题',
113
+          // icon: <AppstoreOutlined />,
114
+          // permission: 'form',
115
+        },
116
+      },
82
     ]
117
     ]
83
   },
118
   },
84
   {
119
   {
147
           // permission: 'form',
182
           // permission: 'form',
148
         },
183
         },
149
       },
184
       },
150
-      {
151
-        path: "locType/list",
152
-        element: <LocTypeList />,
153
-        meta: {
154
-          title: '点位分类',
155
-          // icon: <AppstoreOutlined />,
156
-          // permission: 'form',
157
-        },
158
-      },
159
-      {
160
-        path: "locType/edit",
161
-        element: <LocTypeEdit />,
162
-        meta: {
163
-          hideInMenu: true,
164
-          title: '点位分类编辑',
165
-          // icon: <AppstoreOutlined />,
166
-          // permission: 'form',
167
-        },
168
-      },
169
-
170
-      {
171
-        path: "issueType/list",
172
-        element: <IssueTypeList />,
173
-        meta: {
174
-          title: '问题分类',
175
-          // icon: <AppstoreOutlined />,
176
-          // permission: 'form',
177
-        },
178
-      },
179
-      {
180
-        path: "issueType/edit",
181
-        element: <IssueTypeEdit />,
182
-        meta: {
183
-          hideInMenu: true,
184
-          title: '问题分类编辑',
185
-          // icon: <AppstoreOutlined />,
186
-          // permission: 'form',
187
-        },
188
-      },
189
-      {
190
-        path: "question/list",
191
-        element: <QuestionList />,
192
-        meta: {
193
-          title: '点位问题',
194
-          // icon: <AppstoreOutlined />,
195
-          // permission: 'form',
196
-        },
197
-      },
198
-
199
     ]
185
     ]
200
   },
186
   },
201
 
187
 
228
         index: true,
214
         index: true,
229
         element: <Home />,
215
         element: <Home />,
230
       },
216
       },
231
-      {
232
-        path: "home",
233
-        element: <Home />,
234
-        meta: {
235
-          title: '首页',
236
-          icon: <DesktopOutlined />,
237
-        },
238
-      },
239
       {
217
       {
240
         path: '*',
218
         path: '*',
241
         element: <Page404 />
219
         element: <Page404 />