1
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user