guoziyun 9 luni în urmă
părinte
comite
03ae74a6cf

+ 1 - 1
oms/public/app/index.html

@@ -9,5 +9,5 @@
   <style>body,html{width:100%;height:100%}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}body{margin:0;color:#000000d9;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:tabular-nums;line-height:1.5715;background-color:#fff;font-feature-settings:"tnum"}html{--antd-wave-shadow-color:#1890ff;--scroll-bar:0}</style><link rel="stylesheet" href="styles-LXBSU6DF.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-LXBSU6DF.css"></noscript></head>
   <body>
     <app-root></app-root>
-  <script src="polyfills-B6TNHZQ6.js" type="module"></script><script src="main-NNVEAGAU.js" type="module"></script></body>
+  <script src="polyfills-B6TNHZQ6.js" type="module"></script><script src="main-GFS67RGV.js" type="module"></script></body>
 </html>

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
oms/public/app/main-GFS67RGV.js


+ 10 - 3
omsapp/src/app/pages/message-dashboard.component.ts

@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
 import { CommonModule, DatePipe } from '@angular/common';
 import { HttpClient } from '@angular/common/http';
 import { Router } from '@angular/router';
@@ -203,7 +203,8 @@ export class MessageDashboardComponent implements OnInit {
   constructor(
     private http: HttpClient,
     private message: NzMessageService,
-    private router: Router
+    private router: Router,
+    private cd: ChangeDetectorRef // 注入 ChangeDetectorRef
   ) {
     Chart.register(...registerables);
   }
@@ -266,7 +267,13 @@ export class MessageDashboardComponent implements OnInit {
           })
         ),
     })
-      .pipe(finalize(() => (this.isLoading = false)))
+      .pipe(
+        finalize(() => {
+          this.isLoading = false;
+          // 在所有数据都赋值完毕后,手动触发变更检测
+          this.cd.detectChanges();
+        })
+      )
       .subscribe((results: any) => {
         // Assign data to component properties
         this.overallStats = results.overall;

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff