Przeglądaj źródła

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

张延森 3 lat temu
rodzic
commit
e83f7870ca

+ 0
- 9
src/pages/Machinery/Machinery/edit.jsx Wyświetl plik

@@ -58,15 +58,6 @@ export default (props) => {
58 58
     }
59 59
   };
60 60
 
61
-  const selectTagList = (params) => {
62
-    // return getTagList({
63
-    // }).then((res) => {
64
-    // }).catch((err) => {
65
-    //   return {
66
-    //     success: false,
67
-    //   }
68
-    // })
69
-  };
70 61
   const onDateChange = () => {};
71 62
   const imageInput = (image) => {
72 63
     return {

+ 1
- 5
src/pages/Machinery/Machinery/index.jsx Wyświetl plik

@@ -1,15 +1,11 @@
1 1
 import React, { useRef } from 'react';
2
-import { history, Link } from 'umi';
2
+import { history } from 'umi';
3 3
 import { Button, Popconfirm, message, Select, Modal } from 'antd';
4 4
 import { PlusOutlined } from '@ant-design/icons';
5 5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6
-import moment from 'moment';
7 6
 import PageTable from '@/components/PageTable';
8 7
 import { getMachineryList, deleteMachinery, updateMachinery } from '@/services/machinery';
9 8
 
10
-const formatterTime = (val) => {
11
-  return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '';
12
-};
13 9
 const { Option } = Select;
14 10
 
15 11
 export default (props) => {

+ 1
- 1
src/pages/Machinery/MachineryType/index.jsx Wyświetl plik

@@ -1,7 +1,7 @@
1 1
 import { Button, Popconfirm, Modal, Form, Input, message, Select } from 'antd';
2 2
 import { PlusOutlined } from '@ant-design/icons';
3 3
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
4
-import React, { useRef, useState, useEffect } from 'react';
4
+import React, { useRef, useState } from 'react';
5 5
 import moment from 'moment';
6 6
 import PageTable from '@/components/PageTable';
7 7
 import {

+ 0
- 76
src/pages/MonitoringScreen/DateCommponetsBottomLeft.jsx Wyświetl plik

@@ -1,76 +0,0 @@
1
-import SquareBox from '@/components/ScreenBox/SquareBox';
2
-import TitleBox from '@/components/ScreenBox/TitleBox';
3
-import { Column } from '@ant-design/plots';
4
-// import ba from './a.png'
5
-
6
-export default (props) => {
7
-  const data = [
8
-    {
9
-      name: '预约',
10
-      NongType: '预约.',
11
-      sum: 18,
12
-    },
13
-    {
14
-      name: '作业',
15
-      NongType: '作业.',
16
-      sum: 28,
17
-    },
18
-    {
19
-      name: '闲置',
20
-      NongType: '闲置.',
21
-      sum: 100,
22
-    },
23
-    {
24
-      name: '离线',
25
-      NongType: '离线',
26
-      sum: 181,
27
-    },
28
-    {
29
-      name: '维修',
30
-      NongType: '维修',
31
-      sum: 147,
32
-    },
33
-  ];
34
-  const config = {
35
-    data,
36
-    isGroup: true,
37
-    xField: 'NongType',
38
-    yField: 'sum',
39
-    seriesField: 'name',
40
-    color: [
41
-      'l(270) 0:rgba(225,225,225,0.0) 1:#F5CC5C',
42
-      'l(270) 0:rgba(225,225,225,0.0) 1:#44F68B',
43
-      'l(270) 0:rgba(225,225,225,0.0) 1:#51D4FF',
44
-      'l(270) 0:rgba(225,225,225,0.0) 1:#B8B2A9',
45
-      'l(270) 0:rgba(225,225,225,0.0) 1:#F55226',
46
-    ],
47
-
48
-    /** 设置间距 */
49
-    // marginRatio: 0.1,
50
-    label: {
51
-      // 'top', 'middle', 'bottom'
52
-      // 可配置附加的布局方法
53
-      layout: [
54
-        // 柱形图数据标签位置自动调整
55
-        {
56
-          // type: 'interval-adjust-position',
57
-        }, // 数据标签防遮挡
58
-        {
59
-          // type: 'interval-hide-overlap',
60
-        }, // 数据标签文颜色自动调整
61
-        {
62
-          // type: 'adjust-color',
63
-        },
64
-      ],
65
-    },
66
-  };
67
-
68
-  return (
69
-    <div>
70
-      <TitleBox value="农机状态统计" />
71
-      <SquareBox>
72
-        <Column {...config} />
73
-      </SquareBox>
74
-    </div>
75
-  );
76
-};

+ 0
- 83
src/pages/MonitoringScreen/DateCommponetsBottomRight.jsx Wyświetl plik

@@ -1,83 +0,0 @@
1
-import SquareBox from '@/components/ScreenBox/SquareBox';
2
-import TitleBox from '@/components/ScreenBox/TitleBox';
3
-import { Pie, G2 } from '@ant-design/plots';
4
-// import ba from './a.png'
5
-import RedRing from '@/assets/images/screen/ring-red.png';
6
-
7
-export default (props) => {
8
-  const data = [
9
-    {
10
-      type: '收割机',
11
-      value: 27,
12
-    },
13
-    {
14
-      type: '播种机',
15
-      value: 25,
16
-    },
17
-    {
18
-      type: '农药机',
19
-      value: 18,
20
-    },
21
-    {
22
-      type: '其他',
23
-      value: 70,
24
-    },
25
-  ];
26
-
27
-  const config = {
28
-    // color: [
29
-    //   'r(0.5, 0.5, 1) 0:rgba(225,225,225,0.0) 0.25:#FB9900 0.5:rgba(225,225,225,0.0)  0.75:1:#FB9900 1:#FB9900',
30
-    //   'r(0.5, 0.5, 1) 0:rgba(225,225,225,0.0) 1:#23E8AE',
31
-    //   'r(0.5, 0.5, 1) 0:rgba(225,225,225,0.0) 1:#E63404',
32
-    // ],
33
-    // pieStyle: {
34
-    //   strokeOpacity: 0,
35
-    //   lineWidth: 0,
36
-    // },
37
-    pieStyle: () => {
38
-      return {
39
-        fill: `p(n)${RedRing}`,
40
-      };
41
-    },
42
-    statistic: {
43
-      title: false,
44
-      content: {
45
-        style: {
46
-          whiteSpace: 'pre-wrap',
47
-          overflow: 'hidden',
48
-          textOverflow: 'ellipsis',
49
-        },
50
-        content: ' ',
51
-      },
52
-    },
53
-    appendPadding: 10,
54
-    data,
55
-    angleField: 'value',
56
-    colorField: 'type',
57
-    innerRadius: 0.8,
58
-    radius: 0.75,
59
-    label: {
60
-      type: 'spider',
61
-      labelHeight: 28,
62
-      content: '{name}\n{percentage}',
63
-      fill: 'rgba(225, 0, 0, 0.65)',
64
-    },
65
-
66
-    interactions: [
67
-      {
68
-        type: 'element-selected',
69
-      },
70
-      {
71
-        type: 'element-active',
72
-      },
73
-    ],
74
-  };
75
-  return (
76
-    <div>
77
-      <TitleBox value="农机类型统计" />
78
-      <SquareBox>
79
-        <Pie {...config} />
80
-      </SquareBox>
81
-    </div>
82
-  );
83
-};

+ 0
- 69
src/pages/MonitoringScreen/DateCommponetsLeft.jsx Wyświetl plik

@@ -1,69 +0,0 @@
1
-import SquareBox from '@/components/ScreenBox/SquareBox';
2
-import TitleBox from '@/components/ScreenBox/TitleBox';
3
-import { Bar } from '@ant-design/plots';
4
-
5
-export default (props) => {
6
-  const data = [
7
-    {
8
-      key: '收割机',
9
-      value: 300,
10
-    },
11
-    {
12
-      key: '播种机',
13
-      value: 150,
14
-    },
15
-    {
16
-      key: '农药机',
17
-      value: 50,
18
-    },
19
-  ];
20
-
21
-  const config = {
22
-    data,
23
-    axis: {
24
-      tickLine: null,
25
-      subTickLine: null,
26
-      grid: null,
27
-      line: null,
28
-    },
29
-    xField: 'value',
30
-    yField: 'key',
31
-    seriesField: 'key',
32
-    color: [
33
-      'l(0) 0:rgba(225,225,225,0.0) 1:#FB9900',
34
-      'l(0) 0:rgba(225,225,225,0.0) 1:#23E8AE',
35
-      'l(0) 0:rgba(225,225,225,0.0) 1:#E63404',
36
-    ],
37
-    legend: {
38
-      position: 'top-left',
39
-    },
40
-    barBackground: {
41
-      style: {
42
-        fill: 'rgba(0,0,0,0.1)',
43
-      },
44
-    },
45
-    interactions: [
46
-      {
47
-        type: 'active-region',
48
-        enable: false,
49
-      },
50
-    ],
51
-    statistic: {
52
-      style: {
53
-        fontSize: 10,
54
-        fontWeight: 60,
55
-        textAlign: 'center',
56
-        textBaseline: 'middle',
57
-      },
58
-    },
59
-  };
60
-
61
-  return (
62
-    <div>
63
-      <TitleBox value="农机类型统计" />
64
-      <SquareBox>
65
-        <Bar {...config} />
66
-      </SquareBox>
67
-    </div>
68
-  );
69
-};