80 lines
1.9 KiB
TypeScript
80 lines
1.9 KiB
TypeScript
import { Component, OnInit, ViewChild } from '@angular/core';
|
|
import { Router } from '@angular/router';
|
|
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
|
|
import { SFComponent, SFSchema } from '@delon/form';
|
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
import { TicketService } from 'src/app/routes/ticket-management/services/ticket.service';
|
|
|
|
@Component({
|
|
selector: 'app-selected-captain',
|
|
templateUrl: './selected-captain.component.html'
|
|
})
|
|
export class SelectedCaptainComponent implements OnInit {
|
|
data = [];
|
|
selectedData: any[] = [];
|
|
@ViewChild('st', { static: true })
|
|
st!: STComponent;
|
|
@ViewChild('sf', { static: false })
|
|
sf!: SFComponent;
|
|
columns: STColumn[] = [
|
|
{ title: '', index: 'key', type: 'checkbox' },
|
|
{ title: '企业名称', index: 'no' },
|
|
{ title: '联系人姓名', index: 'callNo' },
|
|
{ title: '联系人手机号', index: 'callNo' },
|
|
{ title: '认证状态', index: 'callNo' }
|
|
];
|
|
searchSchema: SFSchema = {
|
|
properties: {
|
|
params1: {
|
|
title: '',
|
|
type: 'string',
|
|
ui: {
|
|
placeholder: '请输入企业名称'
|
|
}
|
|
},
|
|
params2: {
|
|
title: '',
|
|
type: 'string',
|
|
ui: {
|
|
placeholder: '请输入姓名'
|
|
}
|
|
},
|
|
params3: {
|
|
title: '',
|
|
type: 'string',
|
|
ui: {
|
|
placeholder: '请输入手机号'
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
|
|
|
ngOnInit(): void {}
|
|
|
|
beforeReq = (requestOptions: STRequestOptions) => {
|
|
if (this.sf) {
|
|
Object.assign(requestOptions.body, {
|
|
...this.sf.value
|
|
});
|
|
}
|
|
return requestOptions;
|
|
};
|
|
|
|
stChange(e: STChange): void {
|
|
switch (e.type) {
|
|
case 'checkbox':
|
|
this.selectedData = e.checkbox!;
|
|
break;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 重置表单
|
|
*/
|
|
resetSF() {
|
|
this.sf.reset();
|
|
}
|
|
}
|