From 7f1ffa29f5919bf9c0045fd7a14a9d96c88394bb Mon Sep 17 00:00:00 2001 From: 2509699674 <2509699647@qq.com> Date: Mon, 23 Dec 2024 19:34:02 +0800 Subject: [PATCH] '1' --- yanshouban/src/views/analysis/statistics/index.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/yanshouban/src/views/analysis/statistics/index.vue b/yanshouban/src/views/analysis/statistics/index.vue index 295e45b..146a035 100644 --- a/yanshouban/src/views/analysis/statistics/index.vue +++ b/yanshouban/src/views/analysis/statistics/index.vue @@ -126,7 +126,7 @@ import {QuestionGetAll,excelToTicketTypeSalesSituation} from '@/api/piaowu' export default { data() { return { - +flag:false, total: 1, pageSize: 10, currentPage: 1, @@ -241,11 +241,15 @@ export default { } if (['销售数量(张)', '客单价(元)', '销售金额(元)'].includes(column.label)) { const values = data.map(item => Number(item[column.property])) + if (!values.every(value => isNaN(value))) { sums[index] = values.reduce((prev, curr) => { const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { return prev; } @@ -259,8 +263,8 @@ export default { }); return sums; - } }, + handleCurrentChange(val) { this.currentPage = val }, @@ -281,7 +285,8 @@ export default { }; } } - } + }, + }, } -- libgit2 0.21.4