解决冲突
This commit is contained in:
@ -5,7 +5,7 @@ import { map } from 'rxjs/operators';
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 10:57:56
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-07 15:16:53
|
||||
* @LastEditTime : 2022-04-07 15:53:41
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -15,7 +15,7 @@ import { SFSchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { DataService } from '../../services/data.service';
|
||||
import { DatatableCustomindexMapComponent } from './curve/map.component';
|
||||
import { G2TimelineData } from '@delon/chart/timeline';
|
||||
import { G2TimelineComponent, G2TimelineData } from '@delon/chart/timeline';
|
||||
import { G2MiniAreaClickItem, G2MiniAreaData } from '@delon/chart/mini-area';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
@ -29,6 +29,8 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('orderSt') private readonly orderSt!: STComponent;
|
||||
@ViewChild('map') private readonly map!: DatatableCustomindexMapComponent;
|
||||
@ViewChild('timeline', { static: false }) timeline!: G2TimelineComponent;
|
||||
|
||||
columns: STColumn[] = [];
|
||||
chartData: any[] = [];
|
||||
orderColumns: STColumn[] = [];
|
||||
@ -39,11 +41,14 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
|
||||
monthData: G2TimelineData[] = [];
|
||||
salesData :any;
|
||||
salesData2 :any = this.genData();
|
||||
salesData2 :Array<any> = this.genData();
|
||||
constructor(public service: DataService) {
|
||||
|
||||
}
|
||||
|
||||
ngOnChanges(changes: any): void {
|
||||
console.log(changes);
|
||||
|
||||
}
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
@ -95,16 +100,12 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
initLineData(){
|
||||
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
|
||||
this.monthData = res
|
||||
// for (let i = 0; i < 20; i += 1) {
|
||||
// this.monthData.push({
|
||||
// time: new Date().getTime() + 1000 * 60 * 60 * 24 * i,
|
||||
// y1: Math.floor(Math.random() * 100) + 1000,
|
||||
// y2: Math.floor(Math.random() * 100) + 10,
|
||||
// });
|
||||
// }
|
||||
})
|
||||
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
|
||||
this.monthData = res
|
||||
if (this.timeline) {
|
||||
console.log(this.timeline);
|
||||
|
||||
// 等待组件渲染
|
||||
setTimeout(() => this.timeline.changeData());
|
||||
}
|
||||
// for (let i = 0; i < 20; i += 1) {
|
||||
// this.monthData.push({
|
||||
// time: new Date().getTime() + 1000 * 60 * 60 * 24 * i,
|
||||
@ -123,6 +124,13 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
});
|
||||
});
|
||||
this.salesData = value
|
||||
// if (this.pie) {
|
||||
// // 等待组件渲染
|
||||
// setTimeout(() => {
|
||||
// console.log('a')
|
||||
// this.pie.changeData()
|
||||
// });
|
||||
// }
|
||||
console.log(this.salesData);
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user