page.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. import React, { Component } from 'react';
  2. import './index.less';
  3. import { Icon, Checkbox } from 'antd';
  4. import Page from '@src/containers/Page';
  5. import { timeRange, getMap, formatPercent, formatMonth, formatDate, formatSeconds } from '@src/services/Tools';
  6. import UserLayout from '../../../layouts/User';
  7. import UserTable from '../../../components/UserTable';
  8. import UserAction from '../../../components/UserAction';
  9. import { RealAuth } from '../../../components/OtherModal';
  10. import Examination from '../../../components/Examination';
  11. import VipRenew from '../../../components/VipRenew';
  12. import menu, { refreshQuestionType } from '../index';
  13. import Tabs from '../../../components/Tabs';
  14. import Modal from '../../../components/Modal';
  15. import Select from '../../../components/Select';
  16. import GIcon from '../../../components/Icon';
  17. import { TimeRange, QuestionType, PrepareStatus, ExperiencePercent } from '../../../../Constant';
  18. import { My } from '../../../stores/my';
  19. import { Question } from '../../../stores/question';
  20. const QuestionTypeMap = getMap(QuestionType, 'value', 'label');
  21. const PrepareStatusMap = getMap(PrepareStatus, 'value', 'label');
  22. const ExperiencePercentMap = getMap(ExperiencePercent, 'value', 'label');
  23. const columns = [
  24. {
  25. key: 'question_type',
  26. title: '题型',
  27. render: (text, record) => {
  28. return QuestionTypeMap[record.questionType];
  29. },
  30. fixSort: true,
  31. },
  32. {
  33. key: 'title',
  34. title: '题目ID',
  35. fixSort: true,
  36. },
  37. {
  38. key: 'description',
  39. title: '内容',
  40. },
  41. {
  42. key: 'time',
  43. title: '耗时',
  44. sort: true,
  45. render: (text, record) => {
  46. // <Assets height={10} width={10} name='up' />
  47. return <div className="sub">
  48. <div className="t-2 t-s-12">{formatSeconds(record.stat.userTime / record.stat.userNumber)}</div>
  49. <div className="t-6 t-s-12">全站{formatSeconds(record.questionNo.totalTime / record.questionNo.totalNumber)}</div>
  50. </div>;
  51. },
  52. },
  53. {
  54. key: 'correct',
  55. title: '错误率',
  56. sort: true,
  57. render: (text, record) => {
  58. return <div className="sub">
  59. <div className="t-2 t-s-12">{formatPercent(record.stat.userCorrect, record.stat.userNumber, false)}</div>
  60. <div className="t-6 t-s-12">{record.stat.userCorrect}/{record.stat.userNumber}</div>
  61. </div>;
  62. },
  63. },
  64. {
  65. key: 'latest_time',
  66. title: '最近做题',
  67. render: (text) => {
  68. return <div className="sub">
  69. <div className="t-2 t-s-12">{text.split(' ')[0]}</div>
  70. <div className="t-6 t-s-12">{text.split(' ')[1]}</div>
  71. </div>;
  72. },
  73. },
  74. {
  75. key: '',
  76. title: '',
  77. render: (text, record) => {
  78. return <div><GIcon name="note" active={record.note} /></div>;
  79. },
  80. },
  81. ];
  82. const exportType = [
  83. { key: 'question', title: '题目' },
  84. { key: 'official', title: '官方解析' },
  85. { key: 'note', title: '我的笔记' },
  86. { key: 'qx', title: '千行解析', auth: true },
  87. { key: 'association', title: '题源联想', auth: true },
  88. { key: 'qa', title: '相关问答', auth: true },
  89. ];
  90. export default class extends Page {
  91. constructor(props) {
  92. props.size = 10;
  93. super(props);
  94. }
  95. initState() {
  96. return {
  97. tab: 'question',
  98. module: 'exercise',
  99. timerange: 'today',
  100. filterMap: {},
  101. sortMap: {},
  102. list: [],
  103. selectList: [],
  104. allChecked: false,
  105. showDetail: false,
  106. };
  107. }
  108. initData() {
  109. const data = Object.assign(this.state, this.state.search);
  110. data.filterMap = this.state.search;
  111. if (data.order) {
  112. data.sortMap = { [data.order]: data.direction };
  113. }
  114. if (data.timerange) {
  115. data.filterMap.timerange = data.timerange;
  116. }
  117. switch (data.tab) {
  118. case 'question':
  119. return this.refreshQuestion(data);
  120. case 'article':
  121. return this.refreshArticle(data);
  122. default:
  123. return null;
  124. }
  125. }
  126. refreshQuestion(data) {
  127. const [startTime, endTime] = timeRange(data.timerange);
  128. refreshQuestionType(this, data.subject, data.questionType, {
  129. all: true,
  130. needSentence: true,
  131. allSubject: true,
  132. }).then(({ questionTypes }) => {
  133. this.setState({ moduleSelect: [{ title: '练习', key: 'exercise' }, { title: '模考', key: 'examination' }] });
  134. My.listQuestionCollect(
  135. Object.assign(
  136. { module: data.module, questionTypes, startTime, endTime },
  137. this.state.search,
  138. {
  139. order: Object.keys(data.sortMap)
  140. .map(key => {
  141. if (key === 'title') return 'pid desc, no desc';
  142. return `${key} ${data.sortMap[key]}`;
  143. })
  144. .join(','),
  145. },
  146. ),
  147. ).then(result => {
  148. console.log(result);
  149. result.list = result.list.map(row => {
  150. row.questionType = row.question.questionType;
  151. row.title = row.questionNo.title;
  152. row.description = row.question.description;
  153. row.latestTime = formatDate(row.latestTime, 'YYYY-MM-DD HH:mm:ss');
  154. return row;
  155. });
  156. this.setState({ list: result.list, total: result.total });
  157. });
  158. });
  159. }
  160. refreshArticle(data) {
  161. const [startTime, endTime] = timeRange(data.timerange);
  162. My.listExperienceCollect(Object.assign({ startTime, endTime }, this.state.search)).then(result => {
  163. this.setState({ list: result.list, total: result.total });
  164. });
  165. }
  166. onTabChange(tab) {
  167. const data = { tab };
  168. this.refreshQuery(data);
  169. }
  170. onFilter(value) {
  171. this.search(value);
  172. }
  173. onSort(value) {
  174. const keys = Object.keys(value);
  175. // this.search({ order: keys.length ? keys.join('|') : null, direction: keys.length ? Object.values(value).join('|') : null });
  176. const { sortMap } = this.state;
  177. const index = keys.length > 1 && sortMap[keys[0]] ? 1 : 0;
  178. this.search({ order: keys.length ? keys[index] : null, direction: keys.length ? value[keys[index]] : null });
  179. }
  180. onChangePage(page) {
  181. this.search({ page });
  182. }
  183. onAll(checked) {
  184. if (checked) {
  185. const { data = [] } = this.state;
  186. const list = [];
  187. data.forEach(item => {
  188. list.push(item.key);
  189. });
  190. this.setState({ selectList: list, allChecked: true });
  191. } else {
  192. this.setState({ selectList: [], allChecked: false });
  193. }
  194. }
  195. onSelect(selectList) {
  196. this.setState({ selectList });
  197. }
  198. onAction(key) {
  199. const { info } = this.props.user;
  200. const { selectList } = this.state;
  201. switch (key) {
  202. case 'help':
  203. this.setState({ showTips: true });
  204. return;
  205. case 'clear':
  206. if (selectList.length === 0) {
  207. this.setState({ showWarn: true, warn: { title: '移除', content: '不可少于1题,请重新选择' } });
  208. return;
  209. }
  210. this.setState({ showClearCollectConfirm: true, clearInfo: { questionNoIds: selectList } });
  211. break;
  212. case 'group':
  213. if (!info.vip) {
  214. this.setState({ showVip: true });
  215. return;
  216. }
  217. if (selectList.length < 0) {
  218. this.setState({ showWarn: true, warn: { title: '组卷练习', content: '不可小于10题,请重新选择' } });
  219. return;
  220. }
  221. if (selectList.length > 50) {
  222. this.setState({ showWarn: true, warn: { title: '组卷练习', content: '不可多余50题,请重新选择' } });
  223. return;
  224. }
  225. if (selectList.length === 0) {
  226. this.setState({ showWarn: true, warn: { title: '组卷练习', content: '不可同时选中语文题和数学题,请重新选择。' } });
  227. return;
  228. }
  229. this.setState({ showGroupConfirm: true, groupInfo: { questionNoIds: selectList } });
  230. break;
  231. case 'export':
  232. if (!info.vip) {
  233. this.setState({ showVip: true });
  234. return;
  235. }
  236. if (selectList.length < 0) {
  237. this.setState({ showWarn: true, warn: { title: '导出', content: '不可小于10题,请重新选择' } });
  238. return;
  239. }
  240. if (selectList.length > 100) {
  241. this.setState({ showWarn: true, warn: { title: '导出', content: '不可多余100题,请重新选择' } });
  242. return;
  243. }
  244. if (info.bindReal) {
  245. this.setState({ showExportConfirm: true, exportInfo: { info: exportType.map(row => row.key), questionNoIds: selectList } });
  246. } else {
  247. this.setState({ showExportAuthConfirm: true, exportInfo: { info: exportType.filter(row => !row.auth).map(row => row.key), questionNoIds: selectList } });
  248. }
  249. break;
  250. default:
  251. }
  252. }
  253. clearCollectQuestion() {
  254. const { exportInfo } = this.state;
  255. My.clearQuestionCollect(exportInfo.questionNoIds)
  256. .then(() => {
  257. this.refresh();
  258. })
  259. .then(e => {
  260. this.setState({ warn: { title: '移除', content: e.message }, showClearCollectConfirm: false });
  261. });
  262. }
  263. group() {
  264. const { groupInfo } = this.state;
  265. My.groupQuestionCollect(groupInfo)
  266. .then((result) => {
  267. Question.startLink('collect', result);
  268. this.setState({ showGroupConfirm: false });
  269. })
  270. .catch(e => {
  271. this.setState({ warn: { title: '组卷练习', content: e.message }, showGroupConfirm: false });
  272. });
  273. }
  274. export() {
  275. const { exportInfo } = this.state;
  276. this.setState({ showExportWait: true, showExportConfirm: false, showExportAuthConfirm: false });
  277. My.exportQuestion(exportInfo)
  278. .then((result) => {
  279. openLink(`/export/${result.id}`);
  280. this.setState({ showExportWait: false });
  281. })
  282. .catch(e => {
  283. this.setState({ warn: { title: '导出', content: e.message }, showExportWait: false });
  284. });
  285. }
  286. collectArticle(row, checked) {
  287. if (checked) {
  288. My.addExperienceCollect(row.id).then(() => {
  289. this.refresh();
  290. });
  291. } else {
  292. My.delExperienceCollect(row.id).then(() => {
  293. this.refresh();
  294. });
  295. }
  296. }
  297. prevArticle() {
  298. const { list, article } = this.state;
  299. let index = -1;
  300. list.forEach((row, i) => {
  301. if (row.id === article.id) {
  302. index = i;
  303. }
  304. });
  305. if (index === 0) return;
  306. this.setState({ article: list[index - 1] });
  307. }
  308. nextArticle() {
  309. const { list, article } = this.state;
  310. let index = -1;
  311. list.forEach((row, i) => {
  312. if (row.id === article.id) {
  313. index = i;
  314. }
  315. });
  316. if (index === list.length - 1) return;
  317. this.setState({ article: list[index + 1] });
  318. }
  319. renderView() {
  320. const { config } = this.props;
  321. return <UserLayout active={config.key} menu={menu} center={this.renderTable()} />;
  322. }
  323. renderTable() {
  324. const { tab } = this.state;
  325. return (
  326. <div className="table-layout">
  327. <Tabs
  328. border
  329. type="division"
  330. theme="theme"
  331. size="small"
  332. space={2.5}
  333. width={100}
  334. active={tab}
  335. tabs={[{ key: 'question', title: '题目' }, { key: 'article', title: '文章' }]}
  336. onChange={key => this.onTabChange(key)}
  337. />
  338. {this[`renderTab${tab}`]()}
  339. {this.renderModal()}
  340. </div>
  341. );
  342. }
  343. renderTabquestion() {
  344. const { info } = this.props.user;
  345. const {
  346. questionSubjectSelect,
  347. questionSubjectMap = {},
  348. moduleSelect,
  349. filterMap = {},
  350. sortMap = {},
  351. list = [],
  352. } = this.state;
  353. const { selectList = [], allChecked, page, total } = this.state;
  354. return (
  355. <div className="tab-1-layout">
  356. <UserAction
  357. search
  358. selectList={[
  359. {
  360. children: [
  361. {
  362. key: 'subject',
  363. placeholder: '学科',
  364. select: questionSubjectSelect,
  365. },
  366. {
  367. placeholder: '题型',
  368. key: 'questionType',
  369. be: 'subject',
  370. selectMap: questionSubjectMap,
  371. },
  372. ],
  373. },
  374. {
  375. label: '范围',
  376. key: 'module',
  377. select: moduleSelect,
  378. },
  379. {
  380. right: true,
  381. key: 'timerange',
  382. select: TimeRange,
  383. },
  384. ]}
  385. filterMap={filterMap}
  386. onFilter={value => this.onFilter(value)}
  387. />
  388. <UserAction
  389. allCheckbox
  390. allChecked={allChecked}
  391. help
  392. btnList={[
  393. { title: '移除', key: 'clear' },
  394. { title: '组卷', key: 'group', tag: 'vip', disabled: !info.vip },
  395. { title: '导出', key: 'export', tag: 'vip', disabled: !info.vip },
  396. ]}
  397. onAll={checked => this.onAll(checked)}
  398. onAction={key => this.onAction(key)}
  399. />
  400. <UserTable
  401. select
  402. columns={columns}
  403. sortMap={sortMap}
  404. data={list}
  405. current={page}
  406. pageSize={this.state.search.size}
  407. total={total}
  408. selectList={selectList}
  409. onSelect={l => this.onSelect(l)}
  410. onSort={v => this.onSort(v)}
  411. onChange={p => this.onChangePage(p)}
  412. />
  413. </div>
  414. );
  415. }
  416. renderTabarticle() {
  417. const { filterMap = {}, sortMap = {}, list = [] } = this.state;
  418. return (
  419. <div className="tab-1-layout">
  420. <UserAction
  421. sortList={[
  422. {
  423. key: 'create_time',
  424. label: '收藏时间',
  425. },
  426. {
  427. key: 'update_time',
  428. label: '更新时间',
  429. },
  430. ]}
  431. sortMap={sortMap}
  432. filterMap={filterMap}
  433. onFilter={value => this.onFilter(value)}
  434. onSort={value => this.onSort(value)}
  435. />
  436. {list.map(item => {
  437. return <Article data={item} onClick={() => this.setState({ showDetail: true, article: item })} onUnCollect={() => this.collectArticle(item, false)} />;
  438. })}
  439. </div>
  440. );
  441. }
  442. renderModal() {
  443. const { article = {}, showTips, showWarn, warn = {}, showClearCollectConfirm, clearInfo = {}, showGroupConfirm, groupInfo = {}, showExportConfirm, showExportAuthConfirm, exportInfo = {}, showExportWait, showExamination, showVip, showReal } = this.state;
  444. const { info } = this.props.user;
  445. return [
  446. <ArticleDetail show={this.state.showDetail} data={article} onClose={() => this.setState({ showDetail: false })} onPrev={() => this.prevArticle()} onNext={() => this.nextArticle()} />,
  447. <Modal show={showTips} title="操作提示" confirmText="好的,知道了" btnAlign="center" onConfirm={() => this.setState({ showTips: false })}>
  448. <div className="flex-layout m-b-2">
  449. <div className="flex-block">
  450. <div className="t-1 t-s-18">组卷功能</div>
  451. <div className="t-2">操作数量:10-50;</div>
  452. <div className="t-2">注意事项:可跨题型、不可跨学科。</div>
  453. </div>
  454. <div className="flex-block">
  455. <div className="t-1 t-s-18">导出功能</div>
  456. <div className="t-2">操作数量:1-100;</div>
  457. <div className="t-2">注意事项:“综合推理IR”暂时无法导出。</div>
  458. </div>
  459. </div>
  460. <div className="t-3">
  461. *您可点击
  462. <Icon type="question-circle" theme="filled" />
  463. 查阅以上信息。
  464. </div>
  465. </Modal>,
  466. <Modal show={showWarn} title={warn.title} confirmText="好的,知道了" btnAlign="center" onConfirm={() => this.setState({ showWarn: false })}>
  467. <div className="t-2 t-s-18">{warn.content}</div>
  468. </Modal>,
  469. <Modal show={showGroupConfirm} title="组卷练习" confirmText="开始练习" onConfirm={() => this.group()} onCancel={() => this.setState({ showGroupConfirm: false })}>
  470. <div className="t-2 t-s-18">
  471. 您共选择了 <span className="t-4">{groupInfo.questionNoIds ? groupInfo.questionNoIds.length : 0}</span> 道题目,是否开始练习?
  472. </div>
  473. <div className="t-2 t-s-16">
  474. <Checkbox checked className="m-r-5" />
  475. 剔除已组卷练习 <Select
  476. theme="white"
  477. value={groupInfo.filterTimes}
  478. list={[{ key: 2, title: '2' }, { key: 3, title: '3' }]}
  479. onChange={(key) => {
  480. groupInfo.filterTimes = key;
  481. this.setState({ groupInfo });
  482. }}
  483. />{' '}
  484. 次以上的错题
  485. </div>
  486. </Modal>,
  487. <Modal show={showClearCollectConfirm} title="移出" onConfirm={() => this.clearCollectQuestion()} onCancel={() => this.setState({ showClearCollectConfirm: false })}>
  488. <div className="t-2 t-s-18">
  489. 当前选中的 <span className="t-4">{clearInfo.questionNoIds ? clearInfo.questionNoIds.length : 0}</span> 道题即将被移出收藏,移出后无法恢复,是否继续?
  490. </div>
  491. </Modal>,
  492. <Modal show={showExportWait} title="导出" confirmText="好的,知道了" btnAlign="center" onConfirm={() => this.setState({ showExportWait: false })}>
  493. <div className="t-2 t-s-18">正在下载中,请不要关闭当前页面!</div>
  494. </Modal>,
  495. <Modal show={showExportConfirm} title="导出" confirmText="导出" onConfirm={() => this.export()} onCancel={() => this.setState({ showExportConfirm: false })}>
  496. <div className="t-2 t-s-18 m-b-5">
  497. 当前共选中 <span className="t-4">{exportInfo.questionNoIds ? exportInfo.questionNoIds.length : 0}</span> 道题,请确认需要导出的内容:
  498. </div>
  499. <div className="t-2 t-s-16">
  500. {exportType.map(item => {
  501. return (
  502. <div className="d-i-b m-b-5" style={{ width: 135 }}>
  503. <Checkbox checked={exportInfo.info ? exportInfo.info.indexOf(item.key) >= 0 : false} className="m-r-5" onChange={() => {
  504. exportInfo.info.push(item.key);
  505. this.setState({ exportInfo });
  506. }} />
  507. {item.title}
  508. </div>
  509. );
  510. })}
  511. </div>
  512. </Modal>,
  513. <Modal show={showExportAuthConfirm} title="导出" confirmText="导出" onConfirm={() => this.export()} onCancel={() => this.setState({ showExportAuthConfirm: false })}>
  514. <div className="t-2 t-s-18 m-b-5">
  515. 当前共选中 <span className="t-4">{exportInfo.questionNoIds ? exportInfo.questionNoIds.length : 0}</span> 道题,请确认需要导出的内容:
  516. </div>
  517. <div className="t-2 t-s-16 m-b-2">
  518. {exportType
  519. .filter(item => !item.auth)
  520. .map(item => {
  521. return (
  522. <div className="d-i-b m-b-2" style={{ width: 135 }}>
  523. <Checkbox checked={exportInfo.info ? exportInfo.info.indexOf(item.key) >= 0 : false} className="m-r-5" onChange={() => {
  524. exportInfo.info.push(item.key);
  525. this.setState({ exportInfo });
  526. }} />
  527. {item.title}
  528. </div>
  529. );
  530. })}
  531. </div>
  532. <div className="b-b m-b-2 m-t-2" />
  533. <div className="t-3 m-b-1">
  534. 以下内容需实名认证后才可导出: <a className="f-r" onClick={() => this.setState({ showExportAuthConfirm: false, showReal: true })}>去认证 ></a>
  535. </div>
  536. <div className="t-2 t-s-16 m-b-2">
  537. {exportType
  538. .filter(item => item.auth)
  539. .map(item => {
  540. return (
  541. <div className="d-i-b" style={{ width: 135 }}>
  542. <Checkbox disabled className="m-r-5" />
  543. {item.title}
  544. </div>
  545. );
  546. })}
  547. </div>
  548. </Modal>,
  549. <Examination
  550. show={showExamination}
  551. data={info}
  552. onConfirm={() => this.setState({ showExamination: false })}
  553. onCancel={() => this.setState({ showExamination: false })}
  554. onClose={() => this.setState({ showExamination: false })}
  555. />,
  556. <RealAuth show={showReal} data={info} onConfirm={() => this.setState({ showReal: false })} />,
  557. <VipRenew
  558. show={showVip}
  559. data={info}
  560. onReal={() => this.setState({ showVip: false, showReal: true })}
  561. onPrepare={() => this.setState({ showVip: false, showExamination: true })}
  562. onClose={() => this.setState({ showVip: false })}
  563. />,
  564. ];
  565. }
  566. }
  567. class ArticleDetail extends Component {
  568. render() {
  569. const { show, data, onClose, onPrev, onNext } = this.props;
  570. return (
  571. <Modal
  572. className="article-detail-modal"
  573. body={false}
  574. show={show}
  575. width={720}
  576. maskClosable
  577. close={false}
  578. onClose={onClose}
  579. center
  580. >
  581. <Icon type="left" className="prev" onClick={() => onPrev && onPrev()} />
  582. <Icon type="right" className="next" onClick={() => onNext && onNext()} />
  583. <div className="t-1 t-s-20 m-b-5">{data.title}</div>
  584. <div className="t-1 t-s-12 m-b-2">
  585. <span className="m-r-2">{data.user ? data.user.nickname : data.nickname}</span>
  586. <span className="m-r-2">{PrepareStatusMap[data.prepareStatus]}</span>
  587. <span className="m-r-2">备考:{formatMonth(data.experienceDay, false)}</span>
  588. <span className="m-r-2">{data.experienceScore}分 /提分 {ExperiencePercentMap[data.experiencePercent]}</span>
  589. <span className="t-4">更多信息</span>
  590. </div>
  591. <div className="t-2 t-s-18 detail" dangerouslySetInnerHTML={{ __html: data.content }} />
  592. </Modal>
  593. );
  594. }
  595. }
  596. class Article extends Component {
  597. render() {
  598. const { data, onClick, onUnCollect } = this.props;
  599. return (
  600. <div className="article-item p-t-2 b-b" onClick={() => onClick && onClick()}>
  601. <div className="t-1 t-s-14 f-w-b">
  602. {data.title}
  603. <div className="f-r t-3 t-s-12 f-w-d">
  604. <span>{formatDate(data.updateTime, 'YYYY-MM-DD HH:mm:ss')}</span>
  605. <span className="m-l-2">阅读 {data.viewNumber}</span>
  606. <span className="m-l-2" onClick={() => onUnCollect()}>取消收藏</span>
  607. </div>
  608. </div>
  609. <div className="t-1 t-s-12 m-b-2">
  610. <span className="m-r-2">{data.user ? data.user.nickname : data.nickname}</span>
  611. <span className="m-r-2">{PrepareStatusMap[data.prepareStatus]}</span>
  612. <span className="m-r-2">备考:{formatMonth(data.experienceDay, false)}</span>
  613. <span className="m-r-2">{data.experienceScore}分 /提分 {ExperiencePercentMap[data.experiencePercent]}</span>
  614. </div>
  615. <div className="t-2 m-b-2 detail" dangerouslySetInnerHTML={{ __html: data.content }} />
  616. </div>
  617. );
  618. }
  619. }