fix bug
This commit is contained in:
@ -20,7 +20,7 @@ module.exports = {
|
||||
// }
|
||||
'//api': {
|
||||
target: {
|
||||
host: 'tms-api-test.eascs.com',
|
||||
host: 'tms-api-dev.eascs.com',
|
||||
protocol: 'https:',
|
||||
port: 443
|
||||
},
|
||||
@ -30,7 +30,7 @@ module.exports = {
|
||||
},
|
||||
'//sascs': {
|
||||
target: {
|
||||
host: 'sascs-tj-tms-test.obs.cn-south-1.myhuaweicloud.com',
|
||||
host: 'sascs-tj-tms-dev.obs.cn-south-1.myhuaweicloud.com',
|
||||
protocol: 'https:',
|
||||
port: 443
|
||||
},
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
import { Component, ElementRef, OnInit, ViewChild, NgZone } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, NgZone } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { DatePipe, _HttpClient } from '@delon/theme';
|
||||
import { differenceInCalendarDays } from 'date-fns';
|
||||
import { DataService } from '../../../services/data.service';
|
||||
import { Chart } from '@antv/g2';
|
||||
import { BusitablePillarComponent } from './pillar/pillar.component';
|
||||
import { BusitablePillarComponent } from '../pillar/pillar.component';
|
||||
import { BusitableCurveComponent } from './curve/curve.component';
|
||||
|
||||
@Component({
|
||||
@ -36,11 +35,11 @@ export class DatatableBusiindexComponent implements OnInit {
|
||||
{ title: '合伙人数', index: 'partnerNumber', className: 'text-center' },
|
||||
{ title: '客户数', index: 'enterpriseNumbe', className: 'text-center' },
|
||||
{ title: '订单数', index: 'zsl', className: 'text-center' },
|
||||
{ title: '客户预存款', index: 'czcgje', className: 'text-center' },
|
||||
{ title: '客户预存款', index: 'czcgje', className: 'text-right', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.czcgje }) } },
|
||||
{ title: '业绩量', index: 'yisje', className: 'text-center' },
|
||||
{ title: '已收附加费', index: 'yisfjf', className: 'text-center' },
|
||||
{ title: '已收附加费', index: 'yisfjf', className: 'text-right', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yisfjf }) } },
|
||||
{ title: '平均附加费率', index: 'fjfl', className: 'text-center' },
|
||||
{ title: '已开票金额', index: 'ykpje', className: 'text-center' }
|
||||
{ title: '已开票金额', index: 'ykpje', className: 'text-right', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.ykpje }) } },
|
||||
];
|
||||
/**
|
||||
* 查询参数
|
||||
@ -119,11 +118,16 @@ export class DatatableBusiindexComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
onChangeNext(result: any) {
|
||||
if(result === null) {
|
||||
return
|
||||
}
|
||||
if(this.mode === 'year') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00']
|
||||
} else if(this.mode === 'month') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00']
|
||||
}
|
||||
|
||||
|
||||
this.flag = true
|
||||
this.initData()
|
||||
}
|
||||
|
||||
@ -33,8 +33,10 @@ export class BusitableCurveComponent implements OnInit, OnChanges {
|
||||
}
|
||||
render(el: ElementRef<HTMLDivElement>): void {
|
||||
this.el = el.nativeElement
|
||||
if(!this.service.http.loading){
|
||||
this.ngZone.runOutsideAngular(() => this.init(this.el));
|
||||
}
|
||||
}
|
||||
|
||||
private init(el: HTMLElement): void {
|
||||
this.chart = new Chart({
|
||||
|
||||
@ -38,4 +38,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<app-busitable-pillar #pillar [chartData]="chartData.performance"></app-busitable-pillar>
|
||||
</nz-card>
|
||||
@ -3,6 +3,7 @@ import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { DatePipe, _HttpClient } from '@delon/theme';
|
||||
import { differenceInCalendarDays } from 'date-fns';
|
||||
import { DataService } from '../../../services/data.service';
|
||||
import { BusitablePillarComponent } from '../pillar/pillar.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-datatable-mantable',
|
||||
@ -12,6 +13,7 @@ import { DataService } from '../../../services/data.service';
|
||||
|
||||
})
|
||||
export class DatatableMantableComponent implements OnInit {
|
||||
@ViewChild('pillar') private readonly pillar!: BusitablePillarComponent;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
type = 1;
|
||||
mode = 'year';
|
||||
@ -22,21 +24,23 @@ export class DatatableMantableComponent implements OnInit {
|
||||
today = new Date();
|
||||
dateNext: any = null;
|
||||
modeNext = 'year';
|
||||
chartData: any = {}
|
||||
timeNext: any = ['2022-01-01 00:00:00']
|
||||
flag = false;
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '部门', index: 'networkTransporterName', className: 'text-center' },
|
||||
{ title: '业务员', index: 'zsl', className: 'text-center' },
|
||||
{ title: '合伙人数', index: 'yingsje', className: 'text-center' },
|
||||
{ title: '客户数', index: 'cys', className: 'text-center' },
|
||||
{ title: '客户活跃率', index: 'yingfyf', className: 'text-center' },
|
||||
{ title: '客户预存款', index: 'yl', className: 'text-center' },
|
||||
{ title: '订单数', index: 'djd', className: 'text-center' },
|
||||
{ title: '订单金额', index: 'ysz', className: 'text-center' },
|
||||
{ title: '业绩量', index: 'yswc', className: 'text-center' },
|
||||
{ title: '附加费金额', index: 'yisje', className: 'text-center' },
|
||||
{ title: '平均附加费率', index: 'yifyf', className: 'text-center' },
|
||||
{ title: '已开票金额', index: 'yifyf', className: 'text-center' }
|
||||
{ title: '部门', index: 'bm', className: 'text-center' },
|
||||
{ title: '业务员', index: 'ywy', className: 'text-center' },
|
||||
{ title: '合伙人数', index: 'hhrs', className: 'text-center' },
|
||||
{ title: '客户数', index: 'khs', className: 'text-center' },
|
||||
{ title: '客户活跃率', index: 'khhyl', className: 'text-center' },
|
||||
{ title: '客户预存款', index: 'kfyck', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.kfyck }) } },
|
||||
{ title: '订单数', index: 'dds', className: 'text-center' },
|
||||
{ title: '订单金额', index: 'ddje', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.ddje }) } },
|
||||
{ title: '业绩量', index: 'yjl', className: 'text-center' },
|
||||
{ title: '附加费金额', index: 'fjfje', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfje }) } },
|
||||
{ title: '平均附加费率', index: 'pjfjl', className: 'text-center' },
|
||||
{ title: '已开票金额', index: 'ykpje', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.ykpje }) } },
|
||||
];
|
||||
/**
|
||||
* 查询参数
|
||||
@ -63,6 +67,26 @@ export class DatatableMantableComponent implements OnInit {
|
||||
constructor(public service: DataService, private datePipe: DatePipe) { }
|
||||
ngOnInit(): void { }
|
||||
|
||||
initData(){
|
||||
let type = 1
|
||||
if(this.mode === 'year') {
|
||||
type = 1
|
||||
} else if(this.mode === 'month') {
|
||||
type = 2
|
||||
}
|
||||
const params: any = {
|
||||
time: this.timeNext,
|
||||
type
|
||||
};
|
||||
this.service.request(this.service.$api_performanceReportHistogram, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.chartData = res
|
||||
if(this.flag) {
|
||||
this.pillar.reRender()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
changeData(){
|
||||
if(this.mode === 'year') {
|
||||
this.dateFormat = 'yyyy'
|
||||
@ -93,11 +117,16 @@ export class DatatableMantableComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
onChangeNext(result: any) {
|
||||
if(result === null) {
|
||||
return
|
||||
}
|
||||
if(this.mode === 'year') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00']
|
||||
} else if(this.mode === 'month') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00']
|
||||
}
|
||||
this.flag = true
|
||||
this.initData()
|
||||
}
|
||||
disabledDate = (current: Date): boolean =>
|
||||
// Can not select days before today and today
|
||||
|
||||
@ -91,6 +91,9 @@ export class DatatableComplianceIndexComponent implements OnInit {
|
||||
}
|
||||
|
||||
onChange(result: any) {
|
||||
if(result === null) {
|
||||
return
|
||||
}
|
||||
if(this.mode === 'year') {
|
||||
this.time = this.datePipe.transform(this.date, 'yyyy')
|
||||
} else if(this.mode === 'month') {
|
||||
|
||||
@ -42,10 +42,10 @@
|
||||
[page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }" [loading]="service.http.loading"></st>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="用户新增报表" [nzExtra]="extraTemplate">
|
||||
<ng-template #extraTemplate>
|
||||
<ng-template #extraTemplate01>
|
||||
<div class="chooseBox">
|
||||
<div class="timeBox">
|
||||
<nz-radio-group [(ngModel)]="mode" nzButtonStyle="solid" (ngModelChange)="changeData()">
|
||||
<nz-radio-group [(ngModel)]="modeNext" nzButtonStyle="solid" (ngModelChange)="changeDataNext()">
|
||||
<label nz-radio-button nzValue="year">年</label>
|
||||
<label nz-radio-button nzValue="month">月</label>
|
||||
</nz-radio-group>
|
||||
|
||||
@ -3,6 +3,7 @@ import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { DatePipe, _HttpClient } from '@delon/theme';
|
||||
import { differenceInCalendarDays } from 'date-fns';
|
||||
import { DataService } from '../../../services/data.service';
|
||||
import { OperationCurveComponent } from '../../operationtable/curve/curve.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-datatable-customindex',
|
||||
@ -13,6 +14,7 @@ import { DataService } from '../../../services/data.service';
|
||||
})
|
||||
export class DatatableCustomindexComponent implements OnInit {
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('curve') private readonly curve!: OperationCurveComponent;
|
||||
type = 1;
|
||||
mode = 'year';
|
||||
date: any = null;
|
||||
@ -24,6 +26,7 @@ export class DatatableCustomindexComponent implements OnInit {
|
||||
modeNext = 'year';
|
||||
timeNext: any = ['2022-01-01 00:00:00']
|
||||
chartData: any;
|
||||
flag = false;
|
||||
|
||||
|
||||
columns: STColumn[] = [
|
||||
@ -59,7 +62,30 @@ export class DatatableCustomindexComponent implements OnInit {
|
||||
}
|
||||
|
||||
constructor(public service: DataService, private datePipe: DatePipe) { }
|
||||
ngOnInit(): void { }
|
||||
ngOnInit(): void {
|
||||
this.initCurveData()
|
||||
}
|
||||
initCurveData() {
|
||||
let type = 1
|
||||
if (this.mode === 'year') {
|
||||
type = 1
|
||||
} else if (this.mode === 'month') {
|
||||
type = 2
|
||||
}
|
||||
const params: any = {
|
||||
time: this.timeNext,
|
||||
type
|
||||
};
|
||||
this.flag = true
|
||||
this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.chartData = res
|
||||
if (this.flag) {
|
||||
this.curve.reRender()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
changeData() {
|
||||
if (this.mode === 'year') {
|
||||
@ -86,22 +112,24 @@ export class DatatableCustomindexComponent implements OnInit {
|
||||
// Can not select days before today and today
|
||||
differenceInCalendarDays(current, this.today) > 0;
|
||||
|
||||
|
||||
changeDataNext() {
|
||||
if (this.mode === 'year') {
|
||||
if(this.mode === 'year') {
|
||||
this.dateFormat = 'yyyy'
|
||||
} else if (this.mode === 'month') {
|
||||
} else if(this.mode === 'month') {
|
||||
this.dateFormat = 'yyyy-MM'
|
||||
}
|
||||
}
|
||||
onChangeNext(result: any) {
|
||||
if (this.mode === 'year') {
|
||||
if(result === null) {
|
||||
return
|
||||
}
|
||||
if(this.mode === 'year') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00']
|
||||
} else if (this.mode === 'month') {
|
||||
} else if(this.mode === 'month') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00']
|
||||
}
|
||||
}
|
||||
exportFun() {
|
||||
|
||||
this.initCurveData()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -127,6 +127,9 @@ export class DatatableDriverComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
onChange(result: any) {
|
||||
if(result === null) {
|
||||
return
|
||||
}
|
||||
if (this.mode === 'year') {
|
||||
this.queryTime = [this.datePipe.transform(this.date, 'yyyy')]
|
||||
} else if (this.mode === 'month') {
|
||||
|
||||
@ -146,6 +146,9 @@ export class DatatableOwnerComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
onChange(result: any) {
|
||||
if(result === null) {
|
||||
return
|
||||
}
|
||||
if(this.mode === 'year') {
|
||||
this.time = [this.datePipe.transform(this.date, 'yyyy') + '-01-01 00:00:00']
|
||||
} else if(this.mode === 'month') {
|
||||
|
||||
@ -145,6 +145,9 @@ export class DatatableFinancetableComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
onChangeNext(result: any) {
|
||||
if(result === null) {
|
||||
return
|
||||
}
|
||||
if(this.mode === 'year') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00']
|
||||
} else if(this.mode === 'month') {
|
||||
|
||||
@ -33,9 +33,9 @@ export class OperationCurveComponent implements OnInit, OnChanges {
|
||||
}
|
||||
render(el: ElementRef<HTMLDivElement>): void {
|
||||
this.el = el.nativeElement
|
||||
setTimeout(() => {
|
||||
if(!this.service.http.loading){
|
||||
this.ngZone.runOutsideAngular(() => this.init(this.el));
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
private init(el: HTMLElement): void {
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<nz-card nzTitle="运营报表" [nzExtra]="extraTemplate01">
|
||||
<ng-template #extraTemplate01>
|
||||
<div class="chooseBox">
|
||||
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="initPillarData()">
|
||||
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="initPillarData(true)">
|
||||
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option>
|
||||
</nz-select>
|
||||
<div class="timeBox">
|
||||
|
||||
@ -31,19 +31,19 @@ export class DatatableOperationtableComponent implements OnInit {
|
||||
|
||||
interManlist: any = []
|
||||
chartData: any = {}
|
||||
flag = false;
|
||||
flag: boolean = false;
|
||||
columns: STColumn[] = [
|
||||
{ title: '运营主体', index: 'networkTransporterName', className: 'text-center' },
|
||||
{ title: '订单数', index: 'zsl', className: 'text-center' },
|
||||
{ title: '应收金额', index: 'yingsje', className: 'text-center' },
|
||||
{ title: '应收金额', index: 'yingsje', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yingsje }) } },
|
||||
{ title: '承运数', index: 'cys', className: 'text-center' },
|
||||
{ title: '应付运费', index: 'yingfyf', className: 'text-center' },
|
||||
{ title: '应付运费', index: 'yingfyf', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yingfyf }) } },
|
||||
{ title: '运量(吨)', index: 'yl', className: 'text-center' },
|
||||
{ title: '待接单数', index: 'djd', className: 'text-center' },
|
||||
{ title: '在途数', index: 'ysz', className: 'text-center' },
|
||||
{ title: '运输完成', index: 'yswc', className: 'text-center' },
|
||||
{ title: '已收金额', index: 'yisje', className: 'text-center' },
|
||||
{ title: '已付运费', index: 'yifyf', className: 'text-center' }
|
||||
{ title: '已收金额', index: 'yisje', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yisje }) } },
|
||||
{ title: '已付运费', index: 'yifyf', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yifyf }) } },
|
||||
];
|
||||
/**
|
||||
* 查询参数
|
||||
@ -72,7 +72,7 @@ export class DatatableOperationtableComponent implements OnInit {
|
||||
this.initData()
|
||||
this.initPillarData()
|
||||
}
|
||||
initPillarData(){
|
||||
initPillarData(flag?: boolean){
|
||||
let type = 1
|
||||
if(this.mode === 'year') {
|
||||
type = 1
|
||||
@ -84,7 +84,7 @@ export class DatatableOperationtableComponent implements OnInit {
|
||||
type,
|
||||
enterpriseInfoId: this.enterpriseInfoId
|
||||
};
|
||||
this.flag = true
|
||||
this.flag = flag ? flag : false
|
||||
this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.chartData = res
|
||||
@ -144,6 +144,9 @@ export class DatatableOperationtableComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
onChangeNext(result: any) {
|
||||
if(result === null) {
|
||||
return
|
||||
}
|
||||
if(this.mode === 'year') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00']
|
||||
} else if(this.mode === 'month') {
|
||||
|
||||
@ -28,15 +28,14 @@ export class OperationPillarComponent implements OnInit, OnChanges {
|
||||
reRender() {
|
||||
setTimeout(() => {
|
||||
this.chart.data(this.chartData);
|
||||
console.log(this.chartData)
|
||||
this.chart.render();
|
||||
}, 1000)
|
||||
}
|
||||
render(el: ElementRef<HTMLDivElement>): void {
|
||||
this.el = el.nativeElement
|
||||
setTimeout(() => {
|
||||
if(!this.service.http.loading){
|
||||
this.ngZone.runOutsideAngular(() => this.init(this.el));
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
|
||||
private init(el: HTMLElement): void {
|
||||
|
||||
@ -20,7 +20,7 @@ import { DatatableMancustomtableComponent } from './components/customtable/mancu
|
||||
import { DatatablePartnertableComponent } from './components/customtable/partnertable/partnertable.component';
|
||||
import { DatatableBusiindexComponent } from './components/busitable/busiindex/busiindex.component';
|
||||
import { DatatableMantableComponent } from './components/busitable/mantable/mantable.component';
|
||||
import { BusitablePillarComponent } from './components/busitable/busiindex/pillar/pillar.component';
|
||||
import { BusitablePillarComponent } from './components/busitable/pillar/pillar.component';
|
||||
import { DatatableReportingFundInfoComponent } from './reporting/components/fund-info/fund-info.component';
|
||||
import { BusitableCurveComponent } from './components/busitable/busiindex/curve/curve.component';
|
||||
import { OperationPillarComponent } from './components/operationtable/pillar/pillar.component';
|
||||
|
||||
@ -130,7 +130,7 @@ const routes: Routes = [
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'scroll-img',
|
||||
path: 'scrollimg',
|
||||
children: [
|
||||
{ path: '', component: ScrollImgComponentsListComponent },
|
||||
{ path: 'list', component: ScrollImgComponentsListComponent },
|
||||
|
||||
Reference in New Issue
Block a user