我如何在一个数组内调用一个thats并使用它?

时间:2019-08-23 17:04:29

标签: angular typescript

我想查看客户约会,但是约会在result['price'] = result.eval('ProdTotal / qty') >>> result InvoiceNo totalamt Item# price qty MainCode ProdTotal 0 Inv_001 1720 260 1720.0 1 0 1720.0 1 Inv_002 1160 260 1060.0 1 0 1060.0 2 Inv_002 1160 111 100.0 1 0 100.0 数组中,而client'也是一个数组。用户已经有一个'appointments,我想创建一个mat-table,所以当我单击mat-table行时,它将弹出该user1中的所有users1个约会。但是我真的不明白如何对这些约会进行排序,这些约会有一个mat-table变量,但是我不知道如何使用它……

这是一个user_id数组,其中是约会数组。

User

这是Popup的ts文件:

{ 
    "id": 2, 
    "firstName": "ba", 
    "lastName": "ab", 
    "birthDate": null, 
    "cnp": "123", 
    "sex": null, 
    "city": "ab", 
    "country": "cat", 
    "phoneNumber": null, 
    "appointments": [{ 
        "id": 2, 
        "appointmentType": "HOLIDAY", 
        "appointmentStatus": "CONFIRMED", 
        "startTime": "2019-08-14T00:00:00.000+0000", 
        "endTime": "2019-08-13T00:00:00.000+0000", 
        "appointmentDescription": "jjjjjj" 
    }] 
}

这是主文件中的声明:

patientDetails: PatientDetails;
appdetails = new MatTableDataSource<ModelAppointment>();

displayedColumns: [string[]] = 'select', 'app_Id', 'appointmentDescription', 'appointmentStatus', 'appointmentType', 'app_start_time', 'app_end_time']

constructor(@Inject(MAT_DIALOG_DATA) public data: { appointments: any[] }, 

private patientRestService: PatientRestService) {
    this.patientDetails.appointments = this.appdetails
}

0 个答案:

没有答案