UNPKG

@wjya/ngx-webapp-icpc.group.pms

Version:

angular webapp : icpc.group.pms

66 lines 5.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var forms_1 = require("@angular/forms"); var ReplyDialogComponent = /** @class */ (function () { function ReplyDialogComponent(fb) { this.fb = fb; this.clickSave = new core_1.EventEmitter(); this.modalIsVisible = false; this.keys = []; this.validateForm = this.fb.group({ id: [null], branchRegion: [null, [forms_1.Validators.required]], name: [null, [forms_1.Validators.required]], contacts: [null], phone: [null], remarks: [null], area: [null], province: [null], city: [null], county: [null], fullName: [null], address: [null], zipCode: [null] }); } ReplyDialogComponent.prototype.ngOnInit = function () { }; ReplyDialogComponent.prototype.getFormControl = function (name) { return this.validateForm.controls[name]; }; ReplyDialogComponent.prototype.setFormValue = function (dataRow) { this.modalIsVisible = true; // const data = new Community(dataRow); // this.validateForm.setValue(data); }; ReplyDialogComponent.prototype.resetForm = function () { this.keys = []; this.validateForm.reset(); for (var _i = 0, _a = Object.keys(this.validateForm.controls); _i < _a.length; _i++) { var key = _a[_i]; this.validateForm.controls[key].markAsPristine(); } }; ReplyDialogComponent.prototype.handleCancel = function () { this.modalIsVisible = false; }; ReplyDialogComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'zx-reply-dialog', template: "<nz-modal [nzVisible]=\"modalIsVisible\" [nzWidth]=\"600\" [nzTitle]=\"modalTitle\" [nzContent]=\"modalContent\" [nzFooter]=\"modalFooter\" (nzOnCancel)=\"handleCancel()\"><ng-template #modalTitle><span>\u6DFB\u52A0\u89C4\u5219</span> <span>\u8BF7\u8F93\u5165\u6DFB\u52A0\u89C4\u5219\u7684\u4FE1\u606F</span></ng-template><ng-template #modalContent><form nz-form [formGroup]=\"validateForm\"><div nz-form-item nz-row class=\"hidden\"><div nz-form-label nz-col [nzSpan]=\"24\"><label>ID</label></div><div nz-col [nzSpan]=\"24\" nz-form-control><nz-input formControlName=\"id\" [nzPlaceHolder]=\"'ID'\" [nzSize]=\"'large'\"></nz-input></div></div><div nz-form-item nz-row><div nz-form-label nz-col [nzSpan]=\"4\"><label nz-form-item-required>\u89C4\u5219\u540D\u79F0</label></div><div nz-col [nzSpan]=\"20\" nz-form-control nzHasFeedback><nz-input formControlName=\"name\" [nzPlaceHolder]=\"'\u8BF7\u8F93\u5165\u89C4\u5219\u540D\u79F0'\" [nzSize]=\"'large'\"></nz-input></div></div><div nz-form-item nz-row><div nz-form-label nz-col [nzSpan]=\"4\"><label nz-form-item-required>\u5173\u952E\u8BCD</label></div><div nz-col [nzSpan]=\"20\" nz-form-control><nz-select formControlName=\"contacts\" nzTags [nzPlaceHolder]=\"'\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u540E\u6309\u56DE\u8F66\u786E\u8BA4'\" [nzSize]=\"'large'\"><nz-option *ngFor=\"let option of searchOptions\" [nzLabel]=\"option.label\" [nzValue]=\"option\"></nz-option></nz-select></div></div><div nz-form-item nz-row><div nz-form-label nz-col [nzSpan]=\"4\"><label nz-form-item-required>\u5339\u914D\u7C7B\u578B</label></div><div nz-col [nzSpan]=\"20\" nz-form-control><nz-radio-group formControlName=\"phone\"><label nz-radio [nzValue]=\"'A'\"><span>\u5305\u542B\u5339\u914D(\u6BD4\u5982\u8BBE\u7F6E\u201C123\u201D\uFF0C\u56DE\u590D\u201C12\u201D\u5C31\u4F1A\u89E6\u53D1\u3002\uFF09</span></label> <label nz-radio [nzValue]=\"'B'\"><span>\u5B8C\u5168\u5339\u914D\uFF08\u6BD4\u5982\u8BBE\u7F6E\u201C123\u201D\uFF0C\u4EC5\u56DE\u590D\u201C123\u201D\u624D\u4F1A\u89E6\u53D1\u3002 \uFF09</span></label></nz-radio-group></div></div><div nz-form-item nz-row><div nz-form-label nz-col [nzSpan]=\"4\"><label nz-form-item-required>\u56DE\u590D\u5185\u5BB9</label></div><div nz-col [nzSpan]=\"20\" nz-form-control><nz-input formControlName=\"remarks\" [nzRows]=\"6\" [nzType]=\"'textarea'\" [nzPlaceHolder]=\"'\u8BF7\u8F93\u5165\u56DE\u590D\u5185\u5BB9'\" [nzSize]=\"'large'\"></nz-input></div></div></form></ng-template><ng-template #modalFooter><button nz-button [nzType]=\"'default'\" [nzSize]=\"'large'\" (click)=\"handleCancel()\"><span>\u53D6 \u6D88</span></button> <button nz-button [nzType]=\"'primary'\" [nzSize]=\"'large'\" (click)=\"onSave(validateForm.value)\" [disabled]=\"!validateForm.valid\"><span>\u4FDD \u5B58</span></button></ng-template></nz-modal>", styles: [ "\n :host .hidden {\n display: none;\n }\n " ] },] }, ]; /** @nocollapse */ ReplyDialogComponent.ctorParameters = function () { return [ { type: forms_1.FormBuilder, }, ]; }; ReplyDialogComponent.propDecorators = { "clickSave": [{ type: core_1.Output },], }; return ReplyDialogComponent; }()); exports.ReplyDialogComponent = ReplyDialogComponent; //# sourceMappingURL=reply-dialog.component.js.map