import cacheManager from "@/utils/cacheManager.js";

export function updateChanpin4Process() {
	const cacheData = cacheManager.get('contentInfo');
	console.log('cacheDat444444', cacheData)
	const list = cacheData.danyuanList;
	const defaultCurProcess = cacheData.curProcess;
	let mList = [];
	list.forEach(item => {
		mList = [...mList, ...item.jieList]
	})

	const process = mList.filter(item => item.wanchengFlag).length/mList.length * 100 || 0;
	cacheData.curProcess = defaultCurProcess > process ? defaultCurProcess: process;
	cacheManager.set('contentInfo', cacheData);
}
