解决冲突

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 { ActivatedRoute, Router } from '@angular/router';
import { Component, OnInit, ViewChild, OnChanges } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
@ -21,7 +21,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
loading:boolean = true;
schema: SFSchema = this.initSF();
columns: STColumn[] = this.initST();
_$expand = false;
@ -58,11 +58,30 @@ export class SupplyManagementVehicleComponent implements OnInit {
if (this.resourceStatus) {
a.resourceStatus = this.resourceStatus;
}
this.loading = true
return {
...a
};
}
beforeReq = (requestOptions: STRequestOptions) => {
const params = Object.assign({}, this.sf?.value || {});
delete params._$expand;
const a: any = {
...params
};
if (this.resourceStatus) {
a.resourceStatus = this.resourceStatus;
}
if (this.sf) {
Object.assign(requestOptions.body, {
...a
});
}
this.loading = true;
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
this.loading = false
return data.map(item => ({
...item,
disabled: item.auditStatus !== '1',