page.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. import React from 'react';
  2. import './index.less';
  3. import Page from '@src/containers/Page';
  4. import Continue from '../../../components/Continue';
  5. import Tabs from '../../../components/Tabs';
  6. import Module from '../../../components/Module';
  7. import Division from '../../../components/Division';
  8. import Panel from '../../../components/Panel';
  9. import Card from '../../../components/Card';
  10. import List from '../../../components/List';
  11. import ListTable from '../../../components/ListTable';
  12. import ProgressText from '../../../components/ProgressText';
  13. import IconButton from '../../../components/IconButton';
  14. export default class extends Page {
  15. renderView() {
  16. return (
  17. <div>
  18. <Continue date={'2019-04-29 16:30'} data={{}} />
  19. <div className="content">
  20. <Module className="m-t-2">
  21. <Tabs
  22. type="card"
  23. active="main"
  24. tabs={[
  25. { key: 'main', name: '首页', path: '/' },
  26. { key: 'ready', name: 'GetReady', path: '/' },
  27. { key: 'exercise', name: '练习', path: '/' },
  28. { key: 'cat', name: 'CAT模考', path: '/' },
  29. { key: 'item', name: '题库', path: '/' },
  30. { key: 'machine', name: '换库&机经', path: '/' },
  31. ]}
  32. />
  33. <Tabs
  34. active="main"
  35. tabs={[
  36. { key: 'main', name: '首页', path: '/' },
  37. { key: 'ready', name: 'GetReady', path: '/' },
  38. { key: 'exercise', name: '练习', path: '/' },
  39. { key: 'cat', name: 'CAT模考', path: '/' },
  40. { key: 'item', name: '题库', path: '/' },
  41. ]}
  42. />
  43. </Module>
  44. <Module>
  45. <Tabs
  46. active="main"
  47. border
  48. width="180px"
  49. space="0"
  50. tabs={[
  51. { key: 'main', name: '首页', path: '/' },
  52. { key: 'ready', name: 'GetReady', path: '/' },
  53. { key: 'exercise', name: '练习', path: '/' },
  54. { key: 'cat', name: 'CAT模考', path: '/' },
  55. { key: 'item', name: '题库', path: '/' },
  56. ]}
  57. />
  58. <Tabs
  59. active="main"
  60. type="text"
  61. tabs={[
  62. { key: 'main', name: '首页', path: '/' },
  63. { key: 'ready', name: 'GetReady', path: '/' },
  64. { key: 'exercise', name: '练习', path: '/' },
  65. { key: 'cat', name: 'CAT模考', path: '/' },
  66. { key: 'item', name: '题库', path: '/' },
  67. ]}
  68. />
  69. </Module>
  70. <Division two>
  71. <Panel
  72. title="OG"
  73. col="3"
  74. list={[{ progress: 10, title: '测试' }, { progress: 10, title: '测试' }, { progress: 0, title: '测试' }]}
  75. />
  76. <Panel
  77. title="OG"
  78. col="4"
  79. list={[{ progress: 10, title: '测试' }, { progress: 10, title: '测试' }, { progress: 10, title: '测试' }]}
  80. />
  81. </Division>
  82. <Division three>
  83. <Card title="句改 SC" data={{ status: 'buy', desc: ['名师讲解', '精进学习', '提升成绩'] }} />
  84. <Card title="句改 SC" data={{ status: 'open' }} />
  85. <Card
  86. title="句改 SC"
  87. data={{
  88. status: 'ing',
  89. list: [
  90. { progress: 30, date: '2019-04-22', status: 'start' },
  91. { progress: 40, date: '2019-04-22', status: 'ing' },
  92. ],
  93. }}
  94. />
  95. <Card title="句改 SC" data={{ status: 'ing', list: [] }} />
  96. <Card title="句改 SC" data={{ status: 'end' }} />
  97. </Division>
  98. <List
  99. title="Chapter4"
  100. subTitle="简单句如何变长难句"
  101. list={[{ progress: 30, title: '什么样的句子叫长难句,长难句的基本特征。', part: 'Part 1' }]}
  102. />
  103. <ListTable
  104. title="Chapter5"
  105. subTitle="练习"
  106. filters={[
  107. { type: 'radio', checked: 'first', list: [{ key: 'first', title: 123 }, { key: 'two', title: 321 }] },
  108. ]}
  109. data={[{}]}
  110. columns={[
  111. {
  112. title: '练习册',
  113. width: 250,
  114. align: 'left',
  115. render: () => {
  116. return (
  117. <div className="table-row">
  118. <div className="night f-s-16">OG18 综合:第1-20题</div>
  119. <div>
  120. <ProgressText progress="30" size="small" />
  121. </div>
  122. </div>
  123. );
  124. },
  125. },
  126. {
  127. title: '正确率',
  128. width: 150,
  129. align: 'left',
  130. render: () => {
  131. return (
  132. <div className="table-row">
  133. <div className="night f-s-16 f-w-b">--</div>
  134. <div className="f-s-12">全站55%</div>
  135. </div>
  136. );
  137. },
  138. },
  139. {
  140. title: '全站用时',
  141. width: 150,
  142. align: 'left',
  143. render: () => {
  144. return (
  145. <div className="table-row">
  146. <div className="night f-s-16 f-w-b">55%</div>
  147. <div className="f-s-12">全站56s</div>
  148. </div>
  149. );
  150. },
  151. },
  152. {
  153. title: '最近做题',
  154. width: 150,
  155. align: 'left',
  156. render: () => {
  157. return (
  158. <div className="table-row">
  159. <div>2019-04-28</div>
  160. <div>07:30</div>
  161. </div>
  162. );
  163. },
  164. },
  165. {
  166. title: '操作',
  167. width: 180,
  168. align: 'left',
  169. render: () => {
  170. return (
  171. <div className="table-row p-t-1">
  172. <IconButton type="start" tip="Start" />
  173. </div>
  174. );
  175. },
  176. },
  177. {
  178. title: '报告',
  179. width: 30,
  180. align: 'right',
  181. render: () => {
  182. return (
  183. <div className="table-row p-t-1">
  184. <IconButton type="report" tip="Report" />
  185. </div>
  186. );
  187. },
  188. },
  189. ]}
  190. />
  191. </div>
  192. </div>
  193. );
  194. }
  195. }