46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
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-compliance-salesman',
|
|
templateUrl: './salesman.component.html',
|
|
})
|
|
export class DatatableComplianceSalesmanComponent 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());
|
|
}
|
|
|
|
}
|