Browse Source

页面样式调整

seimin 3 years ago
parent
commit
426b488759

+ 2 - 2
src/app/views/hospital-config/hospital-config.component.html

@@ -1,5 +1,5 @@
1 1
 <div class="hospitalConfig" *ngIf="!isLoading">
2
-  <div class="main">
2
+  <overlay-scrollbars #osComponentRef1 class="main">
3 3
     <h2>院区系统配置</h2>
4 4
     <form nz-form [formGroup]="validateForm" class="forms">
5 5
       <div class="form">
@@ -357,7 +357,7 @@
357 357
         </nz-form-item>
358 358
       </div>
359 359
     </form>
360
-  </div>
360
+  </overlay-scrollbars>
361 361
   <div class="submit">
362 362
     <button
363 363
       [disabled]="!coopBtns.edit"

+ 1 - 0
src/app/views/hospital-config/hospital-config.component.less

@@ -4,6 +4,7 @@
4 4
   flex-direction: column;
5 5
   justify-content: space-between;
6 6
   .main {
7
+    height: calc(100vh - 161px);
7 8
     h2 {
8 9
       height: 60px;
9 10
       line-height: 60px;

+ 7 - 2
src/app/views/hospital-config/hospital-config.component.ts

@@ -1,4 +1,4 @@
1
-import { Component, OnInit } from "@angular/core";
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2 2
 import {
3 3
   FormBuilder,
4 4
   FormGroup,
@@ -11,6 +11,7 @@ import { Subject } from "rxjs";
11 11
 import { debounceTime } from "rxjs/operators";
12 12
 import { MainService } from "src/app/services/main.service";
13 13
 import { ToolService } from "src/app/services/tool.service";
14
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
14 15
 
15 16
 @Component({
16 17
   selector: "app-hospital-config",
@@ -42,7 +43,11 @@ export class HospitalConfigComponent implements OnInit {
42 43
     private tool: ToolService,
43 44
     private message: NzMessageService
44 45
   ) {}
45
-
46
+  @ViewChild("osComponentRef1", {
47
+    read: OverlayScrollbarsComponent,
48
+    static: false,
49
+  })
50
+  osComponentRef1: OverlayScrollbarsComponent;
46 51
   ngOnInit() {
47 52
     this.hosId = this.tool.getCurrentHospital().id;
48 53
     this.onSearchSubject.pipe(debounceTime(500)).subscribe((v) => {

+ 2 - 2
src/app/views/sys-config/sys-config.component.html

@@ -1,5 +1,5 @@
1 1
 <div class="sysConfig" *ngIf="!loading1&&!loading4">
2
-  <div class="main">
2
+  <overlay-scrollbars #osComponentRef1 class="main">
3 3
     <h2>系统配置</h2>
4 4
     <form nz-form [formGroup]="validateForm" class="forms">
5 5
       <div class="form">
@@ -114,7 +114,7 @@
114 114
         </nz-form-item>
115 115
       </div>
116 116
     </form>
117
-  </div>
117
+  </overlay-scrollbars>
118 118
   <div class="submit">
119 119
     <button [disabled]="!coopBtns.edit" nz-button nzType="primary" class="save" (click)="submitForm()"
120 120
       [nzLoading]="loading2">保存</button>

+ 1 - 0
src/app/views/sys-config/sys-config.component.less

@@ -4,6 +4,7 @@
4 4
   flex-direction: column;
5 5
   justify-content: space-between;
6 6
   .main {
7
+    height: calc(100vh - 161px);
7 8
     h2 {
8 9
       font-size: 22px;
9 10
       color: #333;

+ 7 - 2
src/app/views/sys-config/sys-config.component.ts

@@ -1,8 +1,9 @@
1
-import { Component, OnInit } from "@angular/core";
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2 2
 import { FormBuilder, FormGroup, Validators } from "@angular/forms";
3 3
 import { ActivatedRoute } from "@angular/router";
4 4
 import { MainService } from "../../services/main.service";
5 5
 import { ToolService } from "src/app/services/tool.service";
6
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
6 7
 
7 8
 @Component({
8 9
   selector: "app-sys-config",
@@ -29,7 +30,11 @@ export class SysConfigComponent implements OnInit {
29 30
     private route: ActivatedRoute,
30 31
     private tool: ToolService
31 32
   ) {}
32
-
33
+  @ViewChild("osComponentRef1", {
34
+    read: OverlayScrollbarsComponent,
35
+    static: false,
36
+  })
37
+  osComponentRef1: OverlayScrollbarsComponent;
33 38
   ngOnInit() {
34 39
     this.validateForm = this.fb.group({
35 40
       defaultPwd: [null, [Validators.required]],