page.js 24 KB

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