fix bug
This commit is contained in:
		| @ -134,6 +134,9 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { | ||||
|               return of([]); | ||||
|             } | ||||
|           }, | ||||
|           change: (q: any) => { | ||||
|             this.getRegionCode(q); | ||||
|           }, | ||||
|           visibleIf: { | ||||
|             _$expand: (value: boolean) => value, | ||||
|           }, | ||||
| @ -144,13 +147,11 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { | ||||
|         title: '所属项目', | ||||
|         ui: { | ||||
|           widget: 'select', | ||||
|           allowClear: true, | ||||
|           placeholder: '请选择', | ||||
|           visibleIf: { | ||||
|             _$expand: (value: boolean) => value, | ||||
|             _$expand: (value: boolean) => value | ||||
|           }, | ||||
|           asyncData: () => | ||||
|             this.shipperSrv.getEnterpriseProject() | ||||
|         } as SFSelectWidgetSchema, | ||||
|         } as SFSelectWidgetSchema | ||||
|       }, | ||||
|       driverName: { | ||||
|         title: '承运司机', | ||||
| @ -214,4 +215,25 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { | ||||
|   resetSF() { | ||||
|     this.sf.reset(); | ||||
|   } | ||||
|        // 获取城市列表 | ||||
|        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