驾驶舱
This commit is contained in:
@@ -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 ,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user