|
@@ -0,0 +1,89 @@
|
|
1
|
+import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
+import { Button, Popconfirm, Modal, Form, Input, message, Descriptions } from 'antd';
|
|
3
|
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
|
|
4
|
+import PageTable from '@/components/PageTable';
|
|
5
|
+
|
|
6
|
+export default (props) => {
|
|
7
|
+ const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
|
|
8
|
+ const [form] = Form.useForm();
|
|
9
|
+ const [editModal, setEditModal] = useState(false);
|
|
10
|
+ const [loading, setLoading] = useState(false);
|
|
11
|
+ const [regionId, setRegionId] = useState();
|
|
12
|
+ const actionRef = useRef();
|
|
13
|
+
|
|
14
|
+ const exports = () => [
|
|
15
|
+ <Button key="add" type="primary">
|
|
16
|
+ 导出
|
|
17
|
+ </Button>,
|
|
18
|
+ ];
|
|
19
|
+
|
|
20
|
+ const columns = [
|
|
21
|
+ {
|
|
22
|
+ title: '合作社名称',
|
|
23
|
+ dataIndex: 'name',
|
|
24
|
+ key: 'name',
|
|
25
|
+ },
|
|
26
|
+ {
|
|
27
|
+ title: '设备编号',
|
|
28
|
+ dataIndex: 'createDate',
|
|
29
|
+ key: 'createDate',
|
|
30
|
+ width: 340,
|
|
31
|
+ },
|
|
32
|
+ {
|
|
33
|
+ title: '设备类型',
|
|
34
|
+ dataIndex: 'status',
|
|
35
|
+ key: 'status',
|
|
36
|
+ },
|
|
37
|
+ {
|
|
38
|
+ title: '作业面积(亩)',
|
|
39
|
+ dataIndex: 'status',
|
|
40
|
+ key: 'status',
|
|
41
|
+ search: false,
|
|
42
|
+ },
|
|
43
|
+ {
|
|
44
|
+ title: '作业时间',
|
|
45
|
+ dataIndex: 'status',
|
|
46
|
+ key: 'status',
|
|
47
|
+ search: false,
|
|
48
|
+ },
|
|
49
|
+ {
|
|
50
|
+ title: '绑定农机',
|
|
51
|
+ dataIndex: 'status',
|
|
52
|
+ key: 'status',
|
|
53
|
+ search: false,
|
|
54
|
+ },
|
|
55
|
+ {
|
|
56
|
+ title: '时间选择',
|
|
57
|
+ dataIndex: 'created_at',
|
|
58
|
+ valueType: 'dateRange',
|
|
59
|
+ hideInTable: true,
|
|
60
|
+ search: {
|
|
61
|
+ transform: (value) => {
|
|
62
|
+ return {
|
|
63
|
+ startTime: value[0],
|
|
64
|
+ endTime: value[1],
|
|
65
|
+ };
|
|
66
|
+ },
|
|
67
|
+ },
|
|
68
|
+ },
|
|
69
|
+ ];
|
|
70
|
+
|
|
71
|
+ return (
|
|
72
|
+ <PageHeaderWrapper
|
|
73
|
+ content={
|
|
74
|
+ <Descriptions>
|
|
75
|
+ <Descriptions.Item label='总作业面积:'>亩</Descriptions.Item>
|
|
76
|
+ </Descriptions>
|
|
77
|
+ }
|
|
78
|
+ >
|
|
79
|
+ <PageTable
|
|
80
|
+ columns={columns}
|
|
81
|
+ actionRef={actionRef}
|
|
82
|
+ options={false}
|
|
83
|
+ toolBarRender={exports}
|
|
84
|
+ // toolBarRender={actions}
|
|
85
|
+ scroll={{ x: 1000 }}
|
|
86
|
+ />
|
|
87
|
+ </PageHeaderWrapper>
|
|
88
|
+ );
|
|
89
|
+};
|