|
|
@ -6,6 +6,9 @@ import {
|
|
|
|
DashboardOutlined,
|
|
|
|
DashboardOutlined,
|
|
|
|
FileProtectOutlined,
|
|
|
|
FileProtectOutlined,
|
|
|
|
CustomerServiceTwoTone,
|
|
|
|
CustomerServiceTwoTone,
|
|
|
|
|
|
|
|
DollarOutlined,
|
|
|
|
|
|
|
|
AreaChartOutlined,
|
|
|
|
|
|
|
|
WechatOutlined,
|
|
|
|
UserOutlined
|
|
|
|
UserOutlined
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
import {Layout, Menu, Image, Spin} from 'antd';
|
|
|
|
import {Layout, Menu, Image, Spin} from 'antd';
|
|
|
@ -34,10 +37,15 @@ const App = () => {
|
|
|
|
|
|
|
|
|
|
|
|
const menu_items = [
|
|
|
|
const menu_items = [
|
|
|
|
{key: 1, label: <NavLink to="/">主页</NavLink>, icon: <HomeOutlined/>},
|
|
|
|
{key: 1, label: <NavLink to="/">主页</NavLink>, icon: <HomeOutlined/>},
|
|
|
|
{key: 2, label: <NavLink to="/orders">订单数据</NavLink>, icon: <FileProtectOutlined/>,},
|
|
|
|
|
|
|
|
{key: 5, label: <NavLink to="/dashboard">仪表盘</NavLink>, icon: <DashboardOutlined/>},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
key: 3, label: '客运', icon: <CustomerServiceTwoTone/>,
|
|
|
|
key: 2, label: '市场', icon: <AreaChartOutlined/>,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
{key: 21, label: <NavLink to="/orders">订单数据</NavLink>, icon: <FileProtectOutlined/>,},
|
|
|
|
|
|
|
|
{key: 22, label: <NavLink to="/dashboard">仪表盘</NavLink>, icon: <DashboardOutlined/>},
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
key: 3, label: '客运', icon: <WechatOutlined/>,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
{key: 31, label: <NavLink to="/customer_care_potential">潜力客户</NavLink>},
|
|
|
|
{key: 31, label: <NavLink to="/customer_care_potential">潜力客户</NavLink>},
|
|
|
|
{key: 32, label: <NavLink to="/customer_care_regular">老客户</NavLink>},
|
|
|
|
{key: 32, label: <NavLink to="/customer_care_regular">老客户</NavLink>},
|
|
|
@ -49,7 +57,7 @@ const App = () => {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
key: 4,
|
|
|
|
key: 4,
|
|
|
|
label: '财务',
|
|
|
|
label: '财务',
|
|
|
|
icon: <TeamOutlined/>,
|
|
|
|
icon: <DollarOutlined/>,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
{key: 41, label: <NavLink to="/credit_card_bill">信用卡账单</NavLink>},
|
|
|
|
{key: 41, label: <NavLink to="/credit_card_bill">信用卡账单</NavLink>},
|
|
|
|
]
|
|
|
|
]
|
|
|
@ -68,7 +76,7 @@ const App = () => {
|
|
|
|
<Sider collapsible={false} defaultCollapsed={false} breakpoint="lg"
|
|
|
|
<Sider collapsible={false} defaultCollapsed={false} breakpoint="lg"
|
|
|
|
collapsedWidth="0">
|
|
|
|
collapsedWidth="0">
|
|
|
|
<Image src={Logo} preview={false}/>
|
|
|
|
<Image src={Logo} preview={false}/>
|
|
|
|
<Menu theme="dark" defaultSelectedKeys={['1']} defaultOpenKeys={['3']} mode="inline"
|
|
|
|
<Menu theme="dark" defaultSelectedKeys={['1']} defaultOpenKeys={['2', '3','4']} mode="inline"
|
|
|
|
items={menu_items}/>
|
|
|
|
items={menu_items}/>
|
|
|
|
</Sider>
|
|
|
|
</Sider>
|
|
|
|
<Layout className="site-layout">
|
|
|
|
<Layout className="site-layout">
|
|
|
@ -78,7 +86,7 @@ const App = () => {
|
|
|
|
}}>
|
|
|
|
}}>
|
|
|
|
<Routes>
|
|
|
|
<Routes>
|
|
|
|
<Route path="/" element={<Home/>}/>
|
|
|
|
<Route path="/" element={<Home/>}/>
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu']}/>}>
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'marketing']}/>}>
|
|
|
|
<Route path="/orders" element={<Orders/>}/>
|
|
|
|
<Route path="/orders" element={<Orders/>}/>
|
|
|
|
<Route path="/orders_sub/:ordertype/:ordertype_sub/:ordertype_title"
|
|
|
|
<Route path="/orders_sub/:ordertype/:ordertype_sub/:ordertype_title"
|
|
|
|
element={<Orders_sub/>}/>
|
|
|
|
element={<Orders_sub/>}/>
|
|
|
|