This commit is contained in:
Taric Xin
2022-05-07 15:53:06 +08:00
parent ff0ecd4992
commit 7cfee636e2
6 changed files with 11 additions and 28 deletions

View File

@ -58,9 +58,6 @@ export class UserCenterComponentsDriverCaptainComponent extends BasicTableCompon
} }
ngOnInit() { ngOnInit() {
this.ar.url.subscribe(params => {
this.st?.load(1);
});
} }
dataProcess(data: STData[]): STData[] { dataProcess(data: STData[]): STData[] {
return data.map((i, index) => { return data.map((i, index) => {

View File

@ -63,9 +63,6 @@ export class UserCenterComponentsDriverComponent extends BasicTableComponent imp
} }
ngOnInit() { ngOnInit() {
this.ar.url.subscribe(params => {
this.st?.load(1);
});
} }
selectChange(e: any) { selectChange(e: any) {

View File

@ -25,8 +25,6 @@ export class FreightComponentsListComponent extends BasicTableComponent implemen
loadingList = true; loadingList = true;
sfValue = { enterpriseName: '', contactName: '' };
constructor( constructor(
public service: UsermanageService, public service: UsermanageService,
private modal: NzModalService, private modal: NzModalService,
@ -36,6 +34,7 @@ export class FreightComponentsListComponent extends BasicTableComponent implemen
public searchDrawerService: SearchDrawerService public searchDrawerService: SearchDrawerService
) { ) {
super(searchDrawerService); super(searchDrawerService);
this.sfValue = { enterpriseName: '', contactName: '' };
} }
ngOnInit() { ngOnInit() {
@ -49,23 +48,23 @@ export class FreightComponentsListComponent extends BasicTableComponent implemen
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { listSource: 1 }); Object.assign(requestOptions.body, { listSource: 1 });
if (this.sf) { if (this.sfValue) {
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
...this.sf?.value ...this.sfValue
}); });
if (this.sf?.value.createTime) { if (this.sfValue.createTime) {
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
createTime: { createTime: {
start: this.sf?.value.createTime[0], start: this.sfValue.createTime[0],
end: this.sf?.value.createTime[1] end: this.sfValue.createTime[1]
} }
}); });
} }
if (this.sf?.value.approvalTime) { if (this.sfValue.approvalTime) {
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
approvalTime: { approvalTime: {
start: this.sf?.value.approvalTime[0], start: this.sfValue.approvalTime[0],
end: this.sf?.value.approvalTime[1] end: this.sfValue.approvalTime[1]
} }
}); });
} }
@ -518,7 +517,7 @@ export class FreightComponentsListComponent extends BasicTableComponent implemen
const params = { listSource: 1, pageSize: -1 }; const params = { listSource: 1, pageSize: -1 };
if (this.sf) { if (this.sf) {
Object.assign(params, { Object.assign(params, {
...this.sf?.value ...this.sfValue
}); });
} }
this.service.downloadFile(this.service.$api_export_enterprise, params); this.service.downloadFile(this.service.$api_export_enterprise, params);

View File

@ -36,11 +36,7 @@ export class FreightComponentsUserComponent extends BasicTableComponent implemen
this.st?.load(1); this.st?.load(1);
} }
ngOnInit() { ngOnInit() {}
this.ar.url.subscribe(params => {
this.st?.load(1);
});
}
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { certificationStatus: this.resourceStatus }); Object.assign(requestOptions.body, { certificationStatus: this.resourceStatus });

View File

@ -56,9 +56,6 @@ export class VehicleComponentsAuditComponent extends BasicTableComponent impleme
ngOnInit() { ngOnInit() {
this.initSF(); this.initSF();
this.initST(); this.initST();
this.ar.url.subscribe(params => {
this.st?.load(1);
});
} }
search() { search() {

View File

@ -48,9 +48,6 @@ export class VehicleComponentsListComponent extends BasicTableComponent implemen
ngOnInit() { ngOnInit() {
this.initSF(); this.initSF();
this.initST(); this.initST();
this.ar.url.subscribe(params => {
this.st?.load(1);
});
} }
dataProcess(data: STData[]): STData[] { dataProcess(data: STData[]): STData[] {
return data.map((i, index) => { return data.map((i, index) => {