index.tsx 3.91 KB
Newer Older
陈帅's avatar
陈帅 committed
1
import React, { Fragment } from 'react';
陈帅's avatar
陈帅 committed
2
import { formatMessage, FormattedMessage } from 'umi-plugin-react/locale';
3
import { Button, Row, Col, Icon, Steps, Card } from 'antd';
陈帅's avatar
陈帅 committed
4 5
import Result from './Result';
import { GridContent } from '@ant-design/pro-layout';
陈帅's avatar
陈帅 committed
6
import styles from './index.less';
7

afc163's avatar
afc163 committed
8
const { Step } = Steps;
9 10

const desc1 = (
陈帅's avatar
陈帅 committed
11
  <div className={styles.title}>
ddcat1115's avatar
ddcat1115 committed
12
    <div style={{ margin: '8px 0 4px' }}>
13
      <FormattedMessage id="BLOCK_NAME.success.step1-operator" defaultMessage="Qu Lili" />
陈帅's avatar
陈帅 committed
14
      <Icon style={{ marginLeft: 8, color: '#00A0E9' }} type="dingding-o" />
15 16 17 18 19 20
    </div>
    <div>2016-12-12 12:32</div>
  </div>
);

const desc2 = (
21
  <div style={{ fontSize: 12, position: 'relative', left: 42, textAlign: 'left' }}>
ddcat1115's avatar
ddcat1115 committed
22
    <div style={{ margin: '8px 0 4px' }}>
23
      <FormattedMessage id="BLOCK_NAME.success.step2-operator" defaultMessage="Zhou Maomao" />
陈帅's avatar
陈帅 committed
24
      <Icon type="dingding-o" style={{ color: '#00A0E9', marginLeft: 8 }} />
25
    </div>
jim's avatar
jim committed
26
    <div>
张秀玲's avatar
张秀玲 committed
27
      <a href="">
28
        <FormattedMessage id="BLOCK_NAME.success.step2-extra" defaultMessage="Urge" />
张秀玲's avatar
张秀玲 committed
29
      </a>
jim's avatar
jim committed
30
    </div>
31 32 33 34
  </div>
);

const extra = (
陈帅's avatar
陈帅 committed
35
  <Fragment>
陈帅's avatar
陈帅 committed
36
    <div className={styles['head-title']}>
37
      <FormattedMessage id="BLOCK_NAME.success.operate-title" defaultMessage="Project Name" />
38
    </div>
ddcat1115's avatar
ddcat1115 committed
39 40
    <Row style={{ marginBottom: 16 }}>
      <Col xs={24} sm={12} md={12} lg={12} xl={6}>
陈帅's avatar
陈帅 committed
41
        <span>
42
          <FormattedMessage id="BLOCK_NAME.success.operate-id" defaultMessage="Project ID:" />
张秀玲's avatar
张秀玲 committed
43
        </span>
ddcat1115's avatar
ddcat1115 committed
44 45 46
        23421
      </Col>
      <Col xs={24} sm={12} md={12} lg={12} xl={6}>
陈帅's avatar
陈帅 committed
47
        <span>
48
          <FormattedMessage id="BLOCK_NAME.success.principal" defaultMessage="Principal:" />
张秀玲's avatar
张秀玲 committed
49
        </span>
50
        <FormattedMessage id="BLOCK_NAME.success.step1-operator" defaultMessage="Qu Lili" />
ddcat1115's avatar
ddcat1115 committed
51 52
      </Col>
      <Col xs={24} sm={24} md={24} lg={24} xl={12}>
陈帅's avatar
陈帅 committed
53
        <span>
张秀玲's avatar
张秀玲 committed
54
          <FormattedMessage
55
            id="BLOCK_NAME.success.operate-time"
张秀玲's avatar
张秀玲 committed
56 57 58
            defaultMessage="Effective time:"
          />
        </span>
ddcat1115's avatar
ddcat1115 committed
59 60
        2016-12-12 ~ 2017-12-12
      </Col>
61
    </Row>
ddcat1115's avatar
ddcat1115 committed
62
    <Steps style={{ marginLeft: -42, width: 'calc(100% + 84px)' }} progressDot current={1}>
张秀玲's avatar
张秀玲 committed
63 64 65
      <Step
        title={
          <span style={{ fontSize: 14 }}>
66
            <FormattedMessage id="BLOCK_NAME.success.step1-title" defaultMessage="Create project" />
张秀玲's avatar
张秀玲 committed
67 68 69 70 71 72 73 74
          </span>
        }
        description={desc1}
      />
      <Step
        title={
          <span style={{ fontSize: 14 }}>
            <FormattedMessage
75
              id="BLOCK_NAME.success.step2-title"
张秀玲's avatar
张秀玲 committed
76 77 78 79 80 81 82 83 84 85
              defaultMessage="Departmental preliminary review"
            />
          </span>
        }
        description={desc2}
      />
      <Step
        title={
          <span style={{ fontSize: 14 }}>
            <FormattedMessage
86
              id="BLOCK_NAME.success.step3-title"
张秀玲's avatar
张秀玲 committed
87 88 89 90 91 92 93 94
              defaultMessage="Financial review"
            />
          </span>
        }
      />
      <Step
        title={
          <span style={{ fontSize: 14 }}>
95
            <FormattedMessage id="BLOCK_NAME.success.step4-title" defaultMessage="Finish" />
张秀玲's avatar
张秀玲 committed
96 97 98
          </span>
        }
      />
99
    </Steps>
陈帅's avatar
陈帅 committed
100
  </Fragment>
101 102 103
);

const actions = (
陈帅's avatar
陈帅 committed
104
  <Fragment>
张秀玲's avatar
张秀玲 committed
105
    <Button type="primary">
106
      <FormattedMessage id="BLOCK_NAME.success.btn-return" defaultMessage="Back to list" />
张秀玲's avatar
张秀玲 committed
107 108
    </Button>
    <Button>
109
      <FormattedMessage id="BLOCK_NAME.success.btn-project" defaultMessage="View project" />
张秀玲's avatar
张秀玲 committed
110 111
    </Button>
    <Button>
112
      <FormattedMessage id="BLOCK_NAME.success.btn-print" defaultMessage="Print" />
张秀玲's avatar
张秀玲 committed
113
    </Button>
陈帅's avatar
陈帅 committed
114
  </Fragment>
115 116 117
);

export default () => (
陈帅's avatar
陈帅 committed
118 119 120 121 122 123 124 125 126 127 128 129
  <GridContent>
    <Card bordered={false}>
      <Result
        type="success"
        title={formatMessage({ id: 'BLOCK_NAME.success.title' })}
        description={formatMessage({ id: 'BLOCK_NAME.success.description' })}
        extra={extra}
        actions={actions}
        style={{ marginTop: 48, marginBottom: 16 }}
      />
    </Card>
  </GridContent>
130
);