import React, { useState, useEffect, useRef } from 'react';
import { Input, Tabs, Table, Result, Button } from 'antd';
const { TabPane } = Tabs;

import { connect, history } from 'umi';

import { getCookie } from '@/utils/method';
import { RA } from '@/utils/method';
const module = "User"
const ResultPageFailed = (props: any) => {

  const { dispatch, Data } = props;
  const formRef = useRef(null)

  const [resultTime, setResultTime] = useState(3);

  const backPage = () => {
    history.go(-1)
  }
  return (
    <div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
      <Result
        status="error"
        title="Error submit the file!"
        subTitle={<p>server has been handled it ,please try again or back.</p>}
        extra={[
          <Button type="primary" key="ok" ><a href={"http://47.74.233.180:8651/tos/excel/down?operator_id=" + getCookie("id")}>Download</a></Button>, <Button key="back" onClick={backPage}>Back</Button>
        ]}
      />
    </div>
  );
};

function map(state: any) {
  const { Data } = state[module]
  return { Data }
}
export default connect(map)(ResultPageFailed);
