From dfe52cbac54db2ee3f4035ae3064033eeca5b9fa Mon Sep 17 00:00:00 2001
From: helloDy <1615073571@qq.com>
Date: Thu, 27 Jun 2024 14:53:11 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E8=AF=A6=E6=83=85ui?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/produce/data/add-or-updata.vue | 4 +-
src/views/produce/workOrder/add-or-updata.vue | 196 ++++++++++++------
2 files changed, 130 insertions(+), 70 deletions(-)
diff --git a/src/views/produce/data/add-or-updata.vue b/src/views/produce/data/add-or-updata.vue
index 1d6de55..ba67a79 100644
--- a/src/views/produce/data/add-or-updata.vue
+++ b/src/views/produce/data/add-or-updata.vue
@@ -1,7 +1,7 @@
@@ -116,6 +116,8 @@
标准组件平均功率(W)
{{ dataForm.componentAveragePower }}
+
+
标准组件转化效率
{{ dataForm.componentTransRate }}
diff --git a/src/views/produce/workOrder/add-or-updata.vue b/src/views/produce/workOrder/add-or-updata.vue
index b52d0ba..1a817c4 100644
--- a/src/views/produce/workOrder/add-or-updata.vue
+++ b/src/views/produce/workOrder/add-or-updata.vue
@@ -1,7 +1,7 @@
@@ -76,15 +76,44 @@
{{ dataForm.endDate?.length > 0 ? dataForm.endDate[0] + '-' + dataForm.endDate[1] + '-' + dataForm.endDate[2] : '' }}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -118,7 +147,8 @@ export default {
barChart: null,
equipmentLineChart: null,
visible: false,
- dataForm: {}
+ dataForm: {},
+ colorList: ['#3E8EF7', '#69E6D8', '#F7C739'] // pie颜色
}
},
beforeDestroy() {
@@ -227,38 +257,47 @@ export default {
initChart(barData) {
this.barChart = echarts.init(this.$refs['bar'])
this.barChart.setOption({
- title: {
- text: '生产明细',
- left: 'center'
- // subtext: 'Fake Data'
- },
+ // title: {
+ // text: '生产明细',
+ // left: 'center'
+ // // subtext: 'Fake Data'
+ // },
+ color: ['#3E8EF7'],
tooltip: {
trigger: 'axis'
},
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
calculable: true,
grid: {
- top: '20%',
- left: "1%",
- right: "3%",
- bottom: "1%",
+ top: '15%',
+ left: 0,
+ right: '10%',
+ bottom: 0,
containLabel: true
},
xAxis: {
type: 'category',
data: ['目标产量', '计划投入量', '实际投入', '实际产出', '废品数量', '待再加工数量'],
axisLabel: {
- rotate:45
+ rotate: 25
}
},
yAxis: {
- type: 'value'
+ type: 'value',
+ name: '单位/片',
+ axisLine: {
+ show: true
+ }
},
series: [
{
data: barData,
type: 'bar',
- barWidth: '40%'
+ barWidth: '40%',
+ label: {
+ show: true,
+ position: 'top'
+ }
}
]
}, true)
@@ -266,8 +305,9 @@ 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'
},
@@ -275,31 +315,31 @@ export default {
trigger: 'item'
},
legend: {
- top: '5%',
- left: 'right',
- orient: 'vertical'
+ bottom: 0,
+ left: 'center'
},
series: [
{
// name: 'Access From',
type: 'pie',
- radius: ['40%', '70%'],
+ radius: ['50%', '70%'],
avoidLabelOverlap: false,
+ data: pieData,
label: {
- show: false,
- position: 'center'
- },
- emphasis: {
- label: {
- show: false,
- fontSize: 40,
- fontWeight: 'bold'
+ show: true,
+ position: 'outside',
+ formatter: '{d|{d}%} \n {b|{b}}',
+ rich: {
+ d: {
+ color: 'inherit', // 系列色
+ verticalAlign: 'top'
+ },
+ b: {
+ color: '#8C8C8C',
+ verticalAlign: 'top'
+ }
}
- },
- labelLine: {
- show: false
- },
- data: pieData
+ }
}
]
}, true)
@@ -307,39 +347,48 @@ export default {
initEqLineChart(xAxisList, yAxisList) {
this.equipmentLineChart = echarts.init(this.$refs['equipmentLine'])
this.equipmentLineChart.setOption({
- title: {
- text: '待制品分布',
- left: 'center'
- // subtext: 'Fake Data'
- },
+ // title: {
+ // text: '待制品分布',
+ // left: 'center'
+ // // subtext: 'Fake Data'
+ // },
+ color: ['#3E8EF7'],
tooltip: {
trigger: 'axis'
},
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
calculable: true,
grid: {
- top: '20%',
- left: "1%",
- right: "3%",
- bottom: "1%",
+ top: '15%',
+ left: 0,
+ right: 0,
+ bottom: 0,
containLabel: true
},
xAxis: {
type: 'category',
data: xAxisList,
axisLabel: {
- rotate:45,
+ rotate: 25
// width: '10%'
}
},
yAxis: {
- type: 'value'
+ type: 'value',
+ name: '单位/片',
+ axisLine: {
+ show: true
+ }
},
series: [
{
data: yAxisList,
type: 'bar',
- barWidth: '50%'
+ barWidth: '50%',
+ label: {
+ show: true,
+ position: 'top'
+ }
}
]
}, true)
@@ -347,27 +396,39 @@ export default {
initLineChart(xAxisList, seriesList) {
this.lineChart = echarts.init(this.$refs['line'])
this.lineChart.setOption({
- title: {
- text: '历史趋势',
- left: 'center' // 设置标题居中
- },
+ color: ['#3E8EF7'],
tooltip: {
trigger: 'item'
},
+ grid: {
+ top: '15%',
+ left: 0,
+ right: 0,
+ bottom: 0,
+ containLabel: true
+ },
xAxis: {
type: 'category',
data: xAxisList,
axisLabel: {
- rotate:45
+ rotate: 25
}
},
yAxis: {
- type: 'value'
+ type: 'value',
+ name: '单位/片',
+ axisLine: {
+ show: true
+ }
},
series: [
{
data: seriesList,
- type: 'line'
+ type: 'line',
+ label: {
+ show: true,
+ position: 'top'
+ }
}
]
}, true)
@@ -381,14 +442,8 @@ export default {
},
};
+
From d5673f3c9f75da970612f6a56caf8775e155012d Mon Sep 17 00:00:00 2001
From: helloDy <1615073571@qq.com>
Date: Thu, 27 Jun 2024 14:56:47 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=B7=A5=E5=8E=82=E6=9B=B4=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/produce/data/index.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/views/produce/data/index.vue b/src/views/produce/data/index.vue
index 50d3d16..ddffd58 100644
--- a/src/views/produce/data/index.vue
+++ b/src/views/produce/data/index.vue
@@ -1,8 +1,8 @@
@@ -210,7 +210,7 @@ export default {
{
prop: 'factory',
label: '工厂名称',
- filter: (val) => [val],
+ filter: (val) => factoryList[val],
minWidth: 180,
showOverflowtooltip: true
},