import { Component, OnInit, Input } from '@angular/core'; import { NzModalRef } from 'ng-zorro-antd/modal'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; import { handleType,handleTypeList } from 'src/app/pages/license/inform/inform.component'; @Component({ selector: 'app-edit-update-of-license', templateUrl: './edit-update-of-license.component.html', styleUrls: ['./edit-update-of-license.component.scss'] }) export class EditUpdateOfLicenseComponent implements OnInit { @Input() data?: any; validateForm!: FormGroup; constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } ngOnInit(): void { this.validateForm = this.fb.group({ name: [this.data.licenseName, [Validators.required]], handleRemindDays: [this.data.handleRemindDays, [Validators.required]], closingRemindDays: [this.data.closingRemindDays, [Validators.required]], handleType: [this.data.handleTypes, [Validators.required]], isEctype: [this.data.hasAttachment, [Validators.required]], isYearlyCheck: [this.data.isYearlyCheck, [Validators.required]] }); } destroyModal(): void { this.modal.destroy({ data: 'this the result data' }); } handleTypeList: handleTypeList[] = new handleType().list; //办理类型list }