浏览代码

样式调整

seimin 1 年之前
父节点
当前提交
1e36b0824d

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

@@ -8,6 +8,14 @@ import { ToolService } from './services/tool.service';
8
 })
8
 })
9
 export class AppComponent {
9
 export class AppComponent {
10
   constructor(private titleService:Title, private tool:ToolService){
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
   logoUrl = '';
8
   logoUrl = '';
9
   logoTitle = '';
9
   logoTitle = '';
10
 
10
 
11
-  constructor(private mainService: MainService) {
12
-    this.getSysNameAndLogo();
13
-  }
11
+  constructor(private mainService: MainService) {}
14
 
12
 
15
   // 获取logoUrl和logoTitle
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
         position: relative;
675
         position: relative;
676
 
676
 
677
         img {
677
         img {
678
-          width: 32px;
678
+          max-width: 100%;
679
+          max-height: 100%;
679
           vertical-align: middle;
680
           vertical-align: middle;
680
-          margin-right: 8px;
681
         }
681
         }
682
 
682
 
683
         span {
683
         span {
684
+          margin-left: 8px;
684
           color: #fff;
685
           color: #fff;
685
           font-weight: 600;
686
           font-weight: 600;
686
           font-size: 14px;
687
           font-size: 14px;

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

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

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

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

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

@@ -5,7 +5,7 @@
5
   justify-content: space-between;
5
   justify-content: space-between;
6
   .avatar {
6
   .avatar {
7
     width: 128px;
7
     width: 128px;
8
-    height: 128px;
8
+    max-height: 128px;
9
   }
9
   }
10
   .upload-icon {
10
   .upload-icon {
11
     font-size: 32px;
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
       workOrderSettings: [5, [Validators.required]],
52
       workOrderSettings: [5, [Validators.required]],
53
       nurseDeptSwitchTip: [0, [Validators.required]],
53
       nurseDeptSwitchTip: [0, [Validators.required]],
54
       updateTipsForNurses: [""],
54
       updateTipsForNurses: [""],
55
-      systemName: ["", [Validators.required]],
56
-      largeScreenName: ["", [Validators.required]],
57
-      logo: ["", [Validators.required]],
55
+      systemName: [""],
56
+      largeScreenName: [""],
57
+      logo: [""],
58
       defaultRoleOfNurse: [null, [Validators.required]],
58
       defaultRoleOfNurse: [null, [Validators.required]],
59
       formUrl: [{ value: null, disabled: true }, [Validators.required]],
59
       formUrl: [{ value: null, disabled: true }, [Validators.required]],
60
       serviceUrl: [{ value: null, disabled: true }, [Validators.required]],
60
       serviceUrl: [{ value: null, disabled: true }, [Validators.required]],

+ 1 - 1
src/index.html

@@ -11,7 +11,7 @@
11
   <meta http-equiv="Cache" content="no-cache">
11
   <meta http-equiv="Cache" content="no-cache">
12
   <meta name="renderer" content="webkit">
12
   <meta name="renderer" content="webkit">
13
   <meta name="viewport" content="width=device-width, initial-scale=1">
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
 </head>
15
 </head>
16
 
16
 
17
 <body>
17
 <body>