Compare commits

...

7 Commits

Author SHA1 Message Date
‘937886381’
445ebe339d Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-27 15:47:28 +08:00
‘937886381’
353e3e0f35 修改bug 2024-06-27 15:47:07 +08:00
ea29a33c2a Merge pull request 'projects/mescc/dy' (#70) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #70
2024-06-27 14:59:19 +08:00
helloDy
d5673f3c9f 工厂更改 2024-06-27 14:56:47 +08:00
helloDy
3064722052 Merge branch 'projects/mescc/develop' into projects/mescc/dy 2024-06-27 14:53:37 +08:00
helloDy
dfe52cbac5 工单管理详情ui 2024-06-27 14:53:11 +08:00
68e386333b Merge pull request 'projects/mescc/zhp' (#69) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #69
2024-06-27 14:43:32 +08:00
5 changed files with 144 additions and 82 deletions

View File

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

View File

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

View File

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

View File

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

View File

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