|
|
@ -1,5 +1,5 @@ |
|
|
|
import React, { useState, useEffect } from 'react'; |
|
|
|
import React, { useState, useEffect } from 'react'; |
|
|
|
import { Row, Col, Input, Select, Button, Table, Space, Cascader, Modal } from 'antd'; |
|
|
|
import {Row, Col, Input, Select, Button, Table, Space, Cascader, Modal, Form, TreeSelect} from 'antd'; |
|
|
|
import ReactECharts from 'echarts-for-react'; |
|
|
|
import ReactECharts from 'echarts-for-react'; |
|
|
|
import {getExamDetailAnalysisPageList, getIndustryList, getScoreDistribution} from 'api/exam-online/index'; |
|
|
|
import {getExamDetailAnalysisPageList, getIndustryList, getScoreDistribution} from 'api/exam-online/index'; |
|
|
|
import { convertToCascaderData } from "./ExamEditPage"; |
|
|
|
import { convertToCascaderData } from "./ExamEditPage"; |
|
|
@ -21,6 +21,7 @@ type ExamDataItem = { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const ExamDetailAnalysisPage: React.FC = () => { |
|
|
|
const ExamDetailAnalysisPage: React.FC = () => { |
|
|
|
|
|
|
|
let formRef = React.createRef<any>(); |
|
|
|
const [examName, setExamName] = useState(''); |
|
|
|
const [examName, setExamName] = useState(''); |
|
|
|
const [paperName, setPaperName] = useState(''); |
|
|
|
const [paperName, setPaperName] = useState(''); |
|
|
|
const [examArea, setExamArea] = useState(''); |
|
|
|
const [examArea, setExamArea] = useState(''); |
|
|
@ -63,7 +64,8 @@ const ExamDetailAnalysisPage: React.FC = () => { |
|
|
|
setPaperName(''); |
|
|
|
setPaperName(''); |
|
|
|
setExamArea(''); |
|
|
|
setExamArea(''); |
|
|
|
setIndustry(null); |
|
|
|
setIndustry(null); |
|
|
|
handleSearch(); |
|
|
|
const form = formRef.current; |
|
|
|
|
|
|
|
form.resetFields(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handleSearch = () => { |
|
|
|
const handleSearch = () => { |
|
|
@ -170,41 +172,40 @@ const ExamDetailAnalysisPage: React.FC = () => { |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div className="header-filter"> |
|
|
|
<div className="header-filter"> |
|
|
|
<div className="list-filter" style={{display: 'flex', padding: 15}}> |
|
|
|
<div className="list-filter" style={{display: 'flex', padding: 15}}> |
|
|
|
<Row gutter={16}> |
|
|
|
<Form |
|
|
|
<Col span={5}> |
|
|
|
ref={formRef} |
|
|
|
<span style={{ marginRight: 8 }}>考试名称:</span> |
|
|
|
className="filter" |
|
|
|
<Input |
|
|
|
layout="inline" |
|
|
|
placeholder="考试名称" |
|
|
|
name="basic" |
|
|
|
value={examName} |
|
|
|
style={{ paddingLeft: 20 }}> |
|
|
|
onChange={(e) => setExamName(e.target.value)} |
|
|
|
<Form.Item |
|
|
|
style={{ width: 'calc(100% - 100px)' }} // 调整输入框宽度
|
|
|
|
label="考试名称:" |
|
|
|
/> |
|
|
|
name="examName"> |
|
|
|
</Col> |
|
|
|
<Input placeholder="考试名称" onChange={(e) => setExamName(e.target.value)}/> |
|
|
|
<Col span={5}> |
|
|
|
</Form.Item> |
|
|
|
<span style={{ marginRight: 8 }}>试卷名称:</span> |
|
|
|
<Form.Item |
|
|
|
<Input |
|
|
|
label="试卷名称:" |
|
|
|
placeholder="试卷名称" |
|
|
|
name="paperName"> |
|
|
|
value={paperName} |
|
|
|
<Input placeholder="试卷名称" onChange={(e) => setPaperName(e.target.value)}/> |
|
|
|
onChange={(e) => setPaperName(e.target.value)} |
|
|
|
</Form.Item> |
|
|
|
style={{ width: 'calc(100% - 100px)' }} // 调整输入框宽度
|
|
|
|
<Form.Item |
|
|
|
/> |
|
|
|
label="考试区域:" |
|
|
|
</Col> |
|
|
|
name="examArea"> |
|
|
|
<Col span={5}> |
|
|
|
|
|
|
|
<span style={{ marginRight: 8 }}>考试区域:</span> |
|
|
|
|
|
|
|
<Cascader |
|
|
|
<Cascader |
|
|
|
options={convertToCascaderData()} |
|
|
|
options={convertToCascaderData()} |
|
|
|
placeholder="请选择考试区域" |
|
|
|
placeholder="考试区域" |
|
|
|
onChange={(values) => setExamArea(convertArrToRegion(values))} |
|
|
|
onChange={(values) => setExamArea(convertArrToRegion(values))} |
|
|
|
style={{ width: 'calc(100% - 100px)' }} // 调整级联选择器宽度
|
|
|
|
style={{width: 195}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</Col> |
|
|
|
</Form.Item> |
|
|
|
<Col span={5}> |
|
|
|
<Form.Item |
|
|
|
<span style={{ marginRight: 8 }}>监管行业:</span> |
|
|
|
label="监管行业:" |
|
|
|
|
|
|
|
name="industry"> |
|
|
|
<Select |
|
|
|
<Select |
|
|
|
placeholder="监管行业" |
|
|
|
placeholder="监管行业" |
|
|
|
value={industry} |
|
|
|
value={industry} |
|
|
|
onChange={(value) => setIndustry(value)} |
|
|
|
onChange={(value) => setIndustry(value)} |
|
|
|
style={{ width: 150 }} // 调整下拉框宽度
|
|
|
|
style={{width: 195}} |
|
|
|
allowClear |
|
|
|
allowClear |
|
|
|
> |
|
|
|
> |
|
|
|
{industryOptions.map((option) => ( |
|
|
|
{industryOptions.map((option) => ( |
|
|
@ -213,14 +214,16 @@ const ExamDetailAnalysisPage: React.FC = () => { |
|
|
|
</Option> |
|
|
|
</Option> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</Select> |
|
|
|
</Select> |
|
|
|
</Col> |
|
|
|
</Form.Item> |
|
|
|
<Col span={4}> |
|
|
|
<Form.Item> |
|
|
|
<Space> |
|
|
|
<Button htmlType="button" onClick={handleReset}> |
|
|
|
<Button onClick={handleReset}>重置</Button> |
|
|
|
重置 |
|
|
|
<Button type="primary" onClick={handleSearch}>查询</Button> |
|
|
|
</Button> |
|
|
|
</Space> |
|
|
|
</Form.Item> |
|
|
|
</Col> |
|
|
|
<Form.Item> |
|
|
|
</Row> |
|
|
|
<Button type="primary" onClick={handleSearch}>查询</Button> |
|
|
|
|
|
|
|
</Form.Item> |
|
|
|
|
|
|
|
</Form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Table |
|
|
|
<Table |
|
|
|