|
@@ -6,34 +6,35 @@ 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";
|
21
|
|
-import DishList from "@/pages/dish/list";
|
22
|
|
-import DishEdit from "@/pages/dish/edit";
|
23
|
|
-import PackageList from "@/pages/package";
|
24
|
|
-import StockList from "@/pages/stock/list";
|
25
|
|
-import StockEdit from "@/pages/stock/edit";
|
26
|
|
-import StockInOut from "@/pages/stock/outAndIn";
|
27
|
|
-import StockLog from "@/pages/stock/stockLog";
|
28
|
|
-import StockClassificationList from "@/pages/stockClassification/list";
|
29
|
|
-import StockClassificationEdit from "@/pages/stockClassification/edit";
|
30
|
|
-import RotationChartList from "@/pages/rotationChart/list";
|
31
|
|
-import RotationChartEdit from "@/pages/rotationChart/edit";
|
32
|
|
-import RotationChartIntroduction from "@/pages/rotationChart/introduction";
|
33
|
|
-import Roles from "@/pages/roles/index";
|
34
|
|
-import RegulationList from "@/regulation";
|
35
|
|
-import UserList from "@/pages/user";
|
36
|
|
-import UserEdit from "@/pages/user/Edit";
|
|
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
|
+import DishList from '@/pages/dish/list';
|
|
22
|
+import DishEdit from '@/pages/dish/edit';
|
|
23
|
+import PackageList from '@/pages/package/List';
|
|
24
|
+import StockList from '@/pages/stock/list';
|
|
25
|
+import StockEdit from '@/pages/stock/edit';
|
|
26
|
+import StockInOut from '@/pages/stock/outAndIn';
|
|
27
|
+import StockLog from '@/pages/stock/stockLog';
|
|
28
|
+import StockClassificationList from '@/pages/stockClassification/list';
|
|
29
|
+import StockClassificationEdit from '@/pages/stockClassification/edit';
|
|
30
|
+import RotationChartList from '@/pages/rotationChart/list';
|
|
31
|
+import RotationChartEdit from '@/pages/rotationChart/edit';
|
|
32
|
+import RotationChartIntroduction from '@/pages/rotationChart/introduction';
|
|
33
|
+import Roles from '@/pages/roles/index';
|
|
34
|
+import RegulationList from '@/regulation';
|
|
35
|
+import RegulationEdit from '@/regulation/edit';
|
|
36
|
+import UserList from '@/pages/user';
|
|
37
|
+import UserEdit from '@/pages/user/Edit';
|
37
|
38
|
import PurchasePlanList from "@/pages/purchase/plan/list";
|
38
|
39
|
import PurchasePlanEdit from "@/pages/purchase/plan/edit";
|
39
|
40
|
import PurchaseBillEdit from "@/pages/purchase/bill/edit";
|
|
@@ -208,12 +209,20 @@ export const authRoutes = [
|
208
|
209
|
},
|
209
|
210
|
},
|
210
|
211
|
{
|
211
|
|
- path: "regulation",
|
212
|
|
- element: null,
|
|
212
|
+ path: 'regulation',
|
|
213
|
+ element: <RegulationList />,
|
213
|
214
|
meta: {
|
214
|
215
|
title: "规章制度",
|
215
|
216
|
},
|
216
|
217
|
},
|
|
218
|
+ {
|
|
219
|
+ path: 'regulation/add',
|
|
220
|
+ element: <RegulationEdit />,
|
|
221
|
+ meta: {
|
|
222
|
+ hideInMenu: true,
|
|
223
|
+ title: '规章制度维护',
|
|
224
|
+ },
|
|
225
|
+ },
|
217
|
226
|
{
|
218
|
227
|
path: "emergency-plan",
|
219
|
228
|
element: <EmergencyPlanList />,
|
|
@@ -421,7 +430,7 @@ export const defaultRoutes = [
|
421
|
430
|
},
|
422
|
431
|
];
|
423
|
432
|
|
424
|
|
-export function mergeAuthRoutes(r1, r2) {
|
|
433
|
+export function mergeAuthRoutes (r1, r2) {
|
425
|
434
|
const r = r1.slice();
|
426
|
435
|
const children = r1[0].children.slice();
|
427
|
436
|
r[0].children = children.concat(r2);
|
|
@@ -430,8 +439,7 @@ export function mergeAuthRoutes(r1, r2) {
|
430
|
439
|
|
431
|
440
|
// 全部路由
|
432
|
441
|
export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
|
433
|
|
-
|
434
|
|
-function getPath(parent = "/", current = "") {
|
|
442
|
+function getPath (parent = "/", current = "") {
|
435
|
443
|
if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
|
436
|
444
|
return current;
|
437
|
445
|
return `${parent}/${current}`.replace(/\/\//g, "/");
|