|
|
@ -472,119 +472,125 @@ const ExamListPage = ({ history }: { history: any }) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="list-filter"> |
|
|
|
<div className="container"> |
|
|
|
<Form |
|
|
|
<div> |
|
|
|
//ref={this.formRef}
|
|
|
|
<div className="header-filter"> |
|
|
|
className="filter" |
|
|
|
<div className="list-filter" style={{display: 'flex', padding: 15}}> |
|
|
|
layout="inline" |
|
|
|
<Form |
|
|
|
> |
|
|
|
//ref={this.formRef}
|
|
|
|
<Form.Item |
|
|
|
className="filter" |
|
|
|
label="考试名称:" |
|
|
|
layout="inline" |
|
|
|
> |
|
|
|
> |
|
|
|
<Input |
|
|
|
<Form.Item |
|
|
|
placeholder="请输入考试名称" |
|
|
|
label="考试名称:" |
|
|
|
value={searchForm.examName} |
|
|
|
> |
|
|
|
onChange={(e) => |
|
|
|
<Input |
|
|
|
setSearchForm({...searchForm, examName: e.target.value}) |
|
|
|
placeholder="请输入考试名称" |
|
|
|
} |
|
|
|
value={searchForm.examName} |
|
|
|
style={{width: 240}} |
|
|
|
onChange={(e) => |
|
|
|
/> |
|
|
|
setSearchForm({...searchForm, examName: e.target.value}) |
|
|
|
</Form.Item> |
|
|
|
} |
|
|
|
<Form.Item |
|
|
|
style={{width: 240}} |
|
|
|
label="试卷名称:" |
|
|
|
/> |
|
|
|
> |
|
|
|
</Form.Item> |
|
|
|
<Input |
|
|
|
<Form.Item |
|
|
|
placeholder="请输入试卷名称" |
|
|
|
label="试卷名称:" |
|
|
|
value={searchForm.paperName} |
|
|
|
> |
|
|
|
onChange={(e) => |
|
|
|
<Input |
|
|
|
setSearchForm({...searchForm, paperName: e.target.value}) |
|
|
|
placeholder="请输入试卷名称" |
|
|
|
} |
|
|
|
value={searchForm.paperName} |
|
|
|
style={{width: 240}} |
|
|
|
onChange={(e) => |
|
|
|
/> |
|
|
|
setSearchForm({...searchForm, paperName: e.target.value}) |
|
|
|
</Form.Item> |
|
|
|
} |
|
|
|
<Form.Item |
|
|
|
style={{width: 240}} |
|
|
|
label="监管行业:" |
|
|
|
/> |
|
|
|
> |
|
|
|
</Form.Item> |
|
|
|
<Select |
|
|
|
<Form.Item |
|
|
|
placeholder="监管行业" |
|
|
|
label="监管行业:" |
|
|
|
value={searchForm.regulatedIndustry} |
|
|
|
> |
|
|
|
onChange={(value) => |
|
|
|
<Select |
|
|
|
setSearchForm({...searchForm, regulatedIndustry: value}) |
|
|
|
placeholder="监管行业" |
|
|
|
} |
|
|
|
value={searchForm.regulatedIndustry} |
|
|
|
style={{width: 240}} |
|
|
|
onChange={(value) => |
|
|
|
> |
|
|
|
setSearchForm({...searchForm, regulatedIndustry: value}) |
|
|
|
<Option key="" value="">全部</Option> |
|
|
|
} |
|
|
|
{industryOptions.map(option => ( |
|
|
|
style={{width: 240}} |
|
|
|
<Option key={option.value} value={option.value}> |
|
|
|
> |
|
|
|
{option.label} |
|
|
|
<Option key="" value="">全部</Option> |
|
|
|
</Option> |
|
|
|
{industryOptions.map(option => ( |
|
|
|
))} |
|
|
|
<Option key={option.value} value={option.value}> |
|
|
|
</Select> |
|
|
|
{option.label} |
|
|
|
</Form.Item> |
|
|
|
</Option> |
|
|
|
<Form.Item |
|
|
|
))} |
|
|
|
label="考试有效日期:" |
|
|
|
</Select> |
|
|
|
> |
|
|
|
</Form.Item> |
|
|
|
<DatePicker |
|
|
|
<Form.Item |
|
|
|
value={searchForm.validTime} // 使用 Moment 类型
|
|
|
|
label="考试有效日期:" |
|
|
|
onChange={(value: Moment | null) => |
|
|
|
> |
|
|
|
setSearchForm({...searchForm, validTime: value}) |
|
|
|
<DatePicker |
|
|
|
} |
|
|
|
value={searchForm.validTime} // 使用 Moment 类型
|
|
|
|
style={{width: 240}} |
|
|
|
onChange={(value: Moment | null) => |
|
|
|
/> |
|
|
|
setSearchForm({...searchForm, validTime: value}) |
|
|
|
</Form.Item> |
|
|
|
} |
|
|
|
<Form.Item> |
|
|
|
style={{width: 240}} |
|
|
|
<Button onClick={handleReset}>重置</Button> |
|
|
|
/> |
|
|
|
</Form.Item> |
|
|
|
</Form.Item> |
|
|
|
<Form.Item> |
|
|
|
<Form.Item> |
|
|
|
<Button onClick={() => handleSearch(1)} type="primary" style={{marginLeft: 8}}> |
|
|
|
<Button onClick={handleReset}>重置</Button> |
|
|
|
查询 |
|
|
|
</Form.Item> |
|
|
|
</Button> |
|
|
|
<Form.Item> |
|
|
|
</Form.Item> |
|
|
|
<Button onClick={() => handleSearch(1)} type="primary" style={{marginLeft: 8}}> |
|
|
|
</Form> |
|
|
|
查询 |
|
|
|
<div style={{marginBottom: 16, textAlign: "right"}}> |
|
|
|
</Button> |
|
|
|
<Button onClick={handleDeleteSelected} danger> |
|
|
|
</Form.Item> |
|
|
|
删除 |
|
|
|
</Form> |
|
|
|
</Button> |
|
|
|
|
|
|
|
<Button onClick={handleWithdrawSelected} style={{marginLeft: 8}}> |
|
|
|
|
|
|
|
撤回 |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
<Button onClick={handlePublishSelected} style={{marginLeft: 8}}> |
|
|
|
|
|
|
|
发布 |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
<Button onClick={handleAddExam} type="primary" style={{marginLeft: 8}}> |
|
|
|
|
|
|
|
新增考试 |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<Table |
|
|
|
|
|
|
|
columns={columns} |
|
|
|
|
|
|
|
loading={loading} |
|
|
|
|
|
|
|
dataSource={currentPageExamList} |
|
|
|
|
|
|
|
rowKey="examId" |
|
|
|
|
|
|
|
pagination={pagination} |
|
|
|
|
|
|
|
bordered={true} |
|
|
|
|
|
|
|
size={'small'} |
|
|
|
|
|
|
|
onChange={handleTableChange} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<Modal |
|
|
|
|
|
|
|
title={<div style={{ textAlign: 'center' }}>生成考试码</div>} |
|
|
|
|
|
|
|
visible={qrCodeVisible} |
|
|
|
|
|
|
|
onCancel={() => setQrCodeVisible(false)} |
|
|
|
|
|
|
|
onOk={handleDownloadQRCode} |
|
|
|
|
|
|
|
centered |
|
|
|
|
|
|
|
okText="确认" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '20px' }}> |
|
|
|
|
|
|
|
<div ref={qrCodeRef} className="qrCodeRef"> |
|
|
|
|
|
|
|
<QRCode value={'https://4s27589r64.zicp.fun/wx/'+qrCodeData} size={200} fgColor="#000000" ecLevel="H"/> |
|
|
|
|
|
|
|
<div className="overlay"> |
|
|
|
|
|
|
|
<a onClick={() => handleRefreshQRCode(examId)} className="refresh-link"><UndoOutlined />点击刷新</a> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '20px',fontWeight: 'bolder', fontSize: 'larger' }}> |
|
|
|
<div style={{marginBottom: 16, textAlign: "right"}}> |
|
|
|
<span>验证码:{captcha}</span> |
|
|
|
<Button onClick={handleDeleteSelected} danger> |
|
|
|
|
|
|
|
删除 |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
<Button onClick={handleWithdrawSelected} style={{marginLeft: 8}}> |
|
|
|
|
|
|
|
撤回 |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
<Button onClick={handlePublishSelected} style={{marginLeft: 8}}> |
|
|
|
|
|
|
|
发布 |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
<Button onClick={handleAddExam} type="primary" style={{marginLeft: 8}}> |
|
|
|
|
|
|
|
新增考试 |
|
|
|
|
|
|
|
</Button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|
<Table |
|
|
|
|
|
|
|
columns={columns} |
|
|
|
|
|
|
|
loading={loading} |
|
|
|
|
|
|
|
dataSource={currentPageExamList} |
|
|
|
|
|
|
|
rowKey="examId" |
|
|
|
|
|
|
|
pagination={pagination} |
|
|
|
|
|
|
|
bordered={true} |
|
|
|
|
|
|
|
size={'small'} |
|
|
|
|
|
|
|
onChange={handleTableChange} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<Modal |
|
|
|
|
|
|
|
title={<div style={{ textAlign: 'center' }}>生成考试码</div>} |
|
|
|
|
|
|
|
visible={qrCodeVisible} |
|
|
|
|
|
|
|
onCancel={() => setQrCodeVisible(false)} |
|
|
|
|
|
|
|
onOk={handleDownloadQRCode} |
|
|
|
|
|
|
|
centered |
|
|
|
|
|
|
|
okText="确认" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '20px' }}> |
|
|
|
|
|
|
|
<div ref={qrCodeRef} className="qrCodeRef"> |
|
|
|
|
|
|
|
<QRCode value={'https://4s27589r64.zicp.fun/wx/'+qrCodeData} size={200} fgColor="#000000" ecLevel="H"/> |
|
|
|
|
|
|
|
<div className="overlay"> |
|
|
|
|
|
|
|
<a onClick={() => handleRefreshQRCode(examId)} className="refresh-link"><UndoOutlined />点击刷新</a> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '20px',fontWeight: 'bolder', fontSize: 'larger' }}> |
|
|
|
|
|
|
|
<span>验证码:{captcha}</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</Modal> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|