This commit is contained in:
‘937886381’
2025-12-30 09:04:48 +08:00
parent 80deffbb42
commit 7b3873f9ea
232 changed files with 13127 additions and 17011 deletions

View File

@@ -17,7 +17,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<changeBase @selectChange="selectChange" />
<changeBase :factory="factory" @baseChange="selectChange" />
</div>
</div>
<div class="top" style="display: flex; gap: 16px;margin-top: -20px;">
@@ -26,9 +26,8 @@
gap: 12px;
grid-template-columns: 804px 804px;
">
<monthlyOverview :month="month" :itemData="renderList" :title="'月度概览'" />
<totalOverview :itemData="renderList" :title="'累计概览'" />
<monthlyOverview :month="month" :monData="monData" :title="'月度概览'" />
<totalOverview :totalData="totalData" :title="'累计概览'" />
</div>
</div>
<div class="bottom" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -37,7 +36,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -58,12 +57,10 @@ import screenfull from "screenfull";
import changeBase from "../components/changeBase.vue";
import monthlyOverview from "../productionCostAnalysisComponents/monthlyOverview.vue";
import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue";
// import totalOverview from "../operatingComponents/totalOverview.vue";
// import monthlyRelatedMetrics from "../procurementGainAnalysisComponents/monthlyRelatedMetrics.vue";
import relatedIndicatorsAnalysis from "../productionCostAnalysisComponents/relateProcessCostAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendProcessingLabor.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getSingleMaterialCostAnalysis } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -81,7 +78,6 @@ export default {
monthlyOverview,
Sidebar,
totalOverview,
relatedIndicatorsAnalysis,
dataTrend
// psiLineChart
},
@@ -92,14 +88,13 @@ export default {
beilv: 1,
month: '',
value: 100,
factory: 5,
dateData: {},
levelId: undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '制造费用',
};
},
@@ -173,26 +168,49 @@ export default {
};
},
methods: {
changeItem(item) {
console.log('item', item);
this.trendName = item
this.getData()
},
getData() {
const requestParams = {
// startTime: this.startTime,
// endTime: this.endTime,
// mode: this.mode,
startTime: this.dateData.startTime,
endTime: this.dateData.endTime,
mode: this.dateData.mode,
trendName: "燃料成本",
levelId: this.levelId ? this.levelId : 1
// index: this.index,
// sort: 1,
trendName: this.trendName,
analysisObject: [
this.$route.query.name ? this.$route.query.name + '成本' : '包材成本'
],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory,
// baseId: Number(this.factory),
};
// 调用接口
getCostAnalysisXXCostList(requestParams).then((res) => {
this.itemData = res.data[0].map((item) => {
return {
...item,
route: 'singleFuelAnalysis'
}
})
this.trendData = res.data[1]
getSingleMaterialCostAnalysis(requestParams).then((res) => {
this.monData = res.data.currentMonthData.find(item => {
return item.name === "包材成本";
});
console.log('this.monData', this.monData);
this.totalData = res.data.totalMonthData.find(item => {
return item.name === "包材成本";
});
// this.relatedMon = res.data.relatedMon
this.relatedData = {
relatedMon: res.data.currentMonthData.filter(item => {
return item.name !== "包材成本";
}), // 兜底月度数据
relatedTotal: res.data.totalMonthData.filter(item => {
return item.name !== "包材成本";
}) // 兜底累计数据
}
;
this.trend = res.data.dataTrend
});
},
@@ -208,7 +226,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}