Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 13:20:56
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-06 20:24:20
|
||||
* @LastEditTime : 2022-04-14 15:43:56
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\customtable\\customindex\\customindex.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -12,19 +12,19 @@
|
||||
<page-header-wrapper [title]="'客户报表'"></page-header-wrapper>
|
||||
<div nz-row [nzGutter]="16">
|
||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||
<g2-card [title]="'货主'" [bordered]="true" [total]="hzData?.total" [footer]="'已认证' + ' ' + hzData?.auditPassTotal" contentHeight="46">
|
||||
<g2-card [title]="'货主'" [bordered]="true" [total]="hzData?.total || '0'" [footer]="'已认证' + ' ' + hzData?.auditPassTotal" contentHeight="46">
|
||||
</g2-card>
|
||||
</div>
|
||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||
<g2-card [title]="'合伙人'" [bordered]="true" [total]="hhrData?.total" [footer]="'已认证' + ' ' + hhrData?.auditPassTotal" contentHeight="46">
|
||||
<g2-card [title]="'合伙人'" [bordered]="true" [total]="hhrData?.total || '0'" [footer]="'已认证' + ' ' + hhrData?.auditPassTotal" contentHeight="46">
|
||||
</g2-card>
|
||||
</div>
|
||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||
<g2-card [title]="'司机'" [bordered]="true" [total]="sjData?.total" [footer]="'已认证' + ' ' + sjData?.auditPassTotal" contentHeight="46">
|
||||
<g2-card [title]="'司机'" [bordered]="true" [total]="sjData?.total || '0'" [footer]="'已认证' + ' ' + sjData?.auditPassTotal" contentHeight="46">
|
||||
</g2-card>
|
||||
</div>
|
||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||
<g2-card [title]="'车辆'" [bordered]="true" [total]="clData?.total" [footer]="'已认证' + ' '+ clData?.auditPassTotal" contentHeight="46">
|
||||
<g2-card [title]="'车辆'" [bordered]="true" [total]="clData?.total || '0'" [footer]="'已认证' + ' '+ clData?.auditPassTotal" contentHeight="46">
|
||||
</g2-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -38,10 +38,12 @@ export class DatatableCustomindexComponent implements OnInit {
|
||||
{ title: '未激活用户数', index: 'notActivationTotal', className: 'text-center' },
|
||||
{ title: '沉默用户数', index: 'silentTotal', className: 'text-center' },
|
||||
{ title: '流失用户数', index: 'drainTotal', className: 'text-center' },
|
||||
{ title: '流失率', index: 'drainRate', className: 'text-center',format: (item: any) => {return (item?.drainRate)*100 + '%' }}
|
||||
{ title: '流失率', index: 'drainRate', className: 'text-center',format: (item: any) => {return ((item?.drainRate)*100).toFixed(2) + '%' }}
|
||||
];
|
||||
hzData: any;
|
||||
hhrData: any;
|
||||
hhrData: any = {
|
||||
total: 0
|
||||
};
|
||||
sjData: any;
|
||||
clData: any;
|
||||
reportData: any = [];
|
||||
@ -114,7 +116,10 @@ export class DatatableCustomindexComponent implements OnInit {
|
||||
});
|
||||
this.service.request(this.service.$api_statistics_total, { type: 2 }).subscribe(res => {
|
||||
if (res) {
|
||||
|
||||
this.hhrData = res;
|
||||
console.log(this.hhrData);
|
||||
|
||||
}
|
||||
});
|
||||
this.service.request(this.service.$api_statistics_total, { type: 3 }).subscribe(res => {
|
||||
|
||||
@ -4,23 +4,26 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 10:57:56
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-13 15:20:32
|
||||
* @LastEditTime : 2022-04-14 15:48:32
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<!-- 页头 -->
|
||||
<!-- <page-header-wrapper [title]="'运营报表'"></page-header-wrapper> -->
|
||||
<div >
|
||||
<div style="position: relative;">
|
||||
<h1 style="display: flex; justify-content: center; align-items: center;margin: 0; padding: 0; font-size: 25px;font-weight: 700;">运多星网络货运平台</h1>
|
||||
<div style="position: absolute; right: 0; display: flex;">
|
||||
<img src="../../../../../assets/images/oclock.svg" alt="">
|
||||
<span style="font-size: 16px; margin-top: 5px;">{{todayTime}}</span>
|
||||
<div>
|
||||
<div style="position: relative">
|
||||
<h1 style="display: flex; justify-content: center; align-items: center; margin: 0; padding: 0; font-size: 20px; font-weight: 700"
|
||||
>运多星网络货运平台</h1
|
||||
>
|
||||
<div style="position: absolute; right: 0; display: flex">
|
||||
<img src="../../../../../assets/images/oclock.svg" alt="" />
|
||||
<span style="font-size: 16px; margin-top: 5px">{{ todayTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1 style="display: flex; justify-content: center; align-items: center;margin: 0; padding: 0;font-size: 25px;font-weight: 700;">实时交易监控</h1>
|
||||
|
||||
<h1 style="display: flex; justify-content: center; align-items: center; padding: 0; font-size: 20px; font-weight: 700"
|
||||
>实时交易监控</h1
|
||||
>
|
||||
</div>
|
||||
<div nz-row [nzGutter]="24">
|
||||
<div nz-col class="gutter-row" nzXs="12" nzSm="12" nzMd="12" nzLg="12" nzXl="8" nzXXl="8">
|
||||
@ -42,16 +45,15 @@
|
||||
</nz-col>
|
||||
</nz-row>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="本月交易趋势" >
|
||||
<app-financetable-curve-min #curve [chartData]='chartData2'></app-financetable-curve-min>
|
||||
<nz-card nzTitle="本月交易趋势">
|
||||
<app-financetable-curve-min #curve [chartData]="chartData2"></app-financetable-curve-min>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="实时货源">
|
||||
<nz-card nzTitle="实时货源" style="height: 400px">
|
||||
<st
|
||||
#st
|
||||
multiSort
|
||||
bordered
|
||||
[columns]="columns"
|
||||
[scroll]="{ y: '320px' }"
|
||||
[scroll]="{ y: '280px' }"
|
||||
[data]="service.$api_getRealTimeSupply"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data' } }"
|
||||
@ -86,10 +88,12 @@
|
||||
</nz-col>
|
||||
</nz-row>
|
||||
</nz-card>
|
||||
<div style="min-height: 550px">
|
||||
<app-datatable-customindex-map style="max-height: 680px" #map [chartData]="chartData"></app-datatable-customindex-map>
|
||||
</div>
|
||||
<nz-card>
|
||||
<nz-row [nzGutter]="24">
|
||||
<g2-bar #bar height="310" [delay]='500' repaint='true' [title]="'本月发货量排名'" [data]="salesData2" (ready)='genData()'></g2-bar>
|
||||
<g2-bar #bar height="350" [delay]="300" repaint="true" [title]="'本月发货量排名'" [data]="salesData2" (ready)="genData()"></g2-bar>
|
||||
</nz-row>
|
||||
</nz-card>
|
||||
</div>
|
||||
@ -152,12 +156,11 @@
|
||||
</nz-col>
|
||||
</nz-row>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="实时运单风控">
|
||||
<nz-card nzTitle="实时运单风控" style="height: 400px">
|
||||
<st
|
||||
#st
|
||||
multiSort
|
||||
bordered
|
||||
[scroll]="{y: '290px'}"
|
||||
[scroll]="{ y: '280px' }"
|
||||
[columns]="orderColumns"
|
||||
[data]="service.$api_getRealTimeWaybillRiskControl"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqOrderParams }"
|
||||
@ -165,9 +168,9 @@
|
||||
[page]="{ show: false, showSize: false, pageSizes: [5, 50, 100] }"
|
||||
[loading]="service.http.loading"
|
||||
>
|
||||
<ng-template st-row="carNo" let-item let-index="index">
|
||||
{{ item?.driverName }}{{ item?.carNo ? '/' + item?.carNo : '' }}
|
||||
</ng-template>
|
||||
<ng-template st-row="carNo" let-item let-index="index">
|
||||
{{ item?.driverName }}{{ item?.carNo ? '/' + item?.carNo : '' }}
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
</div>
|
||||
|
||||
@ -5,7 +5,11 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
.nz-statistic-number,.ant-statistic-content-value {
|
||||
font-size: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.ant-table-thead > tr > th, .ant-table-tbody > tr > td, .ant-table tfoot > tr > th, .ant-table tfoot > tr > td {
|
||||
padding: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,7 @@ import { map } from 'rxjs/operators';
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 10:57:56
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-13 10:25:50
|
||||
* @LastEditTime : 2022-04-14 16:21:00
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -44,7 +44,7 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
|
||||
monthData: G2TimelineData[] = [];
|
||||
monthData2:G2TimelineData[] =[];
|
||||
salesData2: Array<any> = this.genData();
|
||||
salesData2: Array<any> = [];
|
||||
constructor(public service: DataService) {}
|
||||
ngOnChanges(changes: any): void {
|
||||
console.log(changes);
|
||||
@ -81,6 +81,7 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
this.service.request(this.service.$api_getAnnualTransactions).subscribe((res: any) => {
|
||||
this.allDeal = res;
|
||||
});
|
||||
this.initPillarData()
|
||||
this.service.request(this.service.$api_getTransactionAmount).subscribe((res: any) => {
|
||||
this.headDeal = res;
|
||||
});
|
||||
@ -105,7 +106,7 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
public genData(): G2MiniAreaData[] {
|
||||
genData(): any{
|
||||
let value: any = [];
|
||||
this.service.request(this.service.$api_getShipmentRanking).subscribe((res: any) => {
|
||||
console.log(res);
|
||||
@ -115,32 +116,32 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
y: element.weight
|
||||
});
|
||||
});
|
||||
this.salesData2 = value
|
||||
});
|
||||
console.log(value);
|
||||
return value;
|
||||
}
|
||||
initPillarData(){
|
||||
this.curve.reRender()
|
||||
// this.curve.reRender()
|
||||
this.genData();
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '序号', render: 'index', className: 'text-center', width: '70px', },
|
||||
{ title: '发货地', index: 'loadAddress', className: 'text-center', width: '90px' },
|
||||
{ title: '卸货地', index: 'dischargeAddress', className: 'text-center', width: '90px' },
|
||||
{ title: '货物', index: 'goodsName', className: 'text-center', width: '90px' },
|
||||
{ title: '数量', render: 'weight', className: 'text-center', width: '120px' }
|
||||
{ title: '序号', render: 'index', className: 'text-center', },
|
||||
{ title: '发货地', index: 'loadAddress', className: 'text-center', },
|
||||
{ title: '卸货地', index: 'dischargeAddress', className: 'text-center',},
|
||||
{ title: '货物', index: 'goodsName', className: 'text-center', },
|
||||
{ title: '数量', render: 'weight', className: 'text-center',}
|
||||
];
|
||||
}
|
||||
initOrderST() {
|
||||
this.orderColumns = [
|
||||
{ title: '运单号', index: 'wayCode', className: 'text-center', width: '150px' },
|
||||
{ title: '司机/车辆', index: 'carNo', className: 'text-center', width: '120px' },
|
||||
{ title: '货主', index: 'shipperName', className: 'text-center', width: '200px' },
|
||||
{ title: '时间', index: 'createTime', className: 'text-center', width: '200px' },
|
||||
{ title: '异常预警', index: 'warningTypeLabel', className: 'text-center', width: '120px' }
|
||||
{ title: '运单号', index: 'wayCode', className: 'text-center', },
|
||||
{ title: '司机/车辆', index: 'carNo', className: 'text-center', },
|
||||
{ title: '货主', index: 'shipperName', className: 'text-center', },
|
||||
{ title: '时间', index: 'createTime', className: 'text-center', },
|
||||
{ title: '异常预警', index: 'warningTypeLabel', className: 'text-center',}
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges, Afte
|
||||
constructor(private service: DataService, private ngZone: NgZone) {}
|
||||
ngAfterViewInit(): void {
|
||||
this.map.el.nativeElement.style.height = this.map.el.nativeElement.clientWidth + 'px'
|
||||
this.chart.render();
|
||||
this.chart?.render();
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
@ -35,7 +35,6 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges, Afte
|
||||
|
||||
ngOnInit(): void {}
|
||||
reRender() {
|
||||
console.log('5454545');
|
||||
setTimeout(() => {
|
||||
this.chart.render();
|
||||
}, 1000);
|
||||
@ -75,7 +74,6 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges, Afte
|
||||
this.chart.legend('trend', {
|
||||
position: 'left'
|
||||
});
|
||||
console.log('8888');
|
||||
|
||||
// 绘制世界地图背景
|
||||
this.ds = new DataSet();
|
||||
@ -95,11 +93,10 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges, Afte
|
||||
if(res) {
|
||||
res.forEach((element: any) => {
|
||||
value.push({
|
||||
name: element.province,
|
||||
value: element.weight,
|
||||
'省份': element.province,
|
||||
'订单数': element.weight,
|
||||
});
|
||||
});
|
||||
console.log(value);
|
||||
this.userData = value
|
||||
|
||||
if (!(this.userData instanceof Array) || this.userData.length === 0) {
|
||||
@ -107,17 +104,18 @@ if (!(this.userData instanceof Array) || this.userData.length === 0) {
|
||||
}
|
||||
this.userDv = this.ds.createView().source(this.userData).transform({
|
||||
geoDataView: this.worldMap,
|
||||
field: 'name',
|
||||
field: '省份',
|
||||
type: 'geo.region',
|
||||
as: ['longitude', 'latitude']
|
||||
}).transform({
|
||||
type: 'map',
|
||||
callback: (obj: { trend: string; value: number }) => {
|
||||
if(obj.value < 500) {
|
||||
callback: (obj: { trend: string; 订单数: number }) => {
|
||||
|
||||
if(obj.订单数 < 500) {
|
||||
obj.trend = '500以下';
|
||||
} else if(obj.value >= 500 && obj.value < 1000){
|
||||
} else if(obj.订单数 >= 500 && obj.订单数 < 1000){
|
||||
obj.trend = '500-1000';
|
||||
} else if(obj.value >= 1000 ){
|
||||
} else if(obj.订单数 >= 1000 ){
|
||||
obj.trend = '>1000';
|
||||
}
|
||||
return obj;
|
||||
@ -127,13 +125,10 @@ if (!(this.userData instanceof Array) || this.userData.length === 0) {
|
||||
this.userView.data(this.userDv.rows);
|
||||
this.userView.scale({
|
||||
trend: {
|
||||
alias: '蓝色地区数量'
|
||||
alias: '订单交易数量'
|
||||
}
|
||||
});
|
||||
console.log(this.userView);
|
||||
console.log('45545');
|
||||
|
||||
this.userView.polygon().position('longitude*latitude').color('trend', ['#0a3f80', '#1b6aca', '#5d93d4']).tooltip('name*trend*value').style({fillOpacity: 0.85 })
|
||||
this.userView.polygon().position('longitude*latitude').color('trend', ['#0a3f80', '#1b6aca', '#5d93d4']).tooltip('省份*订单数').style({fillOpacity: 0.85 })
|
||||
.animate({
|
||||
leave: {
|
||||
animation: 'fade-out'
|
||||
@ -145,10 +140,6 @@ if (!(this.userData instanceof Array) || this.userData.length === 0) {
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
console.log('9999');
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ export class DatatableOrderReportingComponent implements OnInit {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
enterpriseInfoId: {
|
||||
networkTransporter: {
|
||||
title: '网络货运人',
|
||||
type: 'string',
|
||||
ui: {
|
||||
|
||||
Reference in New Issue
Block a user