Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
潘晓云
2022-04-02 13:23:57 +08:00
87 changed files with 1301 additions and 736 deletions

View File

@ -32,7 +32,7 @@
<label nz-radio-button nzValue="month"></label>
</nz-radio-group>
<div class="dateBox">
<nz-date-picker [(ngModel)]="dateNext" [nzDisabledDate]="disabledDate" [nzMode]="mode" (ngModelChange)="onChangeNext($event)"></nz-date-picker>
<nz-date-picker [(ngModel)]="dateNext" [nzDisabledDate]="disabledDate" [nzMode]="modeNext" (ngModelChange)="onChangeNext($event)"></nz-date-picker>
</div>
</div>
</div>
@ -43,9 +43,9 @@
<div class="title">
<div class="box" style="background-color: #3ba1ff;"></div> 环比(%)
</div>
<g2-custom delay="100" (render)="render($event)"></g2-custom>
<!-- <g2-custom delay="100" (render)="render($event)"></g2-custom> -->
<!-- <app-busitable-curve></app-busitable-curve> -->
<!-- <app-busitable-curve #curve [chartData]="chartData.chainRatio"></app-busitable-curve> -->
<app-busitable-curve #curve [chartData]="chartData.chainRatio"></app-busitable-curve>
</div>
<div nz-col class="gutter-row" [nzSpan]="12">
<div class="title">
@ -53,7 +53,6 @@
</div>
<app-busitable-pillar #pillar [chartData]="chartData.performance"></app-busitable-pillar>
</div>
</div>
</nz-card>

View File

@ -4,7 +4,8 @@ import { DatePipe, _HttpClient } from '@delon/theme';
import { differenceInCalendarDays } from 'date-fns';
import { DataService } from '../../../services/data.service';
import { Chart } from '@antv/g2';
import { BusitableCurveComponent } from './curve2/curve.component';
import { BusitablePillarComponent } from './pillar/pillar.component';
import { BusitableCurveComponent } from './curve/curve.component';
@Component({
selector: 'app-datatable-busiindex',
@ -16,6 +17,7 @@ import { BusitableCurveComponent } from './curve2/curve.component';
export class DatatableBusiindexComponent implements OnInit {
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('curve') private readonly curve!: BusitableCurveComponent;
@ViewChild('pillar') private readonly pillar!: BusitablePillarComponent;
type = 1;
mode = 'year';
date: any = null;
@ -26,9 +28,8 @@ export class DatatableBusiindexComponent implements OnInit {
timeNext: any = ['2022-01-01 00:00:00']
dateFormat = 'yyyy-MM-dd';
today = new Date();
chainRatio: any = []
chartData: any = {}
el: any;
flag = false;
columns: STColumn[] = [
{ title: '运营主体', index: 'networkTransporterName', className: 'text-center' },
@ -80,12 +81,11 @@ export class DatatableBusiindexComponent implements OnInit {
};
this.service.request(this.service.$api_performanceReportHistogram, params).subscribe(res => {
if (res) {
this.chainRatio = res.chainRatio
this.chartData = res
setTimeout(() => {
this.ngZone.runOutsideAngular(() => this.init(this.el));
}, 1000);
if(this.flag) {
this.pillar.reRender()
this.curve.reRender()
}
}
})
}
@ -124,6 +124,8 @@ export class DatatableBusiindexComponent implements OnInit {
} 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
@ -131,38 +133,4 @@ export class DatatableBusiindexComponent implements OnInit {
exportFun(){
}
render(el: ElementRef<HTMLDivElement>): void {
this.el = el.nativeElement
}
private init(el: HTMLElement): void {
const chart = new Chart({
container: el,
autoFit: true,
height: 500,
});
chart.data(this.chainRatio);
chart.scale({
year: {
range: [0, 1],
},
value: {
min: 0,
nice: true,
},
});
chart.tooltip({
showCrosshairs: true, // 展示 Tooltip 辅助线
shared: true,
});
chart.line().position('time*value').label('value');
chart.point().position('time*value');
chart.render();
}
}

View File

@ -1 +1 @@
<g2-custom delay="100" (render)="render($event)"></g2-custom>
<g2-custom delay="200" (render)="render($event)"></g2-custom>

View File

@ -1,6 +1,4 @@
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { G2MiniAreaClickItem } from '@delon/chart/mini-area';
import DataSet from '@antv/data-set';
import { Chart } from '@antv/g2';
import { DataService } from 'src/app/routes/datatable/services/data.service';
@Component({
@ -9,43 +7,44 @@ import { DataService } from 'src/app/routes/datatable/services/data.service';
styleUrls: ['./curve.component.less']
})
export class BusitableCurveComponent implements OnInit, OnChanges {
@Input() chartData: any;
el: any;
@Input() chartData: any;
chart: any;
constructor(private service: DataService, private ngZone: NgZone) {
}
ngOnChanges(changes: SimpleChanges): void {
if (this.chartData) {
// setTimeout(()=>{
// this.chart.render(true)
// }, 1000)
}
}
ngOnInit(): void {
}
ngOnChanges(changes: SimpleChanges): void {
if (this.chartData) {
setTimeout(() => {
this.ngZone.runOutsideAngular(() => this.init(this.el));
}, 2000)
}
reRender() {
setTimeout(() => {
this.chart.data(this.chartData);
this.chart.render();
}, 500)
}
handleClick(data: G2MiniAreaClickItem): void {
this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`);
}
render(el: ElementRef<HTMLDivElement>): void {
this.el = el.nativeElement
// this.ngZone.runOutsideAngular(() => this.init(this.el));
this.ngZone.runOutsideAngular(() => this.init(this.el));
}
private init(el: HTMLElement): void {
const chart = new Chart({
this.chart = new Chart({
container: el,
autoFit: true,
height: 500,
});
chart.data(this.chartData);
chart.scale({
this.chart.data(this.chartData);
this.chart.scale({
year: {
range: [0, 1],
},
@ -55,15 +54,15 @@ export class BusitableCurveComponent implements OnInit, OnChanges {
},
});
chart.tooltip({
this.chart.tooltip({
showCrosshairs: true, // 展示 Tooltip 辅助线
shared: true,
});
chart.line().position('time*value').label('value');
chart.point().position('time*value');
this.chart.line().position('time*value').label('value');
this.chart.point().position('time*value');
chart.render();
this.chart.render();
}
}

View File

@ -1,92 +0,0 @@
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { G2MiniAreaClickItem } from '@delon/chart/mini-area';
import DataSet from '@antv/data-set';
import { Chart } from '@antv/g2';
import { DataService } from 'src/app/routes/datatable/services/data.service';
@Component({
selector: 'app-busitable-curve',
templateUrl: './curve.component.html',
styleUrls: ['./curve.component.less']
})
export class BusitableCurveComponent implements OnInit, OnChanges {
@Input() chartData: any ;
el: any;
constructor(private service: DataService, private ngZone: NgZone) {
}
ngOnChanges(changes: SimpleChanges): void {
if(this.chartData){
setTimeout(()=>{
this.ngZone.runOutsideAngular(() => this.init(this.el));
}, 3000)
}
}
ngOnInit(): void {
this.initData()
}
initData(){
this.service.request(this.service.$api_operationalReportWaybillStatusDistribution).subscribe(res => {
if (res) {
this.chartData = res
this.ngZone.runOutsideAngular(() => this.init(this.el));
}
})
}
render(el: ElementRef<HTMLDivElement>): void {
this.el = el.nativeElement
}
private init(el: HTMLElement): void {
const ds = new DataSet();
const dv = ds.createView().source(this.chartData);
dv.transform({
type: 'map',
callback: row => {
row.year = parseInt(row.year, 10);
return row;
}
}).transform({
type: 'regression',
method: 'polynomial',
fields: ['year', 'value'],
bandwidth: 0.1,
as: ['Year', 'Value']
});
const chart = new Chart({
container: el,
autoFit: true,
height: 500,
padding: [20, 40],
});
const view1 = chart.createView();
view1.data(this.chartData);
view1.scale('price', {
nice: true,
});
view1.tooltip({
showMarkers: false,
shared: true,
});
view1
.interval()
.position('month*price')
.color('name')
.adjust([
{
type: 'dodge',
marginRatio: 0,
},
]);
// chart.interaction('active-region');
chart.render();
}
}

View File

@ -1 +1 @@
<g2-custom delay="100" (render)="render($event)"></g2-custom>
<g2-custom delay="200" (render)="render($event)"></g2-custom>

View File

@ -7,48 +7,50 @@ import { DataService } from 'src/app/routes/datatable/services/data.service';
styleUrls: ['./pillar.component.less']
})
export class BusitablePillarComponent implements OnInit, OnChanges {
el: any;
@Input() chartData: any ;
@Input() chartData: any;
chart: any;
constructor(private service: DataService, private ngZone: NgZone) {
}
ngOnChanges(changes: SimpleChanges): void {
if(this.chartData){
setTimeout(()=>{
this.ngZone.runOutsideAngular(() => this.init(this.el));
}, 1000)
if (this.chartData) {
// setTimeout(()=>{
// this.chart.render(true)
// }, 1000)
}
}
ngOnInit(): void {
}
reRender() {
setTimeout(() => {
this.chart.data(this.chartData);
this.chart.render();
}, 500)
}
render(el: ElementRef<HTMLDivElement>): void {
this.el = el.nativeElement
this.ngZone.runOutsideAngular(() => this.init(this.el));
}
private init(el: HTMLElement): void {
const chart = new Chart({
this.chart = new Chart({
container: el,
autoFit: true,
height: 500,
});
chart.data(this.chartData);
chart.tooltip({
this.chart.data(this.chartData);
this.chart.tooltip({
showMarkers: false,
});
chart.interval().position('time*number');
chart.interaction('element-active');
chart.render();
this.chart.interval().position('time*number');
this.chart.render();
}
}

View File

@ -38,5 +38,4 @@
</div>
</div>
</ng-template>
<app-datatable-curve></app-datatable-curve>
</nz-card>

View File

@ -0,0 +1,2 @@
<g2-custom delay="100" (render)="render($event)"></g2-custom>

View File

@ -0,0 +1,91 @@
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { G2MiniAreaClickItem } from '@delon/chart/mini-area';
// import DataSet from '@antv/data-set';
const DataSet = require('@antv/data-set');
import { Chart } from '@antv/g2';
import { DataService } from 'src/app/routes/datatable/services/data.service';
@Component({
selector: 'app-compliance-curve',
templateUrl: './curve.component.html',
styleUrls: ['./curve.component.less']
})
export class ComplianceCurveComponent implements OnInit,OnChanges {
el: any;
@Input() chartData: any;
chart: any;
constructor(private service: DataService, private ngZone: NgZone) {
}
ngOnChanges(changes: SimpleChanges): void {
if (this.chartData) {
// setTimeout(()=>{
// this.chart.render(true)
// }, 1000)
}
}
ngOnInit(): void {
}
reRender() {
setTimeout(() => {
this.chart.data(this.chartData);
this.chart.render();
}, 1000)
}
render(el: ElementRef<HTMLDivElement>): void {
this.el = el.nativeElement
setTimeout(() => {
console.log(this.chartData)
this.ngZone.runOutsideAngular(() => this.init(this.el));
}, 1000)
}
private init(el: HTMLElement): void {
this.chart = new Chart({
container: el,
autoFit: true,
height: 500,
});
this.chart.data(this.chartData);
this.chart.scale({
time: {
range: [0, 1],
},
number: {
min: 0,
nice: true,
},
});
this.chart.tooltip({
showCrosshairs: true,
shared: true,
});
this.chart.axis('proportion', {
label: {
formatter: (val: any) => {
return val*100+ ' %';
},
},
});
this.chart
.line()
.position('situationDate*proportion')
.color('type')
.tooltip('proportion*type', function(name: any, value: any) {
return {
name: name*100+'%',
value: value
};
});
this.chart.render();
}
}

View File

@ -24,37 +24,37 @@
<div nz-row [nzGutter]="16">
<div nz-col class="gutter-row" [nzSpan]="6">
<g2-card [title]="'订单合格率'" [bordered]="true" [total]="'95.00%'" [footer]="footer1" contentHeight="46">
<g2-card [title]="'订单合格率'" [bordered]="true" [total]="cardData1?.proportion" [footer]="footer1" contentHeight="46">
<ng-template #footer1>
<div class="card-f">
<span class="card-f-l">合格:12423</span> <span>不合格:12423</span>
<span class="card-f-l">合格:{{cardData1?.leftQuantity}}</span> <span>不合格:{{cardData1?.rightQuantity}}</span>
</div>
</ng-template>
</g2-card>
</div>
<div nz-col class="gutter-row" [nzSpan]="6">
<g2-card [title]="'货源单占比'" [bordered]="true" [total]="'94.00%'" [footer]="footer2" contentHeight="46">
<g2-card [title]="'货源单占比'" [bordered]="true" [total]="cardData2?.proportion" [footer]="footer2" contentHeight="46">
<ng-template #footer2>
<div class="card-f">
<span class="card-f-l">货源单:12423</span> <span>合同单:12423</span>
<span class="card-f-l">货源单:{{cardData2?.leftQuantity}}</span> <span>合同单:{{cardData2?.rightQuantity}}</span>
</div>
</ng-template>
</g2-card>
</div>
<div nz-col class="gutter-row" [nzSpan]="6">
<g2-card [title]="'运费直付占比'" [bordered]="true" [total]="'95.10%'" [footer]="footer3" contentHeight="46">
<g2-card [title]="'运费直付占比'" [bordered]="true" [total]="cardData3?.proportion" [footer]="footer3" contentHeight="46">
<ng-template #footer3>
<div class="card-f">
<span class="card-f-l">司机:12423</span> <span>车队长:12423</span>
<span class="card-f-l">司机:{{cardData3?.leftQuantity}}</span> <span>车队长:{{cardData3?.rightQuantity}}</span>
</div>
</ng-template>
</g2-card>
</div>
<div nz-col class="gutter-row" [nzSpan]="6">
<g2-card [title]="'付款及时率'" [bordered]="true" [total]="'90.00%'" [footer]="footer4" contentHeight="46">
<g2-card [title]="'付款及时率'" [bordered]="true" [total]="cardData4?.proportion" [footer]="footer4" contentHeight="46">
<ng-template #footer4>
<div class="card-f">
<span class="card-f-l">准时:12423</span> <span>逾期:12423</span>
<span class="card-f-l">准时:{{cardData4?.leftQuantity}}</span> <span>逾期:{{cardData4?.rightQuantity}}</span>
</div>
</ng-template>
</g2-card>
@ -62,5 +62,6 @@
</div>
<nz-card nzTitle="平台合规情况监控报表">
<g2-custom delay="100" (render)="render($event)"></g2-custom>
<app-compliance-curve #curve [chartData]="chartData"></app-compliance-curve>
<!-- <g2-custom delay="100" (render)="render($event)"></g2-custom> -->
</nz-card>

View File

@ -5,6 +5,9 @@ import { format } from 'date-fns';
import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { G2TimelineData, G2TimelineMap } from '@delon/chart/timeline';
import { Chart } from '@antv/g2';
import { DataService } from '../../../services/data.service';
import { ComplianceCurveComponent } from './curve/curve.component';
@Component({
selector: 'app-datatable-compliance-index',
templateUrl: './index.component.html',
@ -12,51 +15,107 @@ import { Chart } from '@antv/g2';
providers: [DatePipe]
})
export class DatatableComplianceIndexComponent implements OnInit {
@ViewChild('curve') private readonly curve!: ComplianceCurveComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
ui!: SFUISchema;
schema: SFSchema = {};
mode = 'year';
date: any = null;
dateFormat = 'yyyy-MM-dd';
time: any = ['2022-01-01 00:00:00']
constructor(private http: _HttpClient, private modal: ModalHelper, private ngZone: NgZone, private datePipe: DatePipe) {}
dateFormat = 'yyyy';
time: any = '2022'
chartData: any = {}
cardData1:any;
cardData2:any;
cardData3:any;
cardData4:any;
constructor(private http: _HttpClient, private modal: ModalHelper, private ngZone: NgZone,public service: DataService, private datePipe: DatePipe) {}
ngOnInit(): void {
this.initSF();
this.initdData();
}
initdData(){
const params ={
...this.sf?.value,
timeType:this.mode ==='month'?'M':'Y',
time:this.time
}
this.service.request(this.service.$api_getBillRateQualified, params).subscribe(res => {
if (res) {
this.cardData1 = res;
this.cardData1.proportion = this.cardData1.proportion*100 +'%'
}
});
this.service.request(this.service.$api_getBillRateProportion, params).subscribe(res => {
if (res) {
this.cardData2 = res;
this.cardData2.proportion = this.cardData2.proportion*100 +'%'
}
});
this.service.request(this.service.$api_getBillRateDirectPayment, params).subscribe(res => {
if (res) {
this.cardData3 = res;
this.cardData3.proportion = this.cardData3.proportion*100 +'%'
}
});
this.service.request(this.service.$api_getBillTimelyPayment, params).subscribe(res => {
if (res) {
this.cardData4 = res;
this.cardData4.proportion = this.cardData4.proportion*100 +'%'
}
});
this.service.request(this.service.$api_listMonitorSituation, params).subscribe(res => {
if (res) {
this.chartData = res
this.curve.reRender();
}
})
}
changeData(){
if(this.mode === 'year') {
this.dateFormat = 'yyyy'
} else if(this.mode === 'month') {
this.dateFormat = 'yyyy-MM'
} else {
this.dateFormat = 'yyyy-MM-dd'
}
}
}
onChange(result: any) {
if(this.mode === 'year') {
this.time = [this.datePipe.transform(this.date, 'yyyy') + '-01-01 00:00:00']
this.time = this.datePipe.transform(this.date, 'yyyy')
} else if(this.mode === 'month') {
this.time = [this.datePipe.transform(this.date, 'yyyy-MM') + '-01 00:00:00']
this.time = this.datePipe.transform(this.date, 'yyyy-MM')
}
this.initdData();
}
initSF() {
this.schema = {
properties: {
name: {
enterpriseInfoId: {
type: 'string',
title: '',
ui: {
widget: 'select',
placeholder: '网络货运人'
placeholder: '网络货运人',
asyncData: () => this.service.getNetworkFreightForwarder({}),
change:()=>{
this.initdData();
},
allowClear: true
}
},
name2: {
enterpriseProjectId: {
type: 'string',
title: '',
ui: {
@ -64,11 +123,12 @@ export class DatatableComplianceIndexComponent implements OnInit {
placeholder: '部门'
}
},
name3: {
salesmanId: {
type: 'string',
title: '',
ui: {
placeholder: '业务员'
placeholder: '业务员',
enter: () => this.initdData(),
}
}
}
@ -81,6 +141,9 @@ export class DatatableComplianceIndexComponent implements OnInit {
}
render(el: ElementRef<HTMLDivElement>) {
this.ngZone.runOutsideAngular(() => this.init(el.nativeElement));
}

View File

@ -55,5 +55,4 @@
</div>
</div>
</ng-template>
<app-datatable-curve></app-datatable-curve>
</nz-card>

View File

@ -23,6 +23,7 @@ export class DatatableCustomindexComponent implements OnInit {
dateNext: any = null;
modeNext = 'year';
timeNext: any = ['2022-01-01 00:00:00']
columns: STColumn[] = [
{ title: '用户类型', index: 'networkTransporterName', className: 'text-center' },

View File

@ -52,7 +52,8 @@ export class DatatableDriverComponent implements OnInit {
}
let params: any = {
time: this.time,
type: this.type
type: this.type,
...this.sf?.value
};
delete params._$expand;

View File

@ -38,7 +38,7 @@
</div>
</div>
</ng-template>
<st #st multiSort [columns]="columns" [ps]="20" [data]="service.$api_listOperationalReportPage"
<st #st multiSort [columns]="columns" [ps]="20" [data]="service.$api_listShipperReportPage"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[scroll]="{ x: '1200px' }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }" [loading]="false"></st>

View File

@ -26,23 +26,33 @@ export class DatatableOwnerComponent implements OnInit {
schema: SFSchema = {};
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: 'enterpriseName', className: 'text-center' },
{ title: '注册时间', index: 'registerTime', className: 'text-center' },
{ title: '客户类型', index: 'customerType', className: 'text-center', type: 'enum', enum: {
1: '平台客户',
2: '直客',
3: '渠道客户'
}
},
{ title: '业务员', index: 'salesmanName', className: 'text-center' },
{ title: '合伙人', index: 'partnerName', className: 'text-center' },
{ title: '客户状态', index: 'customerStatus', className: 'text-center', type: 'enum', enum: {
1: '未激活',
2: '沉默',
3: '流失',
4: '活跃'
} },
{ title: '订单数', index: 'zsl', className: 'text-center' },
{ title: '订单金额', index: 'ddje', className: 'text-center' },
{ title: '应收订单数', index: 'ysdds', className: 'text-center' },
{ title: '应收金额', index: 'yingsje', className: 'text-center' },
{ title: '待开票订单数', index: 'yifyf', className: 'text-center' },
{ title: '待开票金额', index: 'yifyf', className: 'text-center' },
{ title: '已收金额', render: 'yifyf', className: 'text-center' },
{ title: '附加费金额', index: 'yifyf', className: 'text-center' },
{ title: '已收附加费', index: 'yifyf', className: 'text-center' },
{ title: '附加费率', index: 'yifyf', className: 'text-center' },
{ title: '已开票金额', index: 'yifyf', className: 'text-center' }
{ title: '待开票金额', index: 'dkpdds', className: 'text-center' },
{ title: '已收金额', render: 'yisje', className: 'text-center' },
{ title: '应收附加费', index: 'yingsfjf', className: 'text-center' },
{ title: '已收附加费', index: 'yisfjf', className: 'text-center' },
{ title: '附加费率', index: 'fjfl', className: 'text-center' },
{ title: '已开票金额', index: 'ykpje', className: 'text-center' }
];
/**
* 查询参数
@ -59,7 +69,8 @@ export class DatatableOwnerComponent implements OnInit {
}
let params: any = {
time: this.time,
type: this.type
type: this.type,
...this.sf?.value
};
delete params._$expand;
@ -76,28 +87,41 @@ export class DatatableOwnerComponent implements OnInit {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
billCode: {
enterpriseName: {
type: 'string',
title: '货主名称',
ui: {
placeholder: '请输入',
}
},
resourceCode: {
customerType: {
type: 'string',
title: '客户类型',
ui: {
widget: 'select',
placeholder: '请选择',
}
},
enum: [
{label: '直客', value: 2},
{label: '渠道客户', value: 3},
{label: '平台客户', value: 1},
]
},
loadingPlace: {
customerStatus: {
type: 'string',
title: '客户状态',
ui: {
widget: 'select',
placeholder: '请选择',
}
},
enum: [
{label: '未激活', value: 1},
{label: '沉默', value: 2},
{label: '流失', value: 3},
{label: '活跃', value: 4},
]
},
createTime: {
registerTime: {
title: '注册时间',
type: 'string',
ui: {

View File

@ -1,5 +1,2 @@
<g2-custom delay="100" (render)="render($event)"></g2-custom>
<nz-divider></nz-divider>
<g2-custom delay="100" (render)="render2($event)"></g2-custom>

View File

@ -1,4 +1,4 @@
import { Component, ElementRef, NgZone, OnInit, ViewChild } from '@angular/core';
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { G2MiniAreaClickItem } from '@delon/chart/mini-area';
import { DataService } from '../../../services/data.service';
// import DataSet from '@antv/data-set';
@ -9,160 +9,81 @@ import { Chart } from '@antv/g2';
templateUrl: './curve.component.html',
styleUrls: ['./curve.component.less']
})
export class FinanceTableCurveComponent implements OnInit {
constructor(private service: DataService, private ngZone: NgZone) {}
export class FinanceTableCurveComponent implements OnInit,OnChanges {
el: any;
@Input() chartData: any;
chart: any;
constructor(private service: DataService, private ngZone: NgZone) {
ngOnInit(): void {}
}
ngOnChanges(changes: SimpleChanges): void {
if (this.chartData) {
// setTimeout(()=>{
// this.chart.render(true)
// }, 1000)
handleClick(data: G2MiniAreaClickItem): void {
this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`);
}
}
ngOnInit(): void {
}
reRender() {
setTimeout(() => {
this.chart.data(this.chartData);
this.chart.render();
}, 1000)
}
render(el: ElementRef<HTMLDivElement>): void {
this.ngZone.runOutsideAngular(() => this.initBar(el.nativeElement));
this.el = el.nativeElement
setTimeout(() => {
this.ngZone.runOutsideAngular(() => this.init(this.el));
}, 1000)
}
private initBar(el: HTMLElement): void {
const data = [
{ name: '已收金额(元)', : 'Jan.', 月均降雨量: 18.9 },
{ name: '已收金额(元)', : 'Feb.', 月均降雨量: 28.8 },
{ name: '已收金额(元)', : 'Mar.', 月均降雨量: 39.3 },
{ name: '已收金额(元)', : 'Apr.', 月均降雨量: 81.4 },
{ name: '已收金额(元)', : 'May', 月均降雨量: 47 },
{ name: '已收金额(元)', : 'Jun.', 月均降雨量: 20.3 },
{ name: '已收金额(元)', : 'Jul.', 月均降雨量: 24 },
{ name: '已收金额(元)', : 'Aug.', 月均降雨量: 35.6 },
{ name: '已付运费(元)', : 'Jan.', 月均降雨量: 12.4 },
{ name: '已付运费(元)', : 'Feb.', 月均降雨量: 23.2 },
{ name: '已付运费(元)', : 'Mar.', 月均降雨量: 34.5 },
{ name: '已付运费(元)', : 'Apr.', 月均降雨量: 99.7 },
{ name: '已付运费(元)', : 'May', 月均降雨量: 52.6 },
{ name: '已付运费(元)', : 'Jun.', 月均降雨量: 35.5 },
{ name: '已付运费(元)', : 'Jul.', 月均降雨量: 37.4 },
{ name: '已付运费(元)', : 'Aug.', 月均降雨量: 42.4 }
];
const chart = new Chart({
private init(el: HTMLElement): void {
this.chart = new Chart({
container: el,
autoFit: true,
height: 500
});
chart.data(data);
chart.scale('月均降雨量', {
nice: true
});
chart.tooltip({
showMarkers: false,
shared: true
});
// 图表下方图形文字自定义
chart.legend({
items: [
{
name: '已收金额(元)',
value: 'node_load1',
marker: {
symbol: 'circle',
style: { fill: '#6395f9' }
}
},
{
name: '已付运费(元)',
value: 'node_load1',
marker: {
symbol: 'circle',
style: { fill: '#62daab' }
}
}
]
height: 500,
});
chart
.interval()
.position('月份*月均降雨量')
.color('name')
.adjust([
{
type: 'dodge',
marginRatio: 0
}
]);
chart.render();
}
render2(el: ElementRef<HTMLDivElement>): void {
this.ngZone.runOutsideAngular(() => this.initCurve(el.nativeElement));
}
private initCurve(el: HTMLElement): void {
const chart = new Chart({
container: el,
autoFit: true,
height: 400
});
// 以三组数据为例, 需要展示 91/92/93年中a/b/c数据走势
const data = [
{ data: '1月', label: '平均附加费率', value: 5 },
{ data: '2月', label: '平均附加费率', value: 10 },
{ data: '3月', label: '平均附加费率', value: 25 },
{ data: '4月', label: '平均附加费率', value: 35 },
{ data: '5月', label: '平均附加费率', value: 15 },
{ data: '6月', label: '平均附加费率', value: 5 },
{ data: '7月', label: '平均附加费率', value: 95 },
{ data: '8月', label: '平均附加费率', value: 45 }
];
chart.data(data);
//刻度自定义
chart.scale({
data: {
range: [0, 1]
this.chart.data(this.chartData);
this.chart.scale({
time: {
range: [0, 1],
},
number: {
nice: true,
},
value: {
min: 0,
nice: true
}
});
// 图表下方图形文字自定义
chart.legend({
items: [
{
name: '平均附加费率',
value: 'node_load1',
marker: {
symbol: 'circle',
style: { fill: '#6193f7' }
}
}
]
});
// 提示自定义
chart.tooltip({
this.chart.tooltip({
showCrosshairs: true,
shared: true
shared: true,
});
this.chart.axis('number', {
label: {
formatter: (val: any) => {
return val*100+ ' %';
},
},
});
//数据格式化
chart.axis('value', {
label: {
formatter: val => {
return val + ' %';
}
}
});
// 在x*y的坐标点上按z值绘制线条, 如果z值相同将使用直线连接
chart
this.chart
.line()
.position('data*value')
.color('label')
.tooltip('label*value', (name: any, value: any) => {
.position('time*number')
.color('name')
.tooltip('name*number', (name:any, value:any) => {
return {
name: name,
value: value + '%'
value: value*100 + '%'
};
});
// 在x*y的坐标上按z值绘制圆点
// chart.point().position('data*value').size(4).color('label').shape('circle');
chart.render();
this.chart.render();
}
}

View File

@ -50,7 +50,7 @@
<nz-card nzTitle="运营报表" [nzExtra]="extraTemplate01">
<ng-template #extraTemplate01>
<div class="chooseBox">
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="changeCurve()">
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="initPillarData()">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option>
</nz-select>
<div class="timeBox">
@ -64,5 +64,12 @@
</div>
</div>
</ng-template>
<app-financetable-curve></app-financetable-curve>
<div nz-row [nzGutter]="64">
<div nz-col class="gutter-row" [nzSpan]="12">
<app-financetable-curve #curve [chartData]="chartData.lineChart"></app-financetable-curve>
</div>
<div nz-col class="gutter-row" [nzSpan]="12">
<app-financetable-pillar #pillar [chartData]="chartData.histogram"></app-financetable-pillar>
</div>
</div>
</nz-card>

View File

@ -4,6 +4,10 @@ import { SFSchema } from '@delon/form';
import { DatePipe, ModalHelper, _HttpClient } from '@delon/theme';
import { DataService } from '../../services/data.service';
import { differenceInCalendarDays } from 'date-fns';
import { OperationCurveComponent } from '../operationtable/curve/curve.component';
import { OperationPillarComponent } from '../operationtable/pillar/pillar.component';
import { FinanceTableCurveComponent } from './curve/curve.component';
import { FinancetablePillarComponent } from './pillar/pillar.component';
@Component({
selector: 'app-datatable-financetable',
@ -12,6 +16,8 @@ import { differenceInCalendarDays } from 'date-fns';
providers: [DatePipe]
})
export class DatatableFinancetableComponent implements OnInit {
@ViewChild('curve') private readonly curve!: FinanceTableCurveComponent;
@ViewChild('pillar') private readonly pillar!: FinancetablePillarComponent;
@ViewChild('st') private readonly st!: STComponent;
type = 1;
mode = 'year';
@ -24,8 +30,9 @@ export class DatatableFinancetableComponent implements OnInit {
timeNext: any = ['2022-01-01 00:00:00']
today = new Date();
enterpriseInfoId = ''
enterpriseInfoIdPie = ''
interManlist: any = []
chartData: any = {}
flag = false;
columns: STColumn[] = [
{ title: '运营主体', index: 'networkTransporterName', className: 'text-center' },
{ title: '客户预存款', index: 'czcgje',render: 'czcgje', className: 'text-center' },
@ -63,13 +70,37 @@ export class DatatableFinancetableComponent implements OnInit {
constructor(public service: DataService, private datePipe: DatePipe) { }
ngOnInit(): void {
this.initData()
this.initData();
this.initPillarData();
}
initPillarData(){
let type = 1
if(this.mode === 'year') {
type = 1
} else if(this.mode === 'month') {
type = 2
}
const params: any = {
time: this.timeNext,
type,
enterpriseInfoId: this.enterpriseInfoId
};
this.flag = true
this.service.request(this.service.$api_financialReportHistogram, params).subscribe(res => {
if (res) {
this.chartData = res
if(this.flag) {
this.pillar.reRender()
this.curve.reRender()
}
}
})
}
initData() {
this.service.getNetworkFreightForwarder().subscribe(res => {
this.interManlist = res
this.enterpriseInfoId = res[0].value
this.enterpriseInfoIdPie = res[0].value
})
}
@ -119,6 +150,7 @@ export class DatatableFinancetableComponent implements OnInit {
} else if(this.mode === 'month') {
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00']
}
this.initPillarData();
}
}

View File

@ -0,0 +1,75 @@
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { Chart } from '@antv/g2';
import { DataService } from 'src/app/routes/datatable/services/data.service';
@Component({
selector: 'app-financetable-pillar',
templateUrl: './pillar.component.html',
styleUrls: ['./pillar.component.less']
})
export class FinancetablePillarComponent implements OnInit, OnChanges {
el: any;
@Input() chartData: any;
chart: any;
constructor(private service: DataService, private ngZone: NgZone) {
}
ngOnChanges(changes: SimpleChanges): void {
if (this.chartData) {
// setTimeout(()=>{
// this.chart.render(true)
// }, 1000)
}
}
ngOnInit(): void {
}
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(() => {
this.ngZone.runOutsideAngular(() => this.init(this.el));
},1000)
}
private init(el: HTMLElement): void {
this.chart = new Chart({
container: el,
autoFit: true,
height: 500,
});
this.chart.data(this.chartData);
this.chart.scale('number', {
nice: true,
});
this.chart.tooltip({
showMarkers: false,
shared: true,
});
this.chart
.interval()
.position('time*number')
.color('name')
.adjust([
{
type: 'dodge',
marginRatio: 0,
},
]);
this.chart.interaction('active-region');
this.chart.render();
}
}

View File

@ -1,24 +0,0 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { DatatableDataindexComponent } from './dataindex.component';
describe('DatatableDataindexComponent', () => {
let component: DatatableDataindexComponent;
let fixture: ComponentFixture<DatatableDataindexComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ DatatableDataindexComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DatatableDataindexComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,131 +1,81 @@
import { Component, ElementRef, NgZone, OnInit, ViewChild } from '@angular/core';
import { G2MiniAreaClickItem } from '@delon/chart/mini-area';
import { DataService } from '../../../services/data.service';
import DataSet from '@antv/data-set';
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { Chart } from '@antv/g2';
import { DataService } from 'src/app/routes/datatable/services/data.service';
@Component({
selector: 'app-datatable-curve',
selector: 'app-operation-curve',
templateUrl: './curve.component.html',
styleUrls: ['./curve.component.less']
})
export class OperationtableCurveComponent implements OnInit {
export class OperationCurveComponent implements OnInit, OnChanges {
el: any;
@Input() chartData: any;
chart: any;
constructor(private service: DataService, private ngZone: NgZone) {
}
ngOnChanges(changes: SimpleChanges): void {
if (this.chartData) {
// setTimeout(()=>{
// this.chart.render(true)
// }, 1000)
}
}
ngOnInit(): void {
}
handleClick(data: G2MiniAreaClickItem): void {
this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`);
reRender() {
setTimeout(() => {
this.chart.data(this.chartData);
this.chart.render();
}, 1000)
}
render(el: ElementRef<HTMLDivElement>): void {
this.ngZone.runOutsideAngular(() => this.init(el.nativeElement));
this.el = el.nativeElement
setTimeout(() => {
this.ngZone.runOutsideAngular(() => this.init(this.el));
}, 1000)
}
private init(el: HTMLElement): void {
const data = [
{ name: '订单数', month: '01', count: 150, },
{ name: '订单数', month: '02', count: 288 },
{ name: '订单数', month: '03', count: 393 },
{ name: '订单数', month: '04', count: 814 },
{ name: '订单数', month: '05', count: 47 },
{ name: '承运数', month: '05', count: 124 },
{ name: '订单数', month: '06', count: 203 },
{ name: '承运数', month: '06', count: 203 },
{ name: '订单数', month: '07', count: 24 },
{ name: '订单数', month: '08', count: 356 },
{ name: '承运数', month: '09', count: 124 },
{ name: '承运数', month: '10', count: 232 },
{ name: '承运数', month: '11', count: 345 },
{ name: '承运数', month: '12', count: 997 }
];
const dataPillar = [
{ name: '应收金额(元)', month: '01', price: 18.9, },
{ name: '应收金额(元)', month: '02', price: 28.8 },
{ name: '应收金额(元)', month: '03', price: 39.3 },
{ name: '应收金额(元)', month: '04', price: 81.4 },
{ name: '应收金额(元)', month: '05', price: 47 },
{ name: '应付金额(元)', month: '05', price: 12.4 },
{ name: '应收金额(元)', month: '06', price: 20.3 },
{ name: '应付金额(元)', month: '06', price: 20.3 },
{ name: '应收金额(元)', month: '07', price: 24 },
{ name: '应收金额(元)', month: '08', price: 35.6 },
{ name: '应付金额(元)', month: '09', price: 12.4 },
{ name: '应付金额(元)', month: '10', price: 23.2 },
{ name: '应付金额(元)', month: '11', price: 34.5 },
{ name: '应付金额(元)', month: '12', price: 99.7 }
];
const ds = new DataSet();
const dv = ds.createView().source(data);
dv.transform({
type: 'map',
callback: row => {
row.year = parseInt(row.year, 10);
return row;
}
}).transform({
type: 'regression',
method: 'polynomial',
fields: ['year', 'value'],
bandwidth: 0.1,
as: ['Year', 'Value']
});
const chart = new Chart({
private init(el: HTMLElement): void {
this.chart = new Chart({
container: el,
autoFit: true,
height: 500,
padding: [20, 40],
});
const view1 = chart.createView();
view1.data(dataPillar);
view1.scale('price', {
nice: true,
this.chart.data(this.chartData);
this.chart.scale({
time: {
range: [0, 1],
},
number: {
nice: true,
},
});
view1.tooltip({
showMarkers: false,
this.chart.tooltip({
showCrosshairs: true,
shared: true,
});
view1
.interval()
.position('month*price')
.color('name')
.adjust([
{
type: 'dodge',
marginRatio: 0,
this.chart.axis('number', {
label: {
formatter: (val: any) => {
return val;
},
]);
const view2 = chart.createView();
// view2.axis('count', {
// label: {
// formatter: (val) => {
// return val + ' °C';
// },
// },
// });
view2.data(data);
view2
},
});
this.chart
.line()
.position('month*count')
.position('time*number')
.color('name')
// chart.interaction('active-region');
chart.render();
this.chart.render();
}
}
}

View File

@ -28,7 +28,7 @@
<nz-card nzTitle="运营报表" [nzExtra]="extraTemplate01">
<ng-template #extraTemplate01>
<div class="chooseBox">
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="changeCurve()">
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="initPillarData()">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option>
</nz-select>
<div class="timeBox">
@ -42,11 +42,22 @@
</div>
</div>
</ng-template>
<app-datatable-curve></app-datatable-curve>
<div nz-row [nzGutter]="64">
<div nz-col class="gutter-row" [nzSpan]="12">
<!-- <div class="title">
<div class="box" style="background-color: #3ba1ff;"></div> 环比(%)
</div> -->
<!-- <g2-custom delay="100" (render)="render($event)"></g2-custom> -->
<!-- <app-busitable-curve></app-busitable-curve> -->
<app-operation-curve #curve [chartData]="chartData.lineChart"></app-operation-curve>
</div>
<div nz-col class="gutter-row" [nzSpan]="12">
<!-- <div class="title">
<div class="box" style="background-color: #f59a23;"></div> 业绩量(元)
</div> -->
<app-operation-pillar #pillar [chartData]="chartData.histogram"></app-operation-pillar>
</div>
</div>
</nz-card>
<nz-card nzTitle="运单状态分布">
<nz-select [(ngModel)]="enterpriseInfoIdPie" style="width: 200px" (ngModelChange)="changeCurve()">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option>
</nz-select>
<app-opeationtable-pie></app-opeationtable-pie>
</nz-card>
<app-opeationtable-pie #pie></app-opeationtable-pie>

View File

@ -3,6 +3,8 @@ import { STColumn, STComponent } from '@delon/abc/st';
import { DatePipe, _HttpClient } from '@delon/theme';
import { DataService } from '../../services/data.service';
import { differenceInCalendarDays } from 'date-fns';
import { OperationCurveComponent } from './curve/curve.component';
import { OperationPillarComponent } from './pillar/pillar.component';
@Component({
selector: 'app-datatable-operationtable',
@ -12,6 +14,8 @@ import { differenceInCalendarDays } from 'date-fns';
})
export class DatatableOperationtableComponent implements OnInit {
@ViewChild('curve') private readonly curve!: OperationCurveComponent;
@ViewChild('pillar') private readonly pillar!: OperationPillarComponent;
@ViewChild('st') private readonly st!: STComponent;
type = 1;
mode = 'year';
@ -24,8 +28,10 @@ export class DatatableOperationtableComponent implements OnInit {
timeNext: any = ['2022-01-01 00:00:00']
today = new Date();
enterpriseInfoId = ''
enterpriseInfoIdPie = ''
interManlist: any = []
chartData: any = {}
flag = false;
columns: STColumn[] = [
{ title: '运营主体', index: 'networkTransporterName', className: 'text-center' },
{ title: '订单数', index: 'zsl', className: 'text-center' },
@ -64,12 +70,36 @@ export class DatatableOperationtableComponent implements OnInit {
constructor(public service: DataService, private datePipe: DatePipe) { }
ngOnInit(): void {
this.initData()
this.initPillarData()
}
initPillarData(){
let type = 1
if(this.mode === 'year') {
type = 1
} else if(this.mode === 'month') {
type = 2
}
const params: any = {
time: this.timeNext,
type,
enterpriseInfoId: this.enterpriseInfoId
};
this.flag = true
this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => {
if (res) {
this.chartData = res
if(this.flag) {
this.pillar.reRender()
this.curve.reRender()
}
}
})
}
initData() {
this.service.getNetworkFreightForwarder().subscribe(res => {
this.interManlist = res
this.enterpriseInfoId = res[0].value
this.enterpriseInfoIdPie = res[0].value
})
}

View File

@ -1,3 +1,6 @@
<div class="box">
<nz-card nzTitle="运单状态分布">
<nz-select [(ngModel)]="enterpriseInfoIdPie" style="width: 200px" (ngModelChange)="initData()">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option>
</nz-select>
<g2-custom delay="100" (render)="render($event)"></g2-custom>
</div>
</nz-card>

View File

@ -1,5 +1,5 @@
.box{
width: 50%;
overflow: hidden;
margin:0 auto;
overflow: hidden;
}

View File

@ -13,21 +13,30 @@ export class OperationtablePieComponent implements OnInit {
@ViewChild('pie', { static: false }) pie!: G2PieComponent;
chartData: any = [];
el: any;
enterpriseInfoIdPie = ''
interManlist: any = []
constructor(private service: DataService, private ngZone: NgZone) {
}
ngOnInit(): void {
this.initData()
this.initManData()
}
initData(){
this.service.request(this.service.$api_operationalReportWaybillStatusDistribution).subscribe(res => {
this.service.request(this.service.$api_operationalReportWaybillStatusDistribution, {id: this.enterpriseInfoIdPie}).subscribe(res => {
if (res) {
this.chartData = res
this.ngZone.runOutsideAngular(() => this.init(this.el));
}
})
}
initManData() {
this.service.getNetworkFreightForwarder().subscribe(res => {
this.interManlist = res
this.enterpriseInfoIdPie = res[0].value
})
}
render(el: ElementRef<HTMLDivElement>): void {
this.el = el.nativeElement
}

View File

@ -0,0 +1 @@
<g2-custom delay="100" (render)="render($event)"></g2-custom>

View File

@ -0,0 +1,75 @@
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { Chart } from '@antv/g2';
import { DataService } from 'src/app/routes/datatable/services/data.service';
@Component({
selector: 'app-operation-pillar',
templateUrl: './pillar.component.html',
styleUrls: ['./pillar.component.less']
})
export class OperationPillarComponent implements OnInit, OnChanges {
el: any;
@Input() chartData: any;
chart: any;
constructor(private service: DataService, private ngZone: NgZone) {
}
ngOnChanges(changes: SimpleChanges): void {
if (this.chartData) {
// setTimeout(()=>{
// this.chart.render(true)
// }, 1000)
}
}
ngOnInit(): void {
}
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(() => {
this.ngZone.runOutsideAngular(() => this.init(this.el));
},1000)
}
private init(el: HTMLElement): void {
this.chart = new Chart({
container: el,
autoFit: true,
height: 500,
});
this.chart.data(this.chartData);
this.chart.scale('number', {
nice: true,
});
this.chart.tooltip({
showMarkers: false,
shared: true,
});
this.chart
.interval()
.position('time*number')
.color('name')
.adjust([
{
type: 'dodge',
marginRatio: 0,
},
]);
this.chart.interaction('active-region');
this.chart.render();
}
}

View File

@ -8,7 +8,6 @@ import { DatatableOperationtableComponent } from './components/operationtable/op
import { OperationtablePieComponent } from './components/operationtable/pie/pie.component';
import { DatatableOrderReportingComponent } from './reporting/components/order-reporting/order-reporting.component';
import { DatatableDataindexComponent } from './components/dataindex/dataindex.component';
import { OperationtableCurveComponent } from './components/operationtable/curve/curve.component';
import { DatatableComplianceIndexComponent } from './components/compliance/index/index.component';
import { DatatableFinancetableComponent } from './components/financetable/financetable.component';
import { DatatableInvoicetableComponent } from './components/invoicetable/invoicetable.component';
@ -23,8 +22,12 @@ import { DatatableBusiindexComponent } from './components/busitable/busiindex/bu
import { DatatableMantableComponent } from './components/busitable/mantable/mantable.component';
import { BusitablePillarComponent } from './components/busitable/busiindex/pillar/pillar.component';
import { DatatableReportingFundInfoComponent } from './reporting/components/fund-info/fund-info.component';
import { BusitableCurveComponent } from './components/busitable/busiindex/curve2/curve.component';
import { BusitableCurveComponent } from './components/busitable/busiindex/curve/curve.component';
import { OperationPillarComponent } from './components/operationtable/pillar/pillar.component';
import { OperationCurveComponent } from './components/operationtable/curve/curve.component';
import { FinanceTableCurveComponent } from './components/financetable/curve/curve.component';
import { FinancetablePillarComponent } from './components/financetable/pillar/pillar.component';
import { ComplianceCurveComponent } from './components/compliance/index/curve/curve.component';
const COMPONENTS: Type<void>[] = [
DatatableDataindexComponent,
@ -34,7 +37,6 @@ const COMPONENTS: Type<void>[] = [
DatatableOperationtableComponent,
OperationtablePieComponent,
DatatableOrderReportingComponent,
OperationtableCurveComponent,
DatatableComplianceIndexComponent,
DatatableFinancetableComponent,
DatatableInvoicetableComponent,
@ -49,9 +51,14 @@ const COMPONENTS: Type<void>[] = [
DatatableMantableComponent,
BusitablePillarComponent,
DatatableFundReportingComponent,
BusitableCurveComponent,
DatatableReportingFundInfoComponent,
FinanceTableCurveComponent
BusitableCurveComponent,
OperationPillarComponent,
OperationCurveComponent,
DatatableReportingFundInfoComponent,
FinanceTableCurveComponent,
FinancetablePillarComponent,
ComplianceCurveComponent
]

View File

@ -27,6 +27,8 @@ export class DataService extends BaseService {
$api_listPerformanceReportPage = `/api/sdc/report/listPerformanceReportPage`;
// 运营报表运单状态分布
$api_operationalReportWaybillStatusDistribution = `/api/sdc/report/operationalReportWaybillStatusDistribution`;
// 运营报表柱状图
$api_operationalReportHistogram = `/api/sdc/report/operationalReportHistogram`;
// 获取网络货运人
$api_get_network_freight_forwarder_list = `/api/mdc/cuc/networkTransporter/findAll`;
// 业绩报表柱状图
@ -37,6 +39,24 @@ export class DataService extends BaseService {
// 查询开票数据报表
$api_listFinancialReportPage = `/api/sdc/report/listFinancialReportPage`;
// 查询货主报表
$api_listShipperReportPage = `/api/sdc/report/listShipperReportPage`;
// 财务报表柱状图
$api_financialReportHistogram = `/api/sdc/report/financialReportHistogram`;
// 合规监控报表-运费直付占比
$api_getBillRateDirectPayment = `/api/sdc/reportComplianceMonitor/getBillRateDirectPayment`;
// 合规监控报表-货源单占比
$api_getBillRateProportion = `/api/sdc/reportComplianceMonitor/getBillRateProportion`;
// 合规监控报表-订单合格率
$api_getBillRateQualified = `/api/sdc/reportComplianceMonitor/getBillRateQualified`;
// 合规监控报表-付款及时率
$api_getBillTimelyPayment = `/api/sdc/reportComplianceMonitor/getBillTimelyPayment`;
// 合规监控报表-监控报表(折线图)
$api_listMonitorSituation = `/api/sdc/reportComplianceMonitor/listMonitorSituation`;
constructor(public injector: Injector) {
super(injector);
}
@ -45,7 +65,7 @@ export class DataService extends BaseService {
* 获取网络货运人
* @returns
*/
getNetworkFreightForwarder(params = {}, containerAll = false) {
getNetworkFreightForwarder(params = {}, containerAll = false) {
return this.request(this.$api_get_network_freight_forwarder_list, params).pipe(
map((res: any) => {
if (!res) {
@ -66,7 +86,7 @@ export class DataService extends BaseService {
);
}
getPerformanceReportHistogram(params = {}){
getPerformanceReportHistogram(params = {}) {
return this.request(this.$api_performanceReportHistogram, params)
}
}