Merge branch 'develop'
This commit is contained in:
@ -30,7 +30,7 @@ module.exports = {
|
||||
// },
|
||||
'//api': {
|
||||
target: {
|
||||
host: 'tms-api-dev.eascs.com',
|
||||
host: 'tms-api-test.eascs.com',
|
||||
protocol: 'https:',
|
||||
port: 443
|
||||
},
|
||||
|
||||
@ -42,6 +42,7 @@ const APPINIT_PROVIDES = [
|
||||
multi: true
|
||||
},
|
||||
{ provide: DEFAULT_CURRENCY_CODE, useValue: '¥' },
|
||||
{ provide: RouteReuseStrategy, useClass: ReuseTabStrategy, deps: [ReuseTabService] },
|
||||
AuthGuard
|
||||
];
|
||||
// #endregion
|
||||
@ -55,6 +56,8 @@ import { SharedModule } from './shared/shared.module';
|
||||
import { STWidgetModule } from './shared/widget/st-widget.module';
|
||||
import { registerLocaleData } from '@angular/common';
|
||||
import { AuthGuard } from './core/guards/auth.guard';
|
||||
import { RouteReuseStrategy } from '@angular/router';
|
||||
import { ReuseTabService, ReuseTabStrategy } from '@delon/abc/reuse-tab';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #subLink let-i>
|
||||
<a *ngIf="!i.externalLink" [routerLink]="i.link" [target]="i.target">{{ i.text }} </a>
|
||||
<a *ngIf="!i.externalLink" (click)="routeTo(i.link)" [target]="i.target">{{ i.text }} </a>
|
||||
<a *ngIf="i.externalLink" [attr.href]="i.externalLink" [attr.target]="i.target">{{ i.text }} </a>
|
||||
</ng-template>
|
||||
<ul *ngIf="menus" nz-menu [nzMode]="mode" [nzTheme]="pro.theme"
|
||||
@ -22,7 +22,7 @@
|
||||
<ng-container *ngFor="let l1 of menus">
|
||||
<li *ngIf="l1.children!.length === 0" nz-menu-item class="alain-pro__menu-item"
|
||||
[class.alain-pro__menu-item--disabled]="l1.disabled" [nzSelected]="l1._selected" [nzDisabled]="l1.disabled">
|
||||
<a *ngIf="!l1.externalLink" [routerLink]="l1.link" (click)="closeCollapsed()" class="alain-pro__menu-title">
|
||||
<a *ngIf="!l1.externalLink" (click)="routeTo(l1.link);closeCollapsed()" class="alain-pro__menu-title">
|
||||
<ng-template [ngTemplateOutlet]="mainLink" [ngTemplateOutletContext]="{ $implicit: l1 }"></ng-template>
|
||||
</a>
|
||||
<a *ngIf="l1.externalLink" [attr.href]="l1.externalLink" [attr.target]="l1.target" (click)="closeCollapsed()"
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { ReuseTabService } from '@delon/abc/reuse-tab';
|
||||
import { MenuService } from '@delon/theme';
|
||||
import { InputBoolean } from '@delon/util';
|
||||
import { NzMenuModeType } from 'ng-zorro-antd/menu';
|
||||
@ -25,7 +26,13 @@ export class LayoutProMenuComponent implements OnInit, OnDestroy {
|
||||
@Input() @InputBoolean() disabledAcl = false;
|
||||
@Input() mode: NzMenuModeType = 'inline';
|
||||
|
||||
constructor(private menuSrv: MenuService, private router: Router, public pro: BrandService, private cdr: ChangeDetectorRef) {}
|
||||
constructor(
|
||||
private menuSrv: MenuService,
|
||||
private router: Router,
|
||||
public pro: BrandService,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private reuseService: ReuseTabService
|
||||
) {}
|
||||
|
||||
private cd(): void {
|
||||
this.cdr.markForCheck();
|
||||
@ -121,4 +128,11 @@ export class LayoutProMenuComponent implements OnInit, OnDestroy {
|
||||
unsubscribe$.next();
|
||||
unsubscribe$.complete();
|
||||
}
|
||||
|
||||
routeTo(link: string | undefined) {
|
||||
if (link) {
|
||||
this.reuseService.clear();
|
||||
this.router.navigate([link]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { OnReuseDestroy } from '@delon/abc/reuse-tab';
|
||||
import { SFComponent, SFSchema } from '@delon/form';
|
||||
import { SearchDrawerService } from '@shared';
|
||||
import { fromEvent, Subscription } from 'rxjs';
|
||||
@ -24,7 +25,7 @@ import { debounceTime } from 'rxjs/operators';
|
||||
@Component({
|
||||
template: ''
|
||||
})
|
||||
export class BasicTableComponent implements AfterViewInit, OnDestroy {
|
||||
export class BasicTableComponent implements AfterViewInit, OnDestroy, OnReuseDestroy {
|
||||
scrollY = '400px';
|
||||
|
||||
sf!: SFComponent;
|
||||
@ -35,6 +36,9 @@ export class BasicTableComponent implements AfterViewInit, OnDestroy {
|
||||
deviationHeight = 0;
|
||||
|
||||
constructor(public searchDrawerService: SearchDrawerService) {}
|
||||
_onReuseDestroy(): void {
|
||||
this.drawer.forEach(sub => sub.unsubscribe());
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
setTimeout(() => {
|
||||
|
||||
@ -144,7 +144,6 @@ export class MenuModalComponent implements OnInit {
|
||||
i18n: null,
|
||||
// i18n: this.sf?.value.keyCode,
|
||||
menuType: 0,
|
||||
reuse: 0,
|
||||
shortcut: 0,
|
||||
hideInBreadcrumb: 0,
|
||||
functionType: 0,
|
||||
|
||||
@ -214,7 +214,7 @@ export class BillingOrderComponent extends BasicTableComponent {
|
||||
className: 'text-center',
|
||||
index: 'paymentMethodRate',
|
||||
width: 130,
|
||||
format: record => `${record.paymentMethodRate}%`
|
||||
format: record => `${record.paymentMethodRate*100}%`
|
||||
},
|
||||
{ title: '货主名称', index: 'shipperAppUserName', width: '180px', className: 'text-center' },
|
||||
{ title: '所属项目', index: 'enterpriseProjectName', width: '180px', className: 'text-center' },
|
||||
|
||||
@ -46,12 +46,12 @@
|
||||
<li nz-menu-item (click)="creat()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-save']">
|
||||
新增企业
|
||||
</li>
|
||||
<!-- <li nz-menu-item (click)="editPartner()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-partner']">
|
||||
<li nz-menu-item (click)="editPartner()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-partner']">
|
||||
修改合伙人
|
||||
</li>
|
||||
<li nz-menu-item (click)="editSale()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-sale']">
|
||||
修改渠道销售
|
||||
</li> -->
|
||||
</li>
|
||||
</ul>
|
||||
</nz-dropdown-menu>
|
||||
</div>
|
||||
|
||||
@ -41,9 +41,6 @@ export class FreightComponentsListComponent extends BasicTableComponent implemen
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
this.ar.url.subscribe(params => {
|
||||
this.st?.load(1);
|
||||
});
|
||||
}
|
||||
|
||||
search() {
|
||||
@ -473,14 +470,14 @@ export class FreightComponentsListComponent extends BasicTableComponent implemen
|
||||
text: '分配客服<br>',
|
||||
click: item => this.showService(item)
|
||||
},
|
||||
// {
|
||||
// text: '修改合伙人',
|
||||
// click: item => this.editPartner(item)
|
||||
// },
|
||||
// {
|
||||
// text: '修改渠道销售',
|
||||
// click: item => this.editSale(item)
|
||||
// }
|
||||
{
|
||||
text: '修改合伙人',
|
||||
click: item => this.editPartner(item)
|
||||
},
|
||||
{
|
||||
text: '修改渠道销售',
|
||||
click: item => this.editSale(item)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user