|
|
|
@ -1,13 +1,14 @@
|
|
|
|
|
import './App.css';
|
|
|
|
|
import React, {Component} from 'react';
|
|
|
|
|
import React, {useContext} from 'react';
|
|
|
|
|
import {
|
|
|
|
|
HomeOutlined,
|
|
|
|
|
TeamOutlined,
|
|
|
|
|
DashboardOutlined,
|
|
|
|
|
FileProtectOutlined,
|
|
|
|
|
CustomerServiceTwoTone,
|
|
|
|
|
UserOutlined
|
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
|
import {Layout, Menu, Image} from 'antd';
|
|
|
|
|
import {Layout, Menu, Image, Spin} from 'antd';
|
|
|
|
|
import {BrowserRouter, Route, Routes, NavLink} from "react-router-dom"
|
|
|
|
|
import Home from "./views/Home"
|
|
|
|
|
import Dashboard from "./views/Dashboard"
|
|
|
|
@ -18,13 +19,15 @@ import Customer_care_inchina from "./charts/Customer_care_inchina"
|
|
|
|
|
import Customer_care_potential from "./charts/Customer_care_potential"
|
|
|
|
|
import Customer_care_regular from "./charts/Customer_care_regular"
|
|
|
|
|
import Logo from './logo.png'
|
|
|
|
|
import {stores_Context} from "./config";
|
|
|
|
|
import {observer} from "mobx-react";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class App extends Component {
|
|
|
|
|
const App = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const {Content, Footer, Sider} = Layout;
|
|
|
|
|
const {auth_store} = useContext(stores_Context);
|
|
|
|
|
|
|
|
|
|
const menu_items = [
|
|
|
|
|
{key: 1, label: <NavLink to="/">主页</NavLink>, icon: <HomeOutlined/>},
|
|
|
|
@ -45,7 +48,6 @@ class App extends Component {
|
|
|
|
|
children: [
|
|
|
|
|
{key: 412, label: <NavLink to="/order">损益表</NavLink>},
|
|
|
|
|
{key: 41, label: <NavLink to="/order">信用卡账单</NavLink>},
|
|
|
|
|
{key: 42, label: <NavLink to="/auth">测试登陆</NavLink>},
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -71,14 +73,14 @@ class App extends Component {
|
|
|
|
|
minHeight: 480,
|
|
|
|
|
}}>
|
|
|
|
|
<Routes>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu']}/>}>
|
|
|
|
|
<Route path="/" element={<Home/>}/>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu']}/>}>
|
|
|
|
|
<Route path="/orders" element={<Orders/>}/>
|
|
|
|
|
<Route path="/orders_sub/:ordertype/:ordertype_sub/:ordertype_title"
|
|
|
|
|
element={<Orders_sub/>}/>
|
|
|
|
|
<Route path="/dashboard" element={<Dashboard/>}/>
|
|
|
|
|
</Route>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'customer_care']}/>}>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'customer_care']}/>}>
|
|
|
|
|
<Route path="/customer_care_inchina" element={<Customer_care_inchina/>}/>
|
|
|
|
|
<Route path="/customer_care_regular" element={<Customer_care_regular/>}/>
|
|
|
|
|
<Route path="/customer_care_potential" element={<Customer_care_potential/>}/>
|
|
|
|
@ -90,13 +92,14 @@ class App extends Component {
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<UserOutlined/> {auth_store.user.name} ({auth_store.user.userid})<br/>
|
|
|
|
|
Hainatravel Dashboard ©2022 Created by IT
|
|
|
|
|
</Footer>
|
|
|
|
|
</Layout>
|
|
|
|
|
</Layout>
|
|
|
|
|
</BrowserRouter>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App;
|
|
|
|
|
export default observer(App);
|
|
|
|
|