Browse Source

update 注册选择

warrior 7 months ago
parent
commit
c0b593c420

+ 3 - 2
projects/textbook/src/modules/login/account-info/account-info.component.html

@@ -146,8 +146,10 @@
               style="width: 100%"
               nzShowSearch
               nzAllowClear
+              [disabled]="true"
               nzPlaceHolder="请选择您在本次教材遴选推荐中所属的身份类型"
-              formControlName="identity"
+              [(ngModel)]="identity"
+              [ngModelOptions]="{ standalone: true }"
             >
               @for(item of userType; track item;let index = $index){
               <nz-option nzCustomContent [nzValue]="item" [nzLabel]="item">{{
@@ -191,7 +193,6 @@
               style="width: 100%"
               nzShowSearch
               nzAllowClear
-              [disabled]="true"
               nzPlaceHolder="请选择所在单位类型"
               [(ngModel)]="companyType"
               [ngModelOptions]="{ standalone: true }"

+ 4 - 3
projects/textbook/src/modules/login/account-info/account-info.component.ts

@@ -46,7 +46,7 @@ export class AccountInfoComponent implements OnInit {
     name: FormControl<string>; //姓名
     phone: FormControl<string>; //手机号
     email: FormControl<string>; //电子邮箱
-    identity: FormControl<string>; //人员类型
+    // identity: FormControl<string>; //人员类型
     // telephone: FormControl<string>; //办公电话
     // province: FormControl<string>; //省份
     // idcard: FormControl<string>; //身份证号
@@ -58,13 +58,14 @@ export class AccountInfoComponent implements OnInit {
     name: ['', [Validators.required]],
     phone: [''],
     email: ['', [Validators.required]],
-    identity: ['工作联系人', [Validators.required]],
+    // identity: ['工作联系人', [Validators.required]],
     // telephone: [''],
     // province: [''],
     // idcard: ['', [Validators.required]],
     // departmentName: [''],
     // postName: [''],
   });
+  identity:string = '工作联系人' //人员类型
   companyType: string = ''; //单位类型
 
   identityFile: string = ''; //单位联系人认证文件
@@ -246,7 +247,7 @@ export class AccountInfoComponent implements OnInit {
       profile?.set('email', params.email);
       // profile?.set('idcard', params.idcard);
       // profile?.set('postName', params.postName);
-      profile?.set('identity', params.identity);
+      profile?.set('identity', this.identity);
       let res = await profile?.save();
       this.loading = false
       this.modal.success({