process-and-facility.component.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { Component, OnInit, ViewChild } from '@angular/core';
  2. import { _HttpClient, ModalHelper } from '@delon/theme';
  3. import { STColumn, STComponent } from '@delon/abc';
  4. import { SFSchema } from '@delon/form';
  5. @Component({
  6. selector: 'app-quality-control-process-and-facility',
  7. templateUrl: './process-and-facility.component.html',
  8. })
  9. export class QualityControlProcessAndFacilityComponent implements OnInit {
  10. url = `/user`;
  11. searchSchema: SFSchema = {
  12. properties: {
  13. no: {
  14. type: 'string',
  15. title: '编号'
  16. }
  17. }
  18. };
  19. @ViewChild('st') st: STComponent;
  20. columns: STColumn[] = [
  21. { title: '编号', index: 'no' },
  22. { title: '调用次数', type: 'number', index: 'callNo' },
  23. { title: '头像', type: 'img', width: '50px', index: 'avatar' },
  24. { title: '时间', type: 'date', index: 'updatedAt' },
  25. {
  26. title: '',
  27. buttons: [
  28. // { text: '查看', click: (item: any) => `/form/${item.id}` },
  29. // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
  30. ]
  31. }
  32. ];
  33. constructor(private http: _HttpClient, private modal: ModalHelper) { }
  34. ngOnInit() { }
  35. add() {
  36. // this.modal
  37. // .createStatic(FormEditComponent, { i: { id: 0 } })
  38. // .subscribe(() => this.st.reload());
  39. }
  40. }