解决冲突

This commit is contained in:
wangshiming
2022-03-01 13:59:37 +08:00
parent c20220da1d
commit c56013d9ea
2 changed files with 14 additions and 9 deletions

View File

@ -147,10 +147,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
onSearch: (q: any) => {
console.log(q)
if (q) {
console.log(q === ' ')
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q })
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
@ -158,8 +159,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
},
change: (q: any) => {
if (q) {
this.getRegionCode(q);
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
this.getRegionCode(str);
}
}
} as SFSelectWidgetSchema

View File

@ -135,9 +135,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
onSearch: (q: any) => {
if (q) {
console.log(q === ' ')
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q })
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
@ -145,8 +147,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
}
},
change: (q: any) => {
if (q) {
this.getRegionCode(q);
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
this.getRegionCode(str);
}
},
} as SFSelectWidgetSchema