index.js 4.09 KB
Newer Older
陈帅's avatar
陈帅 committed
1
import React, { Fragment } from 'react';
张秀玲's avatar
张秀玲 committed
2
import { formatMessage, FormattedMessage } from 'umi/locale';
3
import { Button, Row, Col, Icon, Steps, Card } from 'antd';
4
import { Result } from 'ant-design-pro';
5

afc163's avatar
afc163 committed
6
const { Step } = Steps;
7 8

const desc1 = (
jim's avatar
jim committed
9 10 11 12 13 14
  <div
    style={{
      fontSize: 12,
      color: 'rgba(0, 0, 0, 0.45)',
      position: 'relative',
      left: 42,
afc163's avatar
afc163 committed
15
      textAlign: 'left',
jim's avatar
jim committed
16 17
    }}
  >
ddcat1115's avatar
ddcat1115 committed
18
    <div style={{ margin: '8px 0 4px' }}>
19
      <FormattedMessage id="BLOCK_NAME.success.step1-operator" defaultMessage="Qu Lili" />
陈帅's avatar
陈帅 committed
20
      <Icon style={{ marginLeft: 8 }} type="dingding-o" />
21 22 23 24 25 26
    </div>
    <div>2016-12-12 12:32</div>
  </div>
);

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

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

const actions = (
陈帅's avatar
陈帅 committed
117
  <Fragment>
张秀玲's avatar
张秀玲 committed
118
    <Button type="primary">
119
      <FormattedMessage id="BLOCK_NAME.success.btn-return" defaultMessage="Back to list" />
张秀玲's avatar
张秀玲 committed
120 121
    </Button>
    <Button>
122
      <FormattedMessage id="BLOCK_NAME.success.btn-project" defaultMessage="View project" />
张秀玲's avatar
张秀玲 committed
123 124
    </Button>
    <Button>
125
      <FormattedMessage id="BLOCK_NAME.success.btn-print" defaultMessage="Print" />
张秀玲's avatar
张秀玲 committed
126
    </Button>
陈帅's avatar
陈帅 committed
127
  </Fragment>
128 129 130
);

export default () => (
131 132 133 134 135 136 137 138 139 140
  <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>
141
);