diff --git a/.env.dev b/.env.dev index 2cd7221..3d08229 100644 --- a/.env.dev +++ b/.env.dev @@ -1,7 +1,7 @@ ### # @Author: zhp # @Date: 2024-04-28 13:42:51 - # @LastEditTime: 2024-05-10 08:42:44 + # @LastEditTime: 2024-05-11 08:52:30 # @LastEditors: zhp # @Description: ### diff --git a/src/mixins/chart.js b/src/mixins/chart.js index 504b169..cd961b8 100644 --- a/src/mixins/chart.js +++ b/src/mixins/chart.js @@ -1,20 +1,19 @@ import * as echarts from "echarts"; function __resizeHandler(entries) { - console.log(entries); for (const entry of entries) { if (entry.contentBoxSize) { // manipulate contentBoxSize - const contentBoxSize = Array.isArray(entry.contentBoxSize) - ? entry.contentBoxSize[0] - : entry.contentBoxSize; - this.chart_mixin_chartInstance.resize({ - width: - contentBoxSize.inlineSize < this.MIN_WIDTH - ? this.MIN_WIDTH - : contentBoxSize.inlineSize, - height: contentBoxSize.blockSize, - }); + // const contentBoxSize = Array.isArray(entry.contentBoxSize) + // ? entry.contentBoxSize[0] + // : entry.contentBoxSize; + // this.chart_mixin_chartInstance.resize({ + // width: + // contentBoxSize.inlineSize < this.MIN_WIDTH + // ? this.MIN_WIDTH + // : contentBoxSize.inlineSize, + // height: contentBoxSize.blockSize, + // }); } else { // manipulate contentRect this.chart_mixin_chartInstance.resize({ diff --git a/src/store/modules/home.js b/src/store/modules/home.js index 5fe2265..0ed88e0 100644 --- a/src/store/modules/home.js +++ b/src/store/modules/home.js @@ -29,10 +29,12 @@ const state = { target: [], current: [], previous: [], + outputNumber:[], }, stdRate: { target: [], current: [], + outputNumber:[] }, }, }, @@ -112,11 +114,8 @@ const actions = { targetList = data } let factoryData = factoryList.prodOutputResultDO ? factoryList.prodOutputResultDO : factoryList.prodOutputRateDO - let targetData = targetList.ProdTargetDO ? targetList.ProdTargetDO : targetList.ProdTargetDO - console.log(factoryList.ProdOutputDO) - console.log('ryf',factoryList) + let targetData = targetList.prodTargetDO ? targetList.prodTargetDO : targetList.prodTargetDO const payload = handler(factoryData, targetData) - console.log(payload) commit("SET_COPILOT_INFO", { type, payload }); }, }; @@ -129,7 +128,7 @@ export default { }; function splitCurrentAndPreviousA(factoryListResponse, targetListResponse) { - console.log('工厂',factoryListResponse); + console.log('工厂',targetListResponse); // console.log('工厂',factoryListResponse); // 初始数据 @@ -186,9 +185,6 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse) { // ]; if (factoryListResponse) { for (const factory of factoryListResponse) { - if (factory.glassType === 1) { - console.log(factory.yieldRate) - } const fId = getFactoryId(factory); // 获取目标值 if (targetListResponse) { @@ -197,23 +193,25 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse) { componentYieldRate, chipOee, componentConversionEfficiency, + componentYield } = getFactoryTargetValueA(targetListResponse, fId); - stdRate.target[fId] = chipYieldRate; - chipRate.target[fId] = componentYieldRate; + stdRate.target[fId] = componentYieldRate + chipRate.target[fId] = chipYieldRate } // 芯片OEE - chipOee.current[fId] = factory.oee * 100 || random_default(); - chipOee.previous[fId] = factory.previousYearOee * 100 || random_default(); + chipOee.current[fId] = factory.oee * 100 ; + chipOee.previous[fId] = factory.previousYearOee * 100 ; // 转化效率 transformRate.current[fId] = - factory.componentConversionEfficiency * 100 || random_default(); + factory.componentConversionEfficiency * 100 ; transformRate.previous[fId] = - factory.previousYearComponentConversionEfficiency * 100 || random_default(); + factory.previousYearComponentConversionEfficiency * 100 ; // 芯片良率 与 标准组件良率 if (![0, 1].includes(factory.glassType)) continue; - const _t = [chipRate, stdRate][factory.glassType]; - _t.current[fId] = factory.yieldRate || random_default(); - _t.previous[fId] = factory.previousYearYieldRate || random_default(); + const _t = [chipRate, stdRate][factory.glassType] + console.log('_t',_t); + _t.current[fId] = factory.yieldRate ; + _t.previous[fId] = factory.previousYearYieldRate ; } return { @@ -295,16 +293,18 @@ function getFactoryTargetValue(targetList, factoryId) { * @returns */ function getFactoryTargetValueA(targetList, factoryId) { - const target = targetList.find((item) => item.factory === factoryId); + const target = targetList.find((item) => item.factory === factoryId) if (target) { return { chipYieldRate: target.chipYieldRate ?? random_default(), componentYieldRate: target.componentYieldRate ?? random_default(), + componentYield: target.componentYield ?? random_default(), }; } return { - chipYieldRate: random_default(), - componentYieldRate: random_default(), + chipYieldRate:0, + componentYieldRate:0, + componentYield:0 , }; } diff --git a/src/views/copilot/components/LineChartBase.vue b/src/views/copilot/components/LineChartBase.vue index c4eca81..5ba6fff 100644 --- a/src/views/copilot/components/LineChartBase.vue +++ b/src/views/copilot/components/LineChartBase.vue @@ -1,8 +1,8 @@ - diff --git a/src/views/copilot/energy/components/ElecCost.vue b/src/views/copilot/energy/components/ElecCost.vue index b6c7a17..2a3e3aa 100644 --- a/src/views/copilot/energy/components/ElecCost.vue +++ b/src/views/copilot/energy/components/ElecCost.vue @@ -1,4 +1,4 @@ -