|  |  | 
 |  |  |     private http2: HttpClient) {} | 
 |  |  |  | 
 |  |  |     ngOnInit() { | 
 |  |  |         this.http.get('/chart').subscribe((res: any) => { | 
 |  |  |             res.offlineData.forEach((item: any) => { | 
 |  |  |                 item.chart = Object.assign([], res.offlineChartData); | 
 |  |  |             }); | 
 |  |  |             this.data = res; | 
 |  |  |             this.loading = false; | 
 |  |  |             this.changeSaleType(); | 
 |  |  |         }); | 
 |  |  |         // this.http.get('/chart').subscribe((res: any) => { | 
 |  |  |         //     res.offlineData.forEach((item: any) => { | 
 |  |  |         //         item.chart = Object.assign([], res.offlineChartData); | 
 |  |  |         //     }); | 
 |  |  |         //     this.data = res; | 
 |  |  |         //     this.loading = false; | 
 |  |  |         //     this.changeSaleType(); | 
 |  |  |         // }); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     setDate(type: any) { | 
 
 |  |  | 
 |  |  |     constructor(private http: _HttpClient, public msg: NzMessageService) {} | 
 |  |  |  | 
 |  |  |     ngOnInit() { | 
 |  |  |         zip( | 
 |  |  |             this.http.get('/chart'), | 
 |  |  |             this.http.get('/chart/tags') | 
 |  |  |         ).subscribe(([ res, tags ]) => { | 
 |  |  |             this.data = res; | 
 |  |  |             tags['list'][Math.floor(Math.random() *  tags['list'].length) + 1].value = 1000; | 
 |  |  |             this.tags =  tags['list']; | 
 |  |  |             this.loading = false; | 
 |  |  |         }); | 
 |  |  |         // zip( | 
 |  |  |         //     this.http.get('/chart'), | 
 |  |  |         //     this.http.get('/chart/tags') | 
 |  |  |         // ).subscribe(([ res, tags ]) => { | 
 |  |  |         //     this.data = res; | 
 |  |  |         //     tags['list'][Math.floor(Math.random() *  tags['list'].length) + 1].value = 1000; | 
 |  |  |         //     this.tags =  tags['list']; | 
 |  |  |         //     this.loading = false; | 
 |  |  |         // }); | 
 |  |  |  | 
 |  |  |         // active chart | 
 |  |  |         this.genActiveData(); | 
 |  |  |         this.activeTime$ = setInterval(() => this.genActiveData(), 1000); | 
 |  |  |         // // active chart | 
 |  |  |         // this.genActiveData(); | 
 |  |  |         // this.activeTime$ = setInterval(() => this.genActiveData(), 1000); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     // region: active chart | 
 
 |  |  | 
 |  |  |     offlineChartData: any[] = []; | 
 |  |  |  | 
 |  |  |     ngOnInit() { | 
 |  |  |         this.http.get('/chart').subscribe((res: any) => { | 
 |  |  |             this.webSite = res.visitData.slice(0, 10); | 
 |  |  |             this.salesData = res.salesData; | 
 |  |  |             this.offlineChartData = res.offlineChartData; | 
 |  |  |         }); | 
 |  |  |         // this.http.get('/chart').subscribe((res: any) => { | 
 |  |  |         //     this.webSite = res.visitData.slice(0, 10); | 
 |  |  |         //     this.salesData = res.salesData; | 
 |  |  |         //     this.offlineChartData = res.offlineChartData; | 
 |  |  |         // }); | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |     constructor(private http: _HttpClient, public msg: NzMessageService) {} | 
 |  |  |  | 
 |  |  |     ngOnInit() { | 
 |  |  |         zip( | 
 |  |  |             this.http.get('/chart'), | 
 |  |  |             this.http.get('/api/notice'), | 
 |  |  |             this.http.get('/api/activities') | 
 |  |  |         ).subscribe(([ chart, notice, activities ]) => { | 
 |  |  |             this.radarData = chart['radarData']; | 
 |  |  |             this.notice = <any []>notice; | 
 |  |  |             this.activities = (<any []>activities).map((item: any) => { | 
 |  |  |                 item.template = item.template.split(/@\{([^{}]*)\}/gi).map((key: string) => { | 
 |  |  |                     if (item[key]) return `<a>${item[key].name}</a>`; | 
 |  |  |                     return key; | 
 |  |  |                 }); | 
 |  |  |                 return item; | 
 |  |  |             }); | 
 |  |  |             this.loading = false; | 
 |  |  |         }); | 
 |  |  |         // zip( | 
 |  |  |         //     this.http.get('/chart'), | 
 |  |  |         //     this.http.get('/api/notice'), | 
 |  |  |         //     this.http.get('/api/activities') | 
 |  |  |         // ).subscribe(([ chart, notice, activities ]) => { | 
 |  |  |         //     this.radarData = chart['radarData']; | 
 |  |  |         //     this.notice = <any []>notice; | 
 |  |  |         //     this.activities = (<any []>activities).map((item: any) => { | 
 |  |  |         //         item.template = item.template.split(/@\{([^{}]*)\}/gi).map((key: string) => { | 
 |  |  |         //             if (item[key]) return `<a>${item[key].name}</a>`; | 
 |  |  |         //             return key; | 
 |  |  |         //         }); | 
 |  |  |         //         return item; | 
 |  |  |         //     }); | 
 |  |  |         //     this.loading = false; | 
 |  |  |         // }); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     ngOnDestroy(): void { |