|
|
|
@ -1,9 +1,9 @@
|
|
|
|
|
import { AlignLeftOutlined, LaptopOutlined, NotificationOutlined, PlusOutlined, UserOutlined } from '@ant-design/icons';
|
|
|
|
|
import { useEffect, useState } from 'react';
|
|
|
|
|
import { Button, Card, Col, Layout, List, Menu, Progress, Row, Typography,Image } from 'antd';
|
|
|
|
|
import { Button, Card, Col, Layout, List, Menu, Progress, Row, Typography, Image, message } from 'antd';
|
|
|
|
|
import { PageContainer } from '@ant-design/pro-layout';
|
|
|
|
|
import { useParams, useRequest, history } from 'umi';
|
|
|
|
|
import { viewMyLearningSubject, getCourseExaminationProgressList } from './service';
|
|
|
|
|
import { viewMyLearningSubject, getCourseExaminationProgressList, getErrorQuestionList } from './service';
|
|
|
|
|
import type { CardListItemDataType } from './data.d';
|
|
|
|
|
import styles from './style.less';
|
|
|
|
|
import SubMenu from 'antd/lib/menu/SubMenu';
|
|
|
|
@ -128,11 +128,29 @@ const CardList = () => {
|
|
|
|
|
<Card.Grid hoverable={false} style={{ width: '25%', textAlign: 'center', boxShadow: 'none' }}>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
style={{ width: '10rem', height: '5rem' }}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
onClick={async () => {
|
|
|
|
|
console.log('last_data', last_data)
|
|
|
|
|
const info = subject_data.subject_id + "," + cookie.load('person_id')
|
|
|
|
|
console.log(subject_data, 'subject_data')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const _data1 = await getErrorQuestionList({
|
|
|
|
|
subject_id: params.subject_id,
|
|
|
|
|
person_id: cookie.load('person_id'),
|
|
|
|
|
});
|
|
|
|
|
let num = 0
|
|
|
|
|
if (_data1.success) {
|
|
|
|
|
_data1.list.map((e, i) => {
|
|
|
|
|
num += e.question_list.length
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
console.log(_data1, '_data1', num);
|
|
|
|
|
if (num > 0) {
|
|
|
|
|
history.push(`/mockExamination/chapterExamination/chapterList/chapterErrorListPaper/${info}`)
|
|
|
|
|
} else {
|
|
|
|
|
message.error("暂无错题");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
>错题练习</Button>
|
|
|
|
@ -205,7 +223,10 @@ const CardList = () => {
|
|
|
|
|
<Progress percent={item ? parseInt(item.process * 100) : 0} format={(percent) => percent === 100 ? '100%' : `${percent}%`} />
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{ paddingRight: '1rem', width: '20%', display: 'inline-block', textAlign: 'right' }}>
|
|
|
|
|
<Button type="primary" onClick={() => {
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
disabled={item.question_count > 0 ? false : true}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
const info = cookie.load('identity_id') + ',' + item.chapter_id + ',' + item.course_id + ',' + item.finish_count + ',' + cookie.load('person_id') + ',' + item.subject_id;
|
|
|
|
|
console.log(info)
|
|
|
|
|
history.push(`/mockExamination/chapterExamination/chapterList/chapterListPaper/${info}`)
|
|
|
|
|