xialiang 3 years ago
commit d14173ddd8

@ -2,7 +2,7 @@
import React, { useState, useRef } from 'react';
import { useRequest, history } from 'umi';
import { PlusOutlined, TagsOutlined, UploadOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload, Form, Popconfirm } from 'antd';
import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload, Form, Popconfirm, Typography } from 'antd';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import type { ActionType } from '@ant-design/pro-table';
import type { ProColumns } from '@ant-design/pro-table';
@ -296,10 +296,9 @@ const ExaminationList: React.FC = () => {
}}
>
<a
key="detail"
key="publish"
>
{record.b_use == 1 ? "已发布" : "未发布"}
{record.b_use == 1 ? <Typography.Text type="success"></Typography.Text> : <Typography.Text type="warning"></Typography.Text>}
</a>
</Popconfirm>
@ -312,9 +311,6 @@ const ExaminationList: React.FC = () => {
record.apply_time = [record.apply_start_time, record.apply_end_time]
record.examination_time = [record.examination_end_time, record.examination_end_time]
record.apply_time = [record.apply_start_time, record.apply_end_time]
setCurrentRow(record);
}}
>

@ -2,7 +2,7 @@
import React, { useState, useRef } from 'react';
import { useRequest, history } from 'umi';
import { PlusOutlined, TagsOutlined, UploadOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload } from 'antd';
import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload, Typography } from 'antd';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import type { ProColumns, ActionType } from '@ant-design/pro-table';
import ProTable from '@ant-design/pro-table';
@ -222,6 +222,7 @@ const ExaminationRules: React.FC = () => {
}}>
</a>,
/*
<a
key="registration"
onClick={() => {
@ -229,8 +230,8 @@ const ExaminationRules: React.FC = () => {
//setCurrentRow(record);
}}
>
</a>,
{record.b_use == 1 ? <Typography.Text type="success"></Typography.Text> : <Typography.Text type="secondary"></Typography.Text>}
</a>*/,
]
},
},

@ -20,7 +20,7 @@ import { saveRules, querySubjectList, queryRulesView, queryRulesList, queryRules
import { queryQuestionType } from '@/pages/questionbank/service';
import ProTable, { ActionType, EditableProTable, ProColumns } from '@ant-design/pro-table';
import { TableListPagination } from '@/pages/ListTableList2/data';
import { PlusOutlined } from '@ant-design/icons';
import { DiffOutlined, PlusOutlined } from '@ant-design/icons';
import { TableListItem } from '../../components/QuestionSelector';
import ScoreSetter from '../../components/ScoreSetter';
import AutoSelector from '../components/AutoSelector';
@ -62,8 +62,8 @@ export default () => {
dataIndex: 'examination_time',
valueType: 'text',
sorter: false,
hideInTable: false,
hideInForm: false,
hideInTable: true,
hideInForm: true,
hideInSearch: true,
renderText: (val: string) => `${val}`,
},
@ -71,13 +71,13 @@ export default () => {
title: '关联主题',
dataIndex: 'subject_name',
valueType: 'text',
hideInTable: false,
hideInForm: false,
hideInTable: true,
hideInForm: true,
hideInSearch: true,
},
{
title: '题型设置',
dataIndex: 'subject_id',
dataIndex: 'question_type_count',
valueType: 'text',
hideInTable: true,
hideInForm: false,
@ -93,9 +93,9 @@ export default () => {
sinfo.push({ label: Items.list[i].subject_name, value: Items.list[i].subject_id })
}
console.log(sinfo, 'sinfo');
*/
*/
return [];
},
},
},
{
title: '总分',
@ -104,7 +104,7 @@ export default () => {
valueType: 'text',
hideInSearch: true,
hideInForm: false,
renderText: (val: string) => `${val}`,
renderText: (val: string) => `${val || 0} `,
},
{
title: '通过线',
@ -113,12 +113,13 @@ export default () => {
valueType: 'text',
hideInSearch: true,
hideInForm: false,
renderText: (val: string) => `${val}`,
renderText: (val: string) => `${val || '-'}`,
},
{
title: '操作',
dataIndex: 'option',
valueType: 'option',
width: 200,
render: (_dom: any, record: React.SetStateAction<TableListItem | undefined>) => {
console.log(record, 'record')
return [
@ -305,32 +306,36 @@ export default () => {
>
<div style={{ margin: '0' }}>
<ProTable<TableListItem, TableListPagination>
page
headerTitle={false}
actionRef={actionRef}
rowKey="examination_id"
options={false}
search={false}
toolBarRender={() => [
<Button
type="primary"
key="primary"
onClick={() => {
handleAutoModalVisible(true)
}}
>
<PlusOutlined />
</Button>,
<Button
type="primary"
key="primary"
onClick={() => {
handleScoreModalVisible(true)
}}
>
<PlusOutlined />
</Button>
]}
toolBarRender={() => (
<Space style={{margin:-24}} >
<Button
type="primary"
key="primary"
onClick={() => {
handleAutoModalVisible(true)
}}
>
<PlusOutlined />
</Button>
<Button
type="primary"
key="primary"
onClick={() => {
handleScoreModalVisible(true)
}}
>
<DiffOutlined />
</Button>
</Space>
)}
request={async (value) => {
console.log('queryRulesPaper::')
const _data = await queryRulesPaper(
{
rules_id: params?.id,
@ -340,7 +345,7 @@ export default () => {
);
return {
current: _data?.pageNumber,
data: _data?.table_List,
data: _data?.question_list,
pageSize: _data?.pageSize,
total: _data?.totalRow || 0,
};
@ -407,6 +412,7 @@ export default () => {
console.log('paper', paper)
// setUuidPaper(paper?.paper_uuid)
// message.success('提交成功');
actionRef.current?.reload()
handleAutoModalVisible(false)
return true;
}}

@ -2,7 +2,7 @@
import React, { useState, useRef } from 'react';
import { useRequest, history } from 'umi';
import { PlusOutlined, TagsOutlined, UploadOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload } from 'antd';
import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload, Typography } from 'antd';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import type { ProColumns, ActionType } from '@ant-design/pro-table';
import ProTable from '@ant-design/pro-table';
@ -194,7 +194,7 @@ const ExaminationRules: React.FC = () => {
setSelectedRows([]);
actionRef.current?.reloadAndRest?.();
}}>
<Typography.Text type="danger"></Typography.Text>
</a>,
<a
key="b_use"
@ -206,7 +206,7 @@ const ExaminationRules: React.FC = () => {
actionRef.current?.reloadAndRest?.();
}}
>
{record.b_use == 0 ? "未发布" : "已发布"}
{record.b_use == 1 ? <Typography.Text type="success"></Typography.Text> : <Typography.Text type="secondary"></Typography.Text>}
</a>,
]
},

@ -209,4 +209,4 @@ export async function autoPaperOfficial(data: Record<string, any>, options?: Rec
requestType: "form",
...(options || {}),
});
}
}

@ -46,6 +46,33 @@ console.log('first');
}
};
/**
*
*
* @param selectedRows
*/
const handleRemove = async (selectedRows: TableListItem[]) => {
const hide = message.loading('正在删除');
if (!selectedRows) return true;
try {
const {code, msg} = await removeQuestion({
key: selectedRows.map((row) => row.key),
});
hide();
if(code === 2000 ){
message.success('删除成功,即将刷新');
}else{
message.warning(msg);
}
return true;
} catch (error) {
hide();
message.error('删除失败,请重试');
return false;
}
};
const QuestionBank = () => {
const match = useRouteMatch();
console.log('match', match);
@ -158,21 +185,31 @@ const QuestionBank = () => {
hideInForm: false,
hideInSearch: true,
renderFormItem: (item, { defaultRender, ...rest }, form) => (
<ProFormList
name='answertrue'
children={undefined}
creatorButtonProps={false}
creatorRecord={{
useMode: 'none',
}}
/>
<Checkbox.Group style={{ width: '100%' }} onChange={(e)=>{
//console.log(`checked = ${e.target.checked}`);
}}>
<Row>
<Col span={3}>
<Checkbox value="A">A</Checkbox>
</Col>
<Col span={3}>
<Checkbox value="B">B</Checkbox>
</Col>
<Col span={3}>
<Checkbox value="C">C</Checkbox>
</Col>
<Col span={3}>
<Checkbox value="D">D</Checkbox>
</Col>
</Row>
</Checkbox.Group>
)
/*
formItemProps: {
rules: [
{
required: true,
message: '请填写试题解析',
message: '请填答案',
},
]
},*/
@ -204,23 +241,21 @@ const QuestionBank = () => {
// rules={[{ required: true }]}
value="锦书"
// disabled
/>
),
},
]
const [questionType, setQuestionType] = useState([]);
const [parsing, setParsing] = useState();
const [createModalVisible, handleCreateModalVisible] = useState<boolean>(false);
const [updateModalVisible, handleUpdateModalVisible] = useState<boolean>(false);
const [selectedRowsState, setSelectedRows] = useState<API.RuleListItem[]>([]);
const [expandedDescRowKeys, setExpandedDescRowKeys] = useState<readonly ReactText[]>([]); // 展开解析设置
const [addType, setAddType] = useState({name: '', value: 0});
/** 获取题型 */
const { data } = useRequest(() => {
return queryQuestionType();
@ -277,9 +312,10 @@ const QuestionBank = () => {
<PlusOutlined /> <DownOutlined />
</Button>
</Dropdown>,
/*
<Button key="remove" type="default" danger>
<DeleteOutlined />
</Button>,
</Button>*/,
<Button key="download" onClick={()=>{window.location.href='/dsideal_yy/zygh/training/exportQuestionTemplate'}} >
<DownloadOutlined />
</Button>,
@ -455,7 +491,10 @@ const QuestionBank = () => {
</Col>
<Col flex={1} style={{textAlign:'right'}}>
<Space direction="horizontal" size="middle">
<a href={record.html_url} target="_blank" rel="noopener noreferrer" key="link">
<a onClick={()=>{
handleUpdateModalVisible(true)
return false;
}} target="_blank" rel="noopener noreferrer" key="link">
<EditOutlined />
</a>
<a href={record.html_url} target="_blank" rel="noopener noreferrer" key="warning" >
@ -543,6 +582,57 @@ const QuestionBank = () => {
columns={columns}
/>
</Modal>
<Modal
title={`编辑${addType?.name }`}
//
width="60%"
visible={updateModalVisible}
destroyOnClose
onCancel={() => {
handleUpdateModalVisible(false);
}}
footer={null}
>
<BetaSchemaForm<DataItem>
layout="horizontal"
layoutType="Form"
labelCol={{ span: 8 }}
wrapperCol={{ span: 12 }}
onFinish={async (values: any) => {
// 表单处理
console.log('columns:', columns);
console.log('values:', values);
const opts = [];
values?.answers?.forEach((item)=>{
opts.push({answer:item, is_true:0})
})
const success = await handleAdd({
...values,
type: type, // 必填0-常规题,1-资质考试题
answers: JSON.stringify(opts),
question_type: addType.value,
// subject_id: params?.id || 0,
});
console.log('123')
if(success){
handleCreateModalVisible(false);
actionRef.current?.reloadAndRest?.();
}
}}
submitter={{
render: (props, doms) => (
<Row>
<Col span={12} offset={8}>
<Space>{doms}</Space>
</Col>
</Row>
),
}}
// action = ''
title="编辑"
columns={columns}
/>
</Modal>
</PageContainer>
);
};

@ -47,7 +47,6 @@ export async function saveQuestion(data: Record<string, any>, options?: Record<s
});
}
/**
*
* @param params
@ -73,3 +72,14 @@ export async function queryQuestionById(params: {
params,
});
}
/** 删除试题 */
export async function removeQuestion(data: { key: number[] }, options?: Record<string, any>) {
console.log('data:::', data);
return request<Record<string, any>>('/dsideal_yy/zygh/training/delQuestion', {
data: { ids: data?.key[0] }, // 当前接口支持批量操作
method: 'POST',
requestType: 'form',
...(options || {}),
});
}

@ -3,222 +3,200 @@ import { useEffect, useState } from 'react';
import { Button, Card, Col, Layout, List, Menu, Progress, Row, Typography } from 'antd';
import { PageContainer } from '@ant-design/pro-layout';
import { useParams, useRequest } from 'umi';
import { viewMyLearningSubject, listMyLearningChapterCourse } from './service';
import { viewMyLearningSubject, getCourseExaminationProgressList } from './service';
import type { CardListItemDataType } from './data.d';
import styles from './style.less';
import SubMenu from 'antd/lib/menu/SubMenu';
console.log('course/list')
const { Paragraph } = Typography;
import cookie from 'react-cookies';
// const getList = async (subject_id,chapter_id ) => {
// // const hide = message.loading('正在配置');
// try {
// const a=await listMyLearningChapterCourse({
// identity_id:cookie.load('identity_id'),
// person_id:cookie.load('person_id'),
// subject_id:subject_id,
// chapter_id:chapter_id,
// });
// // message.success('配置成功');
// return a;
// } catch (error) {
// // message.error('配置失败请重试!');
// return false;
// }
// };
import { history } from "@@/core/history";
let chapterCourse=[];
let total_process=0;
const CardList = () => {
const params = useParams();
console.log('params', params);
// const ids = params.msg.split(',');
const params = useParams();
const [currentCourse, SetCurrentCourse] = useState()
const [currentCourse, SetCurrentCourse] = useState()
/** 获取主题下课程 */
const { data } = useRequest(() => {
return viewMyLearningSubject({
identity_id: cookie.load('identity_id'),
person_id: cookie.load('person_id'),
data_id: params.data_id,
data_type: params.data_type,
subject_id: params.subject_id
/** 获取主题下课程 */
const { data } = useRequest(() => {
return viewMyLearningSubject({
identity_id: cookie.load('identity_id'),
person_id: cookie.load('person_id'),
data_id: params?.data_id,
data_type: params?.data_type,
subject_id: params?.subject_id
});
});
});
const list = data?.list || [];
const subject_data = data ? data.subject : [];
const last_data = data ? data.last_learning_course : [];
const chapter_list = data ? data.chapter_list : [];
// const list = data?.list||[];
const subject_data = data ? data.subject : [];
const last_data = data ? data.last_learning_course : [];
const chapter_list = data ? data.chapter_list : [];
//console.log('currentCourse', currentCourse)
/** 获取课程详情 */
const { data: chapterCourse, run, loading } = useRequest((params: { subject_id: number, chapter_id: number }) => {
return listMyLearningChapterCourse({
identity_id: cookie.load('identity_id'),
person_id: cookie.load('person_id'),
subject_id: params?.subject_id,//chapter_list[0].subject_id
chapter_id: params?.chapter_id,//chapter_list[0].chapter_id
});
});
/** 首次页面 当data 变化 执行run chapterCourse 变化 进行currentCourse赋值 */
useEffect(() => {
console.log('chapterCourse...', chapterCourse)
if (data !== undefined && data !== null) {
run({ subject_id: data?.chapter_list[0]?.subject_id, chapter_id: data?.chapter_list[0]?.chapter_id })
SetCurrentCourse(chapterCourse)
}
/** 获取课程详情 */
const { chapterCourseData, run, loading } = useRequest((params: { subject_id: number, chapter_id: number }) => {
return getCourseExaminationProgressList({
identity_id: cookie.load('identity_id'),
person_id: cookie.load('person_id'),
subject_id: params?.subject_id,
chapter_id: params?.chapter_id,
}, [data]);
// r_list[0].chapter_id
});
},{
formatResult: (result) => {
if(result.list.length!==0){
let total_finish_count=0;
let total_question_count=0;
result.list.forEach((item)=>{
total_finish_count+=item.finish_count;
total_question_count+=item.question_count;
if(item.finish_count!==0){
let num=0;
num=result.finish_count/result.question_count;
item.process=num.toFixed(4)
}else {
item.process=0;
}
});
if(total_finish_count!==0){
let total_num=total_finish_count/total_question_count;
total_process=total_num.toFixed(4)
/** run后 chapterCourse 变化 进行currentCourse赋值 */
useEffect(() => {
console.log('chapterCourse...', chapterCourse)
if (data !== undefined) {
console.log('data', data)
SetCurrentCourse(chapterCourse)
}else {
total_process=0;
}
}, [chapterCourse]);
const content = (
<div className={styles.pageHeaderContent}>
<Card
title={<a>{subject_data ? subject_data.subject_name : '--'}</a>}
hoverable={false}
className={styles.card}
actions={[]}
extra={<><span style={{ padding: 10 }}>: {subject_data ? subject_data.learning_start_time : '--'}</span><span style={{ padding: 10 }}>{subject_data ? subject_data.distance_end_time : '--'}</span><span style={{ padding: 10 }}>{subject_data ? subject_data.total_course_hours : '--'}</span></>}
>
<Card.Meta
avatar={<img alt="" className={styles.cardAvatar} src={'https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png'} style={{ width: '270px', height: '150px', borderRadius: '10px' }} />}
title={false}
description={
<>
<Card.Grid hoverable={false} style={{ width: '100%', padding: 0, boxShadow: 'none' }}>
<Paragraph className={styles.item} ellipsis={{ rows: 4 }} style={{ paddingLeft: 10 }}>
{subject_data ? subject_data.subject_describe : '--'}
</Paragraph>
<Row>
<Col span={16} style={{ display: 'inline-block', padding: 10 }}><span></span><span style={{ display: 'inline-block', width: '80%' }}><Progress percent={subject_data ? subject_data.subject_learning_progress * 100 : 0} /></span></Col>
</Row>
<Row>
<Col span={10} style={{ padding: 10 }}><span></span><span>{last_data ? last_data.course_name : '--'}</span></Col> <Col span={10} style={{ padding: 10 }}><span>{last_data ? last_data.lecture_teacher : '--'}</span></Col> <Col span={4} style={{ padding: 10 }}><Button type="primary">::</Button></Col>
</Row>
</Card.Grid>
</>
}
/>
</Card>
</div>
);
console.log('iddddddd', chapter_list.length !== 0 ? chapter_list[0].chapter_id.toString() : '')
const nullData: Partial<CardListItemDataType> = {};
return (
<PageContainer content={content} extraContent={false}>
<Row>
<Col span={6} style={{ paddingRight: 24 }}>
<Menu
mode="inline"
selectedKeys={[chapter_list.length !== 0 ? chapter_list[0].chapter_id.toString() : '']}
defaultOpenKeys={['sub1']}
style={{ height: '100%', width: '100%' }}
>
<SubMenu key="sub1" icon={<AlignLeftOutlined />} title="章节目录">
{
chapter_list.length !== 0 ?
chapter_list.map((item) => {
return (
<Menu.Item
key={item.chapter_id}
onClick={() => {
run({ subject_id: item.subject_id, chapter_id: item.chapter_id })
}}
>{item.chapter_name}</Menu.Item>
)
}) : ''
}
</SubMenu>
</Menu>
</Col>
<Col span={18} style={{ background: '#ffffff', padding: 24 }}>
{console.log('chapterCourse', chapterCourse)}
{
chapterCourse !== undefined ?
<>
<>{chapterCourse[0]?.course_name}</>
<>{chapterCourse[0]?.lecture_teacher}</>
</>
: <></>
}
<List<Partial<CardListItemDataType>>
rowKey="id"
// loading={loading}
grid={{
gutter: 1,
xs: 1,
sm: 2,
md: 1,
lg: 1,
xl: 1,
xxl: 1,
}
chapterCourse=result.list;
}
});
/** 首次页面 当data 变化 执行run chapterCourse 变化 进行currentCourse赋值 */
useEffect(() => {
// console.log('chapterCourse首次页面...', chapterCourse)
if (data !== undefined && data !== null && chapter_list.length !== 0) {
run({ subject_id: data?.chapter_list[0]?.subject_id, chapter_id: data?.chapter_list[0]?.chapter_id })
SetCurrentCourse(chapterCourse)
}
//setSelectedCourse({})
}, [data]);
/** run后 chapterCourse 变化 进行currentCourse赋值 */
useEffect(() => {
// console.log('chapterCourse变化...', chapterCourse)
if (data !== undefined) {
SetCurrentCourse(chapterCourse)
}
//setSelectedCourse({})
}, [chapterCourse]);
const content = (
<div className={styles.pageHeaderContent}>
<Card
title={<a>{subject_data ? subject_data.subject_name : '--'}</a>}
hoverable={false}
className={styles.card}
actions={[]}
>
<Card.Meta
avatar={<img alt="" className={styles.cardAvatar} src={'https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png'} style={{ width: '270px', height: '150px', borderRadius: '10px' }} />}
title={false}
description={
<>
<Card.Grid hoverable={false} style={{ width: '100%', padding: 0, boxShadow: 'none' }}>
<Paragraph className={styles.item} ellipsis={{ rows: 4 }} style={{ paddingLeft: 10 }}>
{subject_data ? subject_data.subject_describe : '--'}
</Paragraph>
<Row>
<Col span={16} style={{ display: 'inline-block', padding: 10 }}><span></span><span style={{ display: 'inline-block', width: '80%' }}><Progress percent={total_process * 100 } /></span></Col>
</Row>
<Row>
<Col span={4} style={{ padding: 10 }}>
<Button type="primary"
onClick={() => {
console.log('last_data',last_data)
}}
></Button>
</Col>
</Row>
</Card.Grid>
</>
}
/>
</Card>
</div>
);
const nullData: Partial<CardListItemDataType> = {};
return (
<PageContainer content={content} extraContent={false}>
<Row>
<Col span={6} style={{ paddingRight: 24 }}>
<Menu
mode="inline"
selectedKeys={[chapter_list.length !== 0 ? chapter_list[0].chapter_id.toString() : '']}
defaultOpenKeys={['sub1']}
style={{ height: '100%', width: '100%' }}
>
<SubMenu key="sub1" icon={<AlignLeftOutlined />} title="章节目录">
{
chapter_list.length !== 0 ?
chapter_list.map((item) => {
return (
<Menu.Item
key={item.chapter_id}
onClick={() => {
run({ subject_id: item.subject_id, chapter_id: item.chapter_id })
}}
dataSource={[nullData, ...chapterCourse]}
renderItem={(item) => {
if (item && item.id) {
return (
<List.Item key={item.id}>
<Card
hoverable={false}
className={styles.card}
actions={[]}
style={{ background: '#f0f0f0' }}
>
<Card.Meta
avatar={false}
title={<a>{item.title}</a>}
description={
<Row>
<Col span={4} style={{ padding: 10 }}>
1
</Col>
<Col span={8} style={{ padding: 10 }}>
<Paragraph className={styles.item} ellipsis={{ rows: 3 }}>
{item.description}
</Paragraph>
</Col>
<Col span={4} style={{ padding: 10, textAlign: 'center' }}>
23
</Col>
<Col span={4} style={{ padding: 10, textAlign: 'center' }}>
<Progress percent={30} />
</Col>
<Col span={4} style={{ padding: 10, textAlign: 'center' }}>
<Button type="primary"></Button>
</Col>
</Row>
}
/>
</Card>
</List.Item>
);
}
}}
/>
</Col>
</Row>
</PageContainer>
);
>{item.chapter_name}</Menu.Item>
)
}) : ''
}
</SubMenu>
</Menu>
</Col>
<Col span={18} style={{ background: '#ffffff', padding: 24, minHeight: '20rem' }}>
{
chapterCourse !== undefined && chapterCourse !== '' ?
chapterCourse.map((item, index) => {
return (
<div key={'chapterCourse' + index} >
<div style={{ marginBottom: '2rem', }}>
<div style={{ paddingRight: '1rem', width: '10%', display: 'inline-block' }}>{index+1}</div>
<div title={item?.course_name} style={{ paddingRight: '1rem', width: '30%', display: 'inline-block', verticalAlign: 'middle', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{item?.course_name}</div>
<div style={{ paddingRight: '1rem', width: '10%', display: 'inline-block' }}>{item?.finish_count}/{item?.question_count}</div>
<div style={{ paddingRight: '1rem', width: '30%', display: 'inline-block' }}>
<Progress percent={item?.progress * 100} />
</div>
<div style={{ paddingRight: '1rem', width: '20%', display: 'inline-block', textAlign: 'right' }}>
<Button type="primary" onClick={() => {
const info = item.chapter_id + ',' + item.course_id + ',' + item.subject_id;
// window.open('/#/course/detail/' + info)
// history.push( '/course/detail/'+info);
}}></Button>
</div>
</div>
</div>
)
})
: <></>
}
</Col>
</Row>
</PageContainer>
);
};
export default CardList;

@ -4,8 +4,8 @@ import type { CardListItemDataType } from './data.d';
/**
* 6.5
* /dsideal_yy/ypt/careerTraining/learning/listMyLearningSubject
* @param params
* @returns
* @param params
* @returns
*/
export async function listMyLearningSubject(params: {
page_size: number;
@ -18,8 +18,8 @@ export async function listMyLearningSubject(params: {
/**
* 6.5
* /dsideal_yy/ypt/careerTraining/learning/listMyLearningSubject
* @param params
* @returns
* @param params
* @returns
*/
export async function getRulesList(params: {
page_size: number;
@ -32,8 +32,8 @@ export async function getRulesList(params: {
/**
* 05
* /dsideal_yy/zygh/training/rules/getRulesPaper
* @param params
* @returns
* @param params
* @returns
*/
export async function getRulesPaper(params: {
page_size: number;
@ -46,8 +46,8 @@ export async function getRulesPaper(params: {
/**
* 06
* /dsideal_yy/zygh/training/rules/getPaperQuestionList
* @param params
* @returns
* @param params
* @returns
*/
export async function getPaperQuestionList(params: {
page_size: number;
@ -79,4 +79,15 @@ export async function listMyLearningChapterCourse(params: {
return request(' /dsideal_yy/ypt/careerTraining/learning/listMyLearningChapterCourse', {
params,
});
}
}
export async function getCourseExaminationProgressList(params: {
chapter_id: number;
identity_id: number;
person_id: number;
subject_id: number
}){
return request('/dsideal_yy/zygh/training/mock/getCourseExaminationProgressList', {
params,
});
}

Loading…
Cancel
Save