Merge remote-tracking branch 'origin/main'

main
liuyiliang 3 months ago
commit 9e0e9c888d
  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. 8
      packages/examination/src/views/question/questionAdd.tsx
  7. 8
      packages/examination/src/views/question/questionList.tsx

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

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

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

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

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

@ -86,7 +86,9 @@ class QuestionAdd extends Component<any, States> {
// 新增试题
handleAddNewQuestion = () => {
const { formIds } = this.state;
const newId = `form_${formIds.length}`;
const lastId = formIds[formIds.length - 1];
const lastNumber = parseInt(lastId.split('_')[1], 10);
const newId = `form_${lastNumber + 1}`;
const formValues = {
[`questionTypes_${newId}`]: "1"
};
@ -207,6 +209,10 @@ class QuestionAdd extends Component<any, States> {
const formIds: string[] = [];
const questionTypesMap = {};
if (rows.length === 0) {
message.warn('导入的文件中没有有效数据行');
return;
}
rows.forEach((row: any, index) => {
const formId = `form_${index}`;
formIds.push(formId);

@ -214,7 +214,7 @@ class QuestionList extends Component<any, States> {
dataIndex: 'serviceTypeId',
key: 'serviceTypeId',
align: 'center',
width: 150,
width: 160,
render: (serviceTypeId: any) => {
const serviceType = serviceTypeDict?.find((item: any) => item.dictKey === serviceTypeId);
return serviceType? serviceType.dictValue : serviceTypeId;
@ -235,7 +235,10 @@ class QuestionList extends Component<any, States> {
dataIndex: 'questionContent',
key: 'questionContent',
align: 'center',
width: 450
width: 450,
render: (questionContent: any, record: any) => {
return `${questionContent} ${record.options}`;
}
},
{
title: '答案',
@ -359,6 +362,7 @@ class QuestionList extends Component<any, States> {
rowKey="id"
bordered={true}
size={'small'}
scroll={{ y: 500 }}
loading={loading}
rowSelection={{
selectedRowKeys: selectedRowKeys,

Loading…
Cancel
Save