page.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  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 = record.stat ? record.stat.userTime / record.stat.userNumber : 0;
  83. const all = 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 {
  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 }) => {
  148. return refreshStruct(this, questionTypes, data.tab, data.one, data.two, {
  149. all: true,
  150. needPreview: true,
  151. needTextbook: true,
  152. }).then(({ courseModules, structIds, latest, year }) => {
  153. My.listError(
  154. Object.assign(
  155. { module: data.tab, questionTypes, courseModules, structIds, latest, year, startTime, endTime },
  156. this.state.search,
  157. {
  158. order: Object.keys(data.sortMap)
  159. .map(key => {
  160. if (key === 'title') return 'pid desc, no desc';
  161. return `${key} ${data.sortMap[key]}`;
  162. })
  163. .join(','),
  164. },
  165. ),
  166. ).then(result => {
  167. result.list = result.list.map(row => {
  168. row.questionNo = row.questionNo || {};
  169. row.key = row.questionNoId;
  170. row.questionType = row.question.questionType;
  171. row.title = row.questionNo.title;
  172. row.description = row.question.description;
  173. row.latest_time = row.latestTime ? formatDate(row.latestTime, 'YYYY-MM-DD HH:mm:ss') : '';
  174. return row;
  175. });
  176. const { selectList, allChecked, selectPage } = this.updateSelectInfo(data.page, result.list);
  177. this.setState({ list: result.list, total: result.total, selectList, allChecked, selectPage });
  178. });
  179. });
  180. });
  181. }
  182. updateSelectInfo(page, list, selectList = null) {
  183. const { selectPage = {} } = this.state;
  184. let allChecked = false;
  185. if (selectList == null) {
  186. selectList = [];
  187. if (selectPage[Number(page)]) {
  188. selectList = selectPage[Number(page)];
  189. }
  190. } else {
  191. selectPage[Number(page)] = selectList;
  192. }
  193. allChecked = list.filter(row => selectList.indexOf(row.key) >= 0).length === list.length && list.length > 0;
  194. return { selectList, allChecked, selectPage };
  195. }
  196. toggleCollect(index) {
  197. const { list } = this.state;
  198. const userQuestion = list[index];
  199. if (!userQuestion.collect) {
  200. My.addQuestionCollect(userQuestion.questionNo.id).then(() => {
  201. userQuestion.collect = true;
  202. this.setState({ list });
  203. });
  204. } else {
  205. My.delQuestionCollect(userQuestion.questionNo.id).then(() => {
  206. userQuestion.collect = false;
  207. this.setState({ list });
  208. });
  209. }
  210. }
  211. note(index) {
  212. const { list } = this.state;
  213. const userQuestion = list[index];
  214. const { questionNo } = userQuestion;
  215. My.getQuestionNote(questionNo.id)
  216. .then(result => {
  217. this.setState({ questionNo, note: result || {}, showNote: true, index });
  218. });
  219. }
  220. onTabChange(tab) {
  221. const data = { tab };
  222. this.refreshQuery(data);
  223. }
  224. onFilter(value) {
  225. this.search(value, false);
  226. this.initData();
  227. }
  228. onSearch(value) {
  229. this.search({ page: 1, keyword: value }, false);
  230. this.initData();
  231. }
  232. onSort(value) {
  233. const keys = Object.keys(value);
  234. // this.search({ order: keys.length ? keys.join('|') : null, direction: keys.length ? Object.values(value).join('|') : null });
  235. const { sortMap } = this.state;
  236. const index = keys.length > 1 && sortMap[keys[0]] ? 1 : 0;
  237. this.search({ order: keys.length && value[keys[index]] && value[keys[index]] ? keys[index] : null, direction: keys.length ? value[keys[index]] : null }, false);
  238. this.initData();
  239. }
  240. onChangePage(page) {
  241. this.search({ page }, false);
  242. this.initData();
  243. }
  244. onAll(checked) {
  245. const { selectPage = {}, search = {} } = this.state;
  246. let { selectList } = this.state;
  247. const { page } = search;
  248. const { list = [] } = this.state;
  249. if (checked) {
  250. list.forEach(item => {
  251. if (selectList.indexOf(item.key) >= 0) return;
  252. selectList.push(item.key);
  253. });
  254. selectPage[Number(page)] = selectList;
  255. } else {
  256. selectList = [];
  257. delete selectPage[Number(page)];
  258. }
  259. this.setState({ selectList, selectPage, allChecked: checked });
  260. }
  261. onSelect(slist) {
  262. const { search = {}, list } = this.state;
  263. const { selectList, allChecked, selectPage } = this.updateSelectInfo(search.page, list, slist);
  264. this.setState({ selectList, allChecked, selectPage });
  265. }
  266. onAction(key) {
  267. const { info } = this.props.user;
  268. const { selectPage = {} } = this.state;
  269. const selectList = [].concat(...Object.values(selectPage).concat());
  270. switch (key) {
  271. case 'help':
  272. this.setState({ showTips: true });
  273. return;
  274. case 'clear':
  275. if (selectList.length === 0) {
  276. this.setState({ showWarn: true, warn: { title: '移除', content: '不可少于1题,请重新选择' } });
  277. return;
  278. }
  279. this.setState({ showClearConfirm: true, clearInfo: { questionNoIds: selectList } });
  280. break;
  281. case 'group':
  282. if (!info.vip) {
  283. this.setState({ showVip: true });
  284. return;
  285. }
  286. if (selectList.length < 10) {
  287. this.setState({ showWarn: true, warn: { title: '组卷练习', content: '不可小于10题,请重新选择' } });
  288. return;
  289. }
  290. if (selectList.length > 50) {
  291. this.setState({ showWarn: true, warn: { title: '组卷练习', content: '不可多余50题,请重新选择' } });
  292. return;
  293. }
  294. if (selectList.length === 0) {
  295. this.setState({ showWarn: true, warn: { title: '组卷练习', content: '不可同时选中语文题和数学题,请重新选择。' } });
  296. return;
  297. }
  298. this.setState({ showGroupConfirm: true, groupInfo: { questionNoIds: selectList, filterTimes: 2 } });
  299. break;
  300. case 'export':
  301. if (!info.vip) {
  302. this.setState({ showVip: true });
  303. return;
  304. }
  305. if (selectList.length < 1) {
  306. this.setState({ showWarn: true, warn: { title: '导出', content: '不可小于1题,请重新选择' } });
  307. return;
  308. }
  309. if (selectList.length > 100) {
  310. this.setState({ showWarn: true, warn: { title: '导出', content: '不可多余100题,请重新选择' } });
  311. return;
  312. }
  313. // if (info.bindReal) {
  314. this.setState({ showExportConfirm: true, exportInfo: { include: exportType.map(row => row.key), questionNoIds: selectList, answer: true } });
  315. // } else {
  316. // this.setState({ showExportAuthConfirm: true, exportInfo: { include: exportType.filter(row => !row.auth).map(row => row.key), questionNoIds: selectList, answer: true } });
  317. // }
  318. break;
  319. default:
  320. }
  321. }
  322. clearErrorQuestion() {
  323. const { clearInfo } = this.state;
  324. My.clearError(clearInfo.questionNoIds)
  325. .then(() => {
  326. this.setState({ showClearConfirm: false, selectList: [], selectPage: {}, allChecked: false });
  327. this.refresh();
  328. })
  329. .catch(e => {
  330. this.setState({ showWarn: true, warn: { title: '移除', content: e.message }, showClearConfirm: false });
  331. });
  332. }
  333. group() {
  334. const { groupInfo } = this.state;
  335. My.groupError(groupInfo)
  336. .then((result) => {
  337. Question.startLink('error', result);
  338. this.setState({ showGroupConfirm: false, selectList: [], selectPage: {}, allChecked: false });
  339. })
  340. .catch(e => {
  341. this.setState({ showWarn: true, warn: { title: '组卷练习', content: e.message }, showGroupConfirm: false });
  342. });
  343. }
  344. export() {
  345. const { exportInfo } = this.state;
  346. this.setState({ showExportWait: true, showExportConfirm: false, showExportAuthConfirm: false });
  347. My.exportQuestionError(exportInfo)
  348. .then((result) => {
  349. openLink(`/export/${result}`);
  350. this.setState({ showExportWait: false, selectList: [], selectPage: {}, allChecked: false });
  351. })
  352. .catch(e => {
  353. this.setState({ showWarn: true, warn: { title: '导出', content: e.message }, showExportWait: false });
  354. });
  355. }
  356. remove(report) {
  357. My.removeError(report.id)
  358. .then(() => {
  359. this.refresh();
  360. });
  361. }
  362. clearErrorReport() {
  363. My.clearLatestError()
  364. .then(() => {
  365. const { info } = this.props.user;
  366. info.latestError = 0;
  367. User.infoHandle(info);
  368. });
  369. this.setState({ latest: null });
  370. }
  371. renderView() {
  372. const { config } = this.props;
  373. return <UserLayout active={config.key} menu={menu} center={this.renderTable()} />;
  374. }
  375. renderTable() {
  376. const {
  377. tab,
  378. questionSubjectSelect,
  379. questionSubjectMap = {},
  380. oneSelect,
  381. twoSelectMap = {},
  382. filterMap = {},
  383. sortMap = {},
  384. list = [],
  385. latest,
  386. } = this.state;
  387. const { selectList = [], allChecked, page, total } = this.state;
  388. const { info } = this.props.user;
  389. return (
  390. <div className="table-layout">
  391. <Tabs
  392. border
  393. type="division"
  394. theme="theme"
  395. size="small"
  396. space={2.5}
  397. width={100}
  398. active={tab}
  399. tabs={[{ key: 'exercise', title: '练习' }, { key: 'examination', title: '模考' }]}
  400. onChange={key => this.onTabChange(key)}
  401. />
  402. <UserAction
  403. search
  404. defaultSearch={filterMap.keyword}
  405. selectList={[
  406. {
  407. children: [
  408. {
  409. key: 'subject',
  410. placeholder: '学科',
  411. select: questionSubjectSelect,
  412. },
  413. {
  414. placeholder: '题型',
  415. key: 'questionType',
  416. be: 'subject',
  417. selectMap: questionSubjectMap,
  418. },
  419. ],
  420. },
  421. {
  422. label: '范围',
  423. children: [
  424. {
  425. key: 'one',
  426. placeholder: '全部',
  427. select: oneSelect,
  428. },
  429. {
  430. key: 'two',
  431. be: 'one',
  432. placeholder: '全部',
  433. selectMap: twoSelectMap,
  434. },
  435. ],
  436. },
  437. {
  438. right: true,
  439. key: 'timerange',
  440. select: TimeRange,
  441. },
  442. ]}
  443. filterMap={filterMap}
  444. onFilter={value => this.onFilter(value)}
  445. onSearch={value => this.onSearch(value)}
  446. />
  447. <UserAction
  448. allCheckbox
  449. allChecked={allChecked}
  450. help
  451. btnList={[
  452. { title: '移除', key: 'clear' },
  453. { title: '组卷', key: 'group', tag: 'vip', disabled: !info.vip },
  454. { title: '导出', key: 'export', tag: 'vip', disabled: !info.vip },
  455. ]}
  456. right={
  457. latest && <div className="tip">
  458. {formatDate(latest.updateTime, 'YYYY-MM-DD HH:mm')} 组卷{latest.questionNumber}题,做对{latest.userCorrect}题。<span onClick={() => {
  459. this.remove(latest);
  460. }}>移除正确题目</span>
  461. <Icon type="close-circle" theme="filled" onClick={() => {
  462. this.clearErrorReport();
  463. }} />
  464. </div>
  465. }
  466. onAll={checked => this.onAll(checked)}
  467. onAction={key => this.onAction(key)}
  468. />
  469. <UserTable
  470. select
  471. columns={this.columns}
  472. sortMap={sortMap}
  473. data={list}
  474. current={page}
  475. total={Number(total)}
  476. pageSize={this.state.search.size}
  477. selectList={selectList}
  478. onSelect={l => this.onSelect(l)}
  479. onSort={v => this.onSort(v)}
  480. onChange={p => this.onChangePage(p)}
  481. />
  482. {this.renderModal()}
  483. </div>
  484. );
  485. }
  486. renderModal() {
  487. const { showTips, showWarn, warn = {}, showClearConfirm, clearInfo = {}, showGroupConfirm, groupInfo = {}, showExportConfirm, showExportAuthConfirm, exportInfo = {}, showExportWait, showExamination, showVip, showReal, showNote, note = {}, questionNo = {}, list } = this.state;
  488. const { info } = this.props.user;
  489. return [
  490. <Modal show={showTips} title="操作提示" confirmText="好的,知道了" btnAlign="center" onConfirm={() => this.setState({ showTips: false })}>
  491. <div className="flex-layout m-b-2">
  492. <div className="flex-block">
  493. <div className="t-1 t-s-18">组卷功能</div>
  494. <div className="t-2">操作数量:10-50;</div>
  495. <div className="t-2">注意事项:可跨题型、不可跨学科。</div>
  496. </div>
  497. <div className="flex-block">
  498. <div className="t-1 t-s-18">导出功能</div>
  499. <div className="t-2">操作数量:1-100;</div>
  500. <div className="t-2">注意事项:“综合推理IR”暂时无法导出。</div>
  501. </div>
  502. </div>
  503. <div className="t-3">
  504. *您可点击
  505. <Icon type="question-circle" theme="filled" />
  506. 查阅以上信息。
  507. </div>
  508. </Modal>,
  509. <Modal show={showWarn} title={warn.title} confirmText="好的,知道了" btnAlign="center" onConfirm={() => this.setState({ showWarn: false })}>
  510. <div className="t-2 t-s-18">{warn.content}</div>
  511. </Modal>,
  512. <Modal show={showGroupConfirm} title="组卷练习" confirmText="开始练习" onConfirm={() => this.group()} onCancel={() => this.setState({ showGroupConfirm: false })}>
  513. <div className="t-2 t-s-18">
  514. 您共选择了 <span className="t-4">{groupInfo.questionNoIds ? groupInfo.questionNoIds.length : 0}</span> 道题目,是否开始练习?</div>
  515. <div className="t-2 t-s-16">
  516. <Checkbox checked className="m-r-5" />
  517. 剔除已组卷练习 <Select
  518. theme="white"
  519. value={groupInfo.filterTimes}
  520. list={[{ key: 2, title: '2' }, { key: 3, title: '3' }]}
  521. onChange={({ key }) => {
  522. groupInfo.filterTimes = key;
  523. this.setState({ groupInfo });
  524. }}
  525. />{' '}
  526. 次以上的错题
  527. </div>
  528. </Modal>,
  529. <Modal show={showClearConfirm} title="移出" onConfirm={() => this.clearErrorQuestion()} onCancel={() => this.setState({ showClearConfirm: false })}>
  530. <div className="t-2 t-s-18">
  531. 当前选中的 <span className="t-4">{clearInfo.questionNoIds ? clearInfo.questionNoIds.length : 0}</span> 道题即将被移出错题本,移出后无法恢复,是否继续?
  532. </div>
  533. </Modal>,
  534. <Modal show={showExportWait} title="导出" confirmText="好的,知道了" btnAlign="center" onConfirm={() => this.setState({ showExportWait: false })}>
  535. <div className="t-2 t-s-18">正在下载中,请不要关闭当前页面!</div>
  536. </Modal>,
  537. <Modal show={showExportConfirm} title="导出" confirmText="导出" onConfirm={() => this.export()} onCancel={() => this.setState({ showExportConfirm: false })}>
  538. <div className="t-2 t-s-18 m-b-5">
  539. 当前共选中 <span className="t-4">{exportInfo.questionNoIds ? exportInfo.questionNoIds.length : 0}</span> 道题,请确认需要导出的内容:
  540. </div>
  541. <div className="t-2 t-s-16">
  542. {exportType.map(item => {
  543. return (
  544. <div className="d-i-b m-b-5" style={{ width: 135 }}>
  545. <Checkbox checked={exportInfo.include ? exportInfo.include.indexOf(item.key) >= 0 : false} className="m-r-5" onChange={() => {
  546. exportInfo.include.push(item.key);
  547. this.setState({ exportInfo });
  548. }} />
  549. {item.title}
  550. </div>
  551. );
  552. })}
  553. </div>
  554. </Modal>,
  555. <Modal show={showExportAuthConfirm} title="导出" confirmText="导出" onConfirm={() => this.export()} onCancel={() => this.setState({ showExportAuthConfirm: false })}>
  556. <div className="t-2 t-s-18 m-b-5">
  557. 当前共选中 <span className="t-4">{exportInfo.questionNoIds ? exportInfo.questionNoIds.length : 0}</span> 道题,请确认需要导出的内容:
  558. </div>
  559. <div className="t-2 t-s-16 m-b-2">
  560. {exportType
  561. .filter(item => !item.auth)
  562. .map(item => {
  563. return (
  564. <div className="d-i-b m-b-2" style={{ width: 135 }}>
  565. <Checkbox checked={exportInfo.include ? exportInfo.include.indexOf(item.key) >= 0 : false} className="m-r-5" onChange={() => {
  566. exportInfo.include.push(item.key);
  567. this.setState({ exportInfo });
  568. }} />
  569. {item.title}
  570. </div>
  571. );
  572. })}
  573. </div>
  574. <div className="b-b m-b-2 m-t-2" />
  575. <div className="t-3 m-b-1">
  576. 以下内容需实名认证后才可导出: <a className="f-r" onClick={() => this.setState({ showExportAuthConfirm: false, showReal: true })}>去认证 ></a>
  577. </div>
  578. <div className="t-2 t-s-16 m-b-2">
  579. {exportType
  580. .filter(item => item.auth)
  581. .map(item => {
  582. return (
  583. <div className="d-i-b" style={{ width: 135 }}>
  584. <Checkbox disabled className="m-r-5" />
  585. {item.title}
  586. </div>
  587. );
  588. })}
  589. </div>
  590. </Modal>,
  591. <Examination
  592. show={showExamination}
  593. data={info}
  594. onConfirm={() => this.setState({ showExamination: false })}
  595. onCancel={() => this.setState({ showExamination: false })}
  596. onClose={() => this.setState({ showExamination: false })}
  597. />,
  598. <RealAuth show={showReal} data={info} onConfirm={() => this.setState({ showReal: false })} />,
  599. <VipRenew
  600. show={showVip}
  601. data={info}
  602. onReal={() => this.setState({ showVip: false, showReal: true })}
  603. onPrepare={() => this.setState({ showVip: false, showExamination: true })}
  604. onClose={(result) => {
  605. if (result) {
  606. this.refresh();
  607. } else {
  608. this.setState({ showVip: false });
  609. }
  610. }}
  611. />,
  612. <QuestionNoteModal show={showNote} defaultData={note} questionNo={questionNo} onConfirm={() => {
  613. list[this.state.index].note = true;
  614. this.setState({ showNote: false, list });
  615. }} onCancel={() => this.setState({ showNote: false })} />,
  616. ];
  617. }
  618. }