题库管理和试卷管理代码提交

main
hujunpeng 3 months ago
parent a0ee60876b
commit bafbcb4de3
  1. 2
      packages/examination/src/views/exam-online/compoents/ExamDetailAnalysisPage.tsx
  2. 11
      packages/examination/src/views/exam-online/compoents/ExamEditPage.tsx
  3. 2
      packages/examination/src/views/exam-online/compoents/ExamPaperAnalysisPage.tsx
  4. 4
      packages/examination/src/views/examPaper/examPaperAdd.tsx
  5. 1
      packages/examination/src/views/examPaper/examPaperList.tsx
  6. 6
      packages/examination/src/views/question/questionList.tsx

@ -40,6 +40,7 @@ const ExamDetailAnalysisPage: React.FC = () => {
try { try {
const industryResponse = await getIndustryList(); const industryResponse = await getIndustryList();
setIndustryOptions(industryResponse.map((item: any) => ({ value: item.industry_id, label: item.industry_name }))); setIndustryOptions(industryResponse.map((item: any) => ({ value: item.industry_id, label: item.industry_name })));
handleSearch();
} catch (error) { } catch (error) {
console.error('数据获取失败:', error); console.error('数据获取失败:', error);
} }
@ -167,7 +168,6 @@ const ExamDetailAnalysisPage: React.FC = () => {
return ( return (
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
<ESBreadcrumbComponent url="/exam-statistics" previousText={"考试统计"} currentText={"考试详情"} />
{/* 检索条件行 */} {/* 检索条件行 */}
<Row gutter={16}> <Row gutter={16}>
<Col span={5}> <Col span={5}>

@ -233,8 +233,6 @@ const ExamBasicInfoForm: React.FC<PropsWithRouter> = (props) => {
return ( return (
<div> <div>
{/* 添加面包屑组件 */}
<ESBreadcrumbComponent currentText={breadcrumbText} />
<h1></h1> <h1></h1>
<Form <Form
ref={formRef} ref={formRef}
@ -264,11 +262,14 @@ const ExamBasicInfoForm: React.FC<PropsWithRouter> = (props) => {
<Form.Item <Form.Item
label="监管行业" label="监管行业"
name="regulatedIndustry" name="regulatedIndustry"
rules={[]} rules={[
required {
required: true,
message: '请选择监管行业',
},
]}
> >
<Select placeholder="请选择监管行业" onChange={handleIndustryChange}> <Select placeholder="请选择监管行业" onChange={handleIndustryChange}>
<Option key="" value=""></Option>
{industryOptions.map(option => ( {industryOptions.map(option => (
<Option key={option.value} value={option.value}> <Option key={option.value} value={option.value}>
{option.label} {option.label}

@ -45,6 +45,7 @@ const ExamPaperAnalysisPage: React.FC<RouteComponentProps> = ({history}) => {
setTotalCount(paperAnalysisResponse.totalCount); setTotalCount(paperAnalysisResponse.totalCount);
setUsedCount(paperAnalysisResponse.usedCount); setUsedCount(paperAnalysisResponse.usedCount);
setDisabledCount(paperAnalysisResponse.disabledCount); setDisabledCount(paperAnalysisResponse.disabledCount);
handleSearch();
} catch (error) { } catch (error) {
console.error('数据获取失败:', error); console.error('数据获取失败:', error);
} }
@ -139,7 +140,6 @@ const ExamPaperAnalysisPage: React.FC<RouteComponentProps> = ({history}) => {
return ( return (
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
<ESBreadcrumbComponent url="/exam-statistics" previousText={"考试统计"} currentText={"试卷分析"} />
{/* 检索条件行 */} {/* 检索条件行 */}
<Row gutter={16}> <Row gutter={16}>
<Col span={6}> <Col span={6}>

@ -543,10 +543,11 @@ class ExamPaperAdd extends Component<any, States> {
dataSource={selectedQuestionList} dataSource={selectedQuestionList}
columns={columns} columns={columns}
bordered={true} bordered={true}
scroll={{ y: 200 }}
size={'small'} size={'small'}
/> />
</div> </div>
<div> <div style={{ marginTop: '20px' }}>
<h3 style={{ fontWeight: 'bold' }}></h3> <h3 style={{ fontWeight: 'bold' }}></h3>
<Form <Form
className="filter" className="filter"
@ -594,6 +595,7 @@ class ExamPaperAdd extends Component<any, States> {
bordered={true} bordered={true}
size={'small'} size={'small'}
rowKey="id" rowKey="id"
scroll={{ y: 200 }}
loading={loading} loading={loading}
rowSelection={{ rowSelection={{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,

@ -380,6 +380,7 @@ class ExamPaperList extends Component<any, States> {
bordered={true} bordered={true}
size={'small'} size={'small'}
loading={loading} loading={loading}
scroll={{ y: 500 }}
rowSelection={{ rowSelection={{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: this.handleOnChange, onChange: this.handleOnChange,

@ -234,7 +234,10 @@ class QuestionList extends Component<any, States> {
dataIndex: 'questionContent', dataIndex: 'questionContent',
key: 'questionContent', key: 'questionContent',
align: 'center', align: 'center',
width: 450 width: 450,
render: (questionContent: any, record: any) => {
return `${questionContent} ${record.options}`;
}
}, },
{ {
title: '答案', title: '答案',
@ -358,6 +361,7 @@ class QuestionList extends Component<any, States> {
rowKey="id" rowKey="id"
bordered={true} bordered={true}
size={'small'} size={'small'}
scroll={{ y: 500 }}
loading={loading} loading={loading}
rowSelection={{ rowSelection={{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,

Loading…
Cancel
Save