From c157f4d2c588a73c1cc4ed0e41ef86608aeaef0c Mon Sep 17 00:00:00 2001 From: "[liang]" <[595996918@qq.com]> Date: Thu, 4 Aug 2022 18:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/companySummary/business.vue | 62 +++++++++++----------- src/components/companySummary/talent.vue | 14 ++--- src/views/Brand.vue | 16 +++--- 3 files changed, 47 insertions(+), 45 deletions(-) diff --git a/src/components/companySummary/business.vue b/src/components/companySummary/business.vue index 90e323f..cf934ef 100644 --- a/src/components/companySummary/business.vue +++ b/src/components/companySummary/business.vue @@ -5,14 +5,14 @@ --> diff --git a/src/components/companySummary/talent.vue b/src/components/companySummary/talent.vue index 6765fbd..ac06d22 100644 --- a/src/components/companySummary/talent.vue +++ b/src/components/companySummary/talent.vue @@ -10,23 +10,23 @@
{{ chartData.alipayPayAmount }}元 - {{ GetPercent(chartData.alipayPayAmount,0.1) }}% + {{ GetPercent(chartData.alipayPayAmount, 0.1) }}%
{{ chartData.weixinPayAmount }}元 - {{ GetPercent(chartData.weixinPayAmount,0.1) }}% + {{ GetPercent(chartData.weixinPayAmount, 0.1) }}%
{{ chartData.casePayAmount }}元 - {{ GetPercent(chartData.casePayAmount,0.1) }}% + {{ GetPercent(chartData.casePayAmount, 0.1) }}%
{{ chartData.robotPayAmount }}元 - {{ GetPercent(chartData.robotPayAmount,0.1) }}% + {{ GetPercent(chartData.robotPayAmount, 0.1) }}%
{{ chartData.unionPayAmount }}元 - {{ GetPercent(chartData.unionPayAmount,0.1) }}% + {{ GetPercent(chartData.unionPayAmount, 0.1) }}%
@@ -54,7 +54,7 @@ export default { // console.log(this.chartData) this.getEchartLeft2(); }, 500); - + }, methods: { GetPercent(num, total) { @@ -123,7 +123,7 @@ export default { let option = { title: { - text: "总金额:" + this.chartData.totalAmount + " 元", + text: `总金额: ${this.chartData ? this.chartData.totalAmount || 0 : 0} 元`, top: 20, left: 200, textStyle: { diff --git a/src/views/Brand.vue b/src/views/Brand.vue index c4f23c6..25aa34f 100644 --- a/src/views/Brand.vue +++ b/src/views/Brand.vue @@ -240,7 +240,7 @@ export default { // 今日交易金额-笔数数据 BiApi.getTodayTrade({ authCode }).then((res) => { // console.log(res); - if (res.code === 200) { + if (res && res.code === 200) { const { totalAmount, totalNum } = res.data this.startNumber = this.endNumber; this.startAmount = this.endAmount; @@ -250,32 +250,32 @@ export default { }); // 实时进出信息 BiApi.getRealTimeInOutRecord({ authCode, pageNum: 1, pageSize: 10 }).then((res) => { - if (res.code === 200) { + if (res && res.code === 200) { this.realTimeInOutRecord = res.rows } }); // 开放统计-车场排行 BiApi.getParkingRanking({ authCode }).then((res) => { - this.rankData = res.data + if (res && res.code === 200) this.rankData = res.data }) // 开放统计-支付统计 BiApi.paymentStatistics({ authCode }).then((res) => { - this.payData = res.data + if (res && res.code === 200) this.payData = res.data }) // 开放统计-收费车辆统计 BiApi.amountCartStatistics({ authCode }).then((res) => { - this.payDataCar = res.data + if (res && res.code === 200) this.payDataCar = res.data }) // 开放统计-24小时车流统计 BiApi.todayTrafficStatistics({ authCode }).then((res) => { - this.todayTraffic = res.data + if (res && res.code === 200) this.todayTraffic = res.data }) // 开放统计-24小时车辆使用统计 BiApi.todayCarUseStatistics({ authCode }).then((res) => { - this.todayCarUse = res.data + if (res && res.code === 200) this.todayCarUse = res.data }) BiApi.useCarStatistics({ authCode }).then((res) => { - this.useCarCon = res.data + if (res && res.code === 200) this.useCarCon = res.data }) },