From aa2ac270fc186d616977173c573a9678d3129927 Mon Sep 17 00:00:00 2001 From: "DESKTOP-FUDKNA8\\znjsz" Date: Sun, 28 Apr 2024 16:55:21 +0800 Subject: [PATCH] 1 --- src/store/modules/home.js | 23 ++++++++++++++----- .../yield/components/sub/city/CityData.vue | 1 + .../components/sub/ring/DoubleRingChart.vue | 3 ++- .../dashboard/components/CompanyInfo.vue | 10 +++++--- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/store/modules/home.js b/src/store/modules/home.js index 0843d43..ca92d85 100644 --- a/src/store/modules/home.js +++ b/src/store/modules/home.js @@ -18,6 +18,7 @@ const state = { efficiency: {}, }, home: { + /** 主页状态 */ ftoInvest: null, chipInvest: null, chipOutput: null, @@ -88,8 +89,8 @@ export default { actions, }; -// utils function function splitCurrentAndPrevious(factoryListResponse, targetListResponse) { + // 初始数据 const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init(); if (factoryListResponse) { for (const factory of factoryListResponse) { @@ -148,6 +149,10 @@ function getFactoryTargetValue(targetList, factoryId) { }; } +/** + * + * @returns 初始化状态值 + */ function init() { const t_ = { current: Array(7).fill(0), @@ -168,11 +173,11 @@ function init() { const bipvOutput = deepClone(chipOutput); return { - chipInvest, - ftoInvest, - chipOutput, - stdOutput, - bipvOutput, + chipInvest, // 芯片投入 + ftoInvest, // FTO投入 + chipOutput, // 芯片产出 + stdOutput, // 标准组件产出 + bipvOutput, // BIPV产出 }; } @@ -248,6 +253,12 @@ async function doFetch(copilot_module = "yield", fetch_target, params) { return null; } +/** + * + * @param {*} period 日周月年1,2,3,4 + * @param {*} target 是否获取目标数据 + * @returns + */ function getCopilotYield(period, target = false) { return getCopilotData("yield", period, target); } diff --git a/src/views/copilot/yield/components/sub/city/CityData.vue b/src/views/copilot/yield/components/sub/city/CityData.vue index 2f539f9..dca4e9c 100644 --- a/src/views/copilot/yield/components/sub/city/CityData.vue +++ b/src/views/copilot/yield/components/sub/city/CityData.vue @@ -98,6 +98,7 @@ export default { _cities[idx].value = v ?? 0; } ); + // 删掉凯盛光伏 _cities.splice(4, 1); return _cities; }, diff --git a/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue b/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue index e9182ea..760946b 100644 --- a/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue +++ b/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue @@ -8,7 +8,7 @@