Compare commits
No commits in common. "db70699a6b352c937e8cde8889ff7fb4b7c614c9" and "9854dd83b2d5ac6dfd29869af0bd7315d55cb896" have entirely different histories.
db70699a6b
...
9854dd83b2
@ -36,8 +36,6 @@ export default {
|
||||
isFullscreen: false,
|
||||
actualOptions: null,
|
||||
chart: "",
|
||||
data: [],
|
||||
orderXAxis:[],
|
||||
// obj:{
|
||||
// seriesArr: [],
|
||||
// targetProduceArr: [],
|
||||
@ -52,7 +50,7 @@ export default {
|
||||
grid: {
|
||||
left: "7%",
|
||||
right: "7%",
|
||||
bottom: "15%",
|
||||
bottom: "8%",
|
||||
top: "15%",
|
||||
},
|
||||
tooltip: {
|
||||
@ -68,7 +66,6 @@ export default {
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
rotate:45,
|
||||
color: "rgba(255, 255, 255, 0.7)",
|
||||
fontSize: 12,
|
||||
},
|
||||
@ -194,7 +191,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
type(val) {
|
||||
this.initChart()
|
||||
|
||||
},
|
||||
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
|
||||
// isFullscreen(val) {
|
||||
@ -252,62 +249,79 @@ export default {
|
||||
}, 500)();
|
||||
},
|
||||
initChart() {
|
||||
if (this.chart) {
|
||||
this.chart.dispose();
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById("factoryEnergyChart"));
|
||||
const actualOptions = JSON.parse(JSON.stringify(this.options));
|
||||
if (this.type === '目标产量') {
|
||||
this.orderXAxis = []
|
||||
this.data = []
|
||||
let orderXAxis = []
|
||||
let targetProduceArr = []
|
||||
if (this.energyCockpits) {
|
||||
this.energyCockpits.forEach(ele => {
|
||||
this.data.push(ele.targetProduction)
|
||||
this.orderXAxis.push(ele.workOrderNumber)
|
||||
targetProduceArr.push(ele.targetProduction)
|
||||
orderXAxis.push(ele.workOrderNumber)
|
||||
});
|
||||
}
|
||||
actualOptions.xAxis.data = orderXAxis;
|
||||
actualOptions.series[0].data = targetProduceArr;
|
||||
// this.initChart(targetProduceArr, orderXAxis)
|
||||
} else if (this.type === '计划投入') {
|
||||
this.orderXAxis = []
|
||||
this.data = []
|
||||
let orderXAxis = []
|
||||
let planIn = []
|
||||
if (this.energyCockpits) {
|
||||
this.energyCockpits.forEach(ele => {
|
||||
this.data.push(ele.plannedInvestment)
|
||||
this.orderXAxis.push(ele.workOrderNumber)
|
||||
planIn.push(ele.plannedInvestment)
|
||||
orderXAxis.push(ele.workOrderNumber)
|
||||
});
|
||||
}
|
||||
actualOptions.xAxis.data = orderXAxis;
|
||||
actualOptions.series[0].data = planIn;
|
||||
} else if (this.type === '实际投入') {
|
||||
this.orderXAxis = []
|
||||
this.data = []
|
||||
let orderXAxis = []
|
||||
let acIn = []
|
||||
if (this.energyCockpits) {
|
||||
this.energyCockpits.forEach(ele => {
|
||||
this.data.push(ele.actualInvestment)
|
||||
this.orderXAxis.push(ele.workOrderNumber)
|
||||
acIn.push(ele.actualInvestment)
|
||||
orderXAxis.push(ele.workOrderNumber)
|
||||
});
|
||||
}
|
||||
actualOptions.xAxis.data = orderXAxis;
|
||||
actualOptions.series[0].data = acIn;
|
||||
} else if (this.type === '实际产出') {
|
||||
this.orderXAxis = []
|
||||
this.data = []
|
||||
let orderXAxis = []
|
||||
let acProduceArr = []
|
||||
if (this.energyCockpits) {
|
||||
this.energyCockpits.forEach(ele => {
|
||||
this.data.push(ele.actualProduction)
|
||||
this.orderXAxis.push(ele.workOrderNumber)
|
||||
acProduceArr.push(ele.actualProduction)
|
||||
orderXAxis.push(ele.workOrderNumber)
|
||||
});
|
||||
}
|
||||
actualOptions.xAxis.data = orderXAxis;
|
||||
actualOptions.series[0].data = acProduceArr;
|
||||
} else if (this.type === '废品数量') {
|
||||
this.orderXAxis = []
|
||||
this.data = []
|
||||
let orderXAxis = []
|
||||
let scrapNum = []
|
||||
if (this.energyCockpits) {
|
||||
this.energyCockpits.forEach(ele => {
|
||||
this.data.push(ele.wasteNum)
|
||||
this.orderXAxis.push(ele.workOrderNumber)
|
||||
scrapNum.push(ele.wasteNum)
|
||||
orderXAxis.push(ele.workOrderNumber)
|
||||
});
|
||||
}
|
||||
actualOptions.xAxis.data = orderXAxis;
|
||||
actualOptions.series[0].data = scrapNum;
|
||||
} else if (this.type === '待再加工') {
|
||||
this.orderXAxis = []
|
||||
this.data = []
|
||||
let orderXAxis = []
|
||||
let processNum = []
|
||||
if (this.energyCockpits) {
|
||||
this.energyCockpits.forEach(ele => {
|
||||
console.log(ele.reworkNum);
|
||||
this.data.push(ele.reworkNum)
|
||||
this.orderXAxis.push(ele.workOrderNumber)
|
||||
processNum.push(ele.reworkNum)
|
||||
orderXAxis.push(ele.workOrderNumber)
|
||||
});
|
||||
}
|
||||
actualOptions.xAxis.data = orderXAxis;
|
||||
actualOptions.series[0].data = processNum;
|
||||
}
|
||||
|
||||
// let seriesArr = [
|
||||
@ -356,13 +370,6 @@ export default {
|
||||
// actualOptions.series[1].name = seriesArr[1].name;
|
||||
// actualOptions.series[2].data = seriesArr[2].data;
|
||||
// actualOptions.series[2].name = seriesArr[2].name;
|
||||
if (this.chart) {
|
||||
this.chart.dispose();
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById("factoryEnergyChart"));
|
||||
const actualOptions = JSON.parse(JSON.stringify(this.options));
|
||||
actualOptions.xAxis.data = this.orderXAxis;
|
||||
actualOptions.series[0].data = this.data;
|
||||
this.actualOptions = actualOptions;
|
||||
this.chart.setOption(actualOptions);
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-29 14:48:06
|
||||
* @LastEditTime: 2024-06-07 14:11:01
|
||||
* @LastEditTime: 2024-06-07 09:30:17
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
computed: {
|
||||
xAxis() {
|
||||
console.log(' this.companyId', this.companyId);
|
||||
return this.companyId === 0 ? ["FTO投入", "芯片产量", "标准组件产量"] : ["FTO投入", "芯片产量", "标准组件产量", 'BIPV产量'];
|
||||
return this.companyId === 0 ? ["fto投入", "芯片产量", "标准组件产量"] : ["fto投入", "芯片产量", "标准组件产量", 'BIPV产量'];
|
||||
},
|
||||
legend() {
|
||||
let items = [];
|
||||
|
@ -9,7 +9,7 @@
|
||||
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
|
||||
</db-container>
|
||||
<left-container title="工单监控" icon="order">
|
||||
<order @update:type="updateType" :type="type" :prodOrder="prodOrder" />
|
||||
<order :prodOrder="prodOrder" />
|
||||
</left-container>
|
||||
<!-- <db-container title="" icon="store"> -->
|
||||
<!-- <store :stock="stock" /> -->
|
||||
@ -47,7 +47,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: '目标产量',
|
||||
companyId: 1,
|
||||
companyName: "邯郸中建材光电材料有限公司",
|
||||
period: 1,
|
||||
@ -76,10 +75,6 @@ export default {
|
||||
this.getMes();
|
||||
},
|
||||
methods: {
|
||||
updateType(val) {
|
||||
console.log(val)
|
||||
this.type = val
|
||||
},
|
||||
updateCompany(obj) {
|
||||
this.companyId = obj.companyId;
|
||||
this.companyName = obj.companyName;
|
||||
|
Loading…
Reference in New Issue
Block a user