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

This commit is contained in:
潘晓云
2022-04-07 17:56:30 +08:00
8 changed files with 142 additions and 84 deletions

View File

@ -1 +1,11 @@
<g2-custom delay="100" (render)="render($event)"></g2-custom> <!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-04-06 17:57:07
* @LastEditors : Shiming
* @LastEditTime : 2022-04-07 15:48:36
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\curve\\map.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<g2-custom delay="200" (render)="render($event)"></g2-custom>

View File

@ -49,7 +49,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
this.chart = new Chart({ this.chart = new Chart({
container: el, container: el,
autoFit: true, autoFit: true,
height: 700, height: 680,
padding: [0, 0] padding: [0, 0]
}); });
this.chart.tooltip({ this.chart.tooltip({
@ -106,7 +106,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
type: 'map', type: 'map',
callback: (obj: { trend: string; value: number }) => { callback: (obj: { trend: string; value: number }) => {
obj.trend = obj.value > 100 ? '蓝色地区' : '色地区'; obj.trend = obj.value > 100 ? '蓝色地区' : '色地区';
return obj; return obj;
} }
}); });
@ -120,7 +120,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
console.log(this.userView); console.log(this.userView);
console.log('45545'); console.log('45545');
this.userView.polygon().position('longitude*latitude').color('trend', ['#000', '#76ddb2']).tooltip('').style({fillOpacity: 0.85 }) this.userView.polygon().position('longitude*latitude').color('trend', ['#c7daf3', '#1779f3']).tooltip('').style({fillOpacity: 0.85 })
// .animate({ // .animate({
// leave: { // leave: {
// animation: 'fade-out' // animation: 'fade-out'

View File

@ -4,14 +4,23 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-04-06 10:57:56 * @Date : 2022-04-06 10:57:56
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-04-07 14:59:07 * @LastEditTime : 2022-04-07 16:57:05
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<!-- 页头 --> <!-- 页头 -->
<!-- <page-header-wrapper [title]="'运营报表'"></page-header-wrapper> --> <!-- <page-header-wrapper [title]="'运营报表'"></page-header-wrapper> -->
<div style="display: flex; justify-content: center; align-items: center"> <div >
<h1>运多星网络货运平台实时交易监控</h1> <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="">&nbsp;
<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>
</div> </div>
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col class="gutter-row" [nzSpan]="8"> <div nz-col class="gutter-row" [nzSpan]="8">
@ -34,10 +43,12 @@
</nz-row> </nz-row>
</nz-card> </nz-card>
<nz-card nzTitle="本月交易趋势"> <nz-card nzTitle="本月交易趋势">
<g2-timeline <g2-timeline repaint='true'
[data]="monthData" [data]="monthData2"
#timeline
[titleMap]="{ y1: '订单数', y2: '运单数' }" [titleMap]="{ y1: '订单数', y2: '运单数' }"
[height]="200" [height]="200"
[delay]='200'
mask="MM月DD日" mask="MM月DD日"
[slider]="false" [slider]="false"
></g2-timeline> ></g2-timeline>
@ -86,7 +97,7 @@
<app-datatable-customindex-map style="max-height: 600px" #map [chartData]="chartData"></app-datatable-customindex-map> <app-datatable-customindex-map style="max-height: 600px" #map [chartData]="chartData"></app-datatable-customindex-map>
<nz-card> <nz-card>
<nz-row [nzGutter]="24"> <nz-row [nzGutter]="24">
<g2-bar height="200" [title]="'本月发货量排名'" [data]="salesData2" (ready)='genData()'></g2-bar> <g2-bar #bar height="200" [delay]='500' repaint='true' [title]="'本月发货量排名'" [data]="salesData2" (ready)='genData()'></g2-bar>
</nz-row> </nz-row>
</nz-card> </nz-card>
</div> </div>

View File

@ -5,7 +5,7 @@ import { map } from 'rxjs/operators';
* @Author : Shiming * @Author : Shiming
* @Date : 2022-04-06 10:57:56 * @Date : 2022-04-06 10:57:56
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-04-07 14:59:12 * @LastEditTime : 2022-04-07 16:58:19
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -15,11 +15,10 @@ import { SFSchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
import { DataService } from '../../services/data.service'; import { DataService } from '../../services/data.service';
import { DatatableCustomindexMapComponent } from './curve/map.component'; import { DatatableCustomindexMapComponent } from './curve/map.component';
import { G2TimelineData } from '@delon/chart/timeline'; import { G2TimelineComponent, G2TimelineData } from '@delon/chart/timeline';
import { G2MiniAreaClickItem, G2MiniAreaData } from '@delon/chart/mini-area'; import { G2MiniAreaClickItem, G2MiniAreaData } from '@delon/chart/mini-area';
import { format } from 'date-fns'; import { format } from 'date-fns';
@Component({ @Component({
selector: 'app-datatable-datascreen', selector: 'app-datatable-datascreen',
templateUrl: './datascreen.component.html', templateUrl: './datascreen.component.html',
@ -29,111 +28,141 @@ export class DatatableDatascreenComponent implements OnInit {
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('orderSt') private readonly orderSt!: STComponent; @ViewChild('orderSt') private readonly orderSt!: STComponent;
@ViewChild('map') private readonly map!: DatatableCustomindexMapComponent; @ViewChild('map') private readonly map!: DatatableCustomindexMapComponent;
@ViewChild('timeline', { static: false }) timeline!: G2TimelineComponent;
columns: STColumn[] = []; columns: STColumn[] = [];
chartData: G2TimelineData[] = []; chartData: any[] = [];
orderColumns: STColumn[] = []; orderColumns: STColumn[] = [];
allDeal: any; allDeal: any;
headDeal: any; headDeal: any;
classifyDeal: any; classifyDeal: any;
todaysDeal: any; todaysDeal: any;
todayTime: string = '';
monthData: G2TimelineData[] = []; monthData: G2TimelineData[] = [];
salesData :any; monthData2: Array<any> = this.genData2();
salesData2 :any = this.genData(); salesData2: Array<any> = this.genData();
constructor(public service: DataService) { constructor(public service: DataService) {}
ngOnChanges(changes: any): void {
} console.log(changes);
}
/** /**
* 查询参数 * 查询参数
*/ */
get reqOrderParams() { get reqOrderParams() {
const params = { const params = {};
}
return { ...params }; return { ...params };
} }
get reqParams() { get reqParams() {
const params = { const params = {};
}
return { ...params }; return { ...params };
} }
ngOnInit(): void { ngOnInit(): void {
this.initST() setInterval(() => {
this.initOrderST() this.setTime();
this.initData() }, 1000);
this.initLineData() this.initST();
this.initOrderST();
this.initData();
// this.initLineData();
} }
initData(){ setTime() {
var myDate = new Date();
var mytime = myDate.toLocaleTimeString(); //获取当前时间
myDate.getFullYear(); //获取完整的年份(4位,1970-????)
myDate.getMonth(); //获取当前月份(0-11,0代表1月)
myDate.getDate(); //获取当前日(1-31)
this.todayTime = myDate.getFullYear() + '-' + myDate.getMonth() + 1 + '-' + myDate.getDate() + ' ' + mytime;
}
initData() {
this.service.request(this.service.$api_getAnnualTransactions).subscribe((res: any) => { this.service.request(this.service.$api_getAnnualTransactions).subscribe((res: any) => {
this.allDeal = res this.allDeal = res;
}) });
this.service.request(this.service.$api_getTransactionAmount).subscribe((res: any) => { this.service.request(this.service.$api_getTransactionAmount).subscribe((res: any) => {
this.headDeal = res this.headDeal = res;
}) });
this.service.request(this.service.$api_getCustomerStatistics).subscribe((res: any) => { this.service.request(this.service.$api_getCustomerStatistics).subscribe((res: any) => {
this.classifyDeal = res this.classifyDeal = res;
}) });
this.service.request(this.service.$api_getTradingToday).subscribe((res: any) => { this.service.request(this.service.$api_getTradingToday).subscribe((res: any) => {
this.todaysDeal = res this.todaysDeal = res;
})
}
initLineData(){
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
this.monthData = res
// for (let i = 0; i < 20; i += 1) {
// this.monthData.push({
// time: new Date().getTime() + 1000 * 60 * 60 * 24 * i,
// y1: Math.floor(Math.random() * 100) + 1000,
// y2: Math.floor(Math.random() * 100) + 10,
// });
// }
})
let value: any = []
this.service.request(this.service.$api_getShipmentRanking).subscribe((res: any) => {
console.log(res);
res.forEach((element: any) => {
value.push({
x: element.city,
y: element.weight,
}); });
let value: any = [];
this.service.request(this.service.$api_getTransactionDistribution).subscribe((res: any) => {
if (res) {
res.forEach((element: any) => {
value.push({
name: element.province,
value: element.weight
});
});
console.log(value);
this.chartData = value;
this.map.reRender();
}
}); });
this.salesData = value
console.log(this.salesData);
})
} }
// initLineData() {
// this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
// this.monthData = res;
// if (this.timeline) {
// console.log(this.timeline);
// // 等待组件渲染
// setTimeout(() => this.timeline.changeData(), 100);
// }
// });
// }
public genData(): G2MiniAreaData[] { public genData(): G2MiniAreaData[] {
let value: any = [] let value: any = [];
this.service.request(this.service.$api_getShipmentRanking).subscribe((res: any) => { this.service.request(this.service.$api_getShipmentRanking).subscribe((res: any) => {
console.log(res); console.log(res);
res.forEach((element: any) => { res.forEach((element: any) => {
value.push({ value.push({
x: element.city, x: element.city,
y: element.weight, y: element.weight
});
}); });
}); });
})
console.log(value); console.log(value);
return value; return value;
}
private genData2(): G2TimelineData[] {
let ress: G2TimelineData[] = [];
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
if (res) {
res.forEach((element: any) => {
ress.push({
time: element.time,
y1: element.billQuantity,
y2: element.wayBillQuantity
});
});
console.log(ress);
}
});
if(!ress) {
setTimeout(() => {},100)
} }
return ress;
}
/** /**
* 初始化数据列表 * 初始化数据列表
*/ */
initST() { initST() {
this.columns = [ this.columns = [
{ title: '序号', render: 'index', className: 'text-center',width: '70px' }, { title: '序号', render: 'index', className: 'text-center', width: '70px' },
{ title: '发货地', index: 'loadAddress', className: 'text-center',width: '90px' }, { title: '发货地', index: 'loadAddress', className: 'text-center', width: '90px' },
{ title: '卸货地', index: 'dischargeAddress', className: 'text-center' ,width: '90px'}, { title: '卸货地', index: 'dischargeAddress', className: 'text-center', width: '90px' },
{ title: '货物', index: 'goodsName', className: 'text-center',width: '90px'}, { title: '货物', index: 'goodsName', className: 'text-center', width: '90px' },
{ title: '数量', render: 'weight', className: 'text-center',width: '120px' }, { title: '数量', render: 'weight', className: 'text-center', width: '120px' }
]; ];
} }
initOrderST() { initOrderST() {
this.orderColumns = [ this.orderColumns = [
{ title: '运单号', index: 'wayCode', className: 'text-center',width: '120px' }, { title: '运单号', index: 'wayCode', className: 'text-center', width: '120px' },
{ title: '货主', index: 'shipperName', className: 'text-center',width: '70px' }, { title: '货主', index: 'shipperName', className: 'text-center', width: '70px' },
{ title: '时间', index: 'createTime', className: 'text-center',width: '200px' }, { title: '时间', index: 'createTime', className: 'text-center', width: '200px' },
{ title: '风险等级', index: 'warningType', className: 'text-center',width: '90px'} { title: '风险等级', index: 'warningType', className: 'text-center', width: '90px' }
]; ];
} }

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-27 10:30:56 * @Date : 2021-12-27 10:30:56
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-04-07 09:30:16 * @LastEditTime : 2022-04-07 15:07:27
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\services\\data.service.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\services\\data.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -82,6 +82,8 @@ export class DataService extends BaseService {
$api_getTradingTrend = `/api/sdc/reportDataLargeScreen/getTradingTrend`; $api_getTradingTrend = `/api/sdc/reportDataLargeScreen/getTradingTrend`;
// 数据大屏-交易额(今日,本月,累计) // 数据大屏-交易额(今日,本月,累计)
$api_getTransactionAmount = `/api/sdc/reportDataLargeScreen/getTransactionAmount`; $api_getTransactionAmount = `/api/sdc/reportDataLargeScreen/getTransactionAmount`;
// 数据大屏-交易分布
$api_getTransactionDistribution = `/api/sdc/reportDataLargeScreen/getTransactionDistribution`;

View File

@ -224,7 +224,7 @@ export class InvoiceRequestedComponent {
}; };
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => { this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
if (res) { if (res) {
this.service.msgSrv.success('开票成功!'); this.service.msgSrv.success('提交成功!');
modal.destroy(); modal.destroy();
this.st.load(1); this.st.load(1);
} }
@ -248,7 +248,7 @@ export class InvoiceRequestedComponent {
}; };
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => { this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
if (res) { if (res) {
this.service.msgSrv.success('开票成功!'); this.service.msgSrv.success('提交成功!');
modal.destroy(); modal.destroy();
this.st.load(1); this.st.load(1);
} }

View File

@ -133,7 +133,7 @@ export class RequestedInvoiceModalComponent {
this.nzModalService.confirm({ this.nzModalService.confirm({
nzTitle: '是否进入销票处理页面完成开票', nzTitle: '是否进入销票处理页面完成开票',
nzOnOk: () => { nzOnOk: () => {
this.service.msgSrv.success('开票成功'); this.service.msgSrv.success('提交成功');
this.modal.destroy(true); this.modal.destroy(true);
this.router.navigate(['/ticket/cancellation-invoice']); this.router.navigate(['/ticket/cancellation-invoice']);
}, },

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="38px" height="38px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -1218 -13 )">
<path d="M 21.944010416666668 9.72265625 C 22.092447916666668 9.87109375 22.166666666666668 10.060763888888884 22 10.291666666666668 L 22 21.375 C 22.166666666666668 21.605902777777775 22.092447916666668 21.795572916666664 21.944010416666668 21.944010416666664 C 21.795572916666668 22.092447916666664 21.60590277777778 22.166666666666664 21.375 22.166666666666664 L 13.458333333333334 22.166666666666664 C 13.227430555555559 22.166666666666664 13.037760416666666 22.092447916666664 12.889322916666666 21.944010416666664 C 12.740885416666666 21.795572916666664 12.666666666666666 21.605902777777775 12.666666666666666 21.375 L 12.666666666666666 19.791666666666664 C 12.666666666666666 19.56076388888889 12.740885416666666 19.37109375 12.889322916666666 19.22265625 C 13.037760416666666 19.07421875 13.227430555555559 19 13.458333333333334 19 L 19 19 L 19 10.291666666666668 C 19 10.060763888888884 19.07421875 9.87109375 19.22265625 9.72265625 C 19.371093750000004 9.57421875 19.560763888888893 9.5 19.791666666666668 9.5 L 21.375 9.5 C 21.60590277777778 9.5 21.795572916666668 9.57421875 21.944010416666668 9.72265625 Z M 30.65234375 25.75390625 C 31.856336805555557 23.69227430555555 32.45833333333333 21.440972222222225 32.45833333333333 19 C 32.45833333333333 16.559027777777775 31.856336805555557 14.307725694444445 30.65234375 12.24609375 C 29.44835069444445 10.184461805555552 27.81553819444445 8.551649305555552 25.75390625 7.34765625 C 23.692274305555557 6.143663194444444 21.440972222222225 5.541666666666668 19 5.541666666666668 C 16.55902777777778 5.541666666666668 14.307725694444446 6.143663194444444 12.24609375 7.34765625 C 10.184461805555555 8.551649305555552 8.551649305555555 10.184461805555552 7.34765625 12.24609375 C 6.143663194444445 14.307725694444445 5.541666666666667 16.559027777777775 5.541666666666667 19 C 5.541666666666667 21.440972222222225 6.143663194444445 23.69227430555555 7.34765625 25.75390625 C 8.551649305555555 27.81553819444444 10.184461805555555 29.448350694444443 12.24609375 30.65234375 C 14.307725694444446 31.856336805555557 16.55902777777778 32.45833333333333 19 32.45833333333333 C 21.440972222222225 32.45833333333333 23.692274305555557 31.856336805555557 25.75390625 30.65234375 C 27.81553819444445 29.448350694444443 29.44835069444445 27.81553819444444 30.65234375 25.75390625 Z M 35.45182291666667 9.462890625 C 37.150607638888886 12.373914930555552 38 15.552951388888884 38 19 C 38 22.44704861111111 37.150607638888886 25.62608506944444 35.45182291666667 28.537109375 C 33.75303819444445 31.448133680555557 31.448133680555557 33.75303819444444 28.537109375 35.45182291666667 C 25.62608506944445 37.15060763888889 22.44704861111111 38 19 38 C 15.55295138888889 38 12.373914930555555 37.15060763888889 9.462890625 35.45182291666667 C 6.551866319444445 33.75303819444444 4.246961805555556 31.448133680555557 2.5481770833333335 28.537109375 C 0.8493923611111109 25.62608506944444 0 22.44704861111111 0 19 C 0 15.552951388888884 0.8493923611111109 12.373914930555552 2.5481770833333335 9.462890625 C 4.246961805555556 6.551866319444444 6.551866319444445 4.246961805555552 9.462890625 2.548177083333332 C 12.373914930555555 0.8493923611111078 15.55295138888889 0 19 0 C 22.44704861111111 0 25.62608506944445 0.8493923611111078 28.537109375 2.548177083333332 C 31.448133680555557 4.246961805555552 33.75303819444445 6.551866319444444 35.45182291666667 9.462890625 Z " fill-rule="nonzero" fill="#000000" stroke="none" transform="matrix(1 0 0 1 1218 13 )" />
</g>
</svg>