|
@@ -6,38 +6,39 @@ import {
|
6
|
6
|
MenuFoldOutlined,
|
7
|
7
|
MenuUnfoldOutlined,
|
8
|
8
|
PieChartOutlined,
|
9
|
|
-} from '@ant-design/icons';
|
10
|
|
-import { Navigate } from 'react-router-dom';
|
11
|
|
-import AuthLayout from '@/layouts/AuthLayout';
|
12
|
|
-import Container from '@/layouts/Container';
|
13
|
|
-import Login from '@/pages/login';
|
14
|
|
-import Page404 from '@/pages/404';
|
15
|
|
-import Home from '@/pages/sample/home';
|
16
|
|
-import BasicForm from '@/pages/sample/form';
|
17
|
|
-import BasicTable from '@/pages/sample/table';
|
18
|
|
-import GuaranteeTaskList from '@/pages/guaranteeTask';
|
19
|
|
-import GuaranteeTaskEdit from '@/pages/guaranteeTask/Edit';
|
20
|
|
-import GuaranteeTaskPrint from '@/pages/guaranteeTask/print';
|
|
9
|
+} from "@ant-design/icons";
|
|
10
|
+import { Navigate } from "react-router-dom";
|
|
11
|
+import AuthLayout from "@/layouts/AuthLayout";
|
|
12
|
+import Container from "@/layouts/Container";
|
|
13
|
+import Login from "@/pages/login";
|
|
14
|
+import Page404 from "@/pages/404";
|
|
15
|
+import Home from "@/pages/sample/home";
|
|
16
|
+import BasicForm from "@/pages/sample/form";
|
|
17
|
+import BasicTable from "@/pages/sample/table";
|
|
18
|
+import GuaranteeTaskList from "@/pages/guaranteeTask";
|
|
19
|
+import GuaranteeTaskEdit from "@/pages/guaranteeTask/Edit";
|
|
20
|
+import GuaranteeTaskPrint from "@/pages/guaranteeTask/print";
|
21
|
21
|
import GuaranteeTaskEvaluate from "@/pages/evaluate";
|
22
|
22
|
import GuaranteeTaskEvaluateList from "@/pages/evaluate/evaluateList";
|
23
|
|
-import DishList from '@/pages/dish/list';
|
24
|
|
-import DishEdit from '@/pages/dish/edit';
|
25
|
|
-import PackageList from '@/pages/package';
|
26
|
|
-import StockList from '@/pages/stock/list';
|
27
|
|
-import StockEdit from '@/pages/stock/edit';
|
28
|
|
-import StockInOut from '@/pages/stock/outAndIn';
|
29
|
|
-import StockLog from '@/pages/stock/stockLog';
|
30
|
|
-import StockClassificationList from '@/pages/stockClassification/list';
|
31
|
|
-import StockClassificationEdit from '@/pages/stockClassification/edit';
|
32
|
|
-import RotationChartList from '@/pages/rotationChart/list';
|
33
|
|
-import RotationChartEdit from '@/pages/rotationChart/edit';
|
34
|
|
-import RotationChartIntroduction from '@/pages/rotationChart/introduction';
|
35
|
|
-import RotationChartIntroductionEdit from '@/pages/rotationChart/introduction/edit';
|
36
|
|
-import Roles from '@/pages/roles/index';
|
37
|
|
-import RegulationList from '@/regulation';
|
38
|
|
-import RegulationEdit from '@/regulation/edit';
|
39
|
|
-import UserList from '@/pages/user';
|
40
|
|
-import UserEdit from '@/pages/user/Edit';
|
|
23
|
+import DishList from "@/pages/dish/list";
|
|
24
|
+import DishEdit from "@/pages/dish/edit";
|
|
25
|
+import PackageList from "@/pages/package";
|
|
26
|
+import StockList from "@/pages/stock/list";
|
|
27
|
+import StockEdit from "@/pages/stock/edit";
|
|
28
|
+import StockInOut from "@/pages/stock/outAndIn";
|
|
29
|
+import StockLog from "@/pages/stock/stockLog";
|
|
30
|
+import StockClassificationList from "@/pages/stockClassification/list";
|
|
31
|
+import StockClassificationEdit from "@/pages/stockClassification/edit";
|
|
32
|
+import RotationChartList from "@/pages/rotationChart/list";
|
|
33
|
+import RotationChartEdit from "@/pages/rotationChart/edit";
|
|
34
|
+import RotationChartIntroduction from "@/pages/rotationChart/introduction";
|
|
35
|
+import RotationChartIntroductionEdit from "@/pages/rotationChart/introduction/edit";
|
|
36
|
+import RotationChartDetail from "@/pages/rotationChart/detail";
|
|
37
|
+import Roles from "@/pages/roles/index";
|
|
38
|
+import RegulationList from "@/regulation";
|
|
39
|
+import RegulationEdit from "@/regulation/edit";
|
|
40
|
+import UserList from "@/pages/user";
|
|
41
|
+import UserEdit from "@/pages/user/Edit";
|
41
|
42
|
import PurchasePlanList from "@/pages/purchase/plan/list";
|
42
|
43
|
import PurchasePlanEdit from "@/pages/purchase/plan/edit";
|
43
|
44
|
import PurchaseBillEdit from "@/pages/purchase/bill/edit";
|
|
@@ -46,9 +47,9 @@ import EmergencyPlanList from "@/pages/cms/emergencyPlan/list";
|
46
|
47
|
import EmergencyPlanEdit from "@/pages/cms/emergencyPlan/edit";
|
47
|
48
|
import EmergencyPlanDetail from "@/pages/cms/emergencyPlan/detail";
|
48
|
49
|
import FilesList from "@/pages/cms/files/list";
|
49
|
|
-import MessageList from '@/pages/message';
|
50
|
|
-import MessageDetail from '@/pages/message/detail';
|
51
|
|
-import StatisCharts from '@/pages/statis/charts';
|
|
50
|
+import MessageList from "@/pages/message";
|
|
51
|
+import MessageDetail from "@/pages/message/detail";
|
|
52
|
+import StatisCharts from "@/pages/statis/charts";
|
52
|
53
|
|
53
|
54
|
/**
|
54
|
55
|
* meta 用来扩展自定义数据数据
|
|
@@ -57,7 +58,7 @@ import StatisCharts from '@/pages/statis/charts';
|
57
|
58
|
* hideInMenu: 布尔值, 如果为 false, 菜单不会显示
|
58
|
59
|
* noLayout: 布尔值, 如果为 true, 将不会使用默认布局
|
59
|
60
|
* noSiderBar: 布尔值, 如果为 true, 将没有左侧菜单栏
|
60
|
|
- * noFooter: 布尔值, 如果为 true, 将没有底部 footer
|
|
61
|
+ * noFooter: 布尔值, 如果为 true, 将没有底部 footer
|
61
|
62
|
* target: 字符串, 如果为 _blank, 将在新窗口打开
|
62
|
63
|
* }
|
63
|
64
|
*/
|
|
@@ -197,6 +198,14 @@ export const authRoutes = [
|
197
|
198
|
hideInMenu: true,
|
198
|
199
|
},
|
199
|
200
|
},
|
|
201
|
+ {
|
|
202
|
+ path: "rotationChart/detail",
|
|
203
|
+ element: <RotationChartDetail />,
|
|
204
|
+ meta: {
|
|
205
|
+ title: "公告详情",
|
|
206
|
+ hideInMenu: true,
|
|
207
|
+ },
|
|
208
|
+ },
|
200
|
209
|
{
|
201
|
210
|
path: "rotationChart/introduction",
|
202
|
211
|
element: <RotationChartIntroduction />,
|
|
@@ -213,18 +222,18 @@ export const authRoutes = [
|
213
|
222
|
},
|
214
|
223
|
},
|
215
|
224
|
{
|
216
|
|
- path: 'regulation',
|
|
225
|
+ path: "regulation",
|
217
|
226
|
element: <RegulationList />,
|
218
|
227
|
meta: {
|
219
|
228
|
title: "规章制度",
|
220
|
229
|
},
|
221
|
230
|
},
|
222
|
231
|
{
|
223
|
|
- path: 'regulation/add',
|
|
232
|
+ path: "regulation/add",
|
224
|
233
|
element: <RegulationEdit />,
|
225
|
234
|
meta: {
|
226
|
235
|
hideInMenu: true,
|
227
|
|
- title: '规章制度维护',
|
|
236
|
+ title: "规章制度维护",
|
228
|
237
|
},
|
229
|
238
|
},
|
230
|
239
|
{
|
|
@@ -261,10 +270,10 @@ export const authRoutes = [
|
261
|
270
|
],
|
262
|
271
|
},
|
263
|
272
|
{
|
264
|
|
- path: 'static',
|
|
273
|
+ path: "static",
|
265
|
274
|
element: <StatisCharts />,
|
266
|
275
|
meta: {
|
267
|
|
- title: '数据分析',
|
|
276
|
+ title: "数据分析",
|
268
|
277
|
noSiderBar: true,
|
269
|
278
|
noFooter: true,
|
270
|
279
|
},
|
|
@@ -417,7 +426,7 @@ export const authRoutes = [
|
417
|
426
|
meta: {
|
418
|
427
|
title: "操作手册",
|
419
|
428
|
},
|
420
|
|
- }
|
|
429
|
+ },
|
421
|
430
|
],
|
422
|
431
|
},
|
423
|
432
|
];
|
|
@@ -457,7 +466,7 @@ export const defaultRoutes = [
|
457
|
466
|
},
|
458
|
467
|
];
|
459
|
468
|
|
460
|
|
-export function mergeAuthRoutes (r1, r2) {
|
|
469
|
+export function mergeAuthRoutes(r1, r2) {
|
461
|
470
|
const r = r1.slice();
|
462
|
471
|
const children = r1[0].children.slice();
|
463
|
472
|
r[0].children = children.concat(r2);
|
|
@@ -466,7 +475,7 @@ export function mergeAuthRoutes (r1, r2) {
|
466
|
475
|
|
467
|
476
|
// 全部路由
|
468
|
477
|
export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
|
469
|
|
-function getPath (parent = "/", current = "") {
|
|
478
|
+function getPath(parent = "/", current = "") {
|
470
|
479
|
if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
|
471
|
480
|
return current;
|
472
|
481
|
return `${parent}/${current}`.replace(/\/\//g, "/");
|