|
|
|
@ -10,7 +10,11 @@ import {
|
|
|
|
|
DollarOutlined,
|
|
|
|
|
AreaChartOutlined,
|
|
|
|
|
WechatOutlined,
|
|
|
|
|
UserOutlined, FlagOutlined, PieChartOutlined, BarChartOutlined, CoffeeOutlined,
|
|
|
|
|
UserOutlined,
|
|
|
|
|
FlagOutlined,
|
|
|
|
|
PieChartOutlined,
|
|
|
|
|
BarChartOutlined,
|
|
|
|
|
CoffeeOutlined,
|
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
|
import { Layout, Menu, Image, Badge } from 'antd';
|
|
|
|
|
import { BrowserRouter, Route, Routes, NavLink } from 'react-router-dom';
|
|
|
|
@ -40,6 +44,7 @@ import Distribution from './views/Distribution';
|
|
|
|
|
import Detail from './views/Detail';
|
|
|
|
|
import Welcome from './views/Welcome';
|
|
|
|
|
import { stores_Context, APP_VERSION } from './config';
|
|
|
|
|
import { WaterMark } from '@ant-design/pro-components';
|
|
|
|
|
|
|
|
|
|
const App = () => {
|
|
|
|
|
const { Content, Footer, Sider } = Layout;
|
|
|
|
@ -143,86 +148,89 @@ const App = () => {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<BrowserRouter>
|
|
|
|
|
<Layout
|
|
|
|
|
hasSider
|
|
|
|
|
style={{
|
|
|
|
|
minHeight: '100vh',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Sider
|
|
|
|
|
collapsible={true}
|
|
|
|
|
breakpoint="lg"
|
|
|
|
|
style={{
|
|
|
|
|
overflow: 'auto',
|
|
|
|
|
height: '100vh',
|
|
|
|
|
position: 'sticky',
|
|
|
|
|
left: 0,
|
|
|
|
|
top: 0,
|
|
|
|
|
bottom: 0,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Image src={Logo} preview={false} />
|
|
|
|
|
<Menu
|
|
|
|
|
theme="dark"
|
|
|
|
|
defaultSelectedKeys={['1']}
|
|
|
|
|
defaultOpenKeys={['2', '5']}
|
|
|
|
|
mode="inline"
|
|
|
|
|
items={menu_items}
|
|
|
|
|
/>
|
|
|
|
|
</Sider>
|
|
|
|
|
<Layout className="site-layout">
|
|
|
|
|
<Content
|
|
|
|
|
<WaterMark content={['HT统计']} gapY={100} gapX={100} rotate={-20} offsetLeft={150} offsetTop={150} fontColor="rgba(0,0,0,.06)">
|
|
|
|
|
<WaterMark content={[auth_store.user.name, auth_store.user.userid.slice(-4)]} gapY={100} gapX={100} rotate={-20} fontColor="rgba(0,0,0,.08)">
|
|
|
|
|
<Layout
|
|
|
|
|
hasSider
|
|
|
|
|
style={{
|
|
|
|
|
padding: 16,
|
|
|
|
|
minHeight: 480,
|
|
|
|
|
minHeight: '100vh',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Routes>
|
|
|
|
|
<Route path="/" element={<Welcome />} />
|
|
|
|
|
<Route path="/detail" element={<Detail />} />
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu']} />}>
|
|
|
|
|
<Route path="/annual" element={<Home />} />
|
|
|
|
|
<Route path="/kpi" element={<KPI />} />
|
|
|
|
|
</Route>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'marketing']} />}>
|
|
|
|
|
<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', '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 />} />
|
|
|
|
|
<Route path="/whatsapp_session" element={<WhatsApp_session />} />
|
|
|
|
|
<Route path="/wechat_session" element={<Wechat_session />} />
|
|
|
|
|
<Route path="/agent/group/count" element={<AgentGroupCount />} />
|
|
|
|
|
<Route path="/destination/group/count" element={<DestinationGroupCount />} />
|
|
|
|
|
<Route path="/agent/:agentId/group/list" element={<AgentGroupList />} />
|
|
|
|
|
<Route path="/destination/:destinationId/group/list" element={<DestinationGroupList />} />
|
|
|
|
|
</Route>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'financial']} />}>
|
|
|
|
|
<Route path="/credit_card_bill" element={<Credit_card_bill />} />
|
|
|
|
|
<Route path="/exchange_rate" element={<ExchangeRate />} />
|
|
|
|
|
</Route>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'sale']} />}>
|
|
|
|
|
<Route path="/sale" element={<Sale />} />
|
|
|
|
|
<Route path="/sale_sub/:type_sub" element={<Sale_sub />} />
|
|
|
|
|
<Route path="/sale_kpi" element={<Sale_KPI />} />
|
|
|
|
|
<Route path="/distribution" element={<Distribution />} />
|
|
|
|
|
</Route>
|
|
|
|
|
</Routes>
|
|
|
|
|
</Content>
|
|
|
|
|
<Footer
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<UserOutlined /> {auth_store.user.name} ({auth_store.user.userid})
|
|
|
|
|
<br />
|
|
|
|
|
Hainatravel Dashboard <span>v<span>{APP_VERSION}</span> </span> ©2022 Created by IT
|
|
|
|
|
</Footer>
|
|
|
|
|
</Layout>
|
|
|
|
|
</Layout>
|
|
|
|
|
<Sider
|
|
|
|
|
collapsible={true}
|
|
|
|
|
breakpoint="lg"
|
|
|
|
|
style={{
|
|
|
|
|
overflow: 'auto',
|
|
|
|
|
height: '100vh',
|
|
|
|
|
position: 'sticky',
|
|
|
|
|
left: 0,
|
|
|
|
|
top: 0,
|
|
|
|
|
bottom: 0,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Image src={Logo} preview={false} />
|
|
|
|
|
<Menu theme="dark" defaultSelectedKeys={['1']} defaultOpenKeys={['2', '5']} mode="inline" items={menu_items} />
|
|
|
|
|
</Sider>
|
|
|
|
|
|
|
|
|
|
<Layout className="site-layout">
|
|
|
|
|
<Content
|
|
|
|
|
style={{
|
|
|
|
|
padding: 16,
|
|
|
|
|
minHeight: 480,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Routes>
|
|
|
|
|
<Route path="/" element={<Welcome />} />
|
|
|
|
|
<Route path="/detail" element={<Detail />} />
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu']} />}>
|
|
|
|
|
<Route path="/annual" element={<Home />} />
|
|
|
|
|
<Route path="/kpi" element={<KPI />} />
|
|
|
|
|
</Route>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'marketing']} />}>
|
|
|
|
|
<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', '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 />} />
|
|
|
|
|
<Route path="/whatsapp_session" element={<WhatsApp_session />} />
|
|
|
|
|
<Route path="/wechat_session" element={<Wechat_session />} />
|
|
|
|
|
<Route path="/agent/group/count" element={<AgentGroupCount />} />
|
|
|
|
|
<Route path="/destination/group/count" element={<DestinationGroupCount />} />
|
|
|
|
|
<Route path="/agent/:agentId/group/list" element={<AgentGroupList />} />
|
|
|
|
|
<Route path="/destination/:destinationId/group/list" element={<DestinationGroupList />} />
|
|
|
|
|
</Route>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'financial']} />}>
|
|
|
|
|
<Route path="/credit_card_bill" element={<Credit_card_bill />} />
|
|
|
|
|
<Route path="/exchange_rate" element={<ExchangeRate />} />
|
|
|
|
|
</Route>
|
|
|
|
|
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'sale']} />}>
|
|
|
|
|
<Route path="/sale" element={<Sale />} />
|
|
|
|
|
<Route path="/sale_sub/:type_sub" element={<Sale_sub />} />
|
|
|
|
|
<Route path="/sale_kpi" element={<Sale_KPI />} />
|
|
|
|
|
<Route path="/distribution" element={<Distribution />} />
|
|
|
|
|
</Route>
|
|
|
|
|
</Routes>
|
|
|
|
|
</Content>
|
|
|
|
|
<Footer
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<UserOutlined /> {auth_store.user.name} ({auth_store.user.userid})
|
|
|
|
|
<br />
|
|
|
|
|
Hainatravel Dashboard{' '}
|
|
|
|
|
<span>
|
|
|
|
|
v<span>{APP_VERSION}</span>{' '}
|
|
|
|
|
</span>{' '}
|
|
|
|
|
©2022 Created by IT
|
|
|
|
|
</Footer>
|
|
|
|
|
</Layout>
|
|
|
|
|
</Layout>
|
|
|
|
|
</WaterMark>
|
|
|
|
|
</WaterMark>
|
|
|
|
|
</BrowserRouter>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|