考试安排页面

main
sunhonglei 4 months ago
parent 3a3f55fd0f
commit da9be7517a
  1. 99
      packages/examination/src/views/exam-online/compoents/ExamListPage.tsx
  2. 6
      packages/examination/src/views/exam-online/compoents/ExamStatisticsPage.tsx

@ -162,7 +162,7 @@ const ExamListPage = ({ history }: { history: any }) => {
console.log('跳转到编辑页面,examId:', examId);
};
const handleDetail = (examId: number)=>{
const handleDetail = (examId: number) => {
sessionStorage.setItem('examId', String(examId));
history.push('/exam-detail');
console.log('跳转到答题情况,examId:', examId);
@ -355,53 +355,56 @@ const ExamListPage = ({ history }: { history: any }) => {
return (
<div>
<div style={{marginBottom: 16}}>
<label>:</label>
<Input
placeholder="考试名称"
value={searchForm.examName}
onChange={(e) =>
setSearchForm({...searchForm, examName: e.target.value})
}
style={{width: 150, marginRight: 8}}
/>
<label>:</label>
<Input
placeholder="试卷名称"
value={searchForm.paperName}
onChange={(e) =>
setSearchForm({...searchForm, paperName: e.target.value})
}
style={{width: 150, marginRight: 8}}
/>
<label>:</label>
<Select
placeholder="监管行业"
value={searchForm.regulatedIndustry}
onChange={(value) =>
setSearchForm({...searchForm, regulatedIndustry: value})
}
style={{width: 150, marginRight: 8}}
>
<Option key="" value=""></Option>
{industryOptions.map(option => (
<Option key={option.value} value={option.value}>
{option.label}
</Option>
))}
</Select>
<label>:</label>
<DatePicker
value={searchForm.validTime} // 使用 Moment 类型
onChange={(value: Moment | null) =>
setSearchForm({...searchForm, validTime: value})
}
style={{marginRight: 8}}
/>
<Button onClick={handleReset}></Button>
<Button onClick={() => handleSearch(1)} type="primary" style={{marginLeft: 8}}>
</Button>
<div style={{ marginBottom: 16, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div>
<label style={{ marginRight: 8 }}><b>:</b></label>
<Input
placeholder="请输入考试名称"
value={searchForm.examName}
onChange={(e) =>
setSearchForm({ ...searchForm, examName: e.target.value })
}
style={{ width: 200, marginRight: '30' }}
/>
<label style={{ marginRight: 8 }}><b>:</b></label>
<Input
placeholder="请输入试卷名称"
value={searchForm.paperName}
onChange={(e) =>
setSearchForm({ ...searchForm, paperName: e.target.value })
}
style={{ width: 200, marginRight: '30' }}
/>
<label style={{ marginRight: 8 }}><b>:</b></label>
<Select
placeholder="监管行业"
value={searchForm.regulatedIndustry}
onChange={(value) =>
setSearchForm({ ...searchForm, regulatedIndustry: value })
}
style={{ width: 200, marginRight: '30' }}
>
<Option key="" value=""></Option>
{industryOptions.map(option => (
<Option key={option.value} value={option.value}>
{option.label}
</Option>
))}
</Select>
<label style={{ marginRight: 8 }}><b>:</b></label>
<DatePicker
value={searchForm.validTime} // 使用 Moment 类型
onChange={(value: Moment | null) =>
setSearchForm({ ...searchForm, validTime: value })
}
/>
</div>
<div>
<Button onClick={handleReset}></Button>
<Button onClick={() => handleSearch(1)} type="primary" style={{ marginLeft: 8 }}>
</Button>
</div>
</div>
<div style={{ marginBottom: 16, textAlign: "right" }}>
<Button onClick={handleDeleteSelected} danger>

@ -186,17 +186,17 @@ const Dashboard: React.FC = () => {
<Row gutter={16}>
<Col span={8}>
<div style={{ textAlign: 'center', background: '#DCE4F8', height: 60 }}>
<p>{questionCount}</p>
<p><span style={{color:"#86A3E7"}}>{questionCount}</span></p>
</div>
</Col>
<Col span={8}>
<div style={{ textAlign: 'center', background: '#DCE4F8', height: 60 }}>
<p>{paperCount}</p>
<p><span style={{color:"#86A3E7"}}>{paperCount}</span></p>
</div>
</Col>
<Col span={8}>
<div style={{ textAlign: 'center', background: '#DCE4F8', height: 60 }}>
<p>{examCount}</p>
<p><span style={{color:"#86A3E7"}}>{examCount}</span></p>
</div>
</Col>
</Row>

Loading…
Cancel
Save