|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
import React, { useEffect, useState } from 'react'; |
|
|
|
|
import { Table, Input, Button, Select, DatePicker, Modal, Checkbox, message } from 'antd'; |
|
|
|
|
import { Table, Input, Button, Select, DatePicker, Modal, Checkbox, message, Form } from 'antd'; |
|
|
|
|
import { Link, withRouter } from 'react-router-dom'; |
|
|
|
|
import moment, { Moment } from 'moment'; // 引入 moment
|
|
|
|
|
import { getList, doDelete, doCancel, doPublish, getIndustryList } from "api/exam-online/index"; |
|
|
|
@ -354,35 +354,46 @@ const ExamListPage = ({ history }: { history: any }) => { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div> |
|
|
|
|
<div style={{ marginBottom: 16, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}> |
|
|
|
|
<div> |
|
|
|
|
<label style={{ marginRight: 8 }}><b>考试名称:</b></label> |
|
|
|
|
<div className="list-filter"> |
|
|
|
|
<Form |
|
|
|
|
//ref={this.formRef}
|
|
|
|
|
className="filter" |
|
|
|
|
layout="inline" |
|
|
|
|
> |
|
|
|
|
<Form.Item |
|
|
|
|
label="考试名称:" |
|
|
|
|
> |
|
|
|
|
<Input |
|
|
|
|
placeholder="请输入考试名称" |
|
|
|
|
value={searchForm.examName} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setSearchForm({...searchForm, examName: e.target.value}) |
|
|
|
|
} |
|
|
|
|
style={{ width: 200, marginRight: '30' }} |
|
|
|
|
style={{width: 240}} |
|
|
|
|
/> |
|
|
|
|
<label style={{ marginRight: 8 }}><b>试卷名称:</b></label> |
|
|
|
|
</Form.Item> |
|
|
|
|
<Form.Item |
|
|
|
|
label="试卷名称:" |
|
|
|
|
> |
|
|
|
|
<Input |
|
|
|
|
placeholder="请输入试卷名称" |
|
|
|
|
value={searchForm.paperName} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setSearchForm({...searchForm, paperName: e.target.value}) |
|
|
|
|
} |
|
|
|
|
style={{ width: 200, marginRight: '30' }} |
|
|
|
|
style={{width: 240}} |
|
|
|
|
/> |
|
|
|
|
<label style={{ marginRight: 8 }}><b>监管行业:</b></label> |
|
|
|
|
</Form.Item> |
|
|
|
|
<Form.Item |
|
|
|
|
label="监管行业:" |
|
|
|
|
> |
|
|
|
|
<Select |
|
|
|
|
placeholder="监管行业" |
|
|
|
|
value={searchForm.regulatedIndustry} |
|
|
|
|
onChange={(value) => |
|
|
|
|
setSearchForm({...searchForm, regulatedIndustry: value}) |
|
|
|
|
} |
|
|
|
|
style={{ width: 200, marginRight: '30' }} |
|
|
|
|
style={{width: 240}} |
|
|
|
|
> |
|
|
|
|
<Option key="" value="">全部</Option> |
|
|
|
|
{industryOptions.map(option => ( |
|
|
|
@ -391,21 +402,26 @@ const ExamListPage = ({ history }: { history: any }) => { |
|
|
|
|
</Option> |
|
|
|
|
))} |
|
|
|
|
</Select> |
|
|
|
|
<label style={{ marginRight: 8 }}><b>考试有效时间:</b></label> |
|
|
|
|
</Form.Item> |
|
|
|
|
<Form.Item |
|
|
|
|
label="考试有效时间:" |
|
|
|
|
> |
|
|
|
|
<DatePicker |
|
|
|
|
value={searchForm.validTime} // 使用 Moment 类型
|
|
|
|
|
onChange={(value: Moment | null) => |
|
|
|
|
setSearchForm({...searchForm, validTime: value}) |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
</Form.Item> |
|
|
|
|
<Form.Item> |
|
|
|
|
<Button onClick={handleReset}>重置</Button> |
|
|
|
|
</Form.Item> |
|
|
|
|
<Form.Item> |
|
|
|
|
<Button onClick={() => handleSearch(1)} type="primary" style={{marginLeft: 8}}> |
|
|
|
|
查询 |
|
|
|
|
</Button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</Form.Item> |
|
|
|
|
</Form> |
|
|
|
|
<div style={{marginBottom: 16, textAlign: "right"}}> |
|
|
|
|
<Button onClick={handleDeleteSelected} danger> |
|
|
|
|
删除 |
|
|
|
|