fix bug
This commit is contained in:
		| @ -165,6 +165,9 @@ export class OrderManagementComplianceAuditComponent implements OnInit { | ||||
|               } else { | ||||
|                 return of([]); | ||||
|               } | ||||
|             }, | ||||
|             change: (q: any) => { | ||||
|               this.getRegionCode(q); | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
| @ -174,13 +177,10 @@ export class OrderManagementComplianceAuditComponent implements OnInit { | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             allowClear: true, | ||||
|             asyncData: () => this.service.getEnterpriseProject(), | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value | ||||
|             } | ||||
|           }, | ||||
|           default: '' | ||||
|             }, | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         loadingPlace: { | ||||
|           type: 'string', | ||||
| @ -283,7 +283,27 @@ export class OrderManagementComplianceAuditComponent implements OnInit { | ||||
|     }; | ||||
|     this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; | ||||
|   } | ||||
|  | ||||
|      // 获取城市列表 | ||||
|      getRegionCode(regionCode: any) { | ||||
|       console.log(regionCode); | ||||
|       return this.service | ||||
|         .request(this.service.$api_get_enterprise_project, { id: regionCode }) | ||||
|         .pipe( | ||||
|           map(res => | ||||
|             res.map((item: any) => ({ | ||||
|               label: item.projectName, | ||||
|               value: item.id | ||||
|             })) | ||||
|           ) | ||||
|         ) | ||||
|         .subscribe(res => { | ||||
|           this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; | ||||
|           this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); | ||||
|           // if (this.enterpriseProjectIds) { | ||||
|           //   this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); | ||||
|           // } | ||||
|         }); | ||||
|     } | ||||
|   /** | ||||
|    * 初始化数据列表 | ||||
|    */ | ||||
|  | ||||
		Reference in New Issue
	
	Block a user