import * as React from 'react'; import { Drawer, Dropdown } from 'kts-xui'; import { Menu } from 'kts-components-antd-x4'; import MyIcon from './Icon'; import UIComponents from './UI.Components'; import IOption from './IOption'; import './index.less'; /** Props接口 */ interface IProps { urlData: IOption; refreshInvoice: () => void; onClose: () => void; currentActive: string; } export default class InvoiceImport extends React.Component { constructor(props: IProps) { super(props); this.state = { currentActive: this.props.currentActive, } } handleMenuClick = e => { this.setState({ currentActive: e.key }); }; renderPageTitle = () => { const { currentActive } = this.state; switch (currentActive) { case 'scangun': return "扫码枪"; case "excel": return "Excel上传"; case 'image': return "影像/板式文件"; case "scanner": return "扫描仪"; case "manual": return "手工录入"; case 'rule': return '规则导入'; case 'commonexcel': return 'Excel上传'; default: return ""; } } render() { const { urlData } = this.props; let menu = ( { urlData.scankey4 && 扫码枪 } { urlData.url && Excel上传 } {/* 影像/板式文件 */} {/* 扫描仪 */} { urlData.key4 && 手工录入 } { urlData.rule && 规则导入 } { urlData.commonUploadCb && Excel上传 } ); return (
{this.renderPageTitle()} } >
); } }