import React from "react"; import { RouterCompProps } from "../tmpl/interface"; import ExcelImport from "../import/excel-import"; import withRouter from "./withroute"; export interface ImportRouteProps extends RouterCompProps { serverKey?: string; layoutRootPath?: string; } interface ImportRouteStat { } class ExcelImportRoute extends React.PureComponent< ImportRouteProps, ImportRouteStat > { state = {}; async componentDidMount() { } get computedLayoutPath() { const { layoutRootPath } = this.props; if (layoutRootPath !== undefined) return `/${layoutRootPath}`; return ""; } getServerKey = () => { // 获取serverKey const { searchParams, serverKey } = this.props; if (serverKey) return serverKey; let temServerKey = searchParams.get("serverKey"); return temServerKey || null; }; render() { const { params } = this.props; const { sourceId } = params; const serverKey = this.getServerKey(); return ( ); } } export default withRouter(ExcelImportRoute);