import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { RhAppConfigService } from 'rh-base/core'; import { RhSafeAny } from 'rh-base/model'; import { RhMessageContentDto } from 'rh-itm/model'; import { SharedService } from '../../../shared/shared.service'; @Component({ selector: 'rh-skeleton-layer', templateUrl: './skeleton-layer.component.html', styleUrls: ['./skeleton-layer.component.less'] }) export class SkeletonLayerComponent implements OnInit { logoPath = ''; /** 当前公司名称 */ readonly companyName: string; readonly companyDisplayName: string; isShowPopupMenu = false; /** 当前消息内容 */ currentMessageContent!: RhMessageContentDto; constructor(public router: Router, private appconfig: RhAppConfigService, private sharedSer: SharedService) { this.companyDisplayName = (this.appconfig.appConfig as RhSafeAny).CompanyDisplayName; this.companyName = this.appconfig.appConfig.CompanyName as string; this.logoPath = `./assets/pages/logo_${this.companyName}.png`; } ngOnInit(): void { // this.subscribeMessageContent(); this.sharedSer.popupMenuVisibleSubject$.subscribe((status) => { this.isShowPopupMenu = status; }); } returnToDefaultPage() { this.router.navigate([`${this.appconfig.projectConfig.MainPath}${this.appconfig.projectConfig.MainPagePath}`]); } // ********** 多播订阅 ********** private subscribeMessageContent() { this.sharedSer.messageContent$.subscribe((result) => { if (result) { this.currentMessageContent = this.sharedSer.currentMessageContent = result; } }); } }