Success.js 4.2 KB

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