Update user-editer.component.ts

This commit is contained in:
MaxKey 2022-05-09 18:13:13 +08:00
parent 0ffbe343a1
commit 7ab853d393

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core'; import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
@ -137,7 +136,7 @@ export class UserEditerComponent implements OnInit {
e.preventDefault(); e.preventDefault();
this.form.submitting = true; this.form.submitting = true;
this.form.model.trans(); this.form.model.trans();
(this.isEdit ? this.usersService.update(this.form.model) : this.usersService.update(this.form.model)).subscribe(res => { (this.isEdit ? this.usersService.update(this.form.model) : this.usersService.add(this.form.model)).subscribe(res => {
if (res.code == 0) { if (res.code == 0) {
this.msg.success(`提交成功`); this.msg.success(`提交成功`);
} else { } else {