Compare commits

..

No commits in common. "445ebe339dc78ecd80b3bdad3d784fb17b7921e9" and "96d55b5a574664ed371f19af0078a169e440a419" have entirely different histories.

5 changed files with 82 additions and 144 deletions

View File

@ -134,11 +134,11 @@ export default {
if (preData && preData[0] != null) {
for (const factory of preData) {
if (factory.previousGlassType === 0) {
preDataDetail[1] = factory.previousOutputNumber
preDataDetail[1] = factory.previousYearOutputNumber
} else if (factory.previousGlassType === 1) {
preDataDetail[2] = factory.previousOutputNumber
} else if (factory.previousGlassType === 2) {
preDataDetail[3] = factory.previousOutputNumber
preDataDetail[2] = factory.previousYearOutputNumber
} else if (factory.previousYearOutputNumber === 2) {
currentDataDetail[3] = factory.outputNumber
}
}
}

View File

@ -132,17 +132,16 @@ export default {
// }
}
}
if (preData) {
if (preData && preData[0] != null) {
for (const factory of preData) {
if (factory.previousGlassType === 0) {
console.log('factory', factory)
preDataDetail[1] = factory.previousOutputNumber
preDataDetail[1] = factory.previousYearOutputNumber
} else if (factory.previousGlassType === 1) {
preDataDetail[2] = factory.previousOutputNumber
preDataDetail[2] = factory.previousYearOutputNumber
}
}
}
if (targetListResponse) {
if (targetListResponse && targetListResponse[0] != null) {
for (const factory of targetListResponse) {
targetDataDetail[0] = factory.ftoInput
// if (factory.previousGlassType === 0) {
@ -154,7 +153,7 @@ export default {
}
}
// console.log('ftoInvest',ftoInvest)
if (factoryListResponse) {
if (factoryListResponse && factoryListResponse[0] != null) {
for (const factory of factoryListResponse) {
// targetDataDetail[0] = factory.ftoInput
if (factory.glassType === 0) {
@ -164,7 +163,6 @@ export default {
}
}
}
console.log(' this.factoryData.preDataDetail', preDataDetail);
this.factoryData.preDataDetail = preDataDetail
this.factoryData.currentDataDetail = currentDataDetail
this.factoryData.targetDataDetail = targetDataDetail

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-26 13:39:22
* @LastEditTime: 2024-06-25 08:59:33
* @LastEditors: DY
* @Description:
-->
@ -116,8 +116,6 @@
<p class="title">标准组件平均功率(W)</p>
<p class="text">{{ dataForm.componentAveragePower }}</p>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="6">
<p class="title">标准组件转化效率</p>
<p class="text">{{ dataForm.componentTransRate }}</p>

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-27 14:56:20
* @LastEditors: DY
* @LastEditTime: 2024-06-26 11:00:11
* @LastEditors: zhp
* @Description:
-->
<template>
@ -210,7 +210,7 @@ export default {
{
prop: 'factory',
label: '工厂名称',
filter: (val) => factoryList[val],
filter: (val) => [val],
minWidth: 180,
showOverflowtooltip: true
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-27 14:50:21
* @LastEditTime: 2024-06-17 17:03:17
* @LastEditors: DY
* @Description:
-->
@ -76,44 +76,15 @@
<p class="text">{{ dataForm.endDate?.length > 0 ? dataForm.endDate[0] + '-' + dataForm.endDate[1] + '-' + dataForm.endDate[2] : '' }}</p>
</el-col>
</el-row>
<div style="width: 100%; padding: 0 32px"><el-divider style="margin: 0"></el-divider></div>
<el-row :gutter="0" style="margin: 20px 32px">
<el-col :span="8">
<div>
<small-title slot="title" :no-padding="true">
产品良率
</small-title>
<div ref="pie" :style="{ height: '40vh', width: '100%' }" />
</div>
</el-col>
<el-col :span="16">
<div style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
<small-title slot="title" :no-padding="true">
历史趋势
</small-title>
<div ref="line" v-show="dataForm.orderStatus === 2" :style="{ height: '40vh', width: '50vw' }" />
</div>
</el-col>
</el-row>
<div style="width: 100%; padding: 0 32px"><el-divider style="margin: 0"></el-divider></div>
<el-row :gutter="0" style="margin: 20px 32px">
<el-col :span="8">
<div>
<small-title slot="title" :no-padding="true">
生产明细
</small-title>
<div ref="bar" :style="{ height: '40vh', width: '100%' }" />
</div>
</el-col>
<el-col :span="16">
<div style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
<small-title slot="title" :no-padding="true">
待制品分布
</small-title>
<div ref="equipmentLine" :style="{ height: '40vh', width: '50vw' }" />
</div>
</el-col>
</el-row>
<el-divider></el-divider>
<div class="chartDiv">
<div ref="bar" :style="{ height: '30vh', width: '40vw' }" />
<div ref="pie" :style="{ height: '30vh', width: '40vw' }" />
</div>
<div class="chartDiv">
<div ref="equipmentLine" :style="{ height: '30vh', width: '40vw' }" />
<div ref="line" v-show="dataForm.orderStatus === 2" :style="{ height: '30vh', width: '40vw' }" />
</div>
</div>
</el-drawer>
@ -147,8 +118,7 @@ export default {
barChart: null,
equipmentLineChart: null,
visible: false,
dataForm: {},
colorList: ['#3E8EF7', '#69E6D8', '#F7C739'] // pie
dataForm: {}
}
},
beforeDestroy() {
@ -257,47 +227,38 @@ export default {
initChart(barData) {
this.barChart = echarts.init(this.$refs['bar'])
this.barChart.setOption({
// title: {
// text: '',
// left: 'center'
// // subtext: 'Fake Data'
// },
color: ['#3E8EF7'],
title: {
text: '生产明细',
left: 'center'
// subtext: 'Fake Data'
},
tooltip: {
trigger: 'axis'
},
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
calculable: true,
grid: {
top: '15%',
left: 0,
right: '10%',
bottom: 0,
top: '20%',
left: "1%",
right: "3%",
bottom: "1%",
containLabel: true
},
xAxis: {
type: 'category',
data: ['目标产量', '计划投入量', '实际投入', '实际产出', '废品数量', '待再加工数量'],
axisLabel: {
rotate: 25
rotate:45
}
},
yAxis: {
type: 'value',
name: '单位/片',
axisLine: {
show: true
}
type: 'value'
},
series: [
{
data: barData,
type: 'bar',
barWidth: '40%',
label: {
show: true,
position: 'top'
}
barWidth: '40%'
}
]
}, true)
@ -305,9 +266,8 @@ export default {
initPieChart(pieData) {
this.pieChart = echarts.init(this.$refs['pie'])
this.pieChart.setOption({
color: ['#3E8EF7', '#69E6D8', '#F7C739'],
title: {
// text: !isNaN((pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100) ? ( ' ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%') : ' -',
text: !isNaN((pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100) ? ( '产品良率 ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%') : '产品良率 -',
left: 'center'
// subtext: 'Fake Data'
},
@ -315,31 +275,31 @@ export default {
trigger: 'item'
},
legend: {
bottom: 0,
left: 'center'
top: '5%',
left: 'right',
orient: 'vertical'
},
series: [
{
// name: 'Access From',
type: 'pie',
radius: ['50%', '70%'],
radius: ['40%', '70%'],
avoidLabelOverlap: false,
data: pieData,
label: {
show: true,
position: 'outside',
formatter: '{d|{d}%} \n {b|{b}}',
rich: {
d: {
color: 'inherit', //
verticalAlign: 'top'
},
b: {
color: '#8C8C8C',
verticalAlign: 'top'
}
show: false,
position: 'center'
},
emphasis: {
label: {
show: false,
fontSize: 40,
fontWeight: 'bold'
}
}
},
labelLine: {
show: false
},
data: pieData
}
]
}, true)
@ -347,48 +307,39 @@ export default {
initEqLineChart(xAxisList, yAxisList) {
this.equipmentLineChart = echarts.init(this.$refs['equipmentLine'])
this.equipmentLineChart.setOption({
// title: {
// text: '',
// left: 'center'
// // subtext: 'Fake Data'
// },
color: ['#3E8EF7'],
title: {
text: '待制品分布',
left: 'center'
// subtext: 'Fake Data'
},
tooltip: {
trigger: 'axis'
},
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
calculable: true,
grid: {
top: '15%',
left: 0,
right: 0,
bottom: 0,
top: '20%',
left: "1%",
right: "3%",
bottom: "1%",
containLabel: true
},
xAxis: {
type: 'category',
data: xAxisList,
axisLabel: {
rotate: 25
rotate:45,
// width: '10%'
}
},
yAxis: {
type: 'value',
name: '单位/片',
axisLine: {
show: true
}
type: 'value'
},
series: [
{
data: yAxisList,
type: 'bar',
barWidth: '50%',
label: {
show: true,
position: 'top'
}
barWidth: '50%'
}
]
}, true)
@ -396,39 +347,27 @@ export default {
initLineChart(xAxisList, seriesList) {
this.lineChart = echarts.init(this.$refs['line'])
this.lineChart.setOption({
color: ['#3E8EF7'],
title: {
text: '历史趋势',
left: 'center' //
},
tooltip: {
trigger: 'item'
},
grid: {
top: '15%',
left: 0,
right: 0,
bottom: 0,
containLabel: true
},
xAxis: {
type: 'category',
data: xAxisList,
axisLabel: {
rotate: 25
rotate:45
}
},
yAxis: {
type: 'value',
name: '单位/片',
axisLine: {
show: true
}
type: 'value'
},
series: [
{
data: seriesList,
type: 'line',
label: {
show: true,
position: 'top'
}
type: 'line'
}
]
}, true)
@ -442,8 +381,14 @@ export default {
},
};
</script>
<style scoped>
.chartDiv {
display: flex;
justify-content: space-between;
width: 100%;
padding: 5px;
padding-left: 30px;
}
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
}
@ -460,8 +405,7 @@ export default {
}
.detailBox p {
margin: 0;
padding-left: 32px;
/* padding: 0 32px; */
padding: 0 32px;
}
.detailBox .title {
/* width: 56px; */
@ -483,8 +427,6 @@ export default {
}
.detailBox {
padding-top: 30px;
overflow-x: hidden;
overflow-y: auto;
/* width: 99%; */
width: 99%;
}
</style>