diff --git a/src/app/routes/datatable/components/datascreen/curve/map.component.html b/src/app/routes/datatable/components/datascreen/curve/map.component.html
index 0640a4d4..4bdcc4de 100644
--- a/src/app/routes/datatable/components/datascreen/curve/map.component.html
+++ b/src/app/routes/datatable/components/datascreen/curve/map.component.html
@@ -1 +1,11 @@
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/src/app/routes/datatable/components/datascreen/curve/map.component.ts b/src/app/routes/datatable/components/datascreen/curve/map.component.ts
index 5a66c684..5702547c 100644
--- a/src/app/routes/datatable/components/datascreen/curve/map.component.ts
+++ b/src/app/routes/datatable/components/datascreen/curve/map.component.ts
@@ -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'
diff --git a/src/app/routes/datatable/components/datascreen/datascreen.component.html b/src/app/routes/datatable/components/datascreen/datascreen.component.html
index 0c3e37dc..4a4eb567 100644
--- a/src/app/routes/datatable/components/datascreen/datascreen.component.html
+++ b/src/app/routes/datatable/components/datascreen/datascreen.component.html
@@ -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.
-->
-
-
运多星网络货运平台实时交易监控
+
+
+
运多星网络货运平台
+
+

+
{{todayTime}}
+
+
+
+
实时交易监控
+
@@ -34,10 +43,12 @@
-
@@ -86,7 +97,7 @@
-
+
diff --git a/src/app/routes/datatable/components/datascreen/datascreen.component.ts b/src/app/routes/datatable/components/datascreen/datascreen.component.ts
index df261bc6..58a942d4 100644
--- a/src/app/routes/datatable/components/datascreen/datascreen.component.ts
+++ b/src/app/routes/datatable/components/datascreen/datascreen.component.ts
@@ -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
= this.genData2();
+ salesData2: Array = 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}`);
}
diff --git a/src/app/routes/datatable/services/data.service.ts b/src/app/routes/datatable/services/data.service.ts
index 32f2c4e0..e7443148 100644
--- a/src/app/routes/datatable/services/data.service.ts
+++ b/src/app/routes/datatable/services/data.service.ts
@@ -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`;
diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts
index 6b00085b..1978a0f9 100644
--- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts
+++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts
@@ -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);
}
diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts
index 4a536279..615ed34d 100644
--- a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts
+++ b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts
@@ -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']);
},
diff --git a/src/assets/images/oclock.svg b/src/assets/images/oclock.svg
new file mode 100644
index 00000000..596ea29d
--- /dev/null
+++ b/src/assets/images/oclock.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file