This commit is contained in:
Taric Xin
2021-12-27 13:55:46 +08:00
parent 0f532ad744
commit cac371baf3
33 changed files with 59 additions and 79 deletions

View File

@ -51,7 +51,7 @@
<nz-card class="content-box" nzBordered>
<st #st [data]="service.$mock_url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: beforeReq }"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }"></st>

View File

@ -19,7 +19,6 @@ export class DriverAccountDetailComponent implements OnInit {
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
reqParams = {};
_$expand = false;
constructor(public service: FreightAccountService) {}
@ -27,7 +26,7 @@ export class DriverAccountDetailComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
this.reqParams = { ...this.sf.value };
Object.assign(requestOptions.body, { ...this.sf.value });
}
return requestOptions;
};

View File

@ -23,7 +23,7 @@
<nz-card class="content-box">
<st #st [data]="service.$mock_url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: beforeReq }"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ y: '370px' }">

View File

@ -17,7 +17,6 @@ export class DriverAccountComponent implements OnInit {
searchSchema: SFSchema = this.initSF();
columns: STColumn[] = this.initST();
reqParams = {};
_$expand = false;
constructor(public service: FreightAccountService, private router: Router) {}
@ -26,7 +25,7 @@ export class DriverAccountComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
this.reqParams = { ...this.sf.value };
Object.assign(requestOptions.body, { ...this.sf.value });
}
return requestOptions;
};