From 227411e38ee425bf7899b64c9aec835ca7430308 Mon Sep 17 00:00:00 2001 From: "DESKTOP-FUDKNA8\\znjsz" Date: Sun, 28 Apr 2024 14:54:54 +0800 Subject: [PATCH 1/3] =?UTF-8?q?update=20=E4=BA=A7=E9=87=8F=E9=A9=BE?= =?UTF-8?q?=E9=A9=B6=E8=88=B1=E7=9A=84=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 4 +- .../copilot/components/ChartContainer.vue | 69 ++++++++++++++++++ .../charts/base/fetcherDoubleRing.js | 10 --- src/views/copilot/components/name.vue | 0 .../charts/base => yield/assets}/icon.png | Bin .../components}/BipvOutput.vue | 2 +- .../components}/ChipInvest.vue | 4 +- .../components}/ChipOutput.vue | 2 +- .../charts => yield/components}/FtoInvest.vue | 4 +- .../charts => yield/components}/StdOutput.vue | 2 +- .../components/sub/bar}/BarChartBase.vue | 4 +- .../components/sub/city}/CityData.vue | 0 .../components/sub/city}/CityItem.vue | 5 +- .../components/sub/city}/CityName.vue | 2 +- .../components/sub/city}/CityValue.vue | 2 +- .../components/sub/gradient}/GradientText.vue | 0 .../components/sub/ring}/DoubleRingChart.vue | 2 +- .../sub/ring}/DoubleRingWrapper.vue | 4 +- src/views/copilot/yield/index.vue | 22 +++--- .../options}/double-ring-chart-options.js | 0 20 files changed, 99 insertions(+), 39 deletions(-) create mode 100644 src/views/copilot/components/ChartContainer.vue delete mode 100644 src/views/copilot/components/charts/base/fetcherDoubleRing.js delete mode 100644 src/views/copilot/components/name.vue rename src/views/copilot/{components/charts/base => yield/assets}/icon.png (100%) rename src/views/copilot/{components/charts => yield/components}/BipvOutput.vue (88%) rename src/views/copilot/{components/charts => yield/components}/ChipInvest.vue (97%) rename src/views/copilot/{components/charts => yield/components}/ChipOutput.vue (88%) rename src/views/copilot/{components/charts => yield/components}/FtoInvest.vue (97%) rename src/views/copilot/{components/charts => yield/components}/StdOutput.vue (88%) rename src/views/copilot/{components/charts/base => yield/components/sub/bar}/BarChartBase.vue (98%) rename src/views/copilot/{components/charts/base => yield/components/sub/city}/CityData.vue (100%) rename src/views/copilot/{components/charts/base => yield/components/sub/city}/CityItem.vue (88%) rename src/views/copilot/{components/charts/base => yield/components/sub/city}/CityName.vue (94%) rename src/views/copilot/{components/charts/base => yield/components/sub/city}/CityValue.vue (97%) rename src/views/copilot/{components/charts/base => yield/components/sub/gradient}/GradientText.vue (100%) rename src/views/copilot/{components/charts/base => yield/components/sub/ring}/DoubleRingChart.vue (98%) rename src/views/copilot/{components/charts/base => yield/components/sub/ring}/DoubleRingWrapper.vue (93%) rename src/views/copilot/{components/charts/base => yield/options}/double-ring-chart-options.js (100%) diff --git a/.env.dev b/.env.dev index f62007f..e8ccd63 100644 --- a/.env.dev +++ b/.env.dev @@ -5,8 +5,8 @@ ENV = 'development' VUE_APP_TITLE = 芋道管理系统 # 芋道管理系统/开发环境 -# VUE_APP_BASE_API = 'http://192.168.1.61:48080' -VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com' +VUE_APP_BASE_API = 'http://192.168.1.61:48080' +# VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/views/copilot/components/ChartContainer.vue b/src/views/copilot/components/ChartContainer.vue new file mode 100644 index 0000000..2dec009 --- /dev/null +++ b/src/views/copilot/components/ChartContainer.vue @@ -0,0 +1,69 @@ + + + + + + + diff --git a/src/views/copilot/components/charts/base/fetcherDoubleRing.js b/src/views/copilot/components/charts/base/fetcherDoubleRing.js deleted file mode 100644 index 6f452a6..0000000 --- a/src/views/copilot/components/charts/base/fetcherDoubleRing.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - getData: async function (url) { - // - return await new Promise((resolve, reject) => { - setTimeout(() => { - resolve([90119, 40801, 44028]); - }, 1200); - }); - }, -}; diff --git a/src/views/copilot/components/name.vue b/src/views/copilot/components/name.vue deleted file mode 100644 index e69de29..0000000 diff --git a/src/views/copilot/components/charts/base/icon.png b/src/views/copilot/yield/assets/icon.png similarity index 100% rename from src/views/copilot/components/charts/base/icon.png rename to src/views/copilot/yield/assets/icon.png diff --git a/src/views/copilot/components/charts/BipvOutput.vue b/src/views/copilot/yield/components/BipvOutput.vue similarity index 88% rename from src/views/copilot/components/charts/BipvOutput.vue rename to src/views/copilot/yield/components/BipvOutput.vue index dba836b..1f77c21 100644 --- a/src/views/copilot/components/charts/BipvOutput.vue +++ b/src/views/copilot/yield/components/BipvOutput.vue @@ -10,7 +10,7 @@ From aa2ac270fc186d616977173c573a9678d3129927 Mon Sep 17 00:00:00 2001 From: "DESKTOP-FUDKNA8\\znjsz" Date: Sun, 28 Apr 2024 16:55:21 +0800 Subject: [PATCH 3/3] 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 @@