Browse Source

logo和title

seimin 1 year ago
parent
commit
5796d14cf3

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

@@ -1,12 +1,13 @@
1
 import { Component } from '@angular/core';
1
 import { Component } from '@angular/core';
2
 import { Title } from '@angular/platform-browser';
2
 import { Title } from '@angular/platform-browser';
3
+import { ToolService } from './services/tool.service';
3
 @Component({
4
 @Component({
4
   selector: 'app-root',
5
   selector: 'app-root',
5
   templateUrl: './app.component.html',
6
   templateUrl: './app.component.html',
6
   styleUrls: ['./app.component.less']
7
   styleUrls: ['./app.component.less']
7
 })
8
 })
8
 export class AppComponent {
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
 export class ToolService {
7
 export class ToolService {
8
   constructor(private mainService: MainService) {}
8
   constructor(private mainService: MainService) {}
9
+  logoUrl = '/assets/images/login_logo.png';
10
+  logoTitle = '大势医院输送保障管理平台';
11
+
9
   // 获取权限中的院区
12
   // 获取权限中的院区
10
   getHospitalList() {
13
   getHospitalList() {
11
     return (
14
     return (

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

@@ -9,10 +9,10 @@
9
       <div
9
       <div
10
         class="sidebar-logo display_flex align-items_center justify-content_flex-center"
10
         class="sidebar-logo display_flex align-items_center justify-content_flex-center"
11
       >
11
       >
12
-        <div>
12
+        <div style="line-height: normal;">
13
           <!-- <img src="../../assets/images/xiehe_logo.jpg" style="width:100%;" alt="logo" /> -->
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
         </div>
16
         </div>
17
       </div>
17
       </div>
18
       <div
18
       <div

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

@@ -2,8 +2,8 @@
2
   <div class="loginBox">
2
   <div class="loginBox">
3
     <!-- 标题 -->
3
     <!-- 标题 -->
4
     <div class="title">
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
     </div>
7
     </div>
8
     <!-- 登录表单 -->
8
     <!-- 登录表单 -->
9
     <div class="content">
9
     <div class="content">

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

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

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

@@ -1,9 +1,9 @@
1
 <nz-layout class="app-layout display_flex flex_auto ant-layout-has-sider">
1
 <nz-layout class="app-layout display_flex flex_auto ant-layout-has-sider">
2
   <overlay-scrollbars #osComponentRef1 class="menu-sidebar">
2
   <overlay-scrollbars #osComponentRef1 class="menu-sidebar">
3
     <div class="sidebar-logo display_flex align-items_center">
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
       </div>
7
       </div>
8
     </div>
8
     </div>
9
     <!-- 导航重写,兼容chrome39 -->
9
     <!-- 导航重写,兼容chrome39 -->

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

@@ -2,8 +2,8 @@
2
   <!-- 头部 start -->
2
   <!-- 头部 start -->
3
   <div class="pharmacy-header">
3
   <div class="pharmacy-header">
4
     <div class="pharmacy-logo">
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
     </div>
7
     </div>
8
     <div class="pharmacy-name">
8
     <div class="pharmacy-name">
9
       <h2 class="pharmacy-name__title">药房</h2>
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
 import { MainService } from "../../services/main.service";
2
 import { MainService } from "../../services/main.service";
3
 import { Router } from "@angular/router";
3
 import { Router } from "@angular/router";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
+import { ToolService } from 'src/app/services/tool.service';
5
 
6
 
6
 @Component({
7
 @Component({
7
   selector: "app-pharmacy",
8
   selector: "app-pharmacy",
@@ -24,7 +25,7 @@ export class PharmacyComponent implements OnInit {
24
     static: false,
25
     static: false,
25
   })
26
   })
26
   osComponentRef3: OverlayScrollbarsComponent;
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
   codes = [];
30
   codes = [];
30
   // 待配药
31
   // 待配药

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

@@ -3,11 +3,11 @@
3
   <div class="pharmacy-header">
3
   <div class="pharmacy-header">
4
     <div class="pharmacy-logo">
4
     <div class="pharmacy-logo">
5
       <img
5
       <img
6
-        src="./../../assets/images/login_logo.png"
6
+        [src]="tool.logoUrl"
7
         class="pharmacy-logo__img"
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
     </div>
11
     </div>
12
     <div class="pharmacy-name">
12
     <div class="pharmacy-name">
13
       <h2 class="pharmacy-name__title">
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
 import { Router } from "@angular/router";
3
 import { Router } from "@angular/router";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
 import { startOfDay, format, endOfDay } from "date-fns";
5
 import { startOfDay, format, endOfDay } from "date-fns";
6
+import { ToolService } from 'src/app/services/tool.service';
6
 
7
 
7
 @Component({
8
 @Component({
8
   selector: "app-pharmacy2",
9
   selector: "app-pharmacy2",
@@ -35,7 +36,7 @@ export class Pharmacy2Component implements OnInit, OnDestroy {
35
     static: false,
36
     static: false,
36
   })
37
   })
37
   osComponentRef5: OverlayScrollbarsComponent;
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
   todayTotal: undefined;
41
   todayTotal: undefined;
41
   // 今日已完成
42
   // 今日已完成

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

@@ -3,11 +3,11 @@
3
   <div class="pharmacy-header">
3
   <div class="pharmacy-header">
4
     <div class="pharmacy-logo">
4
     <div class="pharmacy-logo">
5
       <img
5
       <img
6
-        src="./../../assets/images/login_logo.png"
6
+        [src]="tool.logoUrl"
7
         class="pharmacy-logo__img"
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
     </div>
11
     </div>
12
     <div class="pharmacy-name">
12
     <div class="pharmacy-name">
13
       <h2 class="pharmacy-name__title">
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
 import { Router } from "@angular/router";
3
 import { Router } from "@angular/router";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
 import { startOfDay, format, endOfDay } from "date-fns";
5
 import { startOfDay, format, endOfDay } from "date-fns";
6
+import { ToolService } from 'src/app/services/tool.service';
6
 
7
 
7
 @Component({
8
 @Component({
8
   selector: "app-specimen-view2",
9
   selector: "app-specimen-view2",
@@ -35,7 +36,7 @@ export class SpecimenView2Component implements OnInit, OnDestroy {
35
     static: false,
36
     static: false,
36
   })
37
   })
37
   osComponentRef5: OverlayScrollbarsComponent;
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
   todayTotal: undefined;
41
   todayTotal: undefined;
41
   // 今日已完成
42
   // 今日已完成