page.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  1. import React from 'react';
  2. import './index.less';
  3. import { Tooltip, Popover, Checkbox } from 'antd';
  4. import Page from '@src/containers/Page';
  5. import Assets from '@src/components/Assets';
  6. import { timeRange, formatPercent, formatSeconds, formatDate, getMap } from '@src/services/Tools';
  7. import UserLayout from '../../../layouts/User';
  8. import UserAction from '../../../components/UserAction';
  9. import UserTable from '../../../components/UserTable';
  10. import IconButton from '../../../components/IconButton';
  11. import menu, { refreshQuestionType, refreshStruct } from '../index';
  12. import Tabs from '../../../components/Tabs';
  13. import { TimeRange, QuestionType } from '../../../../Constant';
  14. import { My } from '../../../stores/my';
  15. import { Main } from '../../../stores/main';
  16. import { Question } from '../../../stores/question';
  17. const QuestionnTypeMap = getMap(QuestionType, 'value', 'label');
  18. export default class extends Page {
  19. constructor(props) {
  20. props.size = 10;
  21. super(props);
  22. this.columns = [
  23. { key: 'title', title: '练习册名称', fixSort: true },
  24. {
  25. key: 'create_time',
  26. title: '做题时间',
  27. fixSort: true,
  28. render: (text, row, index) => {
  29. return (
  30. <div>
  31. <div className="t-2">
  32. 2019-12-12
  33. {row.children && (
  34. <Popover
  35. trigger="click"
  36. content={
  37. <table className="user-report-history-overlay">
  38. <tbody>
  39. {row.children.map((child, i) => {
  40. return (
  41. <tr>
  42. <td>{row.children.length - i}</td>
  43. <td>2019-12-12 13:13:13</td>
  44. <td>3/20</td>
  45. <td>
  46. <Checkbox
  47. checked={!child.disabled}
  48. onChange={e => this.onChangeShowHistory(index, i, e.target.checked)}
  49. />
  50. </td>
  51. </tr>
  52. );
  53. })}
  54. </tbody>
  55. </table>
  56. }
  57. >
  58. <Tooltip overlayClassName="gray" title="历史数据">
  59. <span>
  60. <Assets className="m-l-5" name="down_normal" />
  61. </span>
  62. </Tooltip>
  63. </Popover>
  64. )}
  65. </div>
  66. <div className="t-6">13:13:13</div>
  67. </div>
  68. );
  69. },
  70. },
  71. { key: 'correct', title: '正确率', sort: true },
  72. { key: 'time', title: '平均耗时', sort: true },
  73. { key: 'progress', title: '完成度' },
  74. {
  75. key: 'report',
  76. title: '报告',
  77. render() {
  78. return <IconButton type="report" tip="report" />;
  79. },
  80. },
  81. ];
  82. Main.getExaminationNumber().then(nums => {
  83. this.nums = nums;
  84. this.setState({ load: false });
  85. });
  86. }
  87. initState() {
  88. return {
  89. tab: 'exercise',
  90. timerange: 'all',
  91. filterMap: {},
  92. sortMap: {},
  93. list: [], // { children: [{}, {}], title: 'channgnanjue' }, {}, {}, {}
  94. selectList: [],
  95. allChecked: false,
  96. defaultSortMap: { latest_time: 'desc' },
  97. };
  98. }
  99. init() {
  100. this.exerciseColumns = [
  101. {
  102. key: 'title',
  103. title: '练习册名称',
  104. fixSort: true,
  105. render: (text, record) => {
  106. if (text) {
  107. if (QuestionnTypeMap[record.questionTypes[0]]) return `${QuestionnTypeMap[record.questionTypes[0]]}-${text}`;
  108. return `${text}`;
  109. }
  110. return '';
  111. },
  112. },
  113. {
  114. key: 'latest_time',
  115. title: '做题时间',
  116. sort: true,
  117. render: (text, record, index, childIndex) => {
  118. const { reports, show } = record;
  119. const report = childIndex === -1 ? reports[0] : record;
  120. const time = formatDate(report.updateTime, 'YYYY-MM-DD HH:mm:ss');
  121. return <div className="">
  122. <div className="t-2 t-s-12">{time.split(' ')[0]}
  123. {childIndex === -1 && reports && reports.length > 1 && (
  124. <Popover
  125. trigger="click"
  126. content={
  127. <table className="user-report-history-overlay">
  128. <tbody>
  129. {reports.map((child, ii) => {
  130. if (ii === 0) return null;
  131. return <tr>
  132. <td>{reports.length - ii}</td>
  133. <td>{formatDate(child.updateTime, 'YYYY-MM-DD HH:mm:ss')}</td>
  134. <td>{child.userNumber}/{child.questionNumber}</td>
  135. <td>
  136. <Checkbox
  137. checked={show.indexOf(child.id) >= 0}
  138. onChange={e => this.onChangeShowHistory(index, ii, e.target.checked)}
  139. />
  140. </td>
  141. </tr>;
  142. })}
  143. </tbody>
  144. </table>
  145. }
  146. >
  147. <Tooltip overlayClassName="gray" title="历史数据">
  148. <span>
  149. <Assets className="m-l-5" name="down_normal" />
  150. </span>
  151. </Tooltip>
  152. </Popover>
  153. )}</div>
  154. <div className="t-6 t-s-12">{time.split(' ')[1]}</div>
  155. </div>;
  156. },
  157. },
  158. {
  159. key: 'correct',
  160. title: '正确率',
  161. sort: true,
  162. render: (text, record, index, childIndex) => {
  163. const { reports } = record;
  164. const report = childIndex === -1 ? reports[0] : record;
  165. const user = formatPercent(report.userCorrect, report.userNumber);
  166. const all = formatPercent(record.stat.totalCorrect, record.stat.totalNumber);
  167. return <div className="">
  168. <div className="t-2 t-s-12">{user}%<Assets height={10} width={10} name={user > all ? 'up' : 'down'} /></div>
  169. <div className="t-6 t-s-12">全站{all}%</div>
  170. </div>;
  171. },
  172. },
  173. {
  174. key: 'time',
  175. title: '平均耗时',
  176. sort: true,
  177. render: (text, record, index, childIndex) => {
  178. const { reports } = record;
  179. const report = childIndex === -1 ? reports[0] : record;
  180. const user = Math.floor(report.userTime / report.userNumber);
  181. const all = Math.floor(record.stat.totalTime / record.stat.totalNumber);
  182. return <div className="">
  183. <div className="t-2 t-s-12">{formatSeconds(user)}<Assets height={10} width={10} name={user > all ? 'down' : 'up'} /></div>
  184. <div className="t-6 t-s-12">全站{formatSeconds(all)}</div>
  185. </div>;
  186. },
  187. },
  188. {
  189. key: 'progress',
  190. title: '完成度',
  191. render: (text, record, index, childIndex) => {
  192. const { reports } = record;
  193. const report = childIndex === -1 ? reports[0] : record;
  194. return (
  195. <div className="">
  196. <div className="t-2 t-s-12">{formatPercent(report.userNumber, report.questionNumber, false)}</div>
  197. </div>
  198. );
  199. },
  200. },
  201. {
  202. key: 'report',
  203. title: '报告',
  204. render: (text, record, index, childIndex) => {
  205. const { reports } = record;
  206. const report = childIndex === -1 ? reports[0] : record;
  207. return (
  208. <div className="">
  209. <IconButton
  210. type="report"
  211. tip="report"
  212. onClick={() => {
  213. Question.reportLink({ report }, true);
  214. }}
  215. />
  216. </div>
  217. );
  218. },
  219. },
  220. ];
  221. this.examinationColumns = [
  222. { key: 'title', title: '模考名称', fixSort: true },
  223. {
  224. key: 'latest_time',
  225. title: '做题时间',
  226. sort: true,
  227. render: (text, record, index, childIndex) => {
  228. const { reports, show } = record;
  229. const report = childIndex === -1 ? reports[0] : record;
  230. const time = formatDate(report.updateTime, 'YYYY-MM-DD HH:mm:ss');
  231. return <div className="">
  232. <div className="t-2 t-s-12">{time.split(' ')[0]}
  233. {childIndex === -1 && reports && reports.length > 1 && (
  234. <Popover
  235. trigger="click"
  236. content={
  237. <table className="user-report-history-overlay">
  238. <tbody>
  239. {reports.map((child, ii) => {
  240. if (ii === 0) return null;
  241. return <tr>
  242. <td>{reports.length - ii}</td>
  243. <td>{formatDate(child.updateTime, 'YYYY-MM-DD HH:mm:ss')}</td>
  244. <td>{child.userNumber}/{child.questionNumber}</td>
  245. <td>
  246. <Checkbox
  247. checked={show.indexOf(child.id) >= 0}
  248. onChange={e => this.onChangeShowHistory(index, ii, e.target.checked)}
  249. />
  250. </td>
  251. </tr>;
  252. })}
  253. </tbody>
  254. </table>
  255. }
  256. >
  257. <Tooltip overlayClassName="gray" title="历史数据">
  258. <span>
  259. <Assets className="m-l-5" name="down_normal" />
  260. </span>
  261. </Tooltip>
  262. </Popover>
  263. )}</div>
  264. <div className="t-6 t-s-12">{time.split(' ')[1]}</div>
  265. </div>;
  266. },
  267. },
  268. {
  269. key: 'overall',
  270. title: 'Overall',
  271. render: (text, record, index, childIndex) => {
  272. const { reports } = record;
  273. const report = childIndex === -1 ? reports[0] : record;
  274. if (!report) return null;
  275. if (!report.qxCat) {
  276. return (
  277. <div className="f-s-12">
  278. 仅CAT模考
  279. <br />
  280. 提供分数
  281. </div>
  282. );
  283. }
  284. if (!report.score) return null;
  285. return (
  286. <div className="sub">
  287. <div className="t-2 t-s-12">{report.score.totalScore}</div>
  288. <div className="t-6 t-s-12">
  289. {record.qxCat === 1
  290. ? Math.round(record.origin.totalScore / record.origin.totalTimes)
  291. : Math.round(record.origin.secondTotalScore / record.origin.secondTotalTimes)}
  292. </div>
  293. </div>
  294. );
  295. },
  296. },
  297. {
  298. key: 'verbal',
  299. title: 'Verbal',
  300. render: (text, record, index, childIndex) => {
  301. const { reports } = record;
  302. const report = childIndex === -1 ? reports[0] : record;
  303. if (!report) return null;
  304. if (!report.qxCat) {
  305. return (
  306. <div className="f-s-12">
  307. {formatPercent(report.setting.real ? report.setting.real.verbal : report.setting.number.verbal, this.nums.verbal.number, false)}
  308. </div>
  309. );
  310. }
  311. if (!report.score) return null;
  312. return (
  313. <div className="sub">
  314. <div className="t-2 t-s-12">{report.score.verbalScore}</div>
  315. <div className="t-6 t-s-12">
  316. {record.qxCat === 1
  317. ? Math.round(record.origin.verbalScore / record.origin.totalTimes)
  318. : Math.round(record.origin.secondVerbalScore / record.origin.secondTotalTimes)}
  319. </div>
  320. </div>
  321. );
  322. },
  323. },
  324. {
  325. key: 'quant',
  326. title: 'Quant',
  327. render: (text, record, index, childIndex) => {
  328. const { reports } = record;
  329. const report = childIndex === -1 ? reports[0] : record;
  330. if (!report) return null;
  331. if (!report.qxCat) {
  332. return (
  333. <div className="f-s-12">{formatPercent(report.setting.real ? report.setting.real.quant : report.setting.number.quant, false)}</div>
  334. );
  335. }
  336. if (!report.score) return null;
  337. return (
  338. <div className="sub">
  339. <div className="t-2 t-s-12">{report.score.quantScore}</div>
  340. <div className="t-6 t-s-12">
  341. {record.qxCat === 1
  342. ? Math.round(record.origin.quantScore / record.origin.totalTimes)
  343. : Math.round(record.origin.secondQuantScore / record.origin.secondTotalTimes)}
  344. </div>
  345. </div>
  346. );
  347. },
  348. },
  349. {
  350. key: 'ir',
  351. title: 'IR',
  352. render: (text, record, index, childIndex) => {
  353. const { reports } = record;
  354. const report = childIndex === -1 ? reports[0] : record;
  355. if (!report) return null;
  356. if (!report.qxCat) {
  357. return <div className="f-s-12">{formatPercent(report.setting.real ? report.setting.real.ir : report.setting.number.ir, this.nums.ir.number, false)}</div>;
  358. }
  359. if (!report.score) return null;
  360. return (
  361. <div className="sub">
  362. <div className="t-2 t-s-12">{report.score.irScore}</div>
  363. <div className="t-6 t-s-12">
  364. {record.qxCat === 1
  365. ? Math.round(record.origin.irScore / record.origin.totalTimes)
  366. : Math.round(record.origin.secondIrScore / record.origin.secondTotalTimes)}
  367. </div>
  368. </div>
  369. );
  370. },
  371. },
  372. {
  373. key: 'report',
  374. title: '报告',
  375. render: (text, record, index, childIndex) => {
  376. const { reports } = record;
  377. const report = childIndex === -1 ? reports[0] : record;
  378. return (
  379. <IconButton
  380. type="report"
  381. tip="report"
  382. onClick={() => {
  383. Question.reportLink({ report }, true);
  384. }}
  385. />
  386. );
  387. },
  388. },
  389. ];
  390. this.originColumns = [
  391. {
  392. key: 'title',
  393. title: '名称',
  394. fixSort: true,
  395. render: (text) => {
  396. return <div className="sub">{text}</div>;
  397. },
  398. },
  399. {
  400. key: 'questionType',
  401. title: '题型',
  402. render: (text, record) => {
  403. return record.questionTypes.map(row => <p>{QuestionnTypeMap[row]}</p>);
  404. },
  405. },
  406. {
  407. key: 'latest_time',
  408. title: '做题时间',
  409. sort: true,
  410. render: (text, record) => {
  411. const { reports } = record;
  412. if (!reports) return null;
  413. const report = reports[0];
  414. if (!report) return null;
  415. const time = formatDate(report.updateTime, 'YYYY-MM-DD HH:mm:ss');
  416. return (
  417. <div className="sub">
  418. <div className="t-2 t-s-12">{time.split(' ')[0]}</div>
  419. <div className="t-6 t-s-12">{time.split(' ')[1]}</div>
  420. </div>
  421. );
  422. },
  423. },
  424. {
  425. key: 'correct',
  426. title: '正确率',
  427. sort: true,
  428. render: (text, record) => {
  429. const { reports } = record;
  430. if (!reports) return null;
  431. const report = reports[0];
  432. if (!report) return null;
  433. return (
  434. <div className="sub">
  435. <div className="t-2 t-s-12">{formatPercent(report.userCorrect, report.userNumber, false)}</div>
  436. </div>
  437. );
  438. },
  439. },
  440. {
  441. key: 'time',
  442. title: '平均耗时',
  443. sort: true,
  444. render: (text, record) => {
  445. const { reports } = record;
  446. if (!reports) return null;
  447. const report = reports[0];
  448. if (!report) return null;
  449. return (
  450. <div className="sub">
  451. <div className="t-2 t-s-12">{formatSeconds(report.userTime / report.userNumber)}</div>
  452. </div>
  453. );
  454. },
  455. },
  456. {
  457. key: 'progress',
  458. title: '完成度',
  459. render: (text, record) => {
  460. const { reports } = record;
  461. if (!reports) return null;
  462. const report = reports[0];
  463. if (!report) return null;
  464. return (
  465. <div className="sub">
  466. <div className="t-2 t-s-12">{formatPercent(report.userNumber, report.questionNumber, false)}</div>
  467. <div className="t-6 t-s-12">
  468. {report.userNumber}/{report.questionNumber}
  469. </div>
  470. </div>
  471. );
  472. },
  473. },
  474. {
  475. key: 'report',
  476. title: '报告',
  477. render: (text, record) => {
  478. const { reports } = record;
  479. if (!reports) return null;
  480. const report = reports[0];
  481. if (!report) return null;
  482. return (
  483. <div className="sub">
  484. <IconButton
  485. type="report"
  486. tip="report"
  487. onClick={() => {
  488. Question.reportLink({ report }, true);
  489. }}
  490. />
  491. </div>
  492. );
  493. },
  494. },
  495. ];
  496. }
  497. initData() {
  498. const data = Object.assign(this.state, this.state.search);
  499. data.filterMap = this.state.search;
  500. if (data.order) {
  501. data.sortMap = { [data.order]: data.direction };
  502. } else if (data.order !== null && data.order !== '') {
  503. data.sortMap = Object.assign({}, this.state.defaultSortMap);
  504. }
  505. if (data.timerange) {
  506. data.filterMap.timerange = data.timerange;
  507. }
  508. const [startTime, endTime] = timeRange(data.timerange);
  509. switch (data.tab) {
  510. case 'error':
  511. case 'collect':
  512. My.listReport(
  513. Object.assign({ origin: data.tab, startTime, endTime }, this.state.search, {
  514. order: Object.keys(data.sortMap)
  515. .map(key => {
  516. return `${key} ${data.sortMap[key]}`;
  517. })
  518. .join(','),
  519. }),
  520. ).then(result => {
  521. result.list = result.list.map(row => {
  522. row.questionTypes = row.questionTypes || [];
  523. row.reports = row.reports || [];
  524. row.stat = row.stat || {};
  525. return row;
  526. });
  527. this.setState({ list: result.list, total: result.total, page: data.page, columns: this.originColumns });
  528. });
  529. break;
  530. case 'exercise':
  531. case 'examination':
  532. default:
  533. refreshQuestionType(this, data.subject, data.questionType, {
  534. all: true,
  535. needSentence: true,
  536. allSubject: true,
  537. onlyPreview: data.one === 'preview',
  538. }).then(({ questionTypes, selectSentence }) => {
  539. return refreshStruct(this, questionTypes, data.tab, data.one, data.two, {
  540. all: true,
  541. needPreview: true,
  542. needTextbook: false,
  543. selectSentence,
  544. }).then(({ structIds, courseModules }) => {
  545. My.listReport(
  546. Object.assign(
  547. { module: data.tab, questionTypes, structIds, courseModules, startTime, endTime },
  548. this.state.search,
  549. {
  550. order: Object.keys(data.sortMap)
  551. .map(key => {
  552. if (key === 'title') return 'struct_three asc, struct_four asc, no asc';
  553. return `${key} ${data.sortMap[key]}`;
  554. })
  555. .join(','),
  556. },
  557. ),
  558. ).then(result => {
  559. result.list = result.list.map(row => {
  560. row.questionTypes = row.questionTypes || [];
  561. row.reports = row.reports || [];
  562. row.stat = row.stat || {};
  563. row.reports.forEach(r => {
  564. r.stat = row.stat;
  565. });
  566. row.children = [];
  567. row.show = [];
  568. return row;
  569. });
  570. this.setState({
  571. list: result.list,
  572. total: result.total,
  573. page: data.page,
  574. columns: data.tab === 'exercise' ? this.exerciseColumns : this.examinationColumns,
  575. });
  576. });
  577. });
  578. });
  579. }
  580. }
  581. onChangeShowHistory(index, childIndex, checked) {
  582. const { list } = this.state;
  583. const item = list[index];
  584. const { reports } = item;
  585. const { children } = item;
  586. const show = children.map(row => row.id);
  587. const childId = reports[childIndex].id;
  588. // 第一个不允许切换
  589. if (checked) {
  590. if (show.indexOf(childId) >= 0) return;
  591. children.push(reports[childIndex]);
  592. } else {
  593. const k = show.indexOf(childId);
  594. if (k < 0) return;
  595. children.splice(k, 1);
  596. }
  597. list[index].children = children;
  598. list[index].show = children.map(row => row.id);
  599. this.setState({ list });
  600. }
  601. onTabChange(tab) {
  602. const data = { tab };
  603. this.refreshQuery(data);
  604. }
  605. onFilter(value) {
  606. this.search(value, false);
  607. this.initData();
  608. }
  609. onSearch(value) {
  610. this.search({ page: 1, keyword: value }, false);
  611. this.initData();
  612. }
  613. onSort(value) {
  614. const keys = Object.keys(value);
  615. const { sortMap, defaultSortMap } = this.state;
  616. const index = keys.length > 1 && sortMap[keys[0]] ? 1 : 0;
  617. let order = keys.length && value[keys[index]] ? keys[index] : null;
  618. let direction = keys.length ? value[keys[index]] : null;
  619. if (order == null) {
  620. const [prevOrder] = Object.keys(sortMap);
  621. console.log(defaultSortMap[prevOrder]);
  622. if (!defaultSortMap[prevOrder]) {
  623. [order] = Object.keys(defaultSortMap);
  624. direction = defaultSortMap[order];
  625. }
  626. }
  627. this.search({ order, direction }, false);
  628. this.initData();
  629. }
  630. onChangePage(page) {
  631. this.search({ page }, false);
  632. this.initData();
  633. }
  634. renderView() {
  635. const { config } = this.props;
  636. return <UserLayout active={config.key} menu={menu} center={this.renderTable()} />;
  637. }
  638. renderTable() {
  639. const {
  640. tab,
  641. questionSubjectSelect,
  642. questionSubjectMap = {},
  643. oneSelect,
  644. twoSelectMap = {},
  645. oneSelectPlaceholder,
  646. twoSelectPlaceholder,
  647. filterMap = {},
  648. sortMap = {},
  649. list = [],
  650. } = this.state;
  651. const { page, total, columns } = this.state;
  652. const selectList = [];
  653. if (tab === 'exercise') {
  654. selectList.push({
  655. children: [
  656. {
  657. key: 'subject',
  658. placeholder: '学科',
  659. select: questionSubjectSelect,
  660. },
  661. {
  662. placeholder: '题型',
  663. key: 'questionType',
  664. be: 'subject',
  665. selectMap: questionSubjectMap,
  666. },
  667. ],
  668. });
  669. }
  670. if (tab === 'exercise' || tab === 'examination') {
  671. selectList.push({
  672. label: '范围',
  673. children: [
  674. {
  675. key: 'one',
  676. placeholder: oneSelectPlaceholder,
  677. select: oneSelect,
  678. },
  679. {
  680. key: 'two',
  681. be: 'one',
  682. placeholder: twoSelectPlaceholder,
  683. selectMap: twoSelectMap,
  684. },
  685. ],
  686. });
  687. }
  688. selectList.push({
  689. right: true,
  690. key: 'timerange',
  691. select: TimeRange,
  692. });
  693. return (
  694. <div className="table-layout">
  695. <Tabs
  696. border
  697. type="division"
  698. theme="theme"
  699. size="small"
  700. space={2.5}
  701. width={100}
  702. active={tab}
  703. tabs={[
  704. { key: 'exercise', title: '练习' },
  705. { key: 'examination', title: '模考' },
  706. { key: 'error', title: '错题组卷' },
  707. { key: 'collect', title: '收藏组卷' },
  708. ]}
  709. onChange={key => this.onTabChange(key)}
  710. />
  711. <UserAction
  712. search
  713. defaultSearch={filterMap.keyword}
  714. selectList={selectList}
  715. filterMap={filterMap}
  716. onFilter={value => this.onFilter(value)}
  717. onChange={key => this.onChangeTab(key)}
  718. onSearch={value => this.onSearch(value)}
  719. />
  720. <UserTable
  721. even="children"
  722. columns={columns}
  723. sortMap={sortMap}
  724. data={list}
  725. current={page}
  726. total={total}
  727. pageSize={this.state.search.size}
  728. selectList={selectList}
  729. onSelect={l => this.onSelect(l)}
  730. onSort={v => this.onSort(v)}
  731. onChange={p => this.onChangePage(p)}
  732. />
  733. </div>
  734. );
  735. }
  736. }