| | |
| | | qualityInspectionStatistics, |
| | | nonComplianceWarning, |
| | | getManageStatistics, |
| | | planTrends, |
| | | } from "@/api/viewIndex.js"; |
| | | import { energyConsumptionDetailStatistics } from "@/api/energyManagement/energyType"; |
| | | import { getSalesAmountAnalysis } from "@/api/reportAnalysis/salesStatistics"; |
| | |
| | | }; |
| | | |
| | | const loadPlanTrend = async () => { |
| | | // try { |
| | | // const res = await processDataProductionStatistics({ |
| | | // type: chartRangePlan.value, |
| | | // }); |
| | | // const list = Array.isArray(res?.data) ? res.data : []; |
| | | // planXAxis[0].data = list.map( |
| | | // (i, index) => i.processName || `工序${index + 1}` |
| | | // ); |
| | | // planSeries[0].data = list.map(i => |
| | | // pickFirstNumber(i, ["totalInput", "input", "planNum"]) |
| | | // ); |
| | | // planSeries[1].data = list.map(i => |
| | | // pickFirstNumber(i, ["totalOutput", "output", "issueNum"]) |
| | | // ); |
| | | // planSeries[2].data = list.map(i => |
| | | // pickFirstNumber(i, ["totalScrap", "scrap", "completeNum"]) |
| | | // ); |
| | | // } catch (error) { |
| | | // console.error("processDataProductionStatistics接口获取失败:", error); |
| | | // } |
| | | try { |
| | | const res = await planTrends({ |
| | | type: chartRangePlan.value, |
| | | }); |
| | | const list = Array.isArray(res?.data) ? res.data : []; |
| | | planXAxis[0].data = list.map(i => i.dateStr || "-"); |
| | | planSeries[0].data = list.map(i => i.plannedVolume || 0); |
| | | planSeries[1].data = list.map(i => i.lowerVolume || 0); |
| | | planSeries[2].data = list.map(i => i.completionVolume || 0); |
| | | } catch (error) { |
| | | console.error("planTrends接口获取失败:", error); |
| | | } |
| | | }; |
| | | |
| | | const loadQualityData = async () => { |
| | |
| | | |
| | | const refreshDashboardData = () => { |
| | | // loadHomeTodos(); |
| | | // loadOrderAndProgress(); |
| | | // loadPlanTrend(); |
| | | loadOrderAndProgress(); |
| | | loadPlanTrend(); |
| | | // loadQualityData(); |
| | | // loadCostComposition(); |
| | | // loadWarningCenter(); |