From c643aa0e1dbc923fd93706446bc93fdc46d48488 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Fri, 11 Oct 2024 12:13:59 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E7=A0=94=E5=8F=91?= =?UTF-8?q?=E6=8A=95=E5=85=A5=E8=B5=84=E9=87=91=E5=B9=B4=E4=BB=BD=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=97=B6chart=E6=B2=A1=E6=B8=B2=E6=9F=93=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/index.vue | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 44deeed..cc84890 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -187,7 +187,7 @@
-
+
@@ -200,7 +200,18 @@
-
+
+ +
+
@@ -208,19 +219,7 @@
-
- -
总资金:{{ toThousands(totalMoney) }}
-
@@ -317,7 +316,7 @@ import {getArticle} from "@/api/article"; const AuthStore = useAuthStore() const router = useRouter() const topLeftHeight = ref('') -const researchFundYear = ref('2024') +const researchFundYear = ref(new Date().getFullYear()+'') const activeName = ref('first') const docActiveTab = ref('first') const totalMoney = ref('45000') @@ -620,6 +619,7 @@ const getDoneList = () => { const changeResearchFundDataByYear=(year)=>{ if(year){ getResearchChart(year) + } } const getResearchChart = (year) => { @@ -628,9 +628,12 @@ const getResearchChart = (year) => { totalMoney.value = res.data.totalAmount moneyData.value = res.data.rdCompanyList if(res.data.rdCompanyList?.length ==0)return; + if (moneyPieOption.value.series && moneyPieOption.value.series?.length > 0) { moneyPieOption.value.series[0].data = res.data.rdCompanyList - initMoneyCharts() + nextTick(() => { + initMoneyCharts() + }) } } else { ElNotification({