From 72eb06bb2d59d6b01f21f443aa847e06b50d38c0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-FUDKNA8\\znjsz" Date: Thu, 18 Apr 2024 16:18:38 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=8A=AF=E7=89=87=E4=BA=A7=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/home.js | 10 +- src/views/dashboard/charts/Bipv.vue | 7 +- src/views/dashboard/charts/ChipYield.vue | 44 ++++++++- src/views/dashboard/charts/ChipYieldChart.vue | 98 +++++++++++++++++-- src/views/dashboard/charts/StdChart.vue | 76 ++++++++------ 5 files changed, 191 insertions(+), 44 deletions(-) diff --git a/src/store/modules/home.js b/src/store/modules/home.js index 11e0364..e9f8163 100644 --- a/src/store/modules/home.js +++ b/src/store/modules/home.js @@ -95,10 +95,18 @@ const actions = { }; // BIPV产出 if (dataArr) { - console.log("copilot init home--->", dataArr); for (const factory of dataArr) { /* 工厂索引 */ const factoryId = factory.factory; + /* 收集目标数据 */ + if (targetArr) { + const target = targetArr.find((item) => item.factory === factoryId); + if (target) { + chipOutput.target.splice(factoryId, 1, target.chipYield ?? 0); + stdOutput.target.splice(factoryId, 1, target.componentYield ?? 0); + bipvOutput.target.splice(factoryId, 1, target.bipvProductOutput ?? 0); + } + } /* 收集芯片投入数据 */ chipInvest.current.splice( factoryId, diff --git a/src/views/dashboard/charts/Bipv.vue b/src/views/dashboard/charts/Bipv.vue index 97c4cf4..1793791 100644 --- a/src/views/dashboard/charts/Bipv.vue +++ b/src/views/dashboard/charts/Bipv.vue @@ -39,7 +39,12 @@ export default { const bipvOutput = this.$store.getters.home.bipvOutput; // const bipvTarget = this.$store.getters.home.bipvTarget; - if (!bipvOutput || !bipvOutput.current || !bipvOutput.previous) { + if ( + !bipvOutput || + !bipvOutput.current || + !bipvOutput.previous || + !bipvOutput.target + ) { return [ { name: "样例数据--2024年目标值", diff --git a/src/views/dashboard/charts/ChipYield.vue b/src/views/dashboard/charts/ChipYield.vue index 2f740cb..f901a6b 100644 --- a/src/views/dashboard/charts/ChipYield.vue +++ b/src/views/dashboard/charts/ChipYield.vue @@ -7,7 +7,7 @@