|
@@ -4,8 +4,10 @@ import { EditOutlined } from '@ant-design/icons';
|
4
|
4
|
import { Card, Tabs, Button, Form, Input, DatePicker } from 'antd';
|
5
|
5
|
import { ModalForm } from '@ant-design/pro-components';
|
6
|
6
|
import { postTaCheck, putTaCheck } from '@/service/tacheck';
|
|
7
|
+import { useNavigate } from "react-router-dom";
|
7
|
8
|
|
8
|
9
|
export default (props) => {
|
|
10
|
+ const navigate = useNavigate();
|
9
|
11
|
const { checkInfo, onChange, onTabChange } = props;
|
10
|
12
|
|
11
|
13
|
const [open, setOpen] = React.useState(false);
|
|
@@ -47,16 +49,17 @@ export default (props) => {
|
47
|
49
|
}, [checkInfo]);
|
48
|
50
|
|
49
|
51
|
return (
|
50
|
|
- <Card bodyStyle={{padding: 0}}>
|
51
|
|
- <div style={{display: 'flex', padding: '1em', alignItems: 'center'}}>
|
52
|
|
- <div style={{flex: 'none'}}><Button type="link" onClick={onEdit} icon={<EditOutlined />} /></div>
|
53
|
|
- <div style={{flex: 'none', margin: '0 1em'}}>{dateStr}</div>
|
54
|
|
- <div style={{flex: '1', fontSize: '1.6em'}}>{title}</div>
|
|
52
|
+ <Card bodyStyle={{ padding: 0 }}>
|
|
53
|
+ <div style={{ display: 'flex', padding: '1em', alignItems: 'center' }}>
|
|
54
|
+ <div style={{ flex: 'none' }}><Button type="link" onClick={onEdit} icon={<EditOutlined />} /></div>
|
|
55
|
+ <div style={{ flex: 'none', margin: '0 1em' }}>{dateStr}</div>
|
|
56
|
+ <div style={{ flex: '1', fontSize: '1.6em' }}>{title}</div>
|
|
57
|
+ <div style={{ flex: 'none', fontSize: '1.6em' }}><Button type="primary" onClick={() => navigate(-1)}>返回</Button></div>
|
55
|
58
|
</div>
|
56
|
59
|
<Tabs
|
57
|
60
|
defaultActiveKey='1'
|
58
|
61
|
onChange={onTabChange}
|
59
|
|
- tabBarStyle={{margin: '0 2em'}}
|
|
62
|
+ tabBarStyle={{ margin: '0 2em' }}
|
60
|
63
|
items={[
|
61
|
64
|
{
|
62
|
65
|
label: '实地测评',
|
|
@@ -69,15 +72,15 @@ export default (props) => {
|
69
|
72
|
]}
|
70
|
73
|
/>
|
71
|
74
|
<ModalForm title="测评维护" open={open} width={480} form={form} onFinish={onFinish} onOpenChange={setOpen}>
|
72
|
|
- <Form.Item name="title" label="测评名称" required>
|
73
|
|
- <Input placeholder="请输入测评名称" />
|
74
|
|
- </Form.Item>
|
75
|
|
- <Form.Item name="startDate" label="开始时间" required>
|
76
|
|
- <DatePicker placeholder="请选择" style={{ width: '100%' }} />
|
77
|
|
- </Form.Item>
|
78
|
|
- <Form.Item name="endDate" label="结束时间" required>
|
79
|
|
- <DatePicker placeholder="请选择" style={{ width: '100%' }} />
|
80
|
|
- </Form.Item>
|
|
75
|
+ <Form.Item name="title" label="测评名称" required>
|
|
76
|
+ <Input placeholder="请输入测评名称" />
|
|
77
|
+ </Form.Item>
|
|
78
|
+ <Form.Item name="startDate" label="开始时间" required>
|
|
79
|
+ <DatePicker placeholder="请选择" style={{ width: '100%' }} />
|
|
80
|
+ </Form.Item>
|
|
81
|
+ <Form.Item name="endDate" label="结束时间" required>
|
|
82
|
+ <DatePicker placeholder="请选择" style={{ width: '100%' }} />
|
|
83
|
+ </Form.Item>
|
81
|
84
|
</ModalForm>
|
82
|
85
|
</Card>
|
83
|
86
|
)
|