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

@@ -3,7 +3,7 @@
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<ReportHeader size="psi" @timeRangeChange="handleTimeChange" top-title="单项原片原料成本分析" :is-full-screen="isFullScreen"
@screenfullChange="screenfullChange" :leftMargin="'280px'" />
@screenfullChange="screenfullChange" :leftMargin=" '280px' " />
<div class="main-body" style="
margin-top: -20px;
flex: 1;
@@ -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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relateSingleFuelCostAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relateSingleFuelCostAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relateSingleFuelCostAnalysis from "../productionCostAnalysisComponents/relateSingleFuelCostAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendSingleFuel.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getSingleMaterialAnalysis } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -101,16 +100,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '采购单价',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -182,28 +182,52 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
console.log(this.$route.query.name, 'name');
},
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]
getSingleMaterialAnalysis(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
});
},
@@ -219,7 +243,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -304,12 +328,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relatedIndicatorsAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relatedIndicatorsAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relatedIndicatorsAnalysis from "../productionCostAnalysisComponents/relateCombustibleCostAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendCombustible.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -101,16 +100,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '天然气',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -184,26 +184,46 @@ 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: [
"原片燃料成本",
],
// 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]
getCostAnalysisData(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
});
},
@@ -219,7 +239,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -304,12 +324,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relatedIndicatorsAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relatedIndicatorsAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relatedIndicatorsAnalysis from "../productionCostAnalysisComponents/relateFuelCostAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendFuel.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -101,16 +100,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '原片原料成本',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -184,26 +184,46 @@ 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: [
"原片原料成本",
],
// 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]
getCostAnalysisData(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
});
},
@@ -219,7 +239,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -304,12 +324,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

View File

@@ -3,7 +3,7 @@
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<ReportHeader size="psi" @timeRangeChange="handleTimeChange" top-title="原片制造费用成本分析" :is-full-screen="isFullScreen"
@screenfullChange="screenfullChange" :leftMargin="'270px'" />
@screenfullChange="screenfullChange" :leftMargin=" '270px'" />
<div class="main-body" style="
margin-top: -20px;
flex: 1;
@@ -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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relatedIndicatorsAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relatedIndicatorsAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relatedIndicatorsAnalysis from "../productionCostAnalysisComponents/relateFactoryBurdenCostAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendFactoryBurden.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -101,16 +100,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '原片制造费用成本',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -184,26 +184,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: [
"原片制造费用成本",
],
// 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]
getCostAnalysisData(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
});
},
@@ -219,7 +242,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -304,12 +327,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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();
}

View File

@@ -3,7 +3,7 @@
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<ReportHeader top-title="原片成本分析" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
@timeRangeChange="handleTimeChange" :leftMargin=" '300px' " />
@timeRangeChange="handleTimeChange" :leftMargin="'300px'" />
<div class="main-body" style="
flex: 1;
display: flex;
@@ -16,7 +16,7 @@
gap: 12px;
grid-template-columns:1624px;
">
<operatingLineChart :salesTrendMap="salesTrendMap" :grossMarginTrendMap="grossMarginTrendMap" />
<operatingLineChart :baseUrl="baseUrl" :monData="monData" />
</div>
</div>
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -25,7 +25,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<operatingLineChartCumulative :salesTrendMap="salesTrendMap" :grossMarginTrendMap="grossMarginTrendMap" />
<operatingLineChartCumulative :baseUrl="baseUrl" :totalData="totalData" />
<!-- <keyWork /> -->
</div>
</div>
@@ -50,7 +50,7 @@ import { mapState } from "vuex";
import operatingLineChart from "../productionCostAnalysisComponents/operatingLineChart";
import operatingLineChartCumulative from "../productionCostAnalysisComponents/operatingLineChartCumulative.vue";
import { getSalesRevenueData } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
import moment from "moment";
export default {
name: "DayReport",
@@ -68,11 +68,10 @@ export default {
timer: null,
beilv: 1,
value: 100,
saleData: {},
premiumProduct: {},
salesTrendMap: {},
grossMarginTrendMap: {},
salesProportion:{},
baseUrl: 'originalSheetCostBase/originalSheetCostBase',
selectDate: {},
monData: [],
totalData: [],
};
},
@@ -140,23 +139,31 @@ export default {
};
},
methods: {
getData(obj) {
getSalesRevenueData({
startTime: obj.startTime,
endTime: obj.endTime,
timeDim: obj.mode
getData() {
getCostAnalysisData({
startTime: this.selectDate.startTime,
endTime: this.selectDate.endTime,
analysisObject: [
"原片成本"
],
levelId: 1,
// timeDim: this.selectDate.mode
}).then((res) => {
console.log(res);
this.saleData = res.data.SaleData
this.premiumProduct = res.data.premiumProduct
this.salesTrendMap = res.data.salesTrendMap
this.grossMarginTrendMap = res.data.grossMarginTrendMap
this.salesProportion = res.data.salesProportion ? res.data.salesProportion : {}
this.monData = res.data.currentMonthData
this.totalData = res.data.totalMonthData
// this.totalData = res.data.totalData
// this.saleData = res.data.SaleData
// this.premiumProduct = res.data.premiumProduct
// this.salesTrendMap = res.data.salesTrendMap
// this.grossMarginTrendMap = res.data.grossMarginTrendMap
// this.salesProportion = res.data.salesProportion ? res.data.salesProportion : {}
})
},
handleTimeChange(obj) {
console.log(obj, 'obj');
this.getData(obj)
// console.log(obj, 'obj');
this.selectDate = obj
this.getData()
},
handleClickOutside() {
this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
@@ -228,12 +235,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relatedIndicatorsAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relatedIndicatorsAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relatedIndicatorsAnalysis from "../productionCostAnalysisComponents/relatedIndicatorsAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrend.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -103,14 +102,15 @@ export default {
beilv: 1,
month:'',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '原片成本',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -182,28 +182,54 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
console.log('this.$route.query.factory', this.$route.query.factory);
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : this.factory
},
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: [
"原片成本",
],
// 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]
getCostAnalysisData(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
});
},
@@ -219,7 +245,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}

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,8 +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>
@@ -37,7 +37,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -60,10 +60,9 @@ import monthlyOverview from "../productionCostAnalysisComponents/monthlyOverview
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 +80,6 @@ export default {
monthlyOverview,
Sidebar,
totalOverview,
relatedIndicatorsAnalysis,
dataTrend
// psiLineChart
},
@@ -92,14 +90,13 @@ export default {
beilv: 1,
month:'',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '人工成本',
};
},
@@ -173,26 +170,39 @@ 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: [
'人工成本'
],
// 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.trend = res.data.dataTrend
});
},
@@ -208,7 +218,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relateSingleFuelCostAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relateSingleFuelCostAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relateSingleFuelCostAnalysis from "../productionCostAnalysisComponents/relateSingleFuelCostAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendSingleFuel.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -101,16 +100,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '原片电成本',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -184,26 +184,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: [
"原片电成本",
],
// 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]
getCostAnalysisData(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
});
},
@@ -219,7 +242,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -304,12 +327,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -37,8 +36,9 @@
gap: 12px;
grid-template-columns: 804px 804px;
">
<monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" />
<yearRelatedMetrics :month="month" :itemData="renderList" :title="'累计·相关指标分析'" />
<monthlyRelatedMetrics :relatedData="monthRelatedData" :title="'月度概览'" />
<yearRelatedMetrics :relatedData="totalRelatedData" :title="'累计概览'" />
</div>
</div>
@@ -48,7 +48,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -73,10 +73,8 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import monthlyRelatedMetrics from "../productionCostAnalysisComponents/monthlyThreeRelatedMetrics.vue";
import yearRelatedMetrics from "../productionCostAnalysisComponents/yearThreeRelatedMetrics.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendProcAuxMat.vue";
import profitLineChart from "../costComponents/profitLineChart.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -91,7 +89,6 @@ export default {
components: {
ReportHeader,
changeBase,
profitLineChart,
monthlyOverview,
Sidebar,
totalOverview,
@@ -105,16 +102,16 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
factory: 5,
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
dateData: {},
trendName: '加工燃料成本',
monData: {},
totalData: {},
monthRelatedData: [],
totalRelatedData: [],
trend: [],
};
},
@@ -186,28 +183,54 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : this.factory
},
methods: {
handleChange(value) {
this.index = value
this.getData()
},
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: [
"加工辅料成本",
],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory,
// baseId: Number(this.factory),
};
// 调用接口
getCostAnalysisXXCostList(requestParams).then((res) => {
this.itemData = res.data[0].map((item) => {
return {
...item,
route: 'singleFuelAnalysis'
}
getCostAnalysisData(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.monthRelatedData = res.data.currentMonthData.filter(item => {
return item.name !== "加工辅料成本";
})
this.trendData= res.data[1]
this.totalRelatedData = res.data.totalMonthData.filter(item => {
return item.name !== "加工辅料成本";
}) // 兜底累
;
this.trend = res.data.dataTrend
});
},
@@ -216,14 +239,14 @@ export default {
this.dateData = {
startTime: obj.startTime,
endTime: obj.endTime,
mode: obj.mode,
// mode: obj.mode,
}
this.getData()
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -308,12 +331,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -37,9 +36,8 @@
gap: 12px;
grid-template-columns: 804px 804px;
">
<monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" />
<yearRelatedMetrics :month="month" :itemData="renderList" :title="'累计·相关指标分析'" />
<monthlyRelatedMetrics :relatedData="monthRelatedData" :title="'月度概览'" />
<yearRelatedMetrics :relatedData="totalRelatedData" :title="'累计概览'" />
</div>
</div>
<div class="bottom" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -48,7 +46,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -73,10 +71,8 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import monthlyRelatedMetrics from "../productionCostAnalysisComponents/monthlyThreeRelatedMetricsPro.vue";
import yearRelatedMetrics from "../productionCostAnalysisComponents/yearThreeRelatedMetricsPro.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendPro.vue";
import profitLineChart from "../costComponents/profitLineChart.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -91,7 +87,6 @@ export default {
components: {
ReportHeader,
changeBase,
profitLineChart,
monthlyOverview,
Sidebar,
totalOverview,
@@ -107,14 +102,14 @@ export default {
beilv: 1,
month:'',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
trendName: '加工制造费用成本',
monData: {},
totalData: {},
monthRelatedData: [],
totalRelatedData: [],
trend: [],
};
},
@@ -131,12 +126,6 @@ export default {
needTagsView: (state) => state.settings.tagsView,
fixedHeader: (state) => state.settings.fixedHeader,
}),
renderList() {
if (this.itemData && this.itemData.length > 0) {
return this.itemData;
}
return this.parentItemList;
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
@@ -188,26 +177,51 @@ export default {
};
},
methods: {
handleChange(value) {
this.index = value
this.getData()
},
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: [
"加工制造费用成本",
],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory,
// baseId: Number(this.factory),
};
// 调用接口
getCostAnalysisXXCostList(requestParams).then((res) => {
this.itemData = res.data[0].map((item) => {
return {
...item,
route: 'singleFuelAnalysis'
}
getCostAnalysisData(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.monthRelatedData = res.data.currentMonthData.filter(item => {
return item.name !== "加工制造费用成本";
})
this.trendData= res.data[1]
this.totalRelatedData = res.data.totalMonthData.filter(item => {
return item.name !== "加工制造费用成本";
}) // 兜底累
;
this.trend = res.data.dataTrend
});
},
@@ -216,14 +230,14 @@ export default {
this.dateData = {
startTime: obj.startTime,
endTime: obj.endTime,
mode: obj.mode,
// mode: obj.mode,
}
this.getData()
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}

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,8 +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>
@@ -37,7 +37,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -60,10 +60,9 @@ import monthlyOverview from "../productionCostAnalysisComponents/monthlyOverview
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 +80,6 @@ export default {
monthlyOverview,
Sidebar,
totalOverview,
relatedIndicatorsAnalysis,
dataTrend
// psiLineChart
},
@@ -90,16 +88,15 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '加工包材成本',
};
},
@@ -173,26 +170,39 @@ 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: [
'加工包材成本'
],
// 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.trend = res.data.dataTrend
});
},
@@ -208,7 +218,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -293,12 +303,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

View File

@@ -3,7 +3,7 @@
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<ReportHeader top-title="加工成本分析" :is-full-screen="isFullScreen" @screenfullChange="screenfullChange"
@timeRangeChange="handleTimeChange" :leftMargin=" '300px' " />
@timeRangeChange="handleTimeChange" :leftMargin="'300px'" />
<div class="main-body" style="
flex: 1;
display: flex;
@@ -16,7 +16,7 @@
gap: 12px;
grid-template-columns:1624px;
">
<operatingLineChart :salesTrendMap="salesTrendMap" :grossMarginTrendMap="grossMarginTrendMap" />
<operatingLineChart :baseUrl="baseUrl" :monData="monData" />
</div>
</div>
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -25,7 +25,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<operatingLineChartCumulative :salesTrendMap="salesTrendMap" :grossMarginTrendMap="grossMarginTrendMap" />
<operatingLineChartCumulative :baseUrl="baseUrl" :totalData="totalData" />
<!-- <keyWork /> -->
</div>
</div>
@@ -50,7 +50,7 @@ import { mapState } from "vuex";
import operatingLineChart from "../productionCostAnalysisComponents/operatingLineChart";
import operatingLineChartCumulative from "../productionCostAnalysisComponents/operatingLineChartCumulative.vue";
import { getSalesRevenueData } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
import moment from "moment";
export default {
name: "DayReport",
@@ -68,11 +68,10 @@ export default {
timer: null,
beilv: 1,
value: 100,
saleData: {},
premiumProduct: {},
salesTrendMap: {},
grossMarginTrendMap: {},
salesProportion:{},
baseUrl: 'processingCostAnalysisBase/processingCostAnalysisBase',
selectDate: {},
monData: [],
totalData: [],
};
},
@@ -140,23 +139,31 @@ export default {
};
},
methods: {
getData(obj) {
getSalesRevenueData({
startTime: obj.startTime,
endTime: obj.endTime,
timeDim: obj.mode
getData() {
getCostAnalysisData({
startTime: this.selectDate.startTime,
endTime: this.selectDate.endTime,
analysisObject: [
"加工成本"
],
levelId: 1,
// timeDim: this.selectDate.mode
}).then((res) => {
console.log(res);
this.saleData = res.data.SaleData
this.premiumProduct = res.data.premiumProduct
this.salesTrendMap = res.data.salesTrendMap
this.grossMarginTrendMap = res.data.grossMarginTrendMap
this.salesProportion = res.data.salesProportion ? res.data.salesProportion : {}
this.monData = res.data.currentMonthData
this.totalData = res.data.totalMonthData
// this.totalData = res.data.totalData
// this.saleData = res.data.SaleData
// this.premiumProduct = res.data.premiumProduct
// this.salesTrendMap = res.data.salesTrendMap
// this.grossMarginTrendMap = res.data.grossMarginTrendMap
// this.salesProportion = res.data.salesProportion ? res.data.salesProportion : {}
})
},
handleTimeChange(obj) {
console.log(obj, 'obj');
this.getData(obj)
// console.log(obj, 'obj');
this.selectDate = obj
this.getData()
},
handleClickOutside() {
this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
@@ -228,12 +235,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relatedIndicatorsAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relatedIndicatorsAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relatedIndicatorsAnalysis from "../productionCostAnalysisComponents/relateProcessCostAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendProcess.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -101,16 +100,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '加工成本',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -182,28 +182,54 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
console.log('this.$route.query.factory', this.$route.query.factory);
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : this.factory
},
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: [
"加工成本",
],
// 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]
getCostAnalysisData(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
});
},
@@ -219,7 +245,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -304,12 +330,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -37,9 +36,8 @@
gap: 12px;
grid-template-columns: 804px 804px;
">
<monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" />
<yearRelatedMetrics :month="month" :itemData="renderList" :title="'累计·相关指标分析'" />
<monthlyRelatedMetrics :relatedData="monthRelatedData" :title="'月度概览'" />
<yearRelatedMetrics :relatedData="totalRelatedData" :title="'累计概览'" />
</div>
</div>
<div class="bottom" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -48,7 +46,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -73,10 +71,8 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import monthlyRelatedMetrics from "../productionCostAnalysisComponents/monthlyRelatedMetricsProcessingFuel.vue";
import yearRelatedMetrics from "../productionCostAnalysisComponents/yearRelatedMetrics.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendProcessingFuel.vue";
import profitLineChart from "../costComponents/profitLineChart.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -91,7 +87,6 @@ export default {
components: {
ReportHeader,
changeBase,
profitLineChart,
monthlyOverview,
Sidebar,
totalOverview,
@@ -107,14 +102,14 @@ export default {
beilv: 1,
month:'',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
trendName: '加工燃料成本',
monData: {},
totalData: {},
monthRelatedData: [],
totalRelatedData: [],
trend: [],
};
},
@@ -131,12 +126,6 @@ export default {
needTagsView: (state) => state.settings.tagsView,
fixedHeader: (state) => state.settings.fixedHeader,
}),
renderList() {
if (this.itemData && this.itemData.length > 0) {
return this.itemData;
}
return this.parentItemList;
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
@@ -186,28 +175,54 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : this.factory
},
methods: {
handleChange(value) {
this.index = value
this.getData()
},
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: [
"加工燃料成本",
],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory,
// baseId: Number(this.factory),
};
// 调用接口
getCostAnalysisXXCostList(requestParams).then((res) => {
this.itemData = res.data[0].map((item) => {
return {
...item,
route: 'singleFuelAnalysis'
}
getCostAnalysisData(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.monthRelatedData = res.data.currentMonthData.filter(item => {
return item.name !== "加工燃料成本";
})
this.trendData= res.data[1]
this.totalRelatedData = res.data.totalMonthData.filter(item => {
return item.name !== "加工燃料成本";
}) // 兜底累
;
this.trend = res.data.dataTrend
});
},
@@ -216,14 +231,14 @@ export default {
this.dateData = {
startTime: obj.startTime,
endTime: obj.endTime,
mode: obj.mode,
// mode: obj.mode,
}
this.getData()
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}

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,8 +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>
@@ -37,7 +37,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -60,10 +60,9 @@ import monthlyOverview from "../productionCostAnalysisComponents/monthlyOverview
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 +80,6 @@ export default {
monthlyOverview,
Sidebar,
totalOverview,
relatedIndicatorsAnalysis,
dataTrend
// psiLineChart
},
@@ -90,16 +88,15 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '加工人工成本',
};
},
@@ -173,26 +170,39 @@ 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: [
'加工人工成本'
],
// 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.trend = res.data.dataTrend
});
},
@@ -208,7 +218,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -293,12 +303,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

View File

@@ -16,7 +16,7 @@
gap: 12px;
grid-template-columns:1624px;
">
<operatingLineChart :salesTrendMap="salesTrendMap" :grossMarginTrendMap="grossMarginTrendMap" />
<operatingLineChart :baseUrl="baseUrl" :monData="monData" />
</div>
</div>
<div class="top" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -25,7 +25,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<operatingLineChartCumulative :salesTrendMap="salesTrendMap" :grossMarginTrendMap="grossMarginTrendMap" />
<operatingLineChartCumulative :baseUrl="baseUrl" :totalData="totalData" />
<!-- <keyWork /> -->
</div>
</div>
@@ -50,7 +50,7 @@ import { mapState } from "vuex";
import operatingLineChart from "../productionCostAnalysisComponents/operatingLineChart";
import operatingLineChartCumulative from "../productionCostAnalysisComponents/operatingLineChartCumulative.vue";
import { getSalesRevenueData } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
import moment from "moment";
export default {
name: "DayReport",
@@ -68,11 +68,10 @@ export default {
timer: null,
beilv: 1,
value: 100,
saleData: {},
premiumProduct: {},
salesTrendMap: {},
grossMarginTrendMap: {},
salesProportion:{},
baseUrl:'productionCostAnalysisBase',
selectDate: {},
monData: [],
totalData: [],
};
},
@@ -140,23 +139,31 @@ export default {
};
},
methods: {
getData(obj) {
getSalesRevenueData({
startTime: obj.startTime,
endTime: obj.endTime,
timeDim: obj.mode
getData() {
getCostAnalysisData({
startTime: this.selectDate.startTime,
endTime: this.selectDate.endTime,
analysisObject: [
"总制造成本"
],
levelId: 1,
// timeDim: this.selectDate.mode
}).then((res) => {
console.log(res);
this.saleData = res.data.SaleData
this.premiumProduct = res.data.premiumProduct
this.salesTrendMap = res.data.salesTrendMap
this.grossMarginTrendMap = res.data.grossMarginTrendMap
this.salesProportion = res.data.salesProportion ? res.data.salesProportion : {}
this.monData = res.data.currentMonthData
this.totalData = res.data.totalMonthData
// this.totalData = res.data.totalData
// this.saleData = res.data.SaleData
// this.premiumProduct = res.data.premiumProduct
// this.salesTrendMap = res.data.salesTrendMap
// this.grossMarginTrendMap = res.data.grossMarginTrendMap
// this.salesProportion = res.data.salesProportion ? res.data.salesProportion : {}
})
},
handleTimeChange(obj) {
console.log(obj, 'obj');
this.getData(obj)
// console.log(obj, 'obj');
this.selectDate = obj
this.getData()
},
handleClickOutside() {
this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
@@ -228,12 +235,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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,8 +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>
@@ -35,10 +35,10 @@
<div class="left-three" style="
display: grid;
gap: 12px;
grid-template-columns: 804px 804px;
grid-template-columns:804px 804px;
">
<monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" />
<yearRelatedMetrics :month="month" :itemData="renderList" :title="'累计·相关指标分析'" />
<monthlyRelatedMetrics :relatedData="monthRelatedData" :title="'月度概览'" />
<yearRelatedMetrics :relatedData="totalRelatedData" :title="'累计概览'" />
</div>
</div>
@@ -48,7 +48,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -73,10 +73,8 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import monthlyRelatedMetrics from "../productionCostAnalysisComponents/monthlyRelatedMetrics.vue";
import yearRelatedMetrics from "../productionCostAnalysisComponents/yearRelatedMetrics.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendProduct.vue";
import profitLineChart from "../costComponents/profitLineChart.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getCostAnalysisData } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -91,13 +89,12 @@ export default {
components: {
ReportHeader,
changeBase,
profitLineChart,
monthlyOverview,
Sidebar,
totalOverview,
dataTrend,
monthlyRelatedMetrics,
yearRelatedMetrics,
dataTrend
yearRelatedMetrics
// psiLineChart
},
data() {
@@ -105,16 +102,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: [],
trendName: '总制造成本',
monthRelatedData:[],
totalRelatedData: [],
};
},
@@ -131,12 +129,6 @@ export default {
needTagsView: (state) => state.settings.tagsView,
fixedHeader: (state) => state.settings.fixedHeader,
}),
renderList() {
if (this.itemData && this.itemData.length > 0) {
return this.itemData;
}
return this.parentItemList;
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
@@ -186,28 +178,54 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : this.factory
},
methods: {
handleChange(value) {
this.index = value
this.getData()
},
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: [
"总制造成本",
],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory,
// baseId: Number(this.factory),
};
// 调用接口
getCostAnalysisXXCostList(requestParams).then((res) => {
this.itemData = res.data[0].map((item) => {
return {
...item,
route: 'singleFuelAnalysis'
}
getCostAnalysisData(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.monthRelatedData = res.data.currentMonthData.filter(item => {
return item.name !== "总制造成本";
})
this.trendData= res.data[1]
this.totalRelatedData = res.data.totalMonthData.filter(item => {
return item.name !== "总制造成本";
}) // 兜底累
;
this.trend = res.data.dataTrend
});
},
@@ -216,14 +234,14 @@ export default {
this.dateData = {
startTime: obj.startTime,
endTime: obj.endTime,
mode: obj.mode,
// mode: obj.mode,
}
this.getData()
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -308,12 +326,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relateSingleFuelCostAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relateSingleFuelCostAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relateSingleFuelCostAnalysis from "../productionCostAnalysisComponents/relateSingleCombustible.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendSingleCombustible.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getSingleMaterialAnalysis } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -101,16 +100,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '采购单价',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -182,28 +182,52 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
console.log(this.$route.query.name, 'name');
},
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]
getSingleMaterialAnalysis(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
});
},
@@ -219,7 +243,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -304,12 +328,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relateSingleFuelCostAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relateSingleFuelCostAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relateSingleFuelCostAnalysis from "../productionCostAnalysisComponents/relateSingleFuelCostAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendSingleFuel.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getSingleMaterialAnalysis } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -101,16 +100,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '采购单价',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -182,28 +182,52 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
console.log(this.$route.query.name, 'name');
},
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]
getSingleMaterialAnalysis(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
});
},
@@ -219,7 +243,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -304,12 +328,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}

View File

@@ -2,8 +2,8 @@
<div id="dayReport" class="dayReport" :style="styles">
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<ReportHeader size="psi" @timeRangeChange="handleTimeChange" top-title="单项加工制造费用成本分析" :is-full-screen="isFullScreen"
@screenfullChange="screenfullChange" />
<ReportHeader size="psi" @timeRangeChange="handleTimeChange" top-title="单项加工制造费用成本" :is-full-screen="isFullScreen"
@screenfullChange="screenfullChange" :leftMargin=" '270px' " />
<div class="main-body" style="
margin-top: -20px;
flex: 1;
@@ -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,8 +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>
@@ -37,7 +37,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -58,12 +58,9 @@ 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,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '人工成本',
};
},
@@ -116,12 +111,6 @@ export default {
needTagsView: (state) => state.settings.tagsView,
fixedHeader: (state) => state.settings.fixedHeader,
}),
renderList() {
if (this.itemData && this.itemData.length > 0) {
return this.itemData;
}
return this.parentItemList;
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
@@ -173,26 +162,39 @@ 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: [
'加工制造费用成本'
],
// 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.trend = res.data.dataTrend
});
},
@@ -208,7 +210,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}

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="middle" style="display: flex; gap: 16px;margin-top: 6px;">
@@ -38,7 +37,7 @@
grid-template-columns: 1624px;
">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relateSingleFuelCostAnalysis :month="month" :itemData="renderList" :title="'相关指标分析'" />
<relateSingleFuelCostAnalysis :relatedData="relatedData" :title="'相关指标分析'" />
</div>
</div>
@@ -48,7 +47,7 @@
gap: 12px;
grid-template-columns: 1624px;
">
<dataTrend :itemData="renderList" :title="'数据趋势'" />
<dataTrend @getData="changeItem" :trendData="trend" :title="'数据趋势'" />
</div>
</div>
</div>
@@ -74,7 +73,7 @@ import totalOverview from "../productionCostAnalysisComponents/totalOverview.vue
import relateSingleFuelCostAnalysis from "../productionCostAnalysisComponents/relateSingleFuelCostAnalysis.vue";
import dataTrend from "../productionCostAnalysisComponents/dataTrendSingleFuel.vue";
import { mapState } from "vuex";
import { getCostAnalysisXXCostList } from '@/api/cockpit'
import { getSingleMaterialAnalysis } from '@/api/cockpit'
// import PSDO from "./components/PSDO.vue";
// import psiLineChart from "./components/psiLineChart.vue";
@@ -101,16 +100,17 @@ export default {
isFullScreen: false,
timer: null,
beilv: 1,
month:'',
month: '',
value: 100,
dateData:{},
levelId:undefined,
itemData: [],
trendData: [],
parentItemList: [
{ name: "燃料成本", target: 0, value: 0, proportion: 0, flag: 1 },
{ name: "天然气", target: 0, value: 0, proportion: 0, flag: 1 }
],
factory: 5,
dateData: {},
monData: {},
totalData: {},
trend: [],
relatedData: {},
trendName: '采购单价',
// monthRelatedData: [],
// totalRelatedData: [],
};
},
@@ -182,28 +182,52 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
console.log(this.$route.query.name, 'name');
},
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]
getSingleMaterialAnalysis(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
});
},
@@ -219,7 +243,7 @@ export default {
},
selectChange(data) {
console.log('选中的数据:', data);
this.levelId = data
this.factory = data
if (this.dateData.startTime && this.dateData.endTime) {
this.getData();
}
@@ -304,12 +328,14 @@ export default {
<style scoped lang="scss">
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.dayReport {
width: 1920px;
height: 1080px;
background: url("../../../assets/img/backp.png") no-repeat;
background-size: cover;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}