suomingxiang vor 2 Tagen
Ursprung
Commit
41768e1408

BIN
public/images/title.png Datei anzeigen


BIN
public/images/titlev1.png Datei anzeigen


BIN
public/video/maps.mp4 Datei anzeigen


BIN
public/video/mapxl.mp4 Datei anzeigen


+ 7
- 6
src/pages/components/Header/Header.less Datei anzeigen

@@ -23,20 +23,21 @@
23 23
             height: 54px;
24 24
             margin-right: 30px;
25 25
             margin-top: 28px;
26
-            margin-left: 192px;
26
+            margin-left: 360px;
27 27
         }
28 28
         .title{
29
-            width: 746px;
30
-            height: 60px;
31
-            margin-top: 34px;
29
+            width: 380px;
30
+            height: 74px;
31
+            margin-top: 22px;
32
+            margin-left: 20px;
32 33
         }
33 34
         &::after{
34 35
             content: '';
35 36
             width: 2px;
36 37
             height: 64px;
37 38
             position: absolute;
38
-            left: 354px;
39
-            top: 25px;
39
+            left: 530px;
40
+            top: 27px;
40 41
             background-color: #606060;
41 42
         }
42 43
     }

+ 8
- 3
src/pages/components/Header/Header.tsx Datei anzeigen

@@ -10,13 +10,18 @@ const formatDate = (date: Date) => {
10 10
     return `${year}-${month}-${day}`;
11 11
 };
12 12
 
13
+const formatTime = (date: Date) => {
14
+    return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' });
15
+};
13 16
 const Header: React.FC = () => {
14 17
     const [date,setDate] = useState<string>(formatDate(new Date()));
15
-    const [time, setTime] = useState<Date>(new Date());
18
+    const [time, setTime] = useState<string>(formatTime(new Date()));
16 19
 
17 20
     useEffect(() => {
18 21
         const intervalId = setInterval(() => {
19
-            setTime(new Date());
22
+            const now = new Date()
23
+            setDate(formatDate(now)); // 更新日期
24
+            setTime(formatTime(now));
20 25
         }, 1000); // 每秒更新一次
21 26
 
22 27
         // 清理定时器
@@ -32,7 +37,7 @@ const Header: React.FC = () => {
32 37
             <div className={styles.logo}><img src={logo} alt="" /></div>
33 38
             <div className={styles.title}><img src={title} alt="" /></div>
34 39
         </div>
35
-        <div className={styles.time}>{date} {time.toLocaleTimeString()}</div>
40
+        <div className={styles.time}>{date} {time}</div>
36 41
     </div>
37 42
   ); 
38 43
 };

+ 2
- 2
src/pages/index.tsx Datei anzeigen

@@ -37,8 +37,8 @@ import {
37 37
     getNumericalData,
38 38
     getNumericalData2,
39 39
     getNumericalData3,
40
-} from '../services/chartApi';
41
-// } from '../services/chartStatic';
40
+// } from '../services/chartApi';
41
+} from '../services/chartStatic';
42 42
 import magnifierImg from '../../public/images/magnifier.png';
43 43
 import videoMask from '../../public/images/videoMask.png';
44 44
 import maps from '../../public/video/maps.mp4';

+ 29
- 0
src/services/chartStatic.ts Datei anzeigen

@@ -102,3 +102,32 @@ export async function getNumericalData (){
102 102
         yearOrder :410240,
103 103
     });
104 104
 }
105
+
106
+// 大屏数值数据
107
+export async function getNumericalData2 (){
108
+    return({
109
+        totalSalesAmount:24894,
110
+        totalOrder:4404824,
111
+        numberServicePersonnel:2583955,
112
+        numberAirborneCustomers:658879,
113
+        todaySalesVolume :1423253,
114
+        yearSalesVolume :122342,
115
+        todayOrder :1282,
116
+        yearOrder :410240,
117
+    });
118
+}
119
+
120
+
121
+// 大屏数值数据
122
+export async function getNumericalData3 (){
123
+    return({
124
+        totalSalesAmount:24894,
125
+        totalOrder:4404824,
126
+        numberServicePersonnel:2583955,
127
+        numberAirborneCustomers:658879,
128
+        todaySalesVolume :1423253,
129
+        yearSalesVolume :122342,
130
+        todayOrder :1282,
131
+        yearOrder :410240,
132
+    });
133
+}

Laden…
Abbrechen
Speichern