瀏覽代碼

Merge branch 'master' of http://git.ycjcjy.com/nanyang/machinery-admin

张涛 2 年之前
父節點
當前提交
cead56d020

+ 13
- 2
src/pages/Machinery/OperationStatistics/components/search/index.jsx 查看文件

@@ -2,6 +2,7 @@ import React from 'react';
2 2
 import { Card, Input, Select, DatePicker } from 'antd';
3 3
 import moment from 'moment';
4 4
 import Form, { FormItem } from './Form';
5
+import { getCooperativeList } from '@/services/cooperative';
5 6
 
6 7
 const { RangePicker } = DatePicker;
7 8
 
@@ -23,6 +24,8 @@ const options = [
23 24
 export default (props) => {
24 25
   const { onFinish, initial = {} } = props;
25 26
 
27
+  const [orgList, setOrgList] = React.useState([]);
28
+
26 29
   const initialValues = { ...initValues, ...initial };
27 30
 
28 31
   const handleFinish = (values) => {
@@ -37,6 +40,14 @@ export default (props) => {
37 40
   };
38 41
 
39 42
   React.useEffect(() => {
43
+    //
44
+    getCooperativeList({ pageSize: 999 }).then((res) => {
45
+      const list = res.records?.map((item) => {
46
+        return { value: item.orgId, label: item.name };
47
+      });
48
+      setOrgList(list);
49
+    });
50
+
40 51
     // 开始就触发查询
41 52
     handleFinish(initialValues);
42 53
   }, []);
@@ -44,8 +55,8 @@ export default (props) => {
44 55
   return (
45 56
     <Card>
46 57
       <Form onFinish={handleFinish} initialValues={initialValues}>
47
-        <FormItem name="orgName" label="合作社">
48
-          <Input placeholder="请输入" allowClear />
58
+        <FormItem name="orgId" label="合作社">
59
+          <Select options={orgList} allowClear />
49 60
         </FormItem>
50 61
         <FormItem name="userName" label="人员">
51 62
           <Input placeholder="请输入" allowClear />

+ 6
- 6
src/pages/Machinery/OperationStatistics/index.jsx 查看文件

@@ -15,12 +15,6 @@ export default (props) => {
15 15
       dataIndex: 'orgName',
16 16
       key: 'orgName',
17 17
     },
18
-    {
19
-      title: '位置',
20
-      dataIndex: 'address',
21
-      search: false,
22
-      // key: 'orgName',
23
-    },
24 18
     {
25 19
       title: '人员',
26 20
       dataIndex: 'userName',
@@ -55,6 +49,12 @@ export default (props) => {
55 49
       dataIndex: 'jobArea',
56 50
       key: 'jobArea',
57 51
     },
52
+    {
53
+      title: '位置',
54
+      dataIndex: 'address',
55
+      search: false,
56
+      // key: 'orgName',
57
+    },
58 58
     {
59 59
       title: '作业时间',
60 60
       dataIndex: 'jobTime',

+ 0
- 1
src/pages/Machinery/Sensing/components/List.jsx 查看文件

@@ -30,7 +30,6 @@ const List = (props, ref) => {
30 30
       title: '设备编号',
31 31
       dataIndex: 'deviceNo',
32 32
       key: 'deviceNo',
33
-      search: false,
34 33
     },
35 34
     {
36 35
       title: '绑定农机',