张延森 vor 3 Jahren
Ursprung
Commit
fefe808407

+ 1
- 1
config/config.js Datei anzeigen

@@ -67,7 +67,7 @@ export default defineConfig({
67 67
   nodeModulesTransform: {
68 68
     type: 'none',
69 69
   },
70
-  mfsu: {},
70
+  // mfsu: {},
71 71
   webpack5: {},
72 72
   exportStatic: {},
73 73
 });

+ 1
- 0
config/routes.js Datei anzeigen

@@ -44,6 +44,7 @@ export default [
44 44
   },
45 45
   {
46 46
     path: '/MonitoringScreen',
47
+    layout: false,
47 48
     name: '数据大屏',
48 49
     icon: 'DesktopOutlined',
49 50
     component: './MonitoringScreen',

+ 1
- 1
package.json Datei anzeigen

@@ -47,7 +47,6 @@
47 47
   ],
48 48
   "dependencies": {
49 49
     "@amap/amap-jsapi-loader": "^1.0.1",
50
-    "@ant-design/charts": "^1.3.5",
51 50
     "@ant-design/icons": "^4.7.0",
52 51
     "@ant-design/pro-card": "^1.18.34",
53 52
     "@ant-design/pro-descriptions": "^1.10.0",
@@ -70,6 +69,7 @@
70 69
     "react-dev-inspector": "^1.7.0",
71 70
     "react-dom": "^17.0.0",
72 71
     "react-helmet-async": "^1.2.0",
72
+    "swiper": "^8.0.7",
73 73
     "umi": "^3.5.0"
74 74
   },
75 75
   "devDependencies": {

+ 9
- 0
public/js/particles.min.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 1
- 1
src/components/AMap/loader.js Datei anzeigen

@@ -1,7 +1,7 @@
1 1
 import AMapLoader from '@amap/amap-jsapi-loader';
2 2
 
3 3
 const WEB_KEY = '7c02d93b855ab284c12911c231aa2233';
4
-const SERVER_KEY = 'a30b66a26ea1890fd656cf11cb2647fb';
4
+// const SERVER_KEY = 'a30b66a26ea1890fd656cf11cb2647fb';
5 5
 
6 6
 export default (plugins, uiPlugins) => {
7 7
   window._AMapSecurityConfig = {

+ 15
- 0
src/components/AMap/weather.js Datei anzeigen

@@ -0,0 +1,15 @@
1
+const SERVER_KEY = 'a30b66a26ea1890fd656cf11cb2647fb';
2
+
3
+export default function getWeather(city) {
4
+  const url = `https://restapi.amap.com/v3/weather/weatherInfo?key=${SERVER_KEY}&city=${city}&extensions=all`;
5
+
6
+  return fetch(url)
7
+    .then((res) => res.json())
8
+    .then((res) => {
9
+      if (res.info === 'OK') {
10
+        return res.forecasts;
11
+      } else {
12
+        return Promise.reject(res.info);
13
+      }
14
+    });
15
+}

+ 51
- 0
src/components/ScreenBox/Clock/hooks.jsx Datei anzeigen

@@ -0,0 +1,51 @@
1
+import React, { useState, useEffect } from 'react';
2
+
3
+function zeroPadding(num) {
4
+  return num < 10 ? `0${num}` : `${num}`;
5
+}
6
+
7
+function getTime(dt) {
8
+  const hour = dt.getHours();
9
+  const minuts = dt.getMinutes();
10
+  const seconds = dt.getSeconds();
11
+
12
+  return [zeroPadding(hour), zeroPadding(minuts), zeroPadding(seconds)].join(':');
13
+}
14
+
15
+function getDate(dt) {
16
+  const year = dt.getFullYear();
17
+  const month = dt.getMonth() + 1;
18
+  const day = dt.getDate();
19
+
20
+  return [year, zeroPadding(month), zeroPadding(day)].join('-');
21
+}
22
+
23
+export function useTime() {
24
+  const [time, setTime] = useState();
25
+
26
+  useEffect(() => {
27
+    setTime(getTime(new Date()));
28
+    const t = setInterval(() => {
29
+      setTime(getTime(new Date()));
30
+    }, 1000);
31
+
32
+    return () => clearInterval(t);
33
+  }, []);
34
+
35
+  return time;
36
+}
37
+
38
+export function useDate() {
39
+  const [time, setTime] = useState();
40
+
41
+  useEffect(() => {
42
+    setTime(getDate(new Date()));
43
+    const t = setInterval(() => {
44
+      setTime(getDate(new Date()));
45
+    }, 60000);
46
+
47
+    return () => clearInterval(t);
48
+  }, []);
49
+
50
+  return time;
51
+}

+ 19
- 0
src/components/ScreenBox/Clock/index.jsx Datei anzeigen

@@ -0,0 +1,19 @@
1
+import React from 'react';
2
+import classNames from 'classnames';
3
+import { useDate, useTime } from './hooks';
4
+import Styles from './style.less';
5
+
6
+export default (props) => {
7
+  const time = useTime();
8
+  const day = useDate();
9
+
10
+  const str = props.mode === 'time' ? time : day;
11
+
12
+  console.log('------strstrstr------>', str);
13
+
14
+  return (
15
+    <div className={classNames(Styles['clock-box'], props.className)}>
16
+      <div className={Styles['time-label']}>{str}</div>
17
+    </div>
18
+  );
19
+};

+ 11
- 0
src/components/ScreenBox/Clock/style.less Datei anzeigen

@@ -0,0 +1,11 @@
1
+.clock-box {
2
+  height: 100%;
3
+  color: #daf6ff;
4
+  font-family: 'Share Tech Mono', monospace;
5
+  text-shadow: 0 0 20px rgba(10, 175, 230, 1), 0 0 20px rgba(10, 175, 230, 0);
6
+
7
+  .time-label {
8
+    font-weight: bold;
9
+    letter-spacing: 0.05em;
10
+  }
11
+}

+ 7
- 2
src/components/ScreenBox/ScreenHeader/index.jsx Datei anzeigen

@@ -1,4 +1,5 @@
1 1
 import titleImg from '@/assets/images/screen/header-title.png';
2
+import Clock from '../Clock';
2 3
 import Styles from './style.less';
3 4
 
4 5
 export default (props) => {
@@ -7,11 +8,15 @@ export default (props) => {
7 8
       <div className={Styles['screen-header-left']}>
8 9
         <div>数据概览</div>
9 10
       </div>
10
-      <div className={Styles['screen-header-left']}>{/* 只负责占位 */}</div>
11
+      <div className={Styles['screen-header-left']}>
12
+        <Clock className={Styles['clock-date']} />
13
+      </div>
11 14
       <div className={Styles['screen-header-content']}>
12 15
         <img src={titleImg} alt="" />
13 16
       </div>
14
-      <div className={Styles['screen-header-right']}>{/* 只负责占位 */}</div>
17
+      <div className={Styles['screen-header-right']}>
18
+        <Clock className={Styles['clock-time']} mode="time" />
19
+      </div>
15 20
       <div className={Styles['screen-header-right']}>
16 21
         <div>{props.weather}</div>
17 22
       </div>

+ 23
- 2
src/components/ScreenBox/ScreenHeader/style.less Datei anzeigen

@@ -16,12 +16,17 @@
16 16
   .screen-header-right {
17 17
     display: grid;
18 18
     flex: 1;
19
-    letter-spacing: 2px;
19
+    color: #daf6ff;
20
+    line-height: 2em;
21
+    letter-spacing: 0.05em;
20 22
     text-align: left;
23
+    text-shadow: 0 0 20px rgba(10, 175, 230, 1), 0 0 20px rgba(10, 175, 230, 0);
21 24
     place-items: center;
22 25
 
23 26
     & > div {
24 27
       width: 100%;
28
+      font-weight: bold;
29
+      font-size: 16px;
25 30
     }
26 31
   }
27 32
 
@@ -30,6 +35,7 @@
30 35
   }
31 36
 
32 37
   .screen-header-content {
38
+    position: relative;
33 39
     display: flex;
34 40
     flex: 6;
35 41
     align-items: center;
@@ -40,10 +46,25 @@
40 46
     }
41 47
   }
42 48
 
49
+  .clock-date {
50
+    display: flex;
51
+    align-items: center;
52
+    justify-content: end;
53
+    margin-left: 2em;
54
+    font-size: 20px !important;
55
+  }
56
+
57
+  .clock-time {
58
+    display: flex;
59
+    align-items: center;
60
+    justify-content: start;
61
+    font-size: 20px !important;
62
+  }
63
+
43 64
   .attchment {
44 65
     color: #fff;
66
+    font-weight: bold;
45 67
     font-size: 12px;
46
-    line-height: 2em;
47 68
 
48 69
     &.attchment-right {
49 70
       text-align: right;

+ 15
- 1
src/components/ScreenBox/TitleBox/style.less Datei anzeigen

@@ -12,7 +12,9 @@
12 12
     display: inline-block;
13 13
     width: 10px;
14 14
     height: 10px;
15
-    background: linear-gradient(0deg, #0c49c6, #3bd6e8);
15
+    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
16
+    background-size: 400% 400%;
17
+    animation: gradient 5s ease infinite;
16 18
   }
17 19
   .TitleBox-ListBox-value {
18 20
     margin-left: 12px;
@@ -22,4 +24,16 @@
22 24
     background: linear-gradient(0deg, #0c49c6, #3bd6e8);
23 25
     background-clip: text;
24 26
   }
27
+
28
+  @keyframes gradient {
29
+    0% {
30
+      background-position: 0% 50%;
31
+    }
32
+    50% {
33
+      background-position: 100% 50%;
34
+    }
35
+    100% {
36
+      background-position: 0% 50%;
37
+    }
38
+  }
25 39
 }

+ 1
- 0
src/global.jsx Datei anzeigen

@@ -1,6 +1,7 @@
1 1
 import { Button, message, notification } from 'antd';
2 2
 import { useIntl } from 'umi';
3 3
 import defaultSettings from '../config/defaultSettings';
4
+
4 5
 const { pwa } = defaultSettings;
5 6
 const isHttps = document.location.protocol === 'https:';
6 7
 

+ 24
- 4
src/pages/MonitoringScreen/components/List/index.jsx Datei anzeigen

@@ -1,9 +1,14 @@
1
-import React from 'react';
1
+import React, { useEffect, useMemo, useRef, useState } from 'react';
2
+import { Swiper, SwiperSlide } from 'swiper/react';
3
+import { Autoplay } from 'swiper';
4
+import 'swiper/css';
2 5
 import classNames from 'classnames';
3 6
 import Item from './Item';
4 7
 import Styles from './style.less';
5 8
 
6 9
 export default (props) => {
10
+  // 每次加载 4 个
11
+  const tm = 4;
7 12
   const { title, color, children } = props;
8 13
 
9 14
   const classList = classNames(Styles['list-title'], {
@@ -16,9 +21,24 @@ export default (props) => {
16 21
       <div className={classList}>
17 22
         <div>{title}</div>
18 23
       </div>
19
-      {React.Children.map(children, (child) => (
20
-        <Item color={color}>{child}</Item>
21
-      ))}
24
+      <Swiper
25
+        height={48}
26
+        className={Styles['list-body']}
27
+        autoplay={{
28
+          delay: 2500,
29
+          disableOnInteraction: false,
30
+        }}
31
+        loop
32
+        loopAdditionalSlides={2}
33
+        modules={[Autoplay]}
34
+        direction="vertical"
35
+      >
36
+        {React.Children.map(children, (child) => (
37
+          <SwiperSlide>
38
+            <Item color={color}>{child}</Item>
39
+          </SwiperSlide>
40
+        ))}
41
+      </Swiper>
22 42
     </div>
23 43
   );
24 44
 };

+ 5
- 0
src/pages/MonitoringScreen/components/List/style.less Datei anzeigen

@@ -89,4 +89,9 @@
89 89
       background: #25e1aa;
90 90
     }
91 91
   }
92
+
93
+  .list-body {
94
+    width: 100%;
95
+    height: 144px;
96
+  }
92 97
 }

+ 115
- 19
src/pages/MonitoringScreen/hook.js Datei anzeigen

@@ -14,27 +14,8 @@ export function useFullScreen(elRef) {
14 14
     }
15 15
   }, []);
16 16
 
17
-  // useResize((w, h) => {
18
-  //   if (fullScreenRef.current) {
19
-  //     calcStyle();
20
-  //   } else {
21
-  //     setStyle({
22
-  //       width: `${w}px`,
23
-  //       height: `${h}px`,
24
-  //     });
25
-  //   }
26
-
27
-  //   setIsFullScreen(!fullScreenRef.current);
28
-  // });
29
-
30 17
   useEffect(() => {
31
-    console.log('-----fullscreenchange------>', elRef.current);
32 18
     const handleFullScreenChange = (e) => {
33
-      console.log(
34
-        '-----handleFullScreenChange------>',
35
-        document.fullscreenElement,
36
-        fullScreenRef.current,
37
-      );
38 19
       setIsFullScreen(document.fullscreenElement === fullScreenRef.current);
39 20
     };
40 21
 
@@ -47,3 +28,118 @@ export function useFullScreen(elRef) {
47 28
 
48 29
   return { isFullScreen, toggleFullScreen };
49 30
 }
31
+
32
+export function useParticlesJs(id) {
33
+  useEffect(() => {
34
+    window.particlesJS(id, {
35
+      particles: {
36
+        number: {
37
+          value: 20,
38
+          density: {
39
+            enable: true,
40
+            value_area: 400,
41
+          },
42
+        },
43
+        color: {
44
+          value: '#2FB3DF',
45
+        },
46
+        shape: {
47
+          type: 'circle',
48
+          stroke: {
49
+            width: 0,
50
+            color: '#000000',
51
+          },
52
+          polygon: {
53
+            nb_sides: 5,
54
+          },
55
+          image: {
56
+            src: 'img/github.svg',
57
+            width: 100,
58
+            height: 100,
59
+          },
60
+        },
61
+        opacity: {
62
+          value: 0.5,
63
+          random: false,
64
+          anim: {
65
+            enable: false,
66
+            speed: 1,
67
+            opacity_min: 0.1,
68
+            sync: false,
69
+          },
70
+        },
71
+        size: {
72
+          value: 3,
73
+          random: true,
74
+          anim: {
75
+            enable: false,
76
+            speed: 40,
77
+            size_min: 0.1,
78
+            sync: false,
79
+          },
80
+        },
81
+        line_linked: {
82
+          enable: true,
83
+          distance: 150,
84
+          color: '#2FB3DF',
85
+          opacity: 0.5,
86
+          width: 2,
87
+        },
88
+        move: {
89
+          enable: true,
90
+          speed: 6,
91
+          direction: 'none',
92
+          random: false,
93
+          straight: false,
94
+          out_mode: 'out',
95
+          bounce: false,
96
+          attract: {
97
+            enable: false,
98
+            rotateX: 600,
99
+            rotateY: 1200,
100
+          },
101
+        },
102
+      },
103
+      interactivity: {
104
+        detect_on: 'canvas',
105
+        events: {
106
+          onhover: {
107
+            enable: false,
108
+            mode: 'bubble',
109
+          },
110
+          onclick: {
111
+            enable: false,
112
+            mode: 'push',
113
+          },
114
+          resize: true,
115
+        },
116
+        modes: {
117
+          grab: {
118
+            distance: 400,
119
+            line_linked: {
120
+              opacity: 1,
121
+            },
122
+          },
123
+          bubble: {
124
+            distance: 400,
125
+            size: 40,
126
+            duration: 2,
127
+            opacity: 8,
128
+            speed: 3,
129
+          },
130
+          repulse: {
131
+            distance: 200,
132
+            duration: 0.4,
133
+          },
134
+          push: {
135
+            particles_nb: 4,
136
+          },
137
+          remove: {
138
+            particles_nb: 2,
139
+          },
140
+        },
141
+      },
142
+      retina_detect: true,
143
+    });
144
+  }, []);
145
+}

+ 103
- 90
src/pages/MonitoringScreen/index.jsx Datei anzeigen

@@ -1,15 +1,12 @@
1 1
 import React, { useCallback, useEffect, useRef, useState } from 'react';
2 2
 import { history, Link } from 'umi';
3 3
 import classNames from 'classnames';
4
-// import { getPersonList, exportPersonList } from '@/services/person';
5
-import { PageHeaderWrapper } from '@ant-design/pro-layout';
6
-import { FullscreenOutlined } from '@ant-design/icons';
7
-import { Button } from 'antd';
8 4
 import ScreenHeader from '@/components/ScreenBox/ScreenHeader';
9 5
 import GeoMap from '@/components/GeoMap';
10 6
 import StatisCard from '@/components/ScreenBox/StatisCard';
11 7
 import SquareBox from '@/components/ScreenBox/SquareBox';
12
-import { useFullScreen } from './hook';
8
+import getWeather from '@/components/AMap/weather';
9
+import { useParticlesJs } from './hook';
13 10
 import MachineryType from './components/MachineryType';
14 11
 import MachineryStatus from './components/MachineryStatus';
15 12
 
@@ -21,8 +18,7 @@ import Styles from './style.less';
21 18
 
22 19
 export default (props) => {
23 20
   const screenRef = useRef();
24
-  const [height, setHeight] = useState('800px');
25
-  const { isFullScreen, toggleFullScreen } = useFullScreen(screenRef);
21
+  const [weather, setWeather] = useState('暂无天气信息');
26 22
 
27 23
   const [machineryTypeData, setMachineryTypeData] = useState([
28 24
     { name: '收割机', value: 200 },
@@ -52,98 +48,115 @@ export default (props) => {
52 48
     { name: '其他', value: 180 },
53 49
   ]);
54 50
 
55
-  return (
56
-    <PageHeaderWrapper
57
-      extra={
58
-        <Button icon={<FullscreenOutlined />} onClick={toggleFullScreen}>
59
-          全屏
60
-        </Button>
51
+  useEffect(() => {
52
+    console.log('-------process------->', process);
53
+
54
+    getWeather('邓州市').then((res) => {
55
+      if (res && res.length) {
56
+        const { casts } = res[0];
57
+        const { dayweather, nighttemp, daytemp } = casts[0];
58
+        const [min, max] = nighttemp > daytemp ? [daytemp, nighttemp] : [nighttemp, daytemp];
59
+        setWeather(`${dayweather} ${min}-${max} °C`);
60
+      } else {
61
+        setWeather('暂无天气信息');
61 62
       }
62
-    >
63
-      <div
64
-        className={classNames(Styles['screen-page'], Styles['pd-lr-40'], {
65
-          [Styles['full-screen']]: isFullScreen,
66
-        })}
67
-        style={{ height }}
68
-        ref={screenRef}
69
-      >
70
-        <div className={Styles['grail-layout']}>
71
-          <div className={Styles['grail-header']}>
72
-            <ScreenHeader weather="多云 21-28 °C" />
73
-          </div>
74
-          <div className={classNames(Styles['grail-container'], Styles['mg-tp-30'])}>
75
-            <div className={Styles['grail-left']}>
76
-              <div className="flex flex-column full-height">
77
-                <div className="flex-0" style={{ minHeight: '37%' }}>
78
-                  <MachineryType source={machineryTypeData} />
79
-                </div>
80
-                <div className="flex-1" style={{ marginTop: '30px' }}>
81
-                  <MachineryStatus source={machineryStatusData} />
82
-                </div>
63
+    });
64
+  }, []);
65
+
66
+  useParticlesJs(Styles['particles-js']);
67
+
68
+  return (
69
+    <div className={classNames(Styles['screen-page'], Styles['pd-lr-40'])} ref={screenRef}>
70
+      <div id={Styles['particles-js']} />
71
+      <div className={Styles['grail-layout']}>
72
+        <div className={Styles['grail-header']}>
73
+          <ScreenHeader weather={weather} />
74
+        </div>
75
+        <div className={classNames(Styles['grail-container'], Styles['mg-tp-30'])}>
76
+          <div className={Styles['grail-left']}>
77
+            <div className="flex flex-column full-height">
78
+              <div className="flex-0" style={{ minHeight: '37%' }}>
79
+                <MachineryType source={machineryTypeData} />
83 80
               </div>
84
-            </div>
85
-            <div className={classNames(Styles['grail-content'], Styles['pd-lr-40'])}>
86
-              <div className={Styles['statis-container']}>
87
-                <StatisCard color="#23E8AE" icon="icon1" value={2346} title="农机总数(台)" />
88
-                <StatisCard color="#0BDAFF" icon="icon2" value={528} title="农机使用数(台)" />
89
-                <StatisCard color="#F5CC5C" icon="icon3" value={168} title="总预约数(台)" />
90
-                <StatisCard color="#C579FF" icon="icon4" value={1568} title="总服务数(台)" />
81
+              <div className="flex-1" style={{ marginTop: '30px' }}>
82
+                <MachineryStatus source={machineryStatusData} />
91 83
               </div>
92
-              <GeoMap />
93 84
             </div>
94
-            <div className={Styles['grail-right']}>
95
-              <div className="flex flex-column full-height">
96
-                <div className="flex-0" style={{ minHeight: '37%' }}>
97
-                  <WorkData source={workData} />
98
-                </div>
99
-                <div className="flex-1" style={{ marginTop: '30px' }}>
100
-                  <WorkArea source={workAreaData} />
101
-                </div>
102
-              </div>
85
+          </div>
86
+          <div className={classNames(Styles['grail-content'], Styles['pd-lr-40'])}>
87
+            <div className={Styles['statis-container']}>
88
+              <StatisCard color="#23E8AE" icon="icon1" value={2346} title="农机总数(台)" />
89
+              <StatisCard color="#0BDAFF" icon="icon2" value={528} title="农机使用数(台)" />
90
+              <StatisCard color="#F5CC5C" icon="icon3" value={168} title="总预约数(台)" />
91
+              <StatisCard color="#C579FF" icon="icon4" value={1568} title="总服务数(台)" />
103 92
             </div>
93
+            <GeoMap />
104 94
           </div>
105
-          <div className={classNames(Styles['grail-footer'], Styles['mg-tp-30'])}>
106
-            <SquareBox>
107
-              <div className="flex" style={{ padding: '20px 0' }}>
108
-                <div className="flex-1">
109
-                  <List title="预约订单">
110
-                    <div>
111
-                      <ColorFont color="#F5CC5C">[快乐每一天]</ColorFont> 32s前预约了一台收割机,
112
-                      <ColorFont color="#44F68B">[收割机001]</ColorFont> 接到了此订单!
113
-                    </div>
114
-                    <div>
115
-                      <ColorFont color="#F5CC5C">[幸福人生]</ColorFont> 58分钟前预约了一台收割机,
116
-                      <ColorFont color="#44F68B">[播种机008]</ColorFont> 接到了此订单!尽快赶到!
117
-                    </div>
118
-                    <div>
119
-                      <ColorFont color="#F5CC5C">[灿烂人生]</ColorFont> 2个小时前预约了一台收割机,
120
-                      <ColorFont color="#44F68B">[收割机007]</ColorFont>{' '}
121
-                      接到了此订单!正在赶往目的地!
122
-                    </div>
123
-                  </List>
124
-                </div>
125
-                <div className={classNames('flex-0', Styles['footer-middle'])} />
126
-                <div className="flex-1">
127
-                  <List title="作业订单" color="green">
128
-                    <div>
129
-                      <ColorFont color="#44F68B">[收割机001]</ColorFont>
130
-                      32s前接到了一个订单,距离目的地还有3.2公里,请农户耐心等待!
131
-                    </div>
132
-                    <div>
133
-                      <ColorFont color="#44F68B">[播种机008]</ColorFont>{' '}
134
-                      2分钟前接到一个订单,距离目的地还有3.8公里,请农户耐心等待!
135
-                    </div>
136
-                    <div>
137
-                      <ColorFont color="#44F68B">[收割机007]</ColorFont>{' '}
138
-                      2个小时前接到一个订单,距离目的地还有3.8公里,请农户耐心等待!
139
-                    </div>
140
-                  </List>
141
-                </div>
95
+          <div className={Styles['grail-right']}>
96
+            <div className="flex flex-column full-height">
97
+              <div className="flex-0" style={{ minHeight: '37%' }}>
98
+                <WorkData source={workData} />
142 99
               </div>
143
-            </SquareBox>
100
+              <div className="flex-1" style={{ marginTop: '30px' }}>
101
+                <WorkArea source={workAreaData} />
102
+              </div>
103
+            </div>
144 104
           </div>
145 105
         </div>
106
+        <div className={classNames(Styles['grail-footer'], Styles['mg-tp-30'])}>
107
+          <SquareBox>
108
+            <div className="flex" style={{ padding: '20px 0' }}>
109
+              <div className="flex-1">
110
+                <List title="预约订单">
111
+                  <div>
112
+                    <ColorFont color="#F5CC5C">[快乐每一天]</ColorFont> 32s前预约了一台收割机,
113
+                    <ColorFont color="#44F68B">[收割机001]</ColorFont> 接到了此订单!
114
+                  </div>
115
+                  <div>
116
+                    <ColorFont color="#F5CC5C">[幸福人生]</ColorFont> 58分钟前预约了一台收割机,
117
+                    <ColorFont color="#44F68B">[播种机008]</ColorFont> 接到了此订单!尽快赶到!
118
+                  </div>
119
+                  <div>
120
+                    <ColorFont color="#F5CC5C">[灿烂人生]</ColorFont> 2个小时前预约了一台收割机,
121
+                    <ColorFont color="#44F68B">[收割机007]</ColorFont>{' '}
122
+                    接到了此订单!正在赶往目的地!
123
+                  </div>
124
+                  <div>
125
+                    <ColorFont color="#F5CC5C">[快乐每一天]</ColorFont> 32s前预约了一台收割机,
126
+                    <ColorFont color="#44F68B">[收割机001]</ColorFont> 接到了此订单!
127
+                  </div>
128
+                  <div>
129
+                    <ColorFont color="#F5CC5C">[幸福人生]</ColorFont> 58分钟前预约了一台收割机,
130
+                    <ColorFont color="#44F68B">[播种机008]</ColorFont> 接到了此订单!尽快赶到!
131
+                  </div>
132
+                  <div>
133
+                    <ColorFont color="#F5CC5C">[灿烂人生]</ColorFont> 2个小时前预约了一台收割机,
134
+                    <ColorFont color="#44F68B">[收割机007]</ColorFont>{' '}
135
+                    接到了此订单!正在赶往目的地!
136
+                  </div>
137
+                </List>
138
+              </div>
139
+              <div className={classNames('flex-0', Styles['footer-middle'])} />
140
+              <div className="flex-1">
141
+                <List title="作业订单" color="green">
142
+                  <div>
143
+                    <ColorFont color="#44F68B">[收割机001]</ColorFont>
144
+                    32s前接到了一个订单,距离目的地还有3.2公里,请农户耐心等待!
145
+                  </div>
146
+                  <div>
147
+                    <ColorFont color="#44F68B">[播种机008]</ColorFont>{' '}
148
+                    2分钟前接到一个订单,距离目的地还有3.8公里,请农户耐心等待!
149
+                  </div>
150
+                  <div>
151
+                    <ColorFont color="#44F68B">[收割机007]</ColorFont>{' '}
152
+                    2个小时前接到一个订单,距离目的地还有3.8公里,请农户耐心等待!
153
+                  </div>
154
+                </List>
155
+              </div>
156
+            </div>
157
+          </SquareBox>
158
+        </div>
146 159
       </div>
147
-    </PageHeaderWrapper>
160
+    </div>
148 161
   );
149 162
 };

+ 10
- 1
src/pages/MonitoringScreen/style.less Datei anzeigen

@@ -1,7 +1,8 @@
1 1
 .screen-page {
2 2
   position: relative;
3 3
   width: 100%;
4
-  height: 100%;
4
+  // height: 100%;
5
+  height: 100vh;
5 6
   padding-bottom: 30px;
6 7
 
7 8
   background-color: #021222;
@@ -9,6 +10,14 @@
9 10
   background-repeat: no-repeat;
10 11
   background-size: 100% 100%;
11 12
 
13
+  #particles-js {
14
+    position: absolute;
15
+    z-index: 0;
16
+    width: calc(100% - 80px);
17
+    height: 100%;
18
+    background-color: transparent;
19
+  }
20
+
12 21
   &.full-screen {
13 22
     position: fixed;
14 23
     top: 0;

+ 1
- 0
src/pages/document.ejs Datei anzeigen

@@ -24,6 +24,7 @@
24 24
     />
25 25
     <title>Ant Design Pro</title>
26 26
     <link rel="icon" href="<%= context.config.publicPath +'favicon.ico'%>" type="image/x-icon" />
27
+    <script src="./js/particles.min.js"></script>
27 28
   </head>
28 29
   <body>
29 30
     <noscript>