Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -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>
|
||||
@ -49,7 +49,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
|
||||
this.chart = new Chart({
|
||||
container: el,
|
||||
autoFit: true,
|
||||
height: 700,
|
||||
height: 680,
|
||||
padding: [0, 0]
|
||||
});
|
||||
this.chart.tooltip({
|
||||
@ -106,7 +106,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
|
||||
type: 'map',
|
||||
callback: (obj: { trend: string; value: number }) => {
|
||||
|
||||
obj.trend = obj.value > 100 ? '蓝色地区' : '红色地区';
|
||||
obj.trend = obj.value > 100 ? '蓝色地区' : '灰色地区';
|
||||
return obj;
|
||||
}
|
||||
});
|
||||
@ -120,7 +120,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
|
||||
console.log(this.userView);
|
||||
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({
|
||||
// leave: {
|
||||
// animation: 'fade-out'
|
||||
|
||||
@ -4,14 +4,23 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 10:57:56
|
||||
* @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
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<!-- 页头 -->
|
||||
<!-- <page-header-wrapper [title]="'运营报表'"></page-header-wrapper> -->
|
||||
<div style="display: flex; justify-content: center; align-items: center">
|
||||
<h1>运多星网络货运平台实时交易监控</h1>
|
||||
<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>
|
||||
|
||||
<h1 style="display: flex; justify-content: center; align-items: center;margin: 0; padding: 0;font-size: 25px;font-weight: 700;">实时交易监控</h1>
|
||||
|
||||
</div>
|
||||
<div nz-row [nzGutter]="24">
|
||||
<div nz-col class="gutter-row" [nzSpan]="8">
|
||||
@ -34,10 +43,12 @@
|
||||
</nz-row>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="本月交易趋势">
|
||||
<g2-timeline
|
||||
[data]="monthData"
|
||||
<g2-timeline repaint='true'
|
||||
[data]="monthData2"
|
||||
#timeline
|
||||
[titleMap]="{ y1: '订单数', y2: '运单数' }"
|
||||
[height]="200"
|
||||
[delay]='200'
|
||||
mask="MM月DD日"
|
||||
[slider]="false"
|
||||
></g2-timeline>
|
||||
@ -86,7 +97,7 @@
|
||||
<app-datatable-customindex-map style="max-height: 600px" #map [chartData]="chartData"></app-datatable-customindex-map>
|
||||
<nz-card>
|
||||
<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-card>
|
||||
</div>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { map } from 'rxjs/operators';
|
||||
/*
|
||||
* @Description :
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 10:57:56
|
||||
* @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
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -15,11 +15,10 @@ import { SFSchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { DataService } from '../../services/data.service';
|
||||
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 { format } from 'date-fns';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-datatable-datascreen',
|
||||
templateUrl: './datascreen.component.html',
|
||||
@ -29,114 +28,144 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('orderSt') private readonly orderSt!: STComponent;
|
||||
@ViewChild('map') private readonly map!: DatatableCustomindexMapComponent;
|
||||
@ViewChild('timeline', { static: false }) timeline!: G2TimelineComponent;
|
||||
|
||||
columns: STColumn[] = [];
|
||||
chartData: G2TimelineData[] = [];
|
||||
chartData: any[] = [];
|
||||
orderColumns: STColumn[] = [];
|
||||
allDeal: any;
|
||||
headDeal: any;
|
||||
classifyDeal: any;
|
||||
todaysDeal: any;
|
||||
|
||||
monthData: G2TimelineData[] = [];
|
||||
salesData :any;
|
||||
salesData2 :any = this.genData();
|
||||
constructor(public service: DataService) {
|
||||
|
||||
}
|
||||
todayTime: string = '';
|
||||
|
||||
monthData: G2TimelineData[] = [];
|
||||
monthData2: Array<any> = this.genData2();
|
||||
salesData2: Array<any> = this.genData();
|
||||
constructor(public service: DataService) {}
|
||||
ngOnChanges(changes: any): void {
|
||||
console.log(changes);
|
||||
}
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqOrderParams() {
|
||||
const params = {
|
||||
|
||||
}
|
||||
const params = {};
|
||||
return { ...params };
|
||||
}
|
||||
get reqParams() {
|
||||
const params = {
|
||||
}
|
||||
const params = {};
|
||||
return { ...params };
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.initST()
|
||||
this.initOrderST()
|
||||
this.initData()
|
||||
this.initLineData()
|
||||
setInterval(() => {
|
||||
this.setTime();
|
||||
}, 1000);
|
||||
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.allDeal = res
|
||||
})
|
||||
this.allDeal = res;
|
||||
});
|
||||
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.classifyDeal = res
|
||||
})
|
||||
this.classifyDeal = res;
|
||||
});
|
||||
this.service.request(this.service.$api_getTradingToday).subscribe((res: any) => {
|
||||
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,
|
||||
this.todaysDeal = res;
|
||||
});
|
||||
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[] {
|
||||
let value: any = []
|
||||
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,
|
||||
value.push({
|
||||
x: element.city,
|
||||
y: element.weight
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
});
|
||||
console.log(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() {
|
||||
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', 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' }
|
||||
];
|
||||
}
|
||||
initOrderST() {
|
||||
this.orderColumns = [
|
||||
{ title: '运单号', index: 'wayCode', className: 'text-center',width: '120px' },
|
||||
{ title: '货主', index: 'shipperName', className: 'text-center',width: '70px' },
|
||||
{ title: '时间', index: 'createTime', className: 'text-center',width: '200px' },
|
||||
{ title: '风险等级', index: 'warningType', className: 'text-center',width: '90px'}
|
||||
{ title: '运单号', index: 'wayCode', className: 'text-center', width: '120px' },
|
||||
{ title: '货主', index: 'shipperName', className: 'text-center', width: '70px' },
|
||||
{ title: '时间', index: 'createTime', className: 'text-center', width: '200px' },
|
||||
{ title: '风险等级', index: 'warningType', className: 'text-center', width: '90px' }
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
handleClick(data: G2MiniAreaClickItem): void {
|
||||
this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`);
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-27 10:30:56
|
||||
* @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
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -82,6 +82,8 @@ export class DataService extends BaseService {
|
||||
$api_getTradingTrend = `/api/sdc/reportDataLargeScreen/getTradingTrend`;
|
||||
// 数据大屏-交易额(今日,本月,累计)
|
||||
$api_getTransactionAmount = `/api/sdc/reportDataLargeScreen/getTransactionAmount`;
|
||||
// 数据大屏-交易分布
|
||||
$api_getTransactionDistribution = `/api/sdc/reportDataLargeScreen/getTransactionDistribution`;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -224,7 +224,7 @@ export class InvoiceRequestedComponent {
|
||||
};
|
||||
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功!');
|
||||
this.service.msgSrv.success('提交成功!');
|
||||
modal.destroy();
|
||||
this.st.load(1);
|
||||
}
|
||||
@ -248,7 +248,7 @@ export class InvoiceRequestedComponent {
|
||||
};
|
||||
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功!');
|
||||
this.service.msgSrv.success('提交成功!');
|
||||
modal.destroy();
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ export class RequestedInvoiceModalComponent {
|
||||
this.nzModalService.confirm({
|
||||
nzTitle: '是否进入销票处理页面完成开票',
|
||||
nzOnOk: () => {
|
||||
this.service.msgSrv.success('开票成功');
|
||||
this.service.msgSrv.success('提交成功');
|
||||
this.modal.destroy(true);
|
||||
this.router.navigate(['/ticket/cancellation-invoice']);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user