diff --git a/src/app/admin/index/index/index.component.less b/src/app/admin/index/index/index.component.less
index cb1e546..904d3b2 100644
--- a/src/app/admin/index/index/index.component.less
+++ b/src/app/admin/index/index/index.component.less
@@ -5,3 +5,45 @@
.row-bottom {
margin-bottom: 16px;
}
+
+.date {
+
+ float: right;
+
+}
+.span-block {
+ display:block;
+ margin-left: 10px;
+ text-align: center;
+ cursor:pointer;
+ color: white;
+
+}
+.wh-date {
+ width: 30px;
+ height: 30px;
+ border-radius: 4px;
+ line-height: 30px;
+}
+.wh-price {
+ width: 140px;
+ height: 50px;
+ line-height: 50px;
+ font-size: 18px;
+}
+.day {
+ background: #f50;
+}
+.week {
+ background: #faad14;
+}
+.month {
+ background: #2db7f5;
+}
+.year {
+ background: #87d068;
+}
+h3 {
+ margin-top: 14px;
+ margin-left: 10px;
+}
diff --git a/src/app/admin/index/index/index.component.ts b/src/app/admin/index/index/index.component.ts
index a3411cc..01d7cab 100644
--- a/src/app/admin/index/index/index.component.ts
+++ b/src/app/admin/index/index/index.component.ts
@@ -5,6 +5,7 @@ import {IndexService} from '../../../services/index.service';
import {environment} from '../../../../environments/environment';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
+import {CommonsService} from "../../../services/commons.service";
@Component({
@@ -42,11 +43,18 @@ export class IndexComponent implements OnInit {
tyBalance;
webSocket: WebSocket;
adminInfoObject: {};
+
+ // 根据年月日查询总交易金额
+ orderStatisticsByYMDData: any;
+ // 查询每日交易总额
+ orderStatisticsByProductTypeByDay: any;
+ orderStatisticsByProductTypeAll: any;
constructor(
private store: LocalStorageService, // 数据缓存
private message: NzMessageService, // 信息提示
private router: Router,
- private index: IndexService
+ private index: IndexService,
+ private common: CommonsService
) {
}
@@ -57,6 +65,9 @@ export class IndexComponent implements OnInit {
this.getIndexCount();
this.getLineCount();
this.queryCompanyAccountInfo2JD();
+ this.orderStatisticsByYMD(1);
+ this.orderStatisticsByProductType(1);
+ this.orderStatisticsByProductTypeByAll(3);
}
if (this.store.get(ADMIN_INFO_OBJECT)['highAgent'] != null) {
this.code = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id;
@@ -314,5 +325,142 @@ export class IndexComponent implements OnInit {
}
}).then(r => console.log(r));
}
+
+ // 查询
+ public orderStatisticsByYMD(type: number): void {
+ const queryParams = {
+ dateType: type,
+ num: this.common.dateTimeType(type)
+ };
+ this.index.orderStatisticsByYMD(queryParams , data => {
+ if (data['return_code'] === '000000') {
+ const timeData = [];
+ const sumData = [];
+ for (const i of data['return_data']) {
+ timeData.push(i['time']);
+ sumData.push(i['sum']);
+ }
+ this.orderStatisticsByYMDData = {
+ title: {
+ text: this.common.dateType(type) + '总交易额(元)',
+ },
+ xAxis: {
+ type: 'category',
+
+ data: timeData
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ data: sumData,
+ label: {
+ show: true,
+ color: 'black',
+ position: 'top'
+ },
+ type: 'bar',
+ showBackground: true,
+ color: '#1890ff',
+ backgroundStyle: {
+ color: 'rgba(180, 180, 180, 0.2)'
+ }
+ }
+ ]
+ };
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
+
+ }
+
+ public orderStatisticsByProductType(type): void {
+ const queryParams = {
+ dateType: type,
+ };
+ this.index.orderStatisticsByProductType(queryParams , data => {
+ if (data['return_code'] === '000000') {
+ const productData = [];
+ const sumData = [];
+ for (const i of data['return_data']) {
+ productData.push(this.common.productType(i['name']));
+ sumData.push(i['value']);
+ }
+ this.orderStatisticsByProductTypeByDay = {
+ title: {
+ text: '今日交易总额(元)',
+ },
+ xAxis: {
+ type: 'value'
+ },
+ yAxis: {
+ type: 'category',
+
+ data: productData
+ },
+ series: [
+ {
+ data: sumData,
+ label: {
+ show: true,
+ color: 'black',
+ position: 'right'
+ },
+ type: 'bar',
+ showBackground: true,
+ color: '#1890ff',
+ backgroundStyle: {
+ color: 'rgba(180, 180, 180, 0.2)'
+ }
+ }
+ ]
+ };
+
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
+ }
+
+
+ public orderStatisticsByProductTypeByAll(type): void {
+ const queryParams = {
+ dateType: type,
+ };
+ this.index.orderStatisticsByProductType(queryParams , data => {
+ if (data['return_code'] === '000000') {
+ const dataShow = [];
+ for (const i of data['return_data']) {
+ dataShow.push({
+ name: this.common.productType(i['name']),
+ value: i['value']
+ });
+ }
+ this.orderStatisticsByProductTypeAll = {
+ title: {
+ text: this.common.dateType(type) + '交易占比分布',
+ left: 'center'
+ },
+ tooltip: {
+ trigger: 'item'
+ },
+ series: [
+ {
+ name: '交易金额总额(元)',
+ type: 'pie',
+ radius: '50%',
+ data: dataShow,
+
+ }
+ ]
+ };
+
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
+ }
}
diff --git a/src/app/admin/navigation/navigation.component.html b/src/app/admin/navigation/navigation.component.html
index a85efac..b0a960d 100644
--- a/src/app/admin/navigation/navigation.component.html
+++ b/src/app/admin/navigation/navigation.component.html
@@ -5,11 +5,11 @@
{{userInfo.secRole.roleName}}
- -
+
-
首页
- -
+
-
{{item.menuName}}
-
diff --git a/src/app/admin/order-manage/order-manage-routing.module.ts b/src/app/admin/order-manage/order-manage-routing.module.ts
index f0c21ed..40cec00 100644
--- a/src/app/admin/order-manage/order-manage-routing.module.ts
+++ b/src/app/admin/order-manage/order-manage-routing.module.ts
@@ -7,10 +7,10 @@ import {OrderRefundListComponent} from './order-refund-list/order-refund-list.co
import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component';
import {StarbucksOrderListComponent} from './starbucks-order/starbucks-order-list/starbucks-order-list.component';
import {MemberChargeOrderListComponent} from './member-charge-order/member-charge-order-list/member-charge-order-list.component';
-import {OrderHListComponent} from '../order/order-h-list/order-h-list.component';
import {PreOrderComponent} from '../order/pre-order/pre-order.component';
import {DiscountUseConditionListComponent} from '../order/discount-use-condition-list/discount-use-condition-list.component';
import {DicountPackageOrderListComponent} from '../order/dicount-package-order-list/dicount-package-order-list.component';
+import {OrderListComponent} from '../recharge-order/order-list/order-list.component';
const routes: Routes = [
@@ -21,7 +21,7 @@ const routes: Routes = [
{ path: 'order-kfc-list', component: KfcOrderListComponent},
{ path: 'order-starbucks--list', component: StarbucksOrderListComponent},
{ path: 'order-member-charge--list', component: MemberChargeOrderListComponent},
- { path: 'order-h-list', component: OrderHListComponent },
+ { path: 'mobile-recharge-order-list', component: OrderListComponent },
{ path: 'pre-order', component: PreOrderComponent },
{ path: 'discount-use-condition-list', component: DiscountUseConditionListComponent },
{ path: 'discount-package-order-list', component: DicountPackageOrderListComponent},
diff --git a/src/app/admin/recharge-order/order-list/order-list.component.html b/src/app/admin/recharge-order/order-list/order-list.component.html
index b6348f3..f767ff7 100644
--- a/src/app/admin/recharge-order/order-list/order-list.component.html
+++ b/src/app/admin/recharge-order/order-list/order-list.component.html
@@ -163,6 +163,7 @@
{
+ callBack(data);
+ });
+ }
+ /**
+ * @Author Sum1Dream
+ * @methodName orderStatisticsByYMD
+ * @Description //
+ * @Date 15:56 2022/11/3
+ * @Param params: object, callBack
+ */
+ public orderStatisticsByProductType(params: object, callBack) {
+ this.http.get(environment.baseUrl + 'homeOrderStatistics/orderStatisticsByProductType?' + this.common.getWhereCondition(params)).subscribe(data => {
+ callBack(data);
+ });
+ }
}
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 7a35916..264e5d9 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -4,11 +4,11 @@
export const environment = {
production: false,
- // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
- // orderUrl: 'http://localhost:9304/order/',
+ baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
+ orderUrl: 'http://localhost:9304/order/',
// imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
- baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
- orderUrl: 'https://hsgcs.dctpay.com/order/',
+ // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
+ // orderUrl: 'https://hsgcs.dctpay.com/order/',
imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
From efe1c343df83c7501ac397b68baa6e4faa90ebc3 Mon Sep 17 00:00:00 2001
From: Sum1Dream <418471657@qq.com>
Date: Mon, 28 Nov 2022 11:43:47 +0800
Subject: [PATCH 2/3] 1
---
angular.json | 3 ++-
src/app/admin/index/index/index.component.ts | 10 ++++++++++
src/app/app.module.ts | 1 +
src/environments/environment.ts | 10 +++++-----
src/index.html | 2 +-
src/proxy.conf.json | 11 +++++++++++
6 files changed, 30 insertions(+), 7 deletions(-)
create mode 100644 src/proxy.conf.json
diff --git a/angular.json b/angular.json
index cc4e66b..218e30d 100644
--- a/angular.json
+++ b/angular.json
@@ -131,7 +131,8 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
- "browserTarget": "high-web:build"
+ "browserTarget": "high-web:build",
+ "proxyConfig":"proxy.conf.json"
},
"configurations": {
"production": {
diff --git a/src/app/admin/index/index/index.component.ts b/src/app/admin/index/index/index.component.ts
index 01d7cab..ce5dc2b 100644
--- a/src/app/admin/index/index/index.component.ts
+++ b/src/app/admin/index/index/index.component.ts
@@ -6,6 +6,7 @@ import {environment} from '../../../../environments/environment';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {CommonsService} from "../../../services/commons.service";
+import {HttpClient , HttpClientJsonpModule} from '@angular/common/http';
@Component({
@@ -51,6 +52,7 @@ export class IndexComponent implements OnInit {
orderStatisticsByProductTypeAll: any;
constructor(
private store: LocalStorageService, // 数据缓存
+ private http: HttpClient,
private message: NzMessageService, // 信息提示
private router: Router,
private index: IndexService,
@@ -59,6 +61,14 @@ export class IndexComponent implements OnInit {
}
ngOnInit(): void {
+
+ this.http.jsonp('/areas_v3/bound/510000_full.json' , 'features').subscribe(data => {
+ console.log(data);
+ });
+
+
+
+
this.adminInfoObject = this.store.get(ADMIN_INFO_OBJECT);
this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType;
if (this.roleType === 1) {
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 98d4ac3..83c1945 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -35,6 +35,7 @@ registerLocaleData(zh);
ReactiveFormsModule,
NavigationModule,
AppCommonModule,
+
NgxEchartsModule,
],
providers: [
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 264e5d9..74e2ac9 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -4,12 +4,12 @@
export const environment = {
production: false,
- baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
- orderUrl: 'http://localhost:9304/order/',
- // imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
- // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
- // orderUrl: 'https://hsgcs.dctpay.com/order/',
+ // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
+ // orderUrl: 'http://localhost:9304/order/',
imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
+ baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
+ orderUrl: 'https://hsgcs.dctpay.com/order/',
+ // imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
};
diff --git a/src/index.html b/src/index.html
index 7e90525..c50cc83 100644
--- a/src/index.html
+++ b/src/index.html
@@ -5,7 +5,7 @@
嗨森逛
-
+
diff --git a/src/proxy.conf.json b/src/proxy.conf.json
new file mode 100644
index 0000000..f0fcba4
--- /dev/null
+++ b/src/proxy.conf.json
@@ -0,0 +1,11 @@
+{
+ "/api":{
+ "target":"https://geo.datav.aliyun.com",
+ "secure":false,
+ "logLevel":"debug",
+ "changeOrigin":true,
+ "pathRewrite":{
+ "^/api":""
+ }
+ }
+}
From 06a882f7141d22a96e923a475175b2b611c1ae92 Mon Sep 17 00:00:00 2001
From: Sum1Dream <418471657@qq.com>
Date: Wed, 4 Jan 2023 13:49:48 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=A6=96=E9=A1=B5=20?=
=?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/environments/environment.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 74e2ac9..3f59405 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -4,10 +4,10 @@
export const environment = {
production: false,
- // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
+ baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'http://localhost:9304/order/',
imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
- baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
+ // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'https://hsgcs.dctpay.com/order/',
// imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',