page.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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, { BuyPanel, WaitPanel, SmallPanel, SmallWaitPanel, SmallBuyPanel } from '../../../components/Panel';
  9. import Card, { Card1 } 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. import Step from '../../../components/Step';
  15. import OtherAnswer from '../../../components/OtherAnswer';
  16. import QAList from '../../../components/QAList';
  17. import Select from '../../../components/Select';
  18. export default class extends Page {
  19. renderView() {
  20. return (
  21. <div>
  22. <Continue date={'2019-04-29 16:30'} data={{}} />
  23. <div className="content">
  24. <Select list={[{ title: '123' }, { title: '321' }]} />
  25. <Select theme="white" list={[{ title: '123' }, { title: '321' }]} />
  26. <Select theme="default" list={[{ title: '123' }, { title: '321' }]} />
  27. <Division col="3" type="compact">
  28. <SmallPanel
  29. title="千行 CAT"
  30. lock
  31. data={{ info: [{ title: '123', number: '123', unit: '1' }, { title: '123', number: '123', unit: '1' }] }}
  32. />
  33. <SmallWaitPanel title="千行 CAT" />
  34. <SmallBuyPanel title="千行 CAT" />
  35. </Division>
  36. <Division col="2">
  37. <WaitPanel
  38. title="OG"
  39. col="3"
  40. data={{
  41. info: [
  42. { title: '123', number: 123, unit: '%' },
  43. { title: '123', number: 123, unit: '%' },
  44. { title: '123', number: 123, unit: '%' },
  45. { title: '123', number: 123, unit: '%' },
  46. ],
  47. desc: ['最近换库:2019-07-20 ,已换库10天', '最后更新:2019-07-28 00:28:49'],
  48. children: [
  49. { progress: 10, title: '测试' },
  50. { progress: 10, title: '测试' },
  51. { progress: 0, title: '测试' },
  52. ],
  53. }}
  54. />
  55. <Panel
  56. title="OG"
  57. col="3"
  58. data={{
  59. info: [
  60. { title: '123', number: 123, unit: '%' },
  61. { title: '123', number: 123, unit: '%' },
  62. { title: '123', number: 123, unit: '%' },
  63. { title: '123', number: 123, unit: '%' },
  64. ],
  65. desc: ['最近换库:2019-07-20 ,已换库10天', '最后更新:2019-07-28 00:28:49'],
  66. children: [
  67. { progress: 10, title: '测试' },
  68. { progress: 10, title: '测试' },
  69. { progress: 0, title: '测试' },
  70. ],
  71. }}
  72. />
  73. <BuyPanel title="OG" />
  74. </Division>
  75. <QAList data={[]} />
  76. <Tabs
  77. type="tag"
  78. active="main"
  79. space={5}
  80. tabs={[
  81. { key: 'main', name: '首页', path: '/' },
  82. { key: 'ready', name: 'GetReady', path: '/' },
  83. { key: 'exercise', name: '练习', path: '/' },
  84. { key: 'cat', name: 'CAT模考', path: '/' },
  85. { key: 'item', name: '题库', path: '/' },
  86. { key: 'machine', name: '换库&机经', path: '/' },
  87. ]}
  88. />
  89. <Module className="m-t-2">
  90. <Tabs
  91. type="card"
  92. active="main"
  93. tabs={[
  94. { key: 'main', name: '首页', path: '/' },
  95. { key: 'ready', name: 'GetReady', path: '/' },
  96. { key: 'exercise', name: '练习', path: '/' },
  97. { key: 'cat', name: 'CAT模考', path: '/' },
  98. { key: 'item', name: '题库', path: '/' },
  99. { key: 'machine', name: '换库&机经', path: '/' },
  100. ]}
  101. />
  102. <Tabs
  103. active="main"
  104. tabs={[
  105. { key: 'main', name: '首页', path: '/' },
  106. { key: 'ready', name: 'GetReady', path: '/' },
  107. { key: 'exercise', name: '练习', path: '/' },
  108. { key: 'cat', name: 'CAT模考', path: '/' },
  109. { key: 'item', name: '题库', path: '/' },
  110. ]}
  111. />
  112. </Module>
  113. <Module>
  114. <Tabs
  115. active="main"
  116. border
  117. width="180px"
  118. space="0"
  119. tabs={[
  120. { key: 'main', name: '首页', path: '/' },
  121. { key: 'ready', name: 'GetReady', path: '/' },
  122. { key: 'exercise', name: '练习', path: '/' },
  123. { key: 'cat', name: 'CAT模考', path: '/' },
  124. { key: 'item', name: '题库', path: '/' },
  125. ]}
  126. />
  127. <Tabs
  128. active="main"
  129. type="text"
  130. tabs={[
  131. { key: 'main', name: '首页', path: '/' },
  132. { key: 'ready', name: 'GetReady', path: '/' },
  133. { key: 'exercise', name: '练习', path: '/' },
  134. { key: 'cat', name: 'CAT模考', path: '/' },
  135. { key: 'item', name: '题库', path: '/' },
  136. ]}
  137. />
  138. </Module>
  139. <Module>
  140. <Step
  141. list={[
  142. '「1」前言',
  143. '「2」重新认识',
  144. '「3」基本元素',
  145. '「4」简单变长',
  146. '「5」练习',
  147. '「6」翻译',
  148. '「7」附录',
  149. ]}
  150. step="4"
  151. />
  152. </Module>
  153. <Division col="2">
  154. <Panel
  155. title="OG"
  156. col="3"
  157. data={{
  158. info: [
  159. { title: '123', number: 123, unit: '%' },
  160. { title: '123', number: 123, unit: '%' },
  161. { title: '123', number: 123, unit: '%' },
  162. { title: '123', number: 123, unit: '%' },
  163. ],
  164. desc: ['最近换库:2019-07-20 ,已换库10天', '最后更新:2019-07-28 00:28:49'],
  165. children: [
  166. { progress: 10, title: '测试' },
  167. { progress: 10, title: '测试' },
  168. { progress: 0, title: '测试' },
  169. ],
  170. }}
  171. />
  172. <Panel
  173. title="OG"
  174. col="4"
  175. data={{
  176. info: [
  177. { title: '123', number: 123 },
  178. { title: '123', number: 123 },
  179. { title: '123', number: 123 },
  180. { title: '123', number: 123 },
  181. ],
  182. children: [
  183. { progress: 10, title: '测试' },
  184. { progress: 10, title: '测试' },
  185. { progress: 0, title: '测试' },
  186. ],
  187. }}
  188. />
  189. </Division>
  190. <Division col="3">
  191. <Card1 title="句改 SC" data={{ status: 'open', qrCode: '123' }} />
  192. <Card1 title="句改 SC" tag="视频课程" data={{ status: 'stop' }} />
  193. <Card1 title="句改 SC" tag="视频课程" data={{ status: 'open' }} />
  194. <Card1
  195. title="句改 SC"
  196. tag="视频课程"
  197. data={{
  198. status: 'ing',
  199. list: [
  200. { progress: 30, title: '课时5:掌握语法结构', status: 'start' },
  201. { progress: 40, title: '课时5:掌握语法结构', status: 'ing' },
  202. ],
  203. }}
  204. />
  205. <Card1 title="句改 SC" tag="视频课程" data={{ status: 'ing', list: [] }} />
  206. <Card1 title="句改 SC" tag="视频课程" data={{ status: 'end' }} />
  207. </Division>
  208. <Division col="3">
  209. <Card title="句改 SC" data={{ status: 'buy', desc: ['名师讲解', '精进学习', '提升成绩'] }} />
  210. <Card title="句改 SC" data={{ status: 'open' }} />
  211. <Card
  212. title="句改 SC"
  213. data={{
  214. status: 'ing',
  215. list: [
  216. { progress: 30, date: '2019-04-22', status: 'start' },
  217. { progress: 40, date: '2019-04-22', status: 'ing' },
  218. ],
  219. }}
  220. />
  221. <Card title="句改 SC" data={{ status: 'ing', list: [] }} />
  222. <Card title="句改 SC" data={{ status: 'end' }} />
  223. </Division>
  224. <List
  225. position="Chapter4"
  226. title="简单句如何变长难句"
  227. list={[{ progress: 30, title: '什么样的句子叫长难句,长难句的基本特征。', position: 'Part 1' }]}
  228. />
  229. <ListTable
  230. position="Chapter5"
  231. title="练习"
  232. filters={[
  233. { type: 'radio', checked: 'first', list: [{ key: 'first', title: 123 }, { key: 'two', title: 321 }] },
  234. { type: 'select', checked: 'first', list: [{ key: 'first', title: 123 }, { key: 'two', title: 321 }] },
  235. ]}
  236. data={[{}]}
  237. columns={[
  238. {
  239. title: '练习册',
  240. width: 250,
  241. align: 'left',
  242. render: () => {
  243. return (
  244. <div className="table-row">
  245. <div className="night f-s-16">OG18 综合:第1-20题</div>
  246. <div>
  247. <ProgressText progress="30" size="small" />
  248. </div>
  249. </div>
  250. );
  251. },
  252. },
  253. {
  254. title: '正确率',
  255. width: 150,
  256. align: 'left',
  257. render: () => {
  258. return (
  259. <div className="table-row">
  260. <div className="night f-s-16 f-w-b">--</div>
  261. <div className="f-s-12">全站55%</div>
  262. </div>
  263. );
  264. },
  265. },
  266. {
  267. title: '全站用时',
  268. width: 150,
  269. align: 'left',
  270. render: () => {
  271. return (
  272. <div className="table-row">
  273. <div className="night f-s-16 f-w-b">55%</div>
  274. <div className="f-s-12">全站56s</div>
  275. </div>
  276. );
  277. },
  278. },
  279. {
  280. title: '最近做题',
  281. width: 150,
  282. align: 'left',
  283. render: () => {
  284. return (
  285. <div className="table-row">
  286. <div>2019-04-28</div>
  287. <div>07:30</div>
  288. </div>
  289. );
  290. },
  291. },
  292. {
  293. title: '操作',
  294. width: 180,
  295. align: 'left',
  296. render: () => {
  297. return (
  298. <div className="table-row p-t-1">
  299. <IconButton className="m-r-2" type="continue" tip="Continue" />
  300. <IconButton type="restart" tip="Restart" />
  301. </div>
  302. );
  303. },
  304. },
  305. {
  306. title: '报告',
  307. width: 30,
  308. align: 'right',
  309. render: () => {
  310. return (
  311. <div className="table-row p-t-1">
  312. <IconButton type="report" tip="Report" />
  313. </div>
  314. );
  315. },
  316. },
  317. ]}
  318. />
  319. <OtherAnswer data={{ content: '123123', answer: '123123123' }} />
  320. </div>
  321. </div>
  322. );
  323. }
  324. }