From b314e0bd5dbeef190404c71c045f9c1a2f1295b3 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 07 一月 2026 09:39:17 +0800
Subject: [PATCH] 优化
---
admin/src/views/business/admissionStatistics.vue | 21 ++++++++++++---------
admin/src/views/business/carStatistics.vue | 6 ++++++
admin/.env.development | 4 ++--
3 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/admin/.env.development b/admin/.env.development
index 0f83c13..ef1b7cd 100644
--- a/admin/.env.development
+++ b/admin/.env.development
@@ -1,7 +1,7 @@
# 寮�鍙戠幆澧冮厤缃�
NODE_ENV = 'development'
-# VUE_APP_API_URL = 'https://atwl.ahzyssl.com/zhyq_interface'
-VUE_APP_API_URL = 'http://192.168.1.45:10010'
+VUE_APP_API_URL = 'https://atwl.ahzyssl.com/zhyq_interface'
+# VUE_APP_API_URL = 'http://192.168.1.45:10010'
# VUE_APP_API_URL = 'https://atwl.ahzyssl.com/zhyq_interface'
# VUE_APP_API_URL = 'http://10.50.250.253:8088/gateway_interface'
diff --git a/admin/src/views/business/admissionStatistics.vue b/admin/src/views/business/admissionStatistics.vue
index afcddff..e7b1a6d 100644
--- a/admin/src/views/business/admissionStatistics.vue
+++ b/admin/src/views/business/admissionStatistics.vue
@@ -167,17 +167,20 @@
getReportLists() {
getReportList({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 1 })
.then(res => {
+ if (!res || res.length === 0) {
+ this.column = []
+ this.list = []
+ return
+ }
+ this.column = res[0]
- this.column = res[0]
-
- this.list = res.slice(1).map(row => {
- const obj = {};
- this.column.forEach((header, index) => {
- obj[header] = row[index];
+ this.list = res.slice(1).map(row => {
+ const obj = {};
+ this.column.forEach((header, index) => {
+ obj[header] = row[index];
+ });
+ return obj;
});
- return obj;
- });
-
// if (res.length === 0) {
// this.column = []
// this.list = []
diff --git a/admin/src/views/business/carStatistics.vue b/admin/src/views/business/carStatistics.vue
index 6d31df8..701b34b 100644
--- a/admin/src/views/business/carStatistics.vue
+++ b/admin/src/views/business/carStatistics.vue
@@ -169,6 +169,12 @@
getReportList({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 0 })
.then(res => {
+ if (!res || res.length === 0) {
+ this.column = []
+ this.list = []
+ return
+ }
+
this.column = res[0]
this.list = res.slice(1).map(row => {
--
Gitblit v1.9.3