考试安排画面样式代码修改提交

main
hujunpeng 3 months ago
parent 2a7edb37ee
commit 84c15f36b4
  1. 64
      packages/examination/src/views/exam-online/compoents/ExamListPage.tsx
  2. 2
      packages/examination/src/views/exam-online/exam-schedule.tsx

@ -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 })
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 })
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 })
setSearchForm({...searchForm, regulatedIndustry: value})
}
style={{ width: 200, marginRight: '30' }}
style={{width: 240}}
>
<Option key="" value=""></Option>
{industryOptions.map(option => (
@ -391,32 +402,37 @@ 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 })
setSearchForm({...searchForm, validTime: value})
}
/>
</div>
<div>
</Form.Item>
<Form.Item>
<Button onClick={handleReset}></Button>
<Button onClick={() => handleSearch(1)} type="primary" style={{ marginLeft: 8 }}>
</Form.Item>
<Form.Item>
<Button onClick={() => handleSearch(1)} type="primary" style={{marginLeft: 8}}>
</Button>
</div>
</div>
<div style={{ marginBottom: 16, textAlign: "right" }}>
</Form.Item>
</Form>
<div style={{marginBottom: 16, textAlign: "right"}}>
<Button onClick={handleDeleteSelected} danger>
</Button>
<Button onClick={handleWithdrawSelected} style={{ marginLeft: 8 }}>
<Button onClick={handleWithdrawSelected} style={{marginLeft: 8}}>
</Button>
<Button onClick={handlePublishSelected} style={{ marginLeft: 8 }}>
<Button onClick={handlePublishSelected} style={{marginLeft: 8}}>
</Button>
<Button onClick={handleAddExam} type="primary" style={{ marginLeft: 8 }}>
<Button onClick={handleAddExam} type="primary" style={{marginLeft: 8}}>
</Button>
</div>

@ -25,9 +25,7 @@ class ExamSchedule extends Component<any, States> {
render() {
return (
<div className="container">
<ExamListPage />
</div>
)
}
}

Loading…
Cancel
Save