Browse Source

fix: chart

0235953 1 day ago
parent
commit
fe873934e3

+ 4 - 3
industry-device/industry-web/src/modules/industry/machine/page-vibration-history/page-vibration-history.html

@@ -70,14 +70,14 @@
           <button class="btn small secondary">对比分析</button>
         </div>
       </div>
-      <div class="chart-container" id="trend-chart"></div>
+      <div #trendChart class="chart-container"></div>
     </div>
     
     <div class="card">
       <div class="card-header">
         <h2 class="card-title">异常事件统计</h2>
       </div>
-      <div class="chart-container" id="event-chart"></div>
+      <div #eventChart class="chart-container"></div>
     </div>
   </div>
   
@@ -110,12 +110,13 @@
       <thead>
         <tr>
           <th *ngIf="showBatchActions"><input type="checkbox" (change)="toggleSelectAll($event)"></th>
+          <th>操作</th>
           <th>时间</th>
           <th>事件类型</th>
           <th>设备</th>
           <th>振动值</th>
           <th>持续时间</th>
-          <th>操作</th>
+          <th>详情</th>
         </tr>
       </thead>
       <tbody>

+ 0 - 4
industry-device/industry-web/src/modules/industry/machine/page-vibration-history/page-vibration-history.scss

@@ -395,10 +395,6 @@ header {
   }
 }
 
-// 旋转动画
-@keyframes spin {
-  to { transform: rotate(360deg); }
-}
 
 // 事件标签样式
 .event-tag {

+ 1 - 4
industry-device/industry-web/src/modules/industry/machine/page-vibration-history/page-vibration-history.ts

@@ -78,10 +78,7 @@ private initCharts() {
   setTimeout(() => { // 添加延迟确保DOM就绪
     try {
       if (!this.trendChartEl?.nativeElement || !this.eventChartEl?.nativeElement) {
-        console.error('图表容器未找到:', {
-          trend: this.trendChartEl,
-          event: this.eventChartEl
-        });
+        console.error('图表容器未找到');
         return;
       }