解决冲突

This commit is contained in:
wangshiming
2022-02-25 15:23:50 +08:00
parent a6c2aa38c4
commit 9629a9ee72
4 changed files with 62 additions and 15 deletions

View File

@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared';
@ -24,6 +24,7 @@ export class SupplyManagementBulkComponent implements OnInit {
schema: SFSchema = {};
auditMany = false;
isVisible = false;
loading: boolean = true;
auditID: any;
_$expand = false;
columns: STColumn[] = [];
@ -74,12 +75,37 @@ export class SupplyManagementBulkComponent implements OnInit {
},
};
}
beforeReq = (requestOptions: STRequestOptions) => {
const a:any = {};
if(this.resourceStatus) {
a.resourceStatus = this.resourceStatus
}
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
if (this.sf) {
Object.assign(requestOptions.body, {
...a,
...params,
releaseTime: {
start: this.sf?.value?.releaseTime?.[0] || '',
end: this.sf?.value?.releaseTime?.[1] || '',
},
deadlineTime: {
start: this.sf?.value?.deadlineTime?.[0] || '',
end: this.sf?.value?.deadlineTime?.[1] || '',
},
});
}
this.loading = true;
return requestOptions;
};
search() {
this.st?.load(1);
this.getGoodsSourceStatistical()
}
afterRes = (data: any[], rawData?: any) => {
console.log(data)
this.loading = false
return data.map(item => ({
...item,
disabled: item.auditStatus !== '1'