Browse Source

样式调整

seimin 1 year ago
parent
commit
1e36b0824d

+ 9 - 1
src/app/app.component.ts

@@ -8,6 +8,14 @@ import { ToolService } from './services/tool.service';
8 8
 })
9 9
 export class AppComponent {
10 10
   constructor(private titleService:Title, private tool:ToolService){
11
-    this.titleService.setTitle(this.tool.logoTitle);
11
+    this.tool.getSysNameAndLogoAsync().subscribe(result => {
12
+      let logoTitle = '';
13
+      let logoUrl = result.logo || '';
14
+      this.tool.setSysName(logoTitle);
15
+      this.tool.setLogo(logoUrl);
16
+      this.titleService.setTitle(this.tool.logoTitle);
17
+      console.log(document.querySelector('#favicon'));
18
+      (document.querySelector('#favicon') as any).href = this.tool.logoUrl;
19
+    })
12 20
   }
13 21
 }

+ 13 - 9
src/app/services/tool.service.ts

@@ -8,17 +8,21 @@ export class ToolService {
8 8
   logoUrl = '';
9 9
   logoTitle = '';
10 10
 
11
-  constructor(private mainService: MainService) {
12
-    this.getSysNameAndLogo();
13
-  }
11
+  constructor(private mainService: MainService) {}
14 12
 
15 13
   // 获取logoUrl和logoTitle
16
-  getSysNameAndLogo(){
17
-    this.mainService.getSysNameAndLogo().subscribe(result => {
18
-      console.log(result);
19
-      this.logoTitle = result.sysName || '大势医院输送保障管理平台';
20
-      this.logoUrl = result.logo || '/assets/images/login_logo.png';
21
-    })
14
+  getSysNameAndLogoAsync(){
15
+    return this.mainService.getSysNameAndLogo();
16
+  }
17
+
18
+  // 设置logoTitle
19
+  setSysName(logoTitle){
20
+    this.logoTitle = logoTitle;
21
+  }
22
+
23
+  // 设置logoUrl
24
+  setLogo(logoUrl){
25
+    this.logoUrl = logoUrl;
22 26
   }
23 27
 
24 28
   // 获取权限中的院区

+ 3 - 2
src/app/views/hushijiandan/hushijiandan.component.less

@@ -675,12 +675,13 @@
675 675
         position: relative;
676 676
 
677 677
         img {
678
-          width: 32px;
678
+          max-width: 100%;
679
+          max-height: 100%;
679 680
           vertical-align: middle;
680
-          margin-right: 8px;
681 681
         }
682 682
 
683 683
         span {
684
+          margin-left: 8px;
684 685
           color: #fff;
685 686
           font-weight: 600;
686 687
           font-size: 14px;

+ 3 - 2
src/app/views/login/login.component.less

@@ -27,9 +27,10 @@
27 27
       bottom: 100%;
28 28
 
29 29
       img {
30
-        width: 60px;
31 30
         height: 48px;
32
-        margin-right: 8px;
31
+      }
32
+      strong{
33
+        margin-left: 8px;
33 34
       }
34 35
     }
35 36
 

+ 3 - 2
src/app/views/main/main.component.less

@@ -122,13 +122,13 @@ nz-sider {
122 122
 .sidebar-logo {
123 123
   position: relative;
124 124
   height: 88px;
125
-  padding-left: 8px;
126 125
   overflow: hidden;
127 126
   line-height: 64px;
128 127
   background: #001529;
129 128
   transition: all 0.3s;
130 129
 
131 130
   span {
131
+    margin-left: 8px;
132 132
     color: #fff;
133 133
     font-weight: 600;
134 134
     font-size: 13px;
@@ -137,7 +137,8 @@ nz-sider {
137 137
 
138 138
 .sidebar-logo img {
139 139
   display: inline-block;
140
-  width: 32px;
140
+  max-width: 100%;
141
+  max-height: 100%;
141 142
   vertical-align: middle;
142 143
 }
143 144
 

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

@@ -5,23 +5,23 @@
5 5
       <div class="form">
6 6
         <h3>基本配置</h3>
7 7
         <nz-form-item class="formItem">
8
-          <nz-form-label [nzSpan]="24" nzFor="systemName" nzRequired class="label">系统名称</nz-form-label>
8
+          <nz-form-label [nzSpan]="24" nzFor="systemName" class="label">系统名称</nz-form-label>
9 9
           <nz-form-control [nzSpan]="24" nzErrorTip="请输入系统名称!">
10 10
             <input nz-input formControlName="systemName" id="systemName" placeholder="请输入系统名称">
11 11
           </nz-form-control>
12 12
         </nz-form-item>
13 13
         <nz-form-item class="formItem">
14
-          <nz-form-label [nzSpan]="24" nzFor="largeScreenName" nzRequired class="label">名称</nz-form-label>
15
-          <nz-form-control [nzSpan]="24" nzErrorTip="请输入名称!">
16
-            <input nz-input formControlName="largeScreenName" id="largeScreenName" placeholder="请输入名称">
14
+          <nz-form-label [nzSpan]="24" nzFor="largeScreenName" class="label">大屏名称</nz-form-label>
15
+          <nz-form-control [nzSpan]="24" nzErrorTip="请输入大屏名称!">
16
+            <input nz-input formControlName="largeScreenName" id="largeScreenName" placeholder="请输入大屏名称">
17 17
           </nz-form-control>
18 18
         </nz-form-item>
19 19
         <nz-form-item class="formItem">
20
-          <nz-form-label [nzSpan]="24" class="label" nzFor="logo" nzRequired>系统logo</nz-form-label>
20
+          <nz-form-label [nzSpan]="24" class="label" nzFor="logo">系统logo</nz-form-label>
21 21
           <nz-form-control [nzSpan]="24" nzErrorTip="请选择系统logo!">
22 22
             <nz-upload nzFor="logo"
23 23
               class="avatar-uploader"
24
-              nzAction="/service/common/common/uploadAttachment/sysLogo/777/777" 
24
+              nzAction="/service/common/common/uploadAttachment/sysLogo/777/777"
25 25
               [nzCustomRequest]="customReq"
26 26
               nzName="file"
27 27
               nzListType="picture-card"

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

@@ -5,7 +5,7 @@
5 5
   justify-content: space-between;
6 6
   .avatar {
7 7
     width: 128px;
8
-    height: 128px;
8
+    max-height: 128px;
9 9
   }
10 10
   .upload-icon {
11 11
     font-size: 32px;

+ 3 - 3
src/app/views/sys-config/sys-config.component.ts

@@ -52,9 +52,9 @@ export class SysConfigComponent implements OnInit {
52 52
       workOrderSettings: [5, [Validators.required]],
53 53
       nurseDeptSwitchTip: [0, [Validators.required]],
54 54
       updateTipsForNurses: [""],
55
-      systemName: ["", [Validators.required]],
56
-      largeScreenName: ["", [Validators.required]],
57
-      logo: ["", [Validators.required]],
55
+      systemName: [""],
56
+      largeScreenName: [""],
57
+      logo: [""],
58 58
       defaultRoleOfNurse: [null, [Validators.required]],
59 59
       formUrl: [{ value: null, disabled: true }, [Validators.required]],
60 60
       serviceUrl: [{ value: null, disabled: true }, [Validators.required]],

+ 1 - 1
src/index.html

@@ -11,7 +11,7 @@
11 11
   <meta http-equiv="Cache" content="no-cache">
12 12
   <meta name="renderer" content="webkit">
13 13
   <meta name="viewport" content="width=device-width, initial-scale=1">
14
-  <link rel="icon" type="image/x-icon" href="favicon.ico">
14
+  <link rel="icon" id="favicon" type="image/x-icon" href="favicon.ico">
15 15
 </head>
16 16
 
17 17
 <body>