This commit is contained in:
Taric Xin
2022-02-16 17:25:35 +08:00
parent 888103ed65
commit c0801a94d6
3 changed files with 23 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content" [title]="'企业详情'">
<page-header-wrapper [logo]="logo" [content]="content" [title]="'企业详情'" [ngClass]="{'affix': scrollTop>210}">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>

View File

@ -18,4 +18,13 @@
.user-info-des {
margin-bottom: 5px;
}
}
:host::ng-deep {
.affix {
position: fixed !important;
top : 20px !important;
z-index : 999 !important;
width : 100% !important;
}
}

View File

@ -1,4 +1,4 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { apiConf } from '@conf/api.conf';
import { STColumn, STComponent } from '@delon/abc/st';
@ -6,6 +6,8 @@ import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/fo
import { DatePipe, ModalHelper, _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { logging } from 'protractor';
import { fromEvent, Subscription } from 'rxjs';
import { UsermanageService } from '../../../../services/usercenter.service';
@Component({
@ -14,7 +16,7 @@ import { UsermanageService } from '../../../../services/usercenter.service';
styleUrls: ['./detail.component.less'],
providers: [DatePipe]
})
export class FreightComponentsListDetailComponent implements OnInit {
export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
@ViewChild('approvedModal', { static: false })
approvedModal!: any;
@ViewChild('redectModal', { static: false })
@ -41,16 +43,25 @@ export class FreightComponentsListDetailComponent implements OnInit {
};
billEvaluate = null;
scrollTop = 0;
subscribeScoll!: Subscription;
constructor(
public service: UsermanageService,
private route: ActivatedRoute,
private nzModalService: NzModalService,
private datePipe: DatePipe
) {}
ngOnDestroy(): void {
this.subscribeScoll.unsubscribe();
}
ngOnInit() {
this.initData();
this.loadltdId();
this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => {
this.scrollTop = document.documentElement.scrollTop;
});
}
loadltdId() {
this.service.getNetworkFreightForwarder().subscribe(res => {