解决冲突
This commit is contained in:
@ -4,15 +4,23 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 10:57:56
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-07 16:16:57
|
||||
* @LastEditTime : 2022-04-07 16:37: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 >
|
||||
<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">
|
||||
|
||||
@ -5,7 +5,7 @@ import { map } from 'rxjs/operators';
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 10:57:56
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-07 15:53:41
|
||||
* @LastEditTime : 2022-04-07 16:31:17
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -19,7 +19,6 @@ 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',
|
||||
@ -38,68 +37,75 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
headDeal: any;
|
||||
classifyDeal: any;
|
||||
todaysDeal: any;
|
||||
todayTime: string ='';
|
||||
|
||||
monthData: G2TimelineData[] = [];
|
||||
salesData :any;
|
||||
salesData2 :Array<any> = this.genData();
|
||||
constructor(public service: DataService) {
|
||||
|
||||
}
|
||||
salesData: any;
|
||||
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
|
||||
})
|
||||
let value: any = []
|
||||
this.todaysDeal = res;
|
||||
});
|
||||
let value: any = [];
|
||||
this.service.request(this.service.$api_getTransactionDistribution).subscribe((res: any) => {
|
||||
if(res) {
|
||||
if (res) {
|
||||
res.forEach((element: any) => {
|
||||
value.push({
|
||||
name: element.province,
|
||||
value: element.weight,
|
||||
value: element.weight
|
||||
});
|
||||
});
|
||||
console.log(value);
|
||||
this.chartData = value
|
||||
this.map.reRender()
|
||||
this.chartData = value;
|
||||
this.map.reRender();
|
||||
}
|
||||
})
|
||||
}
|
||||
initLineData(){
|
||||
});
|
||||
}
|
||||
initLineData() {
|
||||
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
|
||||
this.monthData = res
|
||||
this.monthData = res;
|
||||
if (this.timeline) {
|
||||
console.log(this.timeline);
|
||||
|
||||
@ -113,17 +119,17 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
// y2: Math.floor(Math.random() * 100) + 10,
|
||||
// });
|
||||
// }
|
||||
})
|
||||
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,
|
||||
y: element.weight
|
||||
});
|
||||
});
|
||||
this.salesData = value
|
||||
this.salesData = value;
|
||||
// if (this.pie) {
|
||||
// // 等待组件渲染
|
||||
// setTimeout(() => {
|
||||
@ -132,40 +138,40 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
// });
|
||||
// }
|
||||
console.log(this.salesData);
|
||||
})
|
||||
});
|
||||
}
|
||||
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,
|
||||
y: element.weight
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
console.log(value);
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
* 初始化数据列表
|
||||
*/
|
||||
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' }
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
6
src/assets/images/oclock.svg
Normal file
6
src/assets/images/oclock.svg
Normal 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>
|
||||
Reference in New Issue
Block a user