index.tsx 4.2 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';
6

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

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

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

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

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

export default () => (
陈帅's avatar
陈帅 committed
132 133 134 135 136 137 138 139 140 141 142 143
  <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>
144
);