张延森 před 3 roky
rodič
revize
2c9ebef7b3

+ 0
- 6
public/css/hyzlsJ-embed.css
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 1
src/components/ScreenBox/TitleBox/style.less Zobrazit soubor

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

+ 9
- 40
src/pages/MonitoringScreen/DateCommponetsBottomLeft.jsx Zobrazit soubor

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

+ 10
- 25
src/pages/MonitoringScreen/DateCommponetsBottomRight.jsx Zobrazit soubor

@@ -1,20 +1,9 @@
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 3
 import { Pie, G2 } from '@ant-design/plots';
7 4
 // import ba from './a.png'
8 5
 
9 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 7
   const data = [
19 8
     {
20 9
       type: '收割机',
@@ -31,7 +20,7 @@ export default (props) => {
31 20
     {
32 21
       type: '其他',
33 22
       value: 70,
34
-    }
23
+    },
35 24
   ];
36 25
   const config = {
37 26
     color: ['#FB9900', '#355C9C', '#23E8AE', '#E63404'],
@@ -71,15 +60,11 @@ export default (props) => {
71 60
     ],
72 61
   };
73 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 68
     </div>
83
-
84
-  )
85
-}
69
+  );
70
+};

+ 11
- 36
src/pages/MonitoringScreen/DateCommponetsLeft.jsx Zobrazit soubor

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

+ 4
- 2
src/pages/MonitoringScreen/index.jsx Zobrazit soubor

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

+ 0
- 1
src/pages/document.ejs Zobrazit soubor

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