张延森 3 years ago
parent
commit
2c9ebef7b3

+ 0
- 6
public/css/hyzlsJ-embed.css
File diff suppressed because it is too large
View File


+ 1
- 1
src/components/ScreenBox/TitleBox/style.less View File

2
   // width: 163px;
2
   // width: 163px;
3
   display: inline-block;
3
   display: inline-block;
4
   align-items: center;
4
   align-items: center;
5
+  margin-bottom: 10px;
5
   padding: 11px 11px 9px 11px;
6
   padding: 11px 11px 9px 11px;
6
   border-radius: 4px;
7
   border-radius: 4px;
7
-
8
   box-shadow: 0px 0px 10px 0px #3d81f0 inset;
8
   box-shadow: 0px 0px 10px 0px #3d81f0 inset;
9
 
9
 
10
   .TitleBox-ListBox {
10
   .TitleBox-ListBox {

+ 9
- 40
src/pages/MonitoringScreen/DateCommponetsBottomLeft.jsx View File

1
-
2
-
3
-
4
-import SquareBox from '@/components/ScreenBox/SquareBox'
5
-import TitleBox from '@/components/ScreenBox/TitleBox'
1
+import SquareBox from '@/components/ScreenBox/SquareBox';
2
+import TitleBox from '@/components/ScreenBox/TitleBox';
6
 import { Column } from '@ant-design/plots';
3
 import { Column } from '@ant-design/plots';
7
 // import ba from './a.png'
4
 // import ba from './a.png'
8
 
5
 
9
 export default (props) => {
6
 export default (props) => {
10
-
11
-
12
-  const style = {
13
-    bgd: {
14
-      width: '25vw',
15
-      display: 'inline-block',
16
-    }
17
-  }
18
   const data = [
7
   const data = [
19
     {
8
     {
20
       name: '预约',
9
       name: '预约',
41
       NongType: '维修',
30
       NongType: '维修',
42
       sum: 147,
31
       sum: 147,
43
     },
32
     },
44
-
45
   ];
33
   ];
46
   const config = {
34
   const config = {
47
     data,
35
     data,
56
     },
44
     },
57
     color: ({ name }) => {
45
     color: ({ name }) => {
58
       if (name == '预约') {
46
       if (name == '预约') {
59
-
60
         return `l(270) 0:rgba(225,225,225,0.0) 1:#F5CC5C`;
47
         return `l(270) 0:rgba(225,225,225,0.0) 1:#F5CC5C`;
61
-
62
-
63
       }
48
       }
64
       if (name == '作业') {
49
       if (name == '作业') {
65
-
66
         return `l(270) 0:rgba(225,225,225,0.0) 1:#44F68B`;
50
         return `l(270) 0:rgba(225,225,225,0.0) 1:#44F68B`;
67
-
68
-
69
       }
51
       }
70
       if (name == '闲置') {
52
       if (name == '闲置') {
71
-
72
         return `l(270) 0:rgba(225,225,225,0.0) 1:#51D4FF`;
53
         return `l(270) 0:rgba(225,225,225,0.0) 1:#51D4FF`;
73
-
74
-
75
       }
54
       }
76
       if (name == '离线') {
55
       if (name == '离线') {
77
-
78
         return `l(270) 0:rgba(225,225,225,0.0) 1:#B8B2A9`;
56
         return `l(270) 0:rgba(225,225,225,0.0) 1:#B8B2A9`;
79
-
80
-
81
       }
57
       }
82
       if (name == '维修') {
58
       if (name == '维修') {
83
-
84
         return `l(270) 0:rgba(225,225,225,0.0) 1:#F55226`;
59
         return `l(270) 0:rgba(225,225,225,0.0) 1:#F55226`;
85
-
86
-
87
       }
60
       }
88
     },
61
     },
89
     /** 设置间距 */
62
     /** 设置间距 */
107
   };
80
   };
108
 
81
 
109
   return (
82
   return (
110
-    <div style={{ width: '100vw' }}>
111
-      <div style={style.bgd} >
112
-        <TitleBox value='农机状态统计' />
113
-        <SquareBox>
114
-          <Column  {...config} />
115
-        </SquareBox>
116
-      </div>
117
-
83
+    <div>
84
+      <TitleBox value="农机状态统计" />
85
+      <SquareBox>
86
+        <Column {...config} />
87
+      </SquareBox>
118
     </div>
88
     </div>
119
-
120
-  )
121
-}
89
+  );
90
+};

+ 10
- 25
src/pages/MonitoringScreen/DateCommponetsBottomRight.jsx View File

1
-
2
-
3
-
4
-import SquareBox from '@/components/ScreenBox/SquareBox'
5
-import TitleBox from '@/components/ScreenBox/TitleBox'
1
+import SquareBox from '@/components/ScreenBox/SquareBox';
2
+import TitleBox from '@/components/ScreenBox/TitleBox';
6
 import { Pie, G2 } from '@ant-design/plots';
3
 import { Pie, G2 } from '@ant-design/plots';
7
 // import ba from './a.png'
4
 // import ba from './a.png'
8
 
5
 
9
 export default (props) => {
6
 export default (props) => {
10
-
11
-  const G = G2.getEngine('canvas');
12
-  const style = {
13
-    bgd: {
14
-      width: '30vw',
15
-      display: 'inline-block',
16
-    }
17
-  }
18
   const data = [
7
   const data = [
19
     {
8
     {
20
       type: '收割机',
9
       type: '收割机',
31
     {
20
     {
32
       type: '其他',
21
       type: '其他',
33
       value: 70,
22
       value: 70,
34
-    }
23
+    },
35
   ];
24
   ];
36
   const config = {
25
   const config = {
37
     color: ['#FB9900', '#355C9C', '#23E8AE', '#E63404'],
26
     color: ['#FB9900', '#355C9C', '#23E8AE', '#E63404'],
71
     ],
60
     ],
72
   };
61
   };
73
   return (
62
   return (
74
-    <div style={{ width: '100vw' }}>
75
-      <div style={style.bgd} >
76
-        <TitleBox value='农机类型统计' />
77
-        <SquareBox>
78
-          <Pie  {...config} />
79
-        </SquareBox>
80
-      </div>
81
-
63
+    <div>
64
+      <TitleBox value="农机类型统计" />
65
+      <SquareBox>
66
+        <Pie {...config} />
67
+      </SquareBox>
82
     </div>
68
     </div>
83
-
84
-  )
85
-}
69
+  );
70
+};

+ 11
- 36
src/pages/MonitoringScreen/DateCommponetsLeft.jsx View File

1
-
2
-
3
-
4
-import SquareBox from '@/components/ScreenBox/SquareBox'
5
-import TitleBox from '@/components/ScreenBox/TitleBox'
1
+import SquareBox from '@/components/ScreenBox/SquareBox';
2
+import TitleBox from '@/components/ScreenBox/TitleBox';
6
 import { Bar } from '@ant-design/plots';
3
 import { Bar } from '@ant-design/plots';
7
 
4
 
8
 export default (props) => {
5
 export default (props) => {
9
-
10
-
11
-  const style = {
12
-    bgd: {
13
-      width: '25vw',
14
-      display: 'inline-block',
15
-    }
16
-  }
17
   const data = [
6
   const data = [
18
     {
7
     {
19
       year: '收割机',
8
       year: '收割机',
39
     // color: [' #FB9900', '#23E8AE', '#E63404'],
28
     // color: [' #FB9900', '#23E8AE', '#E63404'],
40
     color: ({ type, year }) => {
29
     color: ({ type, year }) => {
41
       if (year == '收割机') {
30
       if (year == '收割机') {
42
-
43
         return `l(0) 0:rgba(225,225,225,0.0) 1:#FB9900`;
31
         return `l(0) 0:rgba(225,225,225,0.0) 1:#FB9900`;
44
-
45
-
46
       }
32
       }
47
       if (year == '播种机') {
33
       if (year == '播种机') {
48
-
49
         return `l(0) 0:rgba(225,225,225,0.0) 1:#23E8AE`;
34
         return `l(0) 0:rgba(225,225,225,0.0) 1:#23E8AE`;
50
-
51
-
52
       }
35
       }
53
       if (year == '农药机') {
36
       if (year == '农药机') {
54
-
55
         return `l(0) 0:rgba(225,225,225,0.0) 1:#E63404`;
37
         return `l(0) 0:rgba(225,225,225,0.0) 1:#E63404`;
56
-
57
-
58
       }
38
       }
59
     },
39
     },
60
     barStyle: {
40
     barStyle: {
62
     },
42
     },
63
     legend: {
43
     legend: {
64
       position: 'top-left',
44
       position: 'top-left',
65
-
66
     },
45
     },
67
     statistic: {
46
     statistic: {
68
       style: {
47
       style: {
73
         fontWeight: 60,
52
         fontWeight: 60,
74
         textAlign: 'center',
53
         textAlign: 'center',
75
         textBaseline: 'middle',
54
         textBaseline: 'middle',
76
-      }
77
-    }
55
+      },
56
+    },
78
   };
57
   };
79
 
58
 
80
   return (
59
   return (
81
-    <div style={{ width: '100vw' }}>
82
-      <div style={style.bgd} >
83
-        <TitleBox value='农机类型统计' />
84
-        <SquareBox>
85
-          <Bar  {...config} />
86
-        </SquareBox>
87
-      </div>
88
-
60
+    <div>
61
+      <TitleBox value="农机类型统计" />
62
+      <SquareBox>
63
+        <Bar {...config} />
64
+      </SquareBox>
89
     </div>
65
     </div>
90
-
91
-  )
92
-}
66
+  );
67
+};

+ 4
- 2
src/pages/MonitoringScreen/index.jsx View File

46
           </div>
46
           </div>
47
           <div className={classNames(Styles['grail-container'], Styles['mg-tp-40'])}>
47
           <div className={classNames(Styles['grail-container'], Styles['mg-tp-40'])}>
48
             <div className={Styles['grail-left']}>
48
             <div className={Styles['grail-left']}>
49
-              <SquareBox>asdfasdf</SquareBox>
49
+              <DateCommponetsLeft />
50
+              <div className={Styles['mg-tp-40']}>{/* 占位 */}</div>
51
+              <DateCommponetsBottomLeft />
50
             </div>
52
             </div>
51
             <div className={classNames(Styles['grail-content'], Styles['pd-lr-40'])}>
53
             <div className={classNames(Styles['grail-content'], Styles['pd-lr-40'])}>
52
               <DateCommponetsLeft />
54
               <DateCommponetsLeft />
53
             </div>
55
             </div>
54
             <div className={Styles['grail-right']}>
56
             <div className={Styles['grail-right']}>
55
-              <SquareBox>asdfasdf</SquareBox>
57
+              <DateCommponetsBottomRight />
56
             </div>
58
             </div>
57
           </div>
59
           </div>
58
           <div className={classNames(Styles['grail-footer'], Styles['mg-tp-40'])}></div>
60
           <div className={classNames(Styles['grail-footer'], Styles['mg-tp-40'])}></div>

+ 0
- 1
src/pages/document.ejs View File

23
       content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
23
       content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
24
     />
24
     />
25
     <title>Ant Design Pro</title>
25
     <title>Ant Design Pro</title>
26
-    <link rel="stylesheet" href="./css/hyzlsJ-embed.css" />
27
     <link rel="icon" href="<%= context.config.publicPath +'favicon.ico'%>" type="image/x-icon" />
26
     <link rel="icon" href="<%= context.config.publicPath +'favicon.ico'%>" type="image/x-icon" />
28
   </head>
27
   </head>
29
   <body>
28
   <body>