|
@@ -5,7 +5,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|
|
import gsap from 'gsap';
|
|
import gsap from 'gsap';
|
|
|
import { ScrollTrigger } from 'gsap/ScrollTrigger';
|
|
import { ScrollTrigger } from 'gsap/ScrollTrigger';
|
|
|
import type { EChartsOption } from 'echarts';
|
|
import type { EChartsOption } from 'echarts';
|
|
|
-import { ApiService, Overview, FmodeApiRecharge, FmodeApiUsers, FmodeApiUserStats, FmodeApiTopups, ApigOrderGroups, ApigOrderDetail, UpstreamCost, ModuleForwardingDetails, FmodeApiNewUsers } from './api.service';
|
|
|
|
|
|
|
+import { ApiService, Overview, FmodeApiRecharge, FmodeApiUsers, FmodeApiUserStats, FmodeApiTopups, ApigOrderGroups, ApigOrderDetail, UpstreamCost, ModuleForwardingDetails, FmodeApiNewUsers, UsageDiagnostics } from './api.service';
|
|
|
import { EChartComponent } from './echart.component';
|
|
import { EChartComponent } from './echart.component';
|
|
|
|
|
|
|
|
gsap.registerPlugin(ScrollTrigger);
|
|
gsap.registerPlugin(ScrollTrigger);
|
|
@@ -40,6 +40,7 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
{ id: 'overview', label: '总览', icon: '◎' },
|
|
{ id: 'overview', label: '总览', icon: '◎' },
|
|
|
{ id: 'upstreams', label: '上游余额与成本', icon: '☁' },
|
|
{ id: 'upstreams', label: '上游余额与成本', icon: '☁' },
|
|
|
{ id: 'modules', label: '模块转发明细', icon: '◇' },
|
|
{ id: 'modules', label: '模块转发明细', icon: '◇' },
|
|
|
|
|
+ { id: 'diagnostics', label: '任务成本诊断', icon: '!' },
|
|
|
{ id: 'revenue', label: '营收与订单', icon: '¥' },
|
|
{ id: 'revenue', label: '营收与订单', icon: '¥' },
|
|
|
{ id: 'orders', label: '充值订单明细', icon: '☰' },
|
|
{ id: 'orders', label: '充值订单明细', icon: '☰' },
|
|
|
{ id: 'fmodeapi', label: 'fmodeapi 充值与用量', icon: '⚡' },
|
|
{ id: 'fmodeapi', label: 'fmodeapi 充值与用量', icon: '⚡' },
|
|
@@ -70,6 +71,7 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
apigOrders: ApigOrderGroups | null = null;
|
|
apigOrders: ApigOrderGroups | null = null;
|
|
|
upstreamCost: UpstreamCost | null = null;
|
|
upstreamCost: UpstreamCost | null = null;
|
|
|
moduleForwarding: ModuleForwardingDetails | null = null;
|
|
moduleForwarding: ModuleForwardingDetails | null = null;
|
|
|
|
|
+ usageDiagnostics: UsageDiagnostics | null = null;
|
|
|
newUsers: FmodeApiNewUsers | null = null;
|
|
newUsers: FmodeApiNewUsers | null = null;
|
|
|
updatedAt = '';
|
|
updatedAt = '';
|
|
|
|
|
|
|
@@ -481,6 +483,21 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case 'diagnostics':
|
|
|
|
|
+ this.usageDiagnostics = null;
|
|
|
|
|
+ this.api.getUsageDiagnostics(this.days, month).subscribe({
|
|
|
|
|
+ next: (d) => {
|
|
|
|
|
+ this.usageDiagnostics = d;
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ this.updatedAt = new Date().toLocaleString('zh-CN');
|
|
|
|
|
+ setTimeout(() => ScrollTrigger.refresh(), 50);
|
|
|
|
|
+ },
|
|
|
|
|
+ error: (e) => {
|
|
|
|
|
+ this.error = e?.message || '加载失败';
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ break;
|
|
|
case 'revenue':
|
|
case 'revenue':
|
|
|
this.loadOverview(false);
|
|
this.loadOverview(false);
|
|
|
break;
|
|
break;
|