Yansen 2 lat temu
rodzic
commit
f58b1ea270

+ 3
- 1
src/pages/Machinery/OperationStatistics/components/search/Form.jsx Wyświetl plik

@@ -18,11 +18,13 @@ export default (props) => {
18 18
     form.resetFields();
19 19
   };
20 20
 
21
+  const offset = (3 - (props.children.length % 4)) * 6;
22
+
21 23
   return (
22 24
     <Form form={form} initialValues={initialValues} onFinish={onFinish}>
23 25
       <Row gutter={24}>
24 26
         {props.children}
25
-        <Col span={6} offset={18} style={{ textAlign: 'right' }}>
27
+        <Col span={6} offset={offset} style={{ textAlign: 'right' }}>
26 28
           <Button onClick={onReset}>重置</Button>
27 29
           <Button type="primary" htmlType="submit" style={{ margin: '0 8px' }}>
28 30
             查询

+ 9
- 0
src/pages/Machinery/OperationStatistics/components/search/index.jsx Wyświetl plik

@@ -45,6 +45,15 @@ export default (props) => {
45 45
         <FormItem name="orgName" label="合作社">
46 46
           <Input placeholder="请输入" />
47 47
         </FormItem>
48
+        <FormItem name="userName" label="人员">
49
+          <Input placeholder="请输入" />
50
+        </FormItem>
51
+        <FormItem name="phone" label="手机">
52
+          <Input placeholder="请输入" />
53
+        </FormItem>
54
+        <FormItem name="machineryName" label="农机">
55
+          <Input placeholder="请输入" />
56
+        </FormItem>
48 57
         <FormItem name="deviceNo" label="设备编号">
49 58
           <Input placeholder="请输入" />
50 59
         </FormItem>

+ 20
- 12
src/pages/Machinery/OperationStatistics/index.jsx Wyświetl plik

@@ -12,10 +12,19 @@ export default (props) => {
12 12
       key: 'orgName',
13 13
     },
14 14
     {
15
-      title: '设备编号',
16
-      dataIndex: 'deviceNo',
17
-      key: 'deviceNo',
18
-      width: 340,
15
+      title: '人员',
16
+      dataIndex: 'userName',
17
+      key: 'userName',
18
+    },
19
+    {
20
+      title: '手机',
21
+      dataIndex: 'phone',
22
+      key: 'phone',
23
+    },
24
+    {
25
+      title: '农机',
26
+      dataIndex: 'machineryName',
27
+      key: 'machineryName',
19 28
     },
20 29
     {
21 30
       title: '设备类型',
@@ -23,6 +32,11 @@ export default (props) => {
23 32
       key: 'deviceKind',
24 33
       render: (t) => (t === 'shensong' ? '深松' : t === 'feifang' ? '飞防' : '-'),
25 34
     },
35
+    {
36
+      title: '设备编号',
37
+      dataIndex: 'deviceNo',
38
+      key: 'deviceNo',
39
+    },
26 40
     {
27 41
       title: '作业面积(亩)',
28 42
       dataIndex: 'jobArea',
@@ -30,14 +44,8 @@ export default (props) => {
30 44
     },
31 45
     {
32 46
       title: '作业时间',
33
-      dataIndex: 'jobDate',
34
-      key: 'jobDate',
35
-    },
36
-    {
37
-      title: '绑定农机',
38
-      dataIndex: 'machineryName',
39
-      key: 'machineryName',
40
-      search: false,
47
+      dataIndex: 'jobTime',
48
+      key: 'jobTime',
41 49
     },
42 50
   ];
43 51
 

+ 2
- 2
src/pages/MonitoringScreen2/index.jsx Wyświetl plik

@@ -139,9 +139,9 @@ export default (props) => {
139 139
         </div>
140 140
         <div className={classNames(Styles['grail-container'], Styles['mg-tp-30'])}>
141 141
           <div className={classNames(Styles['grail-content'], Styles['pd-lr-40'])}>
142
-            {/* <div className={Styles['statis-container']}>
142
+            <div className={Styles['statis-container']}>
143 143
               <Banner />
144
-            </div> */}
144
+            </div>
145 145
             <Map onReady={onMapReady}>
146 146
               <div
147 147
                 className={Styles['map-addon']}

+ 1
- 1
src/utils/request.js Wyświetl plik

@@ -51,7 +51,7 @@ async function responseInterceptor(response, ctx) {
51 51
     const data = await response.clone().blob();
52 52
     const content = response.headers.get('content-disposition');
53 53
     const fileName = content.replace('attachment;filename=', '');
54
-    downloadBlob(data, decodeURIComponent(fileName));
54
+    return downloadBlob(data, decodeURIComponent(fileName));
55 55
   }
56 56
 
57 57
   return response;