|
@@ -11,373 +11,568 @@ import Button from '../../../components/Button';
|
|
|
import { Main } from '../../../stores/main';
|
|
|
import { Question } from '../../../stores/question';
|
|
|
|
|
|
-
|
|
|
export default class extends Page {
|
|
|
initState() {
|
|
|
- this.qxCatColumns = [{
|
|
|
- title: '模考',
|
|
|
- width: 250,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- let progress = 0;
|
|
|
- if (record.report) {
|
|
|
- progress = formatPercent(record.report.userNumber, record.report.questionNumber);
|
|
|
- }
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16">{record.title}{record.paper && record.paper.paperNo > 0 ? String.fromCharCode(64 + record.paper.paperNo) : ''}</div>
|
|
|
- <div>
|
|
|
- <ProgressText progress={progress} size="small" />
|
|
|
- </div>
|
|
|
- {this.state.showPrev && <div className="prev">
|
|
|
- <div className="night f-s-16">{record.title}{record.prevPaper && record.prevPaper.paperNo > 0 ? String.fromCharCode(64 + record.prevPaper.paperNo) : ''}</div>
|
|
|
- </div>}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ this.qxCatColumns = [
|
|
|
+ {
|
|
|
+ title: '模考',
|
|
|
+ width: 210,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ let progress = 0;
|
|
|
+ if (record.report) {
|
|
|
+ progress = formatPercent(record.report.userNumber, record.report.questionNumber);
|
|
|
+ }
|
|
|
+ return [
|
|
|
+ <div className="table-row" style={{ paddingRight: 40 }}>
|
|
|
+ <div className="night f-s-16">
|
|
|
+ {record.title}
|
|
|
+ {record.paper && record.paper.paperNo > 0 ? String.fromCharCode(64 + record.paper.paperNo) : ''}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <ProgressText progress={progress} size="small" />
|
|
|
+ </div>
|
|
|
+ {this.state.showPrev && (
|
|
|
+ <div className="prev">
|
|
|
+ <div className="night f-s-16">
|
|
|
+ {record.title}
|
|
|
+ {record.prevPaper && record.prevPaper.paperNo > 0
|
|
|
+ ? String.fromCharCode(64 + record.prevPaper.paperNo)
|
|
|
+ : ''}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>,
|
|
|
+ <div className="table-row" style={{ paddingRight: 40 }}>
|
|
|
+ <div className="night f-s-16">
|
|
|
+ {record.title}
|
|
|
+ {record.paper && record.paper.paperNo > 0 ? String.fromCharCode(64 + record.paper.paperNo) : ''}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <ProgressText progress={progress} size="small" />
|
|
|
+ </div>
|
|
|
+ {this.state.showPrev && (
|
|
|
+ <div className="prev">
|
|
|
+ <div className="night f-s-16">
|
|
|
+ {record.title}
|
|
|
+ {record.prevPaper && record.prevPaper.paperNo > 0
|
|
|
+ ? String.fromCharCode(64 + record.prevPaper.paperNo)
|
|
|
+ : ''}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>,
|
|
|
+ ];
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'Total',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16 f-w-b">{record.report ? `${record.report.score.totalScore}分${record.report.score.totalRank}th` : '-分-th'}</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.totalScore / record.totalTimes)}分</div>
|
|
|
- {this.state.showPrev && record.prevReport && <div className="prev">
|
|
|
- <div className="night f-s-16 f-w-b">{record.prevReport.score.totalScore}分{record.prevReport.score.totalRank}th</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.secondTotalScore / record.secondTotalTimes)}分</div>
|
|
|
- </div>}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'Total',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return [
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.report ? `${record.report.score.totalScore}分${record.report.score.totalRank}th` : '-分-th'}
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.totalScore / record.totalTimes)}分</div>
|
|
|
+ {this.state.showPrev && record.prevReport && (
|
|
|
+ <div className="prev">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.prevReport.score.totalScore}分{record.prevReport.score.totalRank}th
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.secondTotalScore / record.secondTotalTimes)}分</div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>,
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.report ? `${record.report.score.totalScore}分${record.report.score.totalRank}th` : '-分-th'}
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.totalScore / record.totalTimes)}分</div>
|
|
|
+ {this.state.showPrev && record.prevReport && (
|
|
|
+ <div className="prev">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.prevReport.score.totalScore}分{record.prevReport.score.totalRank}th
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.secondTotalScore / record.secondTotalTimes)}分</div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>,
|
|
|
+ ];
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'Verbal',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16 f-w-b">{record.report ? `${record.report.score.verbalScore}分${record.report.score.verbalRank}th` : '-分-th'}</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.verbalScore / record.totalTimes)}分</div>
|
|
|
- {this.state.showPrev && record.prevReport && <div className="prev">
|
|
|
- <div className="night f-s-16 f-w-b">{record.prevReport.score.verbalScore}分{record.prevReport.score.verbalRank}th</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.secondVerbalScore / record.secondTotalTimes)}分</div>
|
|
|
- </div>}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'Verbal',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.report ? `${record.report.score.verbalScore}分${record.report.score.verbalRank}th` : '-分-th'}
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.verbalScore / record.totalTimes)}分</div>
|
|
|
+ {this.state.showPrev && record.prevReport && (
|
|
|
+ <div className="prev">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.prevReport.score.verbalScore}分{record.prevReport.score.verbalRank}th
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.secondVerbalScore / record.secondTotalTimes)}分</div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'Quant',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16 f-w-b">{record.report ? `${record.report.score.quantScore}分${record.report.score.quantRank}th` : '-分-th'}</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.quantScore / record.totalTimes)}分</div>
|
|
|
- {this.state.showPrev && record.prevReport && <div className="prev">
|
|
|
- <div className="night f-s-16 f-w-b">{record.prevReport.score.quantScore}分{record.prevReport.score.quantRank}th</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.secondQuantScore / record.secondTotalTimes)}分</div>
|
|
|
- </div>}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'Quant',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.report ? `${record.report.score.quantScore}分${record.report.score.quantRank}th` : '-分-th'}
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.quantScore / record.totalTimes)}分</div>
|
|
|
+ {this.state.showPrev && record.prevReport && (
|
|
|
+ <div className="prev">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.prevReport.score.quantScore}分{record.prevReport.score.quantRank}th
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.secondQuantScore / record.secondTotalTimes)}分</div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'IR',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16 f-w-b">{record.report ? `${record.report.score.irScore}分${record.report.score.irRank}th` : '-分-th'}</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.irScore / record.totalTimes)}分</div>
|
|
|
- {this.state.showPrev && record.prevReport && <div className="prev">
|
|
|
- <div className="night f-s-16 f-w-b">{record.prevReport.score.irScore}分{record.prevReport.score.irRank}th</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.secondIrScore / record.secondTotalTimes)}分</div>
|
|
|
- </div>}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'IR',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.report ? `${record.report.score.irScore}分${record.report.score.irRank}th` : '-分-th'}
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.irScore / record.totalTimes)}分</div>
|
|
|
+ {this.state.showPrev && record.prevReport && (
|
|
|
+ <div className="prev">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.prevReport.score.irScore}分{record.prevReport.score.irRank}th
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.secondIrScore / record.secondTotalTimes)}分</div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: '做题时间',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div>{record.report && formatDate(record.report.updateTime, 'YYYY-MM-DD')}</div>
|
|
|
- <div>{record.report && formatDate(record.report.updateTime, 'HH:mm')}</div>
|
|
|
- {this.state.showPrev && record.prevReport && <div className="prev">
|
|
|
- <div>{formatDate(record.prevReport.updateTime, 'YYYY-MM-DD')}</div>
|
|
|
- <div>{formatDate(record.prevReport.updateTime, 'HH:mm')}</div>
|
|
|
- </div>}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: '做题时间',
|
|
|
+ width: 100,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div>{record.report && formatDate(record.report.updateTime, 'YYYY-MM-DD')}</div>
|
|
|
+ <div>{record.report && formatDate(record.report.updateTime, 'HH:mm')}</div>
|
|
|
+ {this.state.showPrev && record.prevReport && (
|
|
|
+ <div className="prev">
|
|
|
+ <div>{formatDate(record.prevReport.updateTime, 'YYYY-MM-DD')}</div>
|
|
|
+ <div>{formatDate(record.prevReport.updateTime, 'HH:mm')}</div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: '操作',
|
|
|
- width: 180,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row p-t-1">
|
|
|
- {!record.report && <IconButton type="start" tip="Start" onClick={() => {
|
|
|
- Question.startLink('examination', record);
|
|
|
- }} />}
|
|
|
- {(record.report && !record.report.isFinish) && <IconButton className="m-r-2" type="continue" tip="Continue" onClick={() => {
|
|
|
- Question.continueLink('examination', record);
|
|
|
- }} />}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row p-t-1">
|
|
|
+ {!record.report && (
|
|
|
+ <IconButton
|
|
|
+ className="m-r-5"
|
|
|
+ type="start"
|
|
|
+ tip="Start"
|
|
|
+ onClick={() => {
|
|
|
+ Question.startLink('examination', record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {record.report && !record.report.isFinish && (
|
|
|
+ <IconButton
|
|
|
+ type="continue"
|
|
|
+ tip="Continue"
|
|
|
+ onClick={() => {
|
|
|
+ Question.continueLink('examination', record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: '报告',
|
|
|
- width: 30,
|
|
|
- align: 'right',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row p-t-1">
|
|
|
- {record.report && record.report.isFinish && <IconButton type="report" tip="Report" onClick={() => {
|
|
|
- Question.reportLink(record);
|
|
|
- }} />}
|
|
|
- {this.state.showPrev && <div className="prev">
|
|
|
- {record.prevReport && <IconButton type="report" tip="Report" onClick={() => {
|
|
|
- Question.reportPrevLink(record);
|
|
|
- }} />}
|
|
|
- </div>}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: '报告',
|
|
|
+ width: 50,
|
|
|
+ align: 'right',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row p-t-1">
|
|
|
+ {record.report && record.report.isFinish && (
|
|
|
+ <IconButton
|
|
|
+ className="m-r-5"
|
|
|
+ type="report"
|
|
|
+ tip="Report"
|
|
|
+ onClick={() => {
|
|
|
+ Question.reportLink(record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {this.state.showPrev && (
|
|
|
+ <div className="prev">
|
|
|
+ {record.prevReport && (
|
|
|
+ <IconButton
|
|
|
+ type="report"
|
|
|
+ tip="Report"
|
|
|
+ onClick={() => {
|
|
|
+ Question.reportPrevLink(record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }];
|
|
|
- this.catColumns = [{
|
|
|
- title: '模考',
|
|
|
- width: 250,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- let progress = 0;
|
|
|
- if (record.report) {
|
|
|
- progress = formatPercent(record.report.userNumber, record.report.questionNumber);
|
|
|
- }
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16">{record.title}{record.paper && record.paper.paperNo > 0 ? String.fromCharCode(64 + record.paper.paperNo) : ''}</div>
|
|
|
- <div>
|
|
|
- <ProgressText progress={progress} size="small" />
|
|
|
+ ];
|
|
|
+ this.catColumns = [
|
|
|
+ {
|
|
|
+ title: '模考',
|
|
|
+ width: 210,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ let progress = 0;
|
|
|
+ if (record.report) {
|
|
|
+ progress = formatPercent(record.report.userNumber, record.report.questionNumber);
|
|
|
+ }
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16">
|
|
|
+ {record.title}
|
|
|
+ {record.paper && record.paper.paperNo > 0 ? String.fromCharCode(64 + record.paper.paperNo) : ''}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <ProgressText progress={progress} size="small" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'Total',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16 f-w-b">{record.report ? `${record.report.score.totalScore}分${record.report.score.totalRank}th` : '-分-th'}</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.totalScore / record.totalTimes)}分</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'Total',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.report ? `${record.report.score.totalScore}分${record.report.score.totalRank}th` : '-分-th'}
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.totalScore / record.totalTimes)}分</div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'Verbal',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16 f-w-b">{record.report ? `${record.report.score.verbalScore}分${record.report.score.verbalRank}th` : '-分-th'}</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.verbalScore / record.totalTimes)}分</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'Verbal',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.report ? `${record.report.score.verbalScore}分${record.report.score.verbalRank}th` : '-分-th'}
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.verbalScore / record.totalTimes)}分</div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'Quant',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16 f-w-b">{record.report ? `${record.report.score.quantScore}分${record.report.score.quantRank}th` : '-分-th'}</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.quantScore / record.totalTimes)}分</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'Quant',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.report ? `${record.report.score.quantScore}分${record.report.score.quantRank}th` : '-分-th'}
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.quantScore / record.totalTimes)}分</div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'IR',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16 f-w-b">{record.report ? `${record.report.score.irScore}分${record.report.score.irRank}th` : '-分-th'}</div>
|
|
|
- <div className="f-s-12">全站: {Math.round(record.irScore / record.totalTimes)}分</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'IR',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16 f-w-b">
|
|
|
+ {record.report ? `${record.report.score.irScore}分${record.report.score.irRank}th` : '-分-th'}
|
|
|
+ </div>
|
|
|
+ <div className="f-s-12">全站: {Math.round(record.irScore / record.totalTimes)}分</div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: '做题时间',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div>{record.report && formatDate(record.report.updateTime, 'YYYY-MM-DD')}</div>
|
|
|
- <div>{record.report && formatDate(record.report.updateTime, 'HH:mm')}</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: '做题时间',
|
|
|
+ width: 100,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div>{record.report && formatDate(record.report.updateTime, 'YYYY-MM-DD')}</div>
|
|
|
+ <div>{record.report && formatDate(record.report.updateTime, 'HH:mm')}</div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: '操作',
|
|
|
- width: 180,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row p-t-1">
|
|
|
- {!record.report && <IconButton type="start" tip="Start" onClick={() => {
|
|
|
- Question.startLink('examination', record);
|
|
|
- }} />}
|
|
|
- {(record.report && !record.report.isFinish) && <IconButton className="m-r-2" type="continue" tip="Continue" onClick={() => {
|
|
|
- Question.continueLink('examination', record);
|
|
|
- }} />}
|
|
|
- <IconButton type="restart" tip="Restart" onClick={() => {
|
|
|
- this.restart(record);
|
|
|
- }} />
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row p-t-1">
|
|
|
+ {!record.report && (
|
|
|
+ <IconButton
|
|
|
+ type="start"
|
|
|
+ tip="Start"
|
|
|
+ onClick={() => {
|
|
|
+ Question.startLink('examination', record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {record.report && !record.report.isFinish && (
|
|
|
+ <IconButton
|
|
|
+ className="m-r-2"
|
|
|
+ type="continue"
|
|
|
+ tip="Continue"
|
|
|
+ onClick={() => {
|
|
|
+ Question.continueLink('examination', record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ <IconButton
|
|
|
+ type="restart"
|
|
|
+ tip="Restart"
|
|
|
+ onClick={() => {
|
|
|
+ this.restart(record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: '报告',
|
|
|
- width: 30,
|
|
|
- align: 'right',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row p-t-1">
|
|
|
- {record.report && record.report.isFinish && <IconButton type="report" tip="Report" onClick={() => {
|
|
|
- Question.reportLink(record);
|
|
|
- }} />}
|
|
|
- {this.state.showPrev && <div className="prev">
|
|
|
- {record.prevReport && <IconButton type="report" tip="Report" onClick={() => {
|
|
|
- Question.reportPrevLink(record);
|
|
|
- }} />}
|
|
|
- </div>}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: '报告',
|
|
|
+ width: 50,
|
|
|
+ align: 'right',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row p-t-1">
|
|
|
+ {record.report && record.report.isFinish && (
|
|
|
+ <IconButton
|
|
|
+ type="report"
|
|
|
+ tip="Report"
|
|
|
+ onClick={() => {
|
|
|
+ Question.reportLink(record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {this.state.showPrev && (
|
|
|
+ <div className="prev">
|
|
|
+ {record.prevReport && (
|
|
|
+ <IconButton
|
|
|
+ type="report"
|
|
|
+ tip="Report"
|
|
|
+ onClick={() => {
|
|
|
+ Question.reportPrevLink(record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }];
|
|
|
- this.columns = [{
|
|
|
- title: '模考',
|
|
|
- width: 250,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- let progress = 0;
|
|
|
- if (record.report) {
|
|
|
- progress = formatPercent(record.report.userNumber, record.report.questionNumber);
|
|
|
- }
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="night f-s-16">{record.title}</div>
|
|
|
- <div>
|
|
|
- <ProgressText progress={progress} times={record.paper ? record.paper.times : 0} size="small" />
|
|
|
+ ];
|
|
|
+ this.columns = [
|
|
|
+ {
|
|
|
+ title: '模考',
|
|
|
+ width: 210,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ let progress = 0;
|
|
|
+ if (record.report) {
|
|
|
+ progress = formatPercent(record.report.userNumber, record.report.questionNumber);
|
|
|
+ }
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="night f-s-16">{record.title}</div>
|
|
|
+ <div>
|
|
|
+ <ProgressText progress={progress} times={record.paper ? record.paper.times : 0} size="small" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'Total',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: () => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="f-s-12">仅CAT模考</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'Total',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: () => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="f-s-12">仅CAT模考</div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'Verbal',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="f-s-12">{record.report ? formatPercent(record.report.setting.number.verbal, this.nums.verbal.number, false) : '0%'}</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'Verbal',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="f-s-12">
|
|
|
+ {record.report
|
|
|
+ ? formatPercent(record.report.setting.number.verbal, this.nums.verbal.number, false)
|
|
|
+ : '0%'}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'Quant',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="f-s-12">{record.report ? formatPercent(record.report.setting.number.quant, this.nums.quant.number, false) : '0%'}</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'Quant',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="f-s-12">
|
|
|
+ {record.report
|
|
|
+ ? formatPercent(record.report.setting.number.quant, this.nums.quant.number, false)
|
|
|
+ : '0%'}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: 'IR',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div className="f-s-12">{record.report ? formatPercent(record.report.setting.number.ir, this.nums.ir.number, false) : '0%'}</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: 'IR',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div className="f-s-12">
|
|
|
+ {record.report ? formatPercent(record.report.setting.number.ir, this.nums.ir.number, false) : '0%'}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: '做题时间',
|
|
|
- width: 150,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- if (!record.report) return null;
|
|
|
- return (
|
|
|
- <div className="table-row">
|
|
|
- <div>{formatDate(record.report.updateTime, 'YYYY-MM-DD')}</div>
|
|
|
- <div>{formatDate(record.report.updateTime, 'HH:mm')}</div>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: '做题时间',
|
|
|
+ width: 100,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ if (!record.report) return null;
|
|
|
+ return (
|
|
|
+ <div className="table-row">
|
|
|
+ <div>{formatDate(record.report.updateTime, 'YYYY-MM-DD')}</div>
|
|
|
+ <div>{formatDate(record.report.updateTime, 'HH:mm')}</div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: '操作',
|
|
|
- width: 180,
|
|
|
- align: 'left',
|
|
|
- render: (record) => {
|
|
|
- return (
|
|
|
- <div className="table-row p-t-1">
|
|
|
- {!record.report && <IconButton type="start" tip="Start" onClick={() => {
|
|
|
- Question.startLink('examination', record);
|
|
|
- }} />}
|
|
|
- {(record.report && !record.report.isFinish) && <IconButton className="m-r-2" type="continue" tip="Continue" onClick={() => {
|
|
|
- Question.continueLink('examination', record);
|
|
|
- }} />}
|
|
|
- <IconButton type="restart" tip="Restart" onClick={() => {
|
|
|
- this.restart(record);
|
|
|
- }} />
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ width: 110,
|
|
|
+ align: 'left',
|
|
|
+ render: record => {
|
|
|
+ return (
|
|
|
+ <div className="table-row p-t-1">
|
|
|
+ {!record.report && (
|
|
|
+ <IconButton
|
|
|
+ type="start"
|
|
|
+ tip="Start"
|
|
|
+ onClick={() => {
|
|
|
+ Question.startLink('examination', record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {record.report && !record.report.isFinish && (
|
|
|
+ <IconButton
|
|
|
+ className="m-r-2"
|
|
|
+ type="continue"
|
|
|
+ tip="Continue"
|
|
|
+ onClick={() => {
|
|
|
+ Question.continueLink('examination', record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ <IconButton
|
|
|
+ type="restart"
|
|
|
+ tip="Restart"
|
|
|
+ onClick={() => {
|
|
|
+ this.restart(record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }, {
|
|
|
- title: '报告',
|
|
|
- width: 30,
|
|
|
- align: 'right',
|
|
|
- render: (record) => {
|
|
|
- if (!record.report || !record.report.isFinish) return null;
|
|
|
- return (
|
|
|
- <div className="table-row p-t-1">
|
|
|
- <IconButton type="report" tip="Report" onClick={() => {
|
|
|
- Question.reportLink(record);
|
|
|
- }} />
|
|
|
- </div>
|
|
|
- );
|
|
|
+ {
|
|
|
+ title: '报告',
|
|
|
+ width: 50,
|
|
|
+ align: 'right',
|
|
|
+ render: record => {
|
|
|
+ if (!record.report || !record.report.isFinish) return null;
|
|
|
+ return (
|
|
|
+ <div className="table-row p-t-1">
|
|
|
+ <IconButton
|
|
|
+ type="report"
|
|
|
+ tip="Report"
|
|
|
+ onClick={() => {
|
|
|
+ Question.reportLink(record);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
- }];
|
|
|
+ ];
|
|
|
this.inited = false;
|
|
|
- return {
|
|
|
- };
|
|
|
+ return {};
|
|
|
}
|
|
|
|
|
|
init() {
|
|
@@ -406,7 +601,7 @@ export default class extends Page {
|
|
|
|
|
|
refreshData() {
|
|
|
if (this.cat) {
|
|
|
- Question.getExaminationInfo().then((result) => {
|
|
|
+ Question.getExaminationInfo().then(result => {
|
|
|
this.setState({ examination: result });
|
|
|
});
|
|
|
}
|
|
@@ -415,7 +610,7 @@ export default class extends Page {
|
|
|
|
|
|
refreshExamination() {
|
|
|
Question.getExaminationList(Object.assign({ structId: this.params.id }, this.state.search))
|
|
|
- .then((result) => {
|
|
|
+ .then(result => {
|
|
|
this.setState({ list: result.list, total: result.total });
|
|
|
})
|
|
|
.catch(err => {
|
|
@@ -453,23 +648,42 @@ export default class extends Page {
|
|
|
})}
|
|
|
</Breadcrumb>
|
|
|
<ListTable
|
|
|
- rightAction={<div hidden={!this.qxCat}>
|
|
|
- <span>有效期至:{examination.expireTime && formatDate(examination.expireTime, 'YYYY-MM-DD')}</span>
|
|
|
- {examination.reset && <span>第一遍模考成绩<Switch checked={this.state.showPrev} onChange={() => {
|
|
|
- this.setState({ showPrev: !this.state.showPrev });
|
|
|
- }} /></span>}
|
|
|
- {!examination.reset && examination.canReset && <Button size="small" radius onClick={() => {
|
|
|
- this.resetExamination();
|
|
|
- }}>
|
|
|
- Reset</Button>}
|
|
|
- {!examination.reset && !examination.canReset && <Tooltip overlayClassName="gray" placement="top" title="全部模考做完才可重置">
|
|
|
- <a>
|
|
|
- <Button size="small" disabled radius>
|
|
|
+ rightAction={
|
|
|
+ <div hidden={!this.qxCat}>
|
|
|
+ <span>有效期至:{examination.expireTime && formatDate(examination.expireTime, 'YYYY-MM-DD')}</span>
|
|
|
+ {examination.reset && (
|
|
|
+ <span>
|
|
|
+ 第一遍模考成绩
|
|
|
+ <Switch
|
|
|
+ checked={this.state.showPrev}
|
|
|
+ onChange={() => {
|
|
|
+ this.setState({ showPrev: !this.state.showPrev });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ )}
|
|
|
+ {!examination.reset && examination.canReset && (
|
|
|
+ <Button
|
|
|
+ size="small"
|
|
|
+ radius
|
|
|
+ onClick={() => {
|
|
|
+ this.resetExamination();
|
|
|
+ }}
|
|
|
+ >
|
|
|
Reset
|
|
|
</Button>
|
|
|
- </a >
|
|
|
- </Tooltip>}
|
|
|
- </div>}
|
|
|
+ )}
|
|
|
+ {!examination.reset && !examination.canReset && (
|
|
|
+ <Tooltip overlayClassName="gray" placement="top" title="全部模考做完才可重置">
|
|
|
+ <a>
|
|
|
+ <Button size="small" disabled radius>
|
|
|
+ Reset
|
|
|
+ </Button>
|
|
|
+ </a>
|
|
|
+ </Tooltip>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ }
|
|
|
filters={[
|
|
|
{
|
|
|
type: 'radio',
|
|
@@ -488,8 +702,8 @@ export default class extends Page {
|
|
|
},
|
|
|
},
|
|
|
]}
|
|
|
- data={list}
|
|
|
- columns={this.qxCat ? this.qxCatColumns : (this.cat ? this.catColumns : this.columns)}
|
|
|
+ data={[{}, {}, {}] || list}
|
|
|
+ columns={this.qxCatColumns}
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|