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

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

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

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

Loading…
Cancel
Save