import React, { useCallback, useEffect, useState } from 'react'; import { ServiceAgent } from 'grey-service-agent'; import env from './env'; import { PageHeaderTop } from 'kts-xui'; import { UnorderedListOutlined } from '@ant-design/icons'; import { MasterTask, MasterProductList, MasterResponseList, MasterStatics, MasterInvoiceList, MasterSetting, Dashboard, Exports } from '../../'; import { Redirect, useHistory } from 'react-router-dom'; import { Switch, Route, MemoryRouter } from 'react-router-dom'; import Icon, { SettingOutlined } from '@ant-design/icons'; import { ReactComponent as TaskIcon } from './icon/task.svg'; import { ReactComponent as InvoiceIcon } from './icon/invoice_ico.svg'; import { ReactComponent as GoodsIcon } from './icon/goods.svg'; import { ReactComponent as EchatIcon } from './icon/echart_icon.svg'; import { ReactComponent as RequestIcon } from './icon/request_ico.svg'; export interface DigitalAssetVerificationProps { /** 通信模块 */ server: ServiceAgent; children?: any } const DigitalAsset: React.FunctionComponent = ({ server, children }) => { const history = useHistory(); const [key, setKey] = useState(history.location.pathname || '/task/list/verify'); React.useEffect(() => { env.server = server; }, [server]) const onChange = useCallback((value) => { history.push(value); setKey(value); }, [history]); const onTabChange = useCallback((path) => { setKey(path); }, []); useEffect(() => { setKey(history.location.pathname); }, [history.location.pathname]) return <> 核验任务 , tabKey: '/task/list/verify' }, // { // tab:
// 工作台 //
, tabKey: '/task/list/dash' // }, { tab:
发票明细
, tabKey: '/task/list/invoicelist' }, { tab:
商品明细
, tabKey: '/task/list/product' }, { tab:
申诉请求
, tabKey: '/task/list/response' }, { tab:
穿透报表
, tabKey: '/task/list/echart' }, { tab:
业务规则设置
, tabKey: '/task/list/setting' }, { tab:
导出记录
, tabKey: '/task/list/export' }, ]} >
} /> } /> } /> } /> ; }; export default DigitalAsset;