seimin il y a 1 an
Parent
commit
5796d14cf3

+ 3 - 2
src/app/app.component.ts

@@ -1,12 +1,13 @@
1 1
 import { Component } from '@angular/core';
2 2
 import { Title } from '@angular/platform-browser';
3
+import { ToolService } from './services/tool.service';
3 4
 @Component({
4 5
   selector: 'app-root',
5 6
   templateUrl: './app.component.html',
6 7
   styleUrls: ['./app.component.less']
7 8
 })
8 9
 export class AppComponent {
9
-  constructor(private titleService:Title){
10
-    this.titleService.setTitle('大势医院输送保障管理平台')
10
+  constructor(private titleService:Title, private tool:ToolService){
11
+    this.titleService.setTitle(this.tool.logoTitle);
11 12
   }
12 13
 }

+ 3 - 0
src/app/services/tool.service.ts

@@ -6,6 +6,9 @@ import { MainService } from "./main.service";
6 6
 })
7 7
 export class ToolService {
8 8
   constructor(private mainService: MainService) {}
9
+  logoUrl = '/assets/images/login_logo.png';
10
+  logoTitle = '大势医院输送保障管理平台';
11
+
9 12
   // 获取权限中的院区
10 13
   getHospitalList() {
11 14
     return (

+ 3 - 3
src/app/views/hushijiandan/hushijiandan.component.html

@@ -9,10 +9,10 @@
9 9
       <div
10 10
         class="sidebar-logo display_flex align-items_center justify-content_flex-center"
11 11
       >
12
-        <div>
12
+        <div style="line-height: normal;">
13 13
           <!-- <img src="../../assets/images/xiehe_logo.jpg" style="width:100%;" alt="logo" /> -->
14
-          <img src="../../assets/images/login_logo.png" alt="logo" />
15
-          <span>大势医院输送保障管理平台</span>
14
+          <img [src]="tool.logoUrl" alt="logo" />
15
+          <span>{{tool.logoTitle}}</span>
16 16
         </div>
17 17
       </div>
18 18
       <div

+ 2 - 2
src/app/views/login/login.component.html

@@ -2,8 +2,8 @@
2 2
   <div class="loginBox">
3 3
     <!-- 标题 -->
4 4
     <div class="title">
5
-      <img src="../../assets/images/login_logo@2.png" alt="大势医院输送保障管理平台">
6
-      <strong>大势医院输送保障管理平台</strong>
5
+      <img [src]="tool.logoUrl" [alt]="tool.logoTitle">
6
+      <strong>{{tool.logoTitle}}</strong>
7 7
     </div>
8 8
     <!-- 登录表单 -->
9 9
     <div class="content">

+ 3 - 1
src/app/views/login/login.component.ts

@@ -6,6 +6,7 @@ import { MainService } from "../../services/main.service";
6 6
 import http from "../../../assets/js/http";
7 7
 import { AES, mode, pad, enc } from "crypto-js";
8 8
 import { baseUrlType } from "src/app/type/types";
9
+import { ToolService } from 'src/app/services/tool.service';
9 10
 @Component({
10 11
   selector: "app-login",
11 12
   templateUrl: "./login.component.html",
@@ -20,7 +21,8 @@ export class LoginComponent implements OnInit {
20 21
     private router: Router,
21 22
     private fb: FormBuilder,
22 23
     private mainService: MainService,
23
-    private msg: NzMessageService
24
+    private msg: NzMessageService,
25
+    private tool: ToolService
24 26
   ) {}
25 27
   ngOnInit() {
26 28
     this.http = http;

+ 3 - 3
src/app/views/main/main.component.html

@@ -1,9 +1,9 @@
1 1
 <nz-layout class="app-layout display_flex flex_auto ant-layout-has-sider">
2 2
   <overlay-scrollbars #osComponentRef1 class="menu-sidebar">
3 3
     <div class="sidebar-logo display_flex align-items_center">
4
-      <div>
5
-        <img src="../../assets/images/login_logo.png" alt="大势医院输送保障管理平台">
6
-        <span>大势医院输送保障管理平台</span>
4
+      <div style="line-height: normal;">
5
+        <img [src]="tool.logoUrl" [alt]="tool.logoTitle">
6
+        <span>{{tool.logoTitle}}</span>
7 7
       </div>
8 8
     </div>
9 9
     <!-- 导航重写,兼容chrome39 -->

+ 2 - 2
src/app/views/pharmacy/pharmacy.component.html

@@ -2,8 +2,8 @@
2 2
   <!-- 头部 start -->
3 3
   <div class="pharmacy-header">
4 4
     <div class="pharmacy-logo">
5
-      <img src="./../../assets/images/login_logo.png" class="pharmacy-logo__img" alt="">
6
-      <h1 class="pharmacy-logo__name">大势医院输送保障管理平台</h1>
5
+      <img [src]="tool.logoUrl" class="pharmacy-logo__img" [alt]="tool.logoTitle">
6
+      <h1 class="pharmacy-logo__name">{{tool.logoTitle}}</h1>
7 7
     </div>
8 8
     <div class="pharmacy-name">
9 9
       <h2 class="pharmacy-name__title">药房</h2>

+ 2 - 1
src/app/views/pharmacy/pharmacy.component.ts

@@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from "@angular/core";
2 2
 import { MainService } from "../../services/main.service";
3 3
 import { Router } from "@angular/router";
4 4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
+import { ToolService } from 'src/app/services/tool.service';
5 6
 
6 7
 @Component({
7 8
   selector: "app-pharmacy",
@@ -24,7 +25,7 @@ export class PharmacyComponent implements OnInit {
24 25
     static: false,
25 26
   })
26 27
   osComponentRef3: OverlayScrollbarsComponent;
27
-  constructor(private mainService: MainService, public router: Router) {}
28
+  constructor(private mainService: MainService, public router: Router, private tool: ToolService) {}
28 29
   //待配药数据
29 30
   codes = [];
30 31
   // 待配药

+ 3 - 3
src/app/views/pharmacy2/pharmacy2.component.html

@@ -3,11 +3,11 @@
3 3
   <div class="pharmacy-header">
4 4
     <div class="pharmacy-logo">
5 5
       <img
6
-        src="./../../assets/images/login_logo.png"
6
+        [src]="tool.logoUrl"
7 7
         class="pharmacy-logo__img"
8
-        alt=""
8
+        [alt]="tool.logoTitle"
9 9
       />
10
-      <h1 class="pharmacy-logo__name">大势医院输送保障管理平台</h1>
10
+      <h1 class="pharmacy-logo__name">{{tool.logoTitle}}</h1>
11 11
     </div>
12 12
     <div class="pharmacy-name">
13 13
       <h2 class="pharmacy-name__title">

+ 2 - 1
src/app/views/pharmacy2/pharmacy2.component.ts

@@ -3,6 +3,7 @@ import { MainService } from "../../services/main.service";
3 3
 import { Router } from "@angular/router";
4 4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5 5
 import { startOfDay, format, endOfDay } from "date-fns";
6
+import { ToolService } from 'src/app/services/tool.service';
6 7
 
7 8
 @Component({
8 9
   selector: "app-pharmacy2",
@@ -35,7 +36,7 @@ export class Pharmacy2Component implements OnInit, OnDestroy {
35 36
     static: false,
36 37
   })
37 38
   osComponentRef5: OverlayScrollbarsComponent;
38
-  constructor(private mainService: MainService, public router: Router) {}
39
+  constructor(private mainService: MainService, public router: Router, private tool: ToolService) {}
39 40
   // 今日药单量
40 41
   todayTotal: undefined;
41 42
   // 今日已完成

+ 3 - 3
src/app/views/specimen-view2/specimen-view2.component.html

@@ -3,11 +3,11 @@
3 3
   <div class="pharmacy-header">
4 4
     <div class="pharmacy-logo">
5 5
       <img
6
-        src="./../../assets/images/login_logo.png"
6
+        [src]="tool.logoUrl"
7 7
         class="pharmacy-logo__img"
8
-        alt=""
8
+        [alt]="tool.logoTitle"
9 9
       />
10
-      <h1 class="pharmacy-logo__name">大势医院输送保障管理平台</h1>
10
+      <h1 class="pharmacy-logo__name">{{tool.logoTitle}}</h1>
11 11
     </div>
12 12
     <div class="pharmacy-name">
13 13
       <h2 class="pharmacy-name__title">

+ 2 - 1
src/app/views/specimen-view2/specimen-view2.component.ts

@@ -3,6 +3,7 @@ import { MainService } from "../../services/main.service";
3 3
 import { Router } from "@angular/router";
4 4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5 5
 import { startOfDay, format, endOfDay } from "date-fns";
6
+import { ToolService } from 'src/app/services/tool.service';
6 7
 
7 8
 @Component({
8 9
   selector: "app-specimen-view2",
@@ -35,7 +36,7 @@ export class SpecimenView2Component implements OnInit, OnDestroy {
35 36
     static: false,
36 37
   })
37 38
   osComponentRef5: OverlayScrollbarsComponent;
38
-  constructor(private mainService: MainService, public router: Router) {}
39
+  constructor(private mainService: MainService, public router: Router, private tool: ToolService) {}
39 40
   // 今日药单量
40 41
   todayTotal: undefined;
41 42
   // 今日已完成