fix bug
This commit is contained in:
		| @ -0,0 +1,6 @@ | ||||
| <!-- 页头 --> | ||||
| <page-header-wrapper [title]="'数据报表'"></page-header-wrapper> | ||||
| <nz-card> | ||||
|   <sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf> | ||||
|   <st #st [data]="url" [columns]="columns"></st> | ||||
| </nz-card> | ||||
| @ -0,0 +1,24 @@ | ||||
| import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { DatatableCustomindexComponent } from './customindex.component'; | ||||
|  | ||||
| describe('DatatableCustomindexComponent', () => { | ||||
|   let component: DatatableCustomindexComponent; | ||||
|   let fixture: ComponentFixture<DatatableCustomindexComponent>; | ||||
|  | ||||
|   beforeEach(waitForAsync(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [ DatatableCustomindexComponent ] | ||||
|     }) | ||||
|     .compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(DatatableCustomindexComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -0,0 +1,45 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { SFSchema } from '@delon/form'; | ||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-datatable-customindex', | ||||
|   templateUrl: './customindex.component.html', | ||||
| }) | ||||
| export class DatatableCustomindexComponent implements OnInit { | ||||
|   url = `/user`; | ||||
|   searchSchema: SFSchema = { | ||||
|     properties: { | ||||
|       no: { | ||||
|         type: 'string', | ||||
|         title: '编号' | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|   @ViewChild('st') private readonly st!: STComponent; | ||||
|   columns: STColumn[] = [ | ||||
|     { title: '编号', index: 'no' }, | ||||
|     { title: '调用次数', type: 'number', index: 'callNo' }, | ||||
|     { title: '头像', type: 'img', width: '50px', index: 'avatar' }, | ||||
|     { title: '时间', type: 'date', index: 'updatedAt' }, | ||||
|     { | ||||
|       title: '', | ||||
|       buttons: [ | ||||
|         // { text: '查看', click: (item: any) => `/form/${item.id}` }, | ||||
|         // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, | ||||
|       ] | ||||
|     } | ||||
|   ]; | ||||
|  | ||||
|   constructor(private http: _HttpClient, private modal: ModalHelper) { } | ||||
|  | ||||
|   ngOnInit(): void { } | ||||
|  | ||||
|   add(): void { | ||||
|     // this.modal | ||||
|     //   .createStatic(FormEditComponent, { i: { id: 0 } }) | ||||
|     //   .subscribe(() => this.st.reload()); | ||||
|   } | ||||
|  | ||||
| } | ||||
| @ -0,0 +1,6 @@ | ||||
| <!-- 页头 --> | ||||
| <page-header-wrapper [title]="'数据报表'"></page-header-wrapper> | ||||
| <nz-card> | ||||
|   <sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf> | ||||
|   <st #st [data]="url" [columns]="columns"></st> | ||||
| </nz-card> | ||||
| @ -0,0 +1,24 @@ | ||||
| import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { DatatableCustomtableComponent } from './customtable.component'; | ||||
|  | ||||
| describe('DatatableCustomtableComponent', () => { | ||||
|   let component: DatatableCustomtableComponent; | ||||
|   let fixture: ComponentFixture<DatatableCustomtableComponent>; | ||||
|  | ||||
|   beforeEach(waitForAsync(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [ DatatableCustomtableComponent ] | ||||
|     }) | ||||
|     .compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(DatatableCustomtableComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -0,0 +1,45 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { SFSchema } from '@delon/form'; | ||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-datatable-customtable', | ||||
|   templateUrl: './customtable.component.html', | ||||
| }) | ||||
| export class DatatableCustomtableComponent implements OnInit { | ||||
|   url = `/user`; | ||||
|   searchSchema: SFSchema = { | ||||
|     properties: { | ||||
|       no: { | ||||
|         type: 'string', | ||||
|         title: '编号' | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|   @ViewChild('st') private readonly st!: STComponent; | ||||
|   columns: STColumn[] = [ | ||||
|     { title: '编号', index: 'no' }, | ||||
|     { title: '调用次数', type: 'number', index: 'callNo' }, | ||||
|     { title: '头像', type: 'img', width: '50px', index: 'avatar' }, | ||||
|     { title: '时间', type: 'date', index: 'updatedAt' }, | ||||
|     { | ||||
|       title: '', | ||||
|       buttons: [ | ||||
|         // { text: '查看', click: (item: any) => `/form/${item.id}` }, | ||||
|         // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, | ||||
|       ] | ||||
|     } | ||||
|   ]; | ||||
|  | ||||
|   constructor(private http: _HttpClient, private modal: ModalHelper) { } | ||||
|  | ||||
|   ngOnInit(): void { } | ||||
|  | ||||
|   add(): void { | ||||
|     // this.modal | ||||
|     //   .createStatic(FormEditComponent, { i: { id: 0 } }) | ||||
|     //   .subscribe(() => this.st.reload()); | ||||
|   } | ||||
|  | ||||
| } | ||||
| @ -0,0 +1,6 @@ | ||||
| <!-- 页头 --> | ||||
| <page-header-wrapper [title]="'数据报表'"></page-header-wrapper> | ||||
| <nz-card> | ||||
|   <sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf> | ||||
|   <st #st [data]="url" [columns]="columns"></st> | ||||
| </nz-card> | ||||
| @ -0,0 +1,24 @@ | ||||
| import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { DatatableDriverComponent } from './driver.component'; | ||||
|  | ||||
| describe('DatatableDriverComponent', () => { | ||||
|   let component: DatatableDriverComponent; | ||||
|   let fixture: ComponentFixture<DatatableDriverComponent>; | ||||
|  | ||||
|   beforeEach(waitForAsync(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [ DatatableDriverComponent ] | ||||
|     }) | ||||
|     .compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(DatatableDriverComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -0,0 +1,45 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { SFSchema } from '@delon/form'; | ||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-datatable-driver', | ||||
|   templateUrl: './driver.component.html', | ||||
| }) | ||||
| export class DatatableDriverComponent implements OnInit { | ||||
|   url = `/user`; | ||||
|   searchSchema: SFSchema = { | ||||
|     properties: { | ||||
|       no: { | ||||
|         type: 'string', | ||||
|         title: '编号' | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|   @ViewChild('st') private readonly st!: STComponent; | ||||
|   columns: STColumn[] = [ | ||||
|     { title: '编号', index: 'no' }, | ||||
|     { title: '调用次数', type: 'number', index: 'callNo' }, | ||||
|     { title: '头像', type: 'img', width: '50px', index: 'avatar' }, | ||||
|     { title: '时间', type: 'date', index: 'updatedAt' }, | ||||
|     { | ||||
|       title: '', | ||||
|       buttons: [ | ||||
|         // { text: '查看', click: (item: any) => `/form/${item.id}` }, | ||||
|         // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, | ||||
|       ] | ||||
|     } | ||||
|   ]; | ||||
|  | ||||
|   constructor(private http: _HttpClient, private modal: ModalHelper) { } | ||||
|  | ||||
|   ngOnInit(): void { } | ||||
|  | ||||
|   add(): void { | ||||
|     // this.modal | ||||
|     //   .createStatic(FormEditComponent, { i: { id: 0 } }) | ||||
|     //   .subscribe(() => this.st.reload()); | ||||
|   } | ||||
|  | ||||
| } | ||||
| @ -0,0 +1,5 @@ | ||||
| <!-- 页头 --> | ||||
| <page-header-wrapper [title]="'运营报表'"></page-header-wrapper> | ||||
| <nz-card> | ||||
|   <st #st [data]="url" [columns]="columns"></st> | ||||
| </nz-card> | ||||
| @ -0,0 +1,24 @@ | ||||
| import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { DatatableOwnerComponent } from './owner.component'; | ||||
|  | ||||
| describe('DatatableOwnerComponent', () => { | ||||
|   let component: DatatableOwnerComponent; | ||||
|   let fixture: ComponentFixture<DatatableOwnerComponent>; | ||||
|  | ||||
|   beforeEach(waitForAsync(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [ DatatableOwnerComponent ] | ||||
|     }) | ||||
|     .compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(DatatableOwnerComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -0,0 +1,45 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { SFSchema } from '@delon/form'; | ||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-datatable-owner', | ||||
|   templateUrl: './owner.component.html', | ||||
| }) | ||||
| export class DatatableOwnerComponent implements OnInit { | ||||
|   url = `/user`; | ||||
|   searchSchema: SFSchema = { | ||||
|     properties: { | ||||
|       no: { | ||||
|         type: 'string', | ||||
|         title: '编号' | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|   @ViewChild('st') private readonly st!: STComponent; | ||||
|   columns: STColumn[] = [ | ||||
|     { title: '编号', index: 'no' }, | ||||
|     { title: '调用次数', type: 'number', index: 'callNo' }, | ||||
|     { title: '头像', type: 'img', width: '50px', index: 'avatar' }, | ||||
|     { title: '时间', type: 'date', index: 'updatedAt' }, | ||||
|     { | ||||
|       title: '', | ||||
|       buttons: [ | ||||
|         // { text: '查看', click: (item: any) => `/form/${item.id}` }, | ||||
|         // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, | ||||
|       ] | ||||
|     } | ||||
|   ]; | ||||
|  | ||||
|   constructor(private http: _HttpClient, private modal: ModalHelper) { } | ||||
|  | ||||
|   ngOnInit(): void { } | ||||
|  | ||||
|   add(): void { | ||||
|     // this.modal | ||||
|     //   .createStatic(FormEditComponent, { i: { id: 0 } }) | ||||
|     //   .subscribe(() => this.st.reload()); | ||||
|   } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user