warrior 8 months ago
parent
commit
5d591cfada

BIN
projects/textbook/public/file/模板.doc


+ 14 - 14
projects/textbook/src/app/comp-user/comp-user.component.scss

@@ -45,17 +45,17 @@
   text-align: left;
 }
 
-.login-content {
-  position     : absolute;
-  transform    : translate(-50%, -50%);
-  top          : 50%;
-  left        : 50%;
-  padding      : 10px 50px;
-  text-align   : center;
-  width        : 944px;
-  min-height   : 518px;
-  margin       : 0 auto;
-  background   : #fff;
-  border-radius: 8px;
-  overflow     : hidden;
-}
+// .login-content {
+//   position     : absolute;
+//   transform    : translate(-50%, -50%);
+//   top          : 50%;
+//   left        : 50%;
+//   padding      : 10px 50px;
+//   text-align   : center;
+//   width        : 944px;
+//   min-height   : 518px;
+//   margin       : 0 auto;
+//   background   : #fff;
+//   border-radius: 8px;
+//   overflow     : hidden;
+// }

+ 230 - 105
projects/textbook/src/modules/login/account-info/account-info.component.html

@@ -1,65 +1,130 @@
-<div class="region">
-  <div class="nav">
-    <div>
-      <svg width="24" height="27" viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">
-        <path
-          d="M18 2H4C3.46957 2 2.96086 2.21071 2.58579 2.58579C2.21071 2.96086 2 3.46957 2 4C2 4.53043 2.21071 5.03914 2.58579 5.41421C2.96086 5.78929 3.46957 6 4 6H18V19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H4C2.93913 20 1.92172 19.5786 1.17157 18.8284C0.421427 18.0783 0 17.0609 0 16V4C0 2.93913 0.421427 1.92172 1.17157 1.17157C1.92172 0.421427 2.93913 0 4 0H17C17.2652 0 17.5196 0.105357 17.7071 0.292893C17.8946 0.48043 18 0.734783 18 1V2Z"
-          fill="url(#paint0_linear_5_11023)" />
-        <defs>
-          <linearGradient id="paint0_linear_5_11023" x1="9" y1="-2.21282e-07" x2="25.5" y2="40"
-            gradientUnits="userSpaceOnUse">
-            <stop stop-color="#E04860" />
-            <stop offset="1" stop-color="#E99306" />
-          </linearGradient>
-        </defs>
-      </svg>
-    </div>
-    完善账号信息
-    <div class="tips">
-      欢迎使用“十四五”高等教育国家规划教材申报系统 ,为了激活账号使用权限,请先完善您的资料信息。
+<div class="all">
+  <div class="region">
+    <div class="nav">
+      <div>
+        <svg
+          width="24"
+          height="27"
+          viewBox="0 0 18 20"
+          fill="none"
+          xmlns="http://www.w3.org/2000/svg"
+        >
+          <path
+            d="M18 2H4C3.46957 2 2.96086 2.21071 2.58579 2.58579C2.21071 2.96086 2 3.46957 2 4C2 4.53043 2.21071 5.03914 2.58579 5.41421C2.96086 5.78929 3.46957 6 4 6H18V19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H4C2.93913 20 1.92172 19.5786 1.17157 18.8284C0.421427 18.0783 0 17.0609 0 16V4C0 2.93913 0.421427 1.92172 1.17157 1.17157C1.92172 0.421427 2.93913 0 4 0H17C17.2652 0 17.5196 0.105357 17.7071 0.292893C17.8946 0.48043 18 0.734783 18 1V2Z"
+            fill="url(#paint0_linear_5_11023)"
+          />
+          <defs>
+            <linearGradient
+              id="paint0_linear_5_11023"
+              x1="9"
+              y1="-2.21282e-07"
+              x2="25.5"
+              y2="40"
+              gradientUnits="userSpaceOnUse"
+            >
+              <stop stop-color="#E04860" />
+              <stop offset="1" stop-color="#E99306" />
+            </linearGradient>
+          </defs>
+        </svg>
+      </div>
+      完善账号信息
+      <div class="tips">
+        欢迎使用“十四五”高等教育国家规划教材申报系统
+        ,为了激活账号使用权限,请先完善您的资料信息。
+      </div>
     </div>
-  </div>
-  <div class="form">
-    <form nz-form [formGroup]="validateForm" class="account-form" (ngSubmit)="submitForm()">
-      <nz-form-item nz-row nzJustify="space-between">
-        <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true" nzRequired>姓名</nz-form-label>
-        <nz-input-group nz-col nzSpan="16">
-          <input nz-input type="text" formControlName="name" placeholder="请输入真实姓名" />
-        </nz-input-group>
-      </nz-form-item>
-      @if (validateForm.value.identity!='工作联系人') {
-      <nz-form-item nz-row nzJustify="space-between">
-        <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true">手机号</nz-form-label>
-        <nz-input-group nz-col nzSpan="16">
-          <input nz-input type="text" formControlName="phone" [disabled]="true" placeholder="请输入手机号" maxlength="11" />
-        </nz-input-group>
-      </nz-form-item>
-      }
-
-      <nz-form-item nz-row nzJustify="space-between">
-        <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true" nzRequired>电子邮箱</nz-form-label>
-        <nz-input-group nz-col nzSpan="16">
-          <input nz-input type="email" [disabled]="user?.get('email')" formControlName="email" placeholder="请输入电子邮箱" />
-        </nz-input-group>
-      </nz-form-item>
-
+    <div class="form">
+      <form
+        nz-form
+        [formGroup]="validateForm"
+        class="account-form"
+        (ngSubmit)="submitForm()"
+      >
+        <nz-form-item nz-row nzJustify="space-between">
+          <nz-form-label
+            nz-col
+            nzSpan="6"
+            class="label"
+            [nzNoColon]="true"
+            nzRequired
+            >姓名</nz-form-label
+          >
+          <nz-input-group nz-col nzSpan="16">
+            <input
+              nz-input
+              type="text"
+              formControlName="name"
+              placeholder="请输入真实姓名"
+            />
+          </nz-input-group>
+        </nz-form-item>
+        @if (validateForm.value.identity!='工作联系人') {
+        <nz-form-item nz-row nzJustify="space-between">
+          <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true"
+            >手机号</nz-form-label
+          >
+          <nz-input-group nz-col nzSpan="16">
+            <input
+              nz-input
+              type="text"
+              formControlName="phone"
+              [disabled]="true"
+              placeholder="请输入手机号"
+              maxlength="11"
+            />
+          </nz-input-group>
+        </nz-form-item>
+        }
 
+        <nz-form-item nz-row nzJustify="space-between">
+          <nz-form-label
+            nz-col
+            nzSpan="6"
+            class="label"
+            [nzNoColon]="true"
+            nzRequired
+            >电子邮箱</nz-form-label
+          >
+          <nz-input-group nz-col nzSpan="16">
+            <input
+              nz-input
+              type="email"
+              [disabled]="user?.get('email')"
+              formControlName="email"
+              placeholder="请输入电子邮箱"
+            />
+          </nz-input-group>
+        </nz-form-item>
 
-      <nz-form-item nz-row nzJustify="space-between">
-        <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true" nzRequired>人员类型</nz-form-label>
-        <nz-input-group nz-col nzSpan="16">
-          <nz-select style="width: 100%" nzShowSearch nzAllowClear nzPlaceHolder="请选择您在本次教材遴选推荐中所属的身份类型" formControlName="identity">
-            @for(item of userType; track item;let index = $index){
-            <nz-option nzCustomContent [nzValue]="item" [nzLabel]="item">{{
-              item
+        <nz-form-item nz-row nzJustify="space-between">
+          <nz-form-label
+            nz-col
+            nzSpan="6"
+            class="label"
+            [nzNoColon]="true"
+            nzRequired
+            >人员类型</nz-form-label
+          >
+          <nz-input-group nz-col nzSpan="16">
+            <nz-select
+              style="width: 100%"
+              nzShowSearch
+              nzAllowClear
+              nzPlaceHolder="请选择您在本次教材遴选推荐中所属的身份类型"
+              formControlName="identity"
+            >
+              @for(item of userType; track item;let index = $index){
+              <nz-option nzCustomContent [nzValue]="item" [nzLabel]="item">{{
+                item
               }}</nz-option>
-            }
-          </nz-select>
-        </nz-input-group>
-      </nz-form-item>
-      <!-- validateForm.value.identity=='工作联系人' -->
-      @if (true) {
-      <!-- <nz-form-item nz-row nzJustify="space-between">
+              }
+            </nz-select>
+          </nz-input-group>
+        </nz-form-item>
+        <!-- validateForm.value.identity=='工作联系人' -->
+        @if (validateForm.value.identity == '工作联系人') {
+        <!-- <nz-form-item nz-row nzJustify="space-between">
         <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true">办公电话</nz-form-label>
         <nz-input-group nz-col nzSpan="16">
           <input nz-input type="text" formControlName="telephone" placeholder="请填写办公电话" />
@@ -78,33 +143,67 @@
         </nz-input-group>
       </nz-form-item> -->
 
-      <nz-form-item nz-row nzJustify="space-between">
-        <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true" nzRequired>单位类型</nz-form-label>
-        <nz-input-group nz-col nzSpan="16">
-          <nz-select style="width: 100%" nzShowSearch nzAllowClear nzPlaceHolder="请选择所在单位类型" formControlName="companyType"
-            (ngModelChange)="provinceChange('', true)">
-            @for(item of unitTypes; track item.name;let index = $index){
-            <nz-option nzCustomContent [nzValue]="item.name" [nzLabel]="item.name">{{
-              item.name
-              }}</nz-option>
-            }
-          </nz-select>
-        </nz-input-group>
-      </nz-form-item>
-      <nz-form-item nz-row nzJustify="space-between">
-        <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true" nzRequired>单位名称</nz-form-label>
-        <nz-input-group nz-col nzSpan="16">
-          <nz-select style="width: 100%" nzShowSearch nzAllowClear nzPlaceHolder="请输入所在单位名称" [(ngModel)]="companyId"
-            (nzOnSearch)="provinceChange($event)" [ngModelOptions]="{ standalone: true }">
-            @for(item of companys; track item;let index = $index){
-            <nz-option nzCustomContent [nzValue]="item.id" [nzLabel]="item.name">{{
-              item.name
-              }}</nz-option>
-            }
-          </nz-select>
-        </nz-input-group>
-      </nz-form-item>
-      <!-- <nz-form-item nz-row nzJustify="space-between">
+        <nz-form-item nz-row nzJustify="space-between">
+          <nz-form-label
+            nz-col
+            nzSpan="6"
+            class="label"
+            [nzNoColon]="true"
+            nzRequired
+            >单位类型</nz-form-label
+          >
+          <nz-input-group nz-col nzSpan="16">
+            <nz-select
+              style="width: 100%"
+              nzShowSearch
+              nzAllowClear
+              nzPlaceHolder="请选择所在单位类型"
+              [(ngModel)]="companyType"
+              [ngModelOptions]="{ standalone: true }"
+              (ngModelChange)="provinceChange('', true)"
+            >
+              @for(item of unitTypes; track item.name;let index = $index){
+              <nz-option
+                nzCustomContent
+                [nzValue]="item.name"
+                [nzLabel]="item.name"
+                >{{ item.name }}</nz-option
+              >
+              }
+            </nz-select>
+          </nz-input-group>
+        </nz-form-item>
+        <nz-form-item nz-row nzJustify="space-between">
+          <nz-form-label
+            nz-col
+            nzSpan="6"
+            class="label"
+            [nzNoColon]="true"
+            nzRequired
+            >单位名称</nz-form-label
+          >
+          <nz-input-group nz-col nzSpan="16">
+            <nz-select
+              style="width: 100%"
+              nzShowSearch
+              nzAllowClear
+              nzPlaceHolder="请输入所在单位名称"
+              [(ngModel)]="companyId"
+              (nzOnSearch)="provinceChange($event)"
+              [ngModelOptions]="{ standalone: true }"
+            >
+              @for(item of companys; track item;let index = $index){
+              <nz-option
+                nzCustomContent
+                [nzValue]="item.id"
+                [nzLabel]="item.name"
+                >{{ item.name }}</nz-option
+              >
+              }
+            </nz-select>
+          </nz-input-group>
+        </nz-form-item>
+        <!-- <nz-form-item nz-row nzJustify="space-between">
         <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true">所在部门</nz-form-label>
         <nz-input-group nz-col nzSpan="16">
           <input nz-input type="text" formControlName="departmentName" placeholder="请填写所在部门" />
@@ -116,7 +215,7 @@
           <input nz-input type="text" formControlName="postName" placeholder="请填写职务" />
         </nz-input-group>
       </nz-form-item> -->
-      <!-- <nz-form-item>
+        <!-- <nz-form-item>
         <nz-form-label class="label" [nzNoColon]="true" nzRequired
           >身份证号</nz-form-label
         >
@@ -129,26 +228,51 @@
           />
         </nz-input-group>
       </nz-form-item> -->
-      <nz-form-item nz-row nzJustify="space-between">
-        <nz-form-label nz-col nzSpan="6" class="label" [nzNoColon]="true" nzRequired>单位联系人认证文件</nz-form-label>
-        <nz-input-group nz-col nzSpan="16">
-          <div style="background: var(--palette-grey---semi-grey-1, #EAE6E6);width: 120px;padding: 5px 10px;border-radius: 5px;">
-            <app-comp-upload [width]="320" (change)="upload($event)" title="上传认证文件"></app-comp-upload>
-          </div>
-          <div class="text" style="margin: 10px 0; color: #231c1f99">
-            请 <a href="">下载单位联系人认证文件模板</a>,填写盖章后上传 PDF 格式,单个文件大小不超过 2M
-            <!-- 请<a href="">下载单位联系人认证文件模板</a>,填写盖章后上传。支持上传 PDF、JPG、JPEG、PNG
+        <nz-form-item nz-row nzJustify="space-between">
+          <nz-form-label
+            nz-col
+            nzSpan="6"
+            class="label"
+            [nzNoColon]="true"
+            nzRequired
+            >单位联系人认证文件</nz-form-label
+          >
+          <nz-input-group nz-col nzSpan="16">
+            <div
+              style="
+                background: var(--palette-grey---semi-grey-1, #eae6e6);
+                width: 120px;
+                padding: 5px 10px;
+                border-radius: 5px;
+              "
+            >
+              <app-comp-upload
+                [width]="320"
+                (change)="upload($event)"
+                title="上传认证文件"
+              ></app-comp-upload>
+            </div>
+            <div class="text" style="margin: 10px 0; color: #231c1f99">
+              请 <a href="/file/模板.doc" download='模板'>下载单位联系人认证文件模板</a>,填写盖章后上传 PDF
+              格式,单个文件大小不超过 2M
+              <!-- 请<a href="">下载单位联系人认证文件模板</a>,填写盖章后上传。支持上传 PDF、JPG、JPEG、PNG
             格式,单个文件大小不超过 2M -->
-          </div>
-        </nz-input-group>
-      </nz-form-item>
-      }
-    </form>
+            </div>
+          </nz-input-group>
+        </nz-form-item>
+        }
+      </form>
 
-    <button id="basic" class="form-button" type="button" mat-button (click)="submitForm()">
-      提交
-    </button>
-    <!-- <div class="menu">
+      <button
+        id="basic"
+        class="form-button"
+        type="button"
+        mat-button
+        (click)="submitForm()"
+      >
+        提交
+      </button>
+      <!-- <div class="menu">
       <a nz-dropdown [nzDropdownMenu]="menu">
         <span style="color: #231c1f99">English</span>
         <span
@@ -164,5 +288,6 @@
         </ul>
       </nz-dropdown-menu>
     </div> -->
+    </div>
   </div>
-</div>
+</div>

+ 14 - 0
projects/textbook/src/modules/login/account-info/account-info.component.scss

@@ -1,3 +1,17 @@
+.all {
+  position     : absolute;
+  transform    : translate(-50%, -50%);
+  top          : 50%;
+  left        : 50%;
+  padding      : 10px 50px;
+  text-align   : center;
+  width        : 944px;
+  min-height   : 518px;
+  margin       : 0 auto;
+  background   : #fff;
+  border-radius: 8px;
+  overflow     : hidden;
+}
 .region {
   width: 600px;
   margin: 20px auto 10px;

+ 23 - 19
projects/textbook/src/modules/login/account-info/account-info.component.ts

@@ -38,6 +38,7 @@ import { NzGridModule } from 'ng-zorro-antd/grid';
   styleUrls: ['./account-info.component.scss'],
 })
 export class AccountInfoComponent implements OnInit {
+  url:string = `"http://hep-textbook.oss-cn-beijing.aliyuncs.com/6687b9417f823ff53c74cfd6/2024-7-15/1721044465100-%E2%80%9C%E5%8D%81%E5%9B%9B%E4%BA%94%E2%80%9D%E6%99%AE%E9%80%9A%E9%AB%98%E7%AD%89%E6%95%99%E8%82%B2%E6%9C%AC%E7%A7%91%E5%9B%BD%E5%AE%B6%E7%BA%A7%E8%A7%84%E5%88%92%E6%95%99%E6%9D%90%E6%8E%A8%E8%8D%90%E9%81%B4%E9%80%89%E5%B7%A5%E4%BD%9C%E8%81%94%E7%B3%BB%E4%BA%BA%E4%BF%A1%E6%81%AF%E8%A1%A8.doc"`
   user: Parse.Object | undefined;
   validateForm: FormGroup<{
     name: FormControl<string>; //姓名
@@ -46,7 +47,6 @@ export class AccountInfoComponent implements OnInit {
     // telephone: FormControl<string>; //办公电话
     // province: FormControl<string>; //省份
     identity: FormControl<string>; //人员类型
-    companyType: FormControl<string>; //单位类型
     // idcard: FormControl<string>; //身份证号
     // departmentName: FormControl<string>; //所在部门
     // postName: FormControl<string>; //职务
@@ -57,11 +57,12 @@ export class AccountInfoComponent implements OnInit {
     // telephone: [''],
     // province: [''],
     identity: ['', [Validators.required]],
-    companyType: ['', [Validators.required]],
     // idcard: ['', [Validators.required]],
     // departmentName: [''],
     // postName: [''],
   });
+  companyType: string = ''; //单位类型
+
   identityFile: string = ''; //单位联系人认证文件
   companyId: string = ''; //单位名称
 
@@ -104,12 +105,12 @@ export class AccountInfoComponent implements OnInit {
       // telephone: [profile?.get('telephone') || ''],
       // province: [user?.get('province') || ''],
       identity: [profile?.get('identity') || '', [Validators.required]],
-      companyType: [profile?.get('companyType') || '', [Validators.required]],
       // departmentName: [user?.get('departmentName') || ''],
       // postName: [profile?.get('postName') || ''],
     });
     this.identityFile = profile?.get('identityFile') || ''
     this.companyId = user?.get('department')?.id || '';
+    this.companyType = profile?.get('companyType') || ''
     this.provinceChange();
     // console.log(this.companyId, this.identityFile);
     // console.log(this.validateForm.value);
@@ -130,10 +131,9 @@ export class AccountInfoComponent implements OnInit {
     // console.log(val);
     if (isChange) this.companyId = '';
     this.companys = [];
-    let parent = this.unitTypes.find(item=>item.name == this.validateForm.value.companyType)
+    let parent = this.unitTypes.find(item=>item.name == this.companyType)
     console.log(parent);
     let query = new Parse.Query('Department');
-    // query.equalTo('branch', this.validateForm.value.companyType);
     query.equalTo('parent', parent.id);
     query.select('name', 'branch');
     query.limit(100);
@@ -147,7 +147,7 @@ export class AccountInfoComponent implements OnInit {
     console.log(this.validateForm.value);
     console.log(this.companyId);
     if (this.validateForm.valid) {
-      if (!this.companyId) {
+      if (!this.companyId && this.validateForm.value.identity == '工作联系人') {
         this.message.error('单位名称未选择或与单位类型不匹配,请重新选择');
         return;
       }
@@ -157,7 +157,7 @@ export class AccountInfoComponent implements OnInit {
         this.message.error('邮箱格式不正确');
         return;
       }
-      if (!this.identityFile) {
+      if (!this.identityFile && this.validateForm.value.identity == '工作联系人') {
         this.message.error('请上传单位联系人认证文件');
         return;
       }
@@ -179,22 +179,24 @@ export class AccountInfoComponent implements OnInit {
     queryDepart.equalTo('objectId', this.companyId);
     queryDepart.select('objectId');
     let depart = await queryDepart.first()
-    if(!depart?.id){
+    if(!depart?.id && this.validateForm.value.identity == '工作联系人'){
       this.message.error('单位名称未选择或与单位类型不匹配,请重新选择');
       return;
     }
     this.user?.set('name', params.name);
     this.user?.set('email', params.email);
     this.user?.set('phone', params.phone);
-    this.user?.set('province', params.province);
+    // this.user?.set('province', params.province);
     this.user?.set('companyName', depart?.get('name'));
-    this.user?.set('department', {
-      __type: 'Pointer',
-      className: 'Department',
-      objectId: depart?.id,
-    });
+    if(this.validateForm.value.identity == '工作联系人'){
+      this.user?.set('department', {
+        __type: 'Pointer',
+        className: 'Department',
+        objectId: depart?.id,
+      });
+    }
     !this.user?.get('accountState') && this.user?.set('accountState', '待认证');
-    this.user?.set('departmentName', params.departmentName);
+    // this.user?.set('departmentName', params.departmentName);
     await this.user?.save();
 
     let query = new Parse.Query('Profile');
@@ -211,13 +213,15 @@ export class AccountInfoComponent implements OnInit {
       className: 'Company',
       objectId: this.tbookSer.company,
     });
-    profile?.set('telephone', params.telephone);
-    profile?.set('companyType', params.companyType);
+    // profile?.set('telephone', params.telephone);
+    if(this.validateForm.value.identity == '工作联系人'){
+      profile?.set('companyType', this.companyType);
+      profile?.set('identityFile', this.identityFile);
+    }
     profile?.set('email', params.email);
     // profile?.set('idcard', params.idcard);
+    // profile?.set('postName', params.postName);
     profile?.set('identity', params.identity);
-    profile?.set('identityFile', this.identityFile);
-    profile?.set('postName', params.postName);
     let res = await profile?.save();
     this.modal.success({
       nzTitle: '提交成功',

+ 44 - 42
projects/textbook/src/modules/login/login/login.component.html

@@ -1,46 +1,48 @@
-<div class="region">
-  <div class="nav">
-    <div>
-      <svg
-        width="24"
-        height="27"
-        viewBox="0 0 18 20"
-        fill="none"
-        xmlns="http://www.w3.org/2000/svg"
-      >
-        <path
-          d="M18 2H4C3.46957 2 2.96086 2.21071 2.58579 2.58579C2.21071 2.96086 2 3.46957 2 4C2 4.53043 2.21071 5.03914 2.58579 5.41421C2.96086 5.78929 3.46957 6 4 6H18V19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H4C2.93913 20 1.92172 19.5786 1.17157 18.8284C0.421427 18.0783 0 17.0609 0 16V4C0 2.93913 0.421427 1.92172 1.17157 1.17157C1.92172 0.421427 2.93913 0 4 0H17C17.2652 0 17.5196 0.105357 17.7071 0.292893C17.8946 0.48043 18 0.734783 18 1V2Z"
-          fill="url(#paint0_linear_5_11023)"
-        />
-        <defs>
-          <linearGradient
-            id="paint0_linear_5_11023"
-            x1="9"
-            y1="-2.21282e-07"
-            x2="25.5"
-            y2="40"
-            gradientUnits="userSpaceOnUse"
+<div class="all">
+  <div class="region">
+    <div class="nav">
+      <div>
+        <svg
+          width="24"
+          height="27"
+          viewBox="0 0 18 20"
+          fill="none"
+          xmlns="http://www.w3.org/2000/svg"
+        >
+          <path
+            d="M18 2H4C3.46957 2 2.96086 2.21071 2.58579 2.58579C2.21071 2.96086 2 3.46957 2 4C2 4.53043 2.21071 5.03914 2.58579 5.41421C2.96086 5.78929 3.46957 6 4 6H18V19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H4C2.93913 20 1.92172 19.5786 1.17157 18.8284C0.421427 18.0783 0 17.0609 0 16V4C0 2.93913 0.421427 1.92172 1.17157 1.17157C1.92172 0.421427 2.93913 0 4 0H17C17.2652 0 17.5196 0.105357 17.7071 0.292893C17.8946 0.48043 18 0.734783 18 1V2Z"
+            fill="url(#paint0_linear_5_11023)"
+          />
+          <defs>
+            <linearGradient
+              id="paint0_linear_5_11023"
+              x1="9"
+              y1="-2.21282e-07"
+              x2="25.5"
+              y2="40"
+              gradientUnits="userSpaceOnUse"
+            >
+              <stop stop-color="#E04860" />
+              <stop offset="1" stop-color="#E99306" />
+            </linearGradient>
+          </defs>
+        </svg>
+      </div>
+      登录教材遴选管理系统
+    </div>
+    <div class="form">
+      <nz-tabset [nzSelectedIndex]="active" (nzSelectChange)="onChange($event)">
+        <nz-tab nzTitle="密码登录">
+          <form
+            nz-form
+            [formGroup]="validateForm"
+            class="login-form"
+            (ngSubmit)="submitForm('account')"
           >
-            <stop stop-color="#E04860" />
-            <stop offset="1" stop-color="#E99306" />
-          </linearGradient>
-        </defs>
-      </svg>
+            <div id="authing-guard-container"></div>
+          </form>
+        </nz-tab>
+      </nz-tabset>
     </div>
-    登录教材遴选管理系统
-  </div>
-  <div class="form">
-    <nz-tabset [nzSelectedIndex]="active" (nzSelectChange)="onChange($event)">
-      <nz-tab nzTitle="密码登录">
-        <form
-          nz-form
-          [formGroup]="validateForm"
-          class="login-form"
-          (ngSubmit)="submitForm('account')"
-        >
-          <div id="authing-guard-container"></div>
-        </form>
-      </nz-tab>
-    </nz-tabset>
   </div>
 </div>

+ 14 - 0
projects/textbook/src/modules/login/login/login.component.scss

@@ -1,3 +1,17 @@
+.all {
+  position: absolute;
+  transform: translateY(-50%);
+  top: 50%;
+  right: 100px;
+  padding: 10px 50px;
+  text-align: center;
+  width: 448px;
+  min-height: 536px;
+  margin: 0 auto;
+  background: #fff;
+  border-radius: 8px;
+  overflow: hidden;
+}
 .region {
   width: 348px;
   margin: 20px auto 10px;

+ 44 - 42
projects/textbook/src/modules/login/register/register.component.html

@@ -1,46 +1,48 @@
-<div class="region">
-  <div class="nav">
-    <div>
-      <svg
-        width="24"
-        height="27"
-        viewBox="0 0 18 20"
-        fill="none"
-        xmlns="http://www.w3.org/2000/svg"
-      >
-        <path
-          d="M18 2H4C3.46957 2 2.96086 2.21071 2.58579 2.58579C2.21071 2.96086 2 3.46957 2 4C2 4.53043 2.21071 5.03914 2.58579 5.41421C2.96086 5.78929 3.46957 6 4 6H18V19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H4C2.93913 20 1.92172 19.5786 1.17157 18.8284C0.421427 18.0783 0 17.0609 0 16V4C0 2.93913 0.421427 1.92172 1.17157 1.17157C1.92172 0.421427 2.93913 0 4 0H17C17.2652 0 17.5196 0.105357 17.7071 0.292893C17.8946 0.48043 18 0.734783 18 1V2Z"
-          fill="url(#paint0_linear_5_11023)"
-        />
-        <defs>
-          <linearGradient
-            id="paint0_linear_5_11023"
-            x1="9"
-            y1="-2.21282e-07"
-            x2="25.5"
-            y2="40"
-            gradientUnits="userSpaceOnUse"
+<div class="all">
+  <div class="region">
+    <div class="nav">
+      <div>
+        <svg
+          width="24"
+          height="27"
+          viewBox="0 0 18 20"
+          fill="none"
+          xmlns="http://www.w3.org/2000/svg"
+        >
+          <path
+            d="M18 2H4C3.46957 2 2.96086 2.21071 2.58579 2.58579C2.21071 2.96086 2 3.46957 2 4C2 4.53043 2.21071 5.03914 2.58579 5.41421C2.96086 5.78929 3.46957 6 4 6H18V19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H4C2.93913 20 1.92172 19.5786 1.17157 18.8284C0.421427 18.0783 0 17.0609 0 16V4C0 2.93913 0.421427 1.92172 1.17157 1.17157C1.92172 0.421427 2.93913 0 4 0H17C17.2652 0 17.5196 0.105357 17.7071 0.292893C17.8946 0.48043 18 0.734783 18 1V2Z"
+            fill="url(#paint0_linear_5_11023)"
+          />
+          <defs>
+            <linearGradient
+              id="paint0_linear_5_11023"
+              x1="9"
+              y1="-2.21282e-07"
+              x2="25.5"
+              y2="40"
+              gradientUnits="userSpaceOnUse"
+            >
+              <stop stop-color="#E04860" />
+              <stop offset="1" stop-color="#E99306" />
+            </linearGradient>
+          </defs>
+        </svg>
+      </div>
+      登录教材遴选管理系统
+    </div>
+    <div class="form">
+      <nz-tabset [nzSelectedIndex]="active" (nzSelectChange)="onChange($event)">
+        <nz-tab nzTitle="密码登录">
+          <form
+            nz-form
+            [formGroup]="validateForm"
+            class="login-form"
+            (ngSubmit)="submitForm('account')"
           >
-            <stop stop-color="#E04860" />
-            <stop offset="1" stop-color="#E99306" />
-          </linearGradient>
-        </defs>
-      </svg>
+            <div id="authing-guard-container"></div>
+          </form>
+        </nz-tab>
+      </nz-tabset>
     </div>
-    登录教材遴选管理系统
-  </div>
-  <div class="form">
-    <nz-tabset [nzSelectedIndex]="active" (nzSelectChange)="onChange($event)">
-      <nz-tab nzTitle="密码登录">
-        <form
-          nz-form
-          [formGroup]="validateForm"
-          class="login-form"
-          (ngSubmit)="submitForm('account')"
-        >
-          <div id="authing-guard-container"></div>
-        </form>
-      </nz-tab>
-    </nz-tabset>
   </div>
 </div>

+ 14 - 0
projects/textbook/src/modules/login/register/register.component.scss

@@ -1,3 +1,17 @@
+.all {
+  position: absolute;
+  transform: translateY(-50%);
+  top: 50%;
+  right: 100px;
+  padding: 10px 50px;
+  text-align: center;
+  width: 448px;
+  min-height: 536px;
+  margin: 0 auto;
+  background: #fff;
+  border-radius: 8px;
+  overflow: hidden;
+}
 .region {
   width: 348px;
   margin: 20px auto 10px;