Success.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. import React, { Fragment } from 'react';
  2. import { formatMessage, FormattedMessage } from 'umi/locale';
  3. import { Button, Row, Col, Icon, Steps, Card } from 'antd';
  4. import Result from '@/components/Result';
  5. import PageHeaderWrapper from '@/components/PageHeaderWrapper';
  6. const { Step } = Steps;
  7. const desc1 = (
  8. <div
  9. style={{
  10. fontSize: 12,
  11. color: 'rgba(0, 0, 0, 0.45)',
  12. position: 'relative',
  13. left: 42,
  14. textAlign: 'left',
  15. }}
  16. >
  17. <div style={{ margin: '8px 0 4px' }}>
  18. <FormattedMessage id="app.result.success.step1-operator" defaultMessage="Qu Lili" />
  19. <Icon style={{ marginLeft: 8 }} type="dingding-o" />
  20. </div>
  21. <div>2016-12-12 12:32</div>
  22. </div>
  23. );
  24. const desc2 = (
  25. <div style={{ fontSize: 12, position: 'relative', left: 42, textAlign: 'left' }}>
  26. <div style={{ margin: '8px 0 4px' }}>
  27. <FormattedMessage id="app.result.success.step2-operator" defaultMessage="Zhou Maomao" />
  28. <Icon type="dingding-o" style={{ color: '#00A0E9', marginLeft: 8 }} />
  29. </div>
  30. <div>
  31. <a href="">
  32. <FormattedMessage id="app.result.success.step2-extra" defaultMessage="Urge" />
  33. </a>
  34. </div>
  35. </div>
  36. );
  37. const extra = (
  38. <Fragment>
  39. <div
  40. style={{
  41. fontSize: 16,
  42. color: 'rgba(0, 0, 0, 0.85)',
  43. fontWeight: '500',
  44. marginBottom: 20,
  45. }}
  46. >
  47. <FormattedMessage id="app.result.success.operate-title" defaultMessage="Project Name" />
  48. </div>
  49. <Row style={{ marginBottom: 16 }}>
  50. <Col xs={24} sm={12} md={12} lg={12} xl={6}>
  51. <span style={{ color: 'rgba(0, 0, 0, 0.85)' }}>
  52. <FormattedMessage id="app.result.success.operate-id" defaultMessage="Project ID:" />
  53. </span>
  54. 23421
  55. </Col>
  56. <Col xs={24} sm={12} md={12} lg={12} xl={6}>
  57. <span style={{ color: 'rgba(0, 0, 0, 0.85)' }}>
  58. <FormattedMessage id="app.result.success.principal" defaultMessage="Principal:" />
  59. </span>
  60. <FormattedMessage id="app.result.success.step1-operator" defaultMessage="Qu Lili" />
  61. </Col>
  62. <Col xs={24} sm={24} md={24} lg={24} xl={12}>
  63. <span style={{ color: 'rgba(0, 0, 0, 0.85)' }}>
  64. <FormattedMessage
  65. id="app.result.success.operate-time"
  66. defaultMessage="Effective time:"
  67. />
  68. </span>
  69. 2016-12-12 ~ 2017-12-12
  70. </Col>
  71. </Row>
  72. <Steps style={{ marginLeft: -42, width: 'calc(100% + 84px)' }} progressDot current={1}>
  73. <Step
  74. title={
  75. <span style={{ fontSize: 14 }}>
  76. <FormattedMessage id="app.result.success.step1-title" defaultMessage="Create project" />
  77. </span>
  78. }
  79. description={desc1}
  80. />
  81. <Step
  82. title={
  83. <span style={{ fontSize: 14 }}>
  84. <FormattedMessage
  85. id="app.result.success.step2-title"
  86. defaultMessage="Departmental preliminary review"
  87. />
  88. </span>
  89. }
  90. description={desc2}
  91. />
  92. <Step
  93. title={
  94. <span style={{ fontSize: 14 }}>
  95. <FormattedMessage
  96. id="app.result.success.step3-title"
  97. defaultMessage="Financial review"
  98. />
  99. </span>
  100. }
  101. />
  102. <Step
  103. title={
  104. <span style={{ fontSize: 14 }}>
  105. <FormattedMessage id="app.result.success.step4-title" defaultMessage="Finish" />
  106. </span>
  107. }
  108. />
  109. </Steps>
  110. </Fragment>
  111. );
  112. const actions = (
  113. <Fragment>
  114. <Button type="primary">
  115. <FormattedMessage id="app.result.success.btn-return" defaultMessage="Back to list" />
  116. </Button>
  117. <Button>
  118. <FormattedMessage id="app.result.success.btn-project" defaultMessage="View project" />
  119. </Button>
  120. <Button>
  121. <FormattedMessage id="app.result.success.btn-print" defaultMessage="Print" />
  122. </Button>
  123. </Fragment>
  124. );
  125. export default () => (
  126. <PageHeaderWrapper>
  127. <Card bordered={false}>
  128. <Result
  129. type="success"
  130. title={formatMessage({ id: 'app.result.success.title' })}
  131. description={formatMessage({ id: 'app.result.success.description' })}
  132. extra={extra}
  133. actions={actions}
  134. style={{ marginTop: 48, marginBottom: 16 }}
  135. />
  136. </Card>
  137. </PageHeaderWrapper>
  138. );