From 683fc9169ad0e7e0a4d4f784a44361b05d2eeff0 Mon Sep 17 00:00:00 2001
From: Fanzink <460995166@qq.com>
Date: Tue, 14 Mar 2023 15:24:30 +0530
Subject: [PATCH] =?UTF-8?q?'=E6=95=B0=E6=8D=AE=E5=88=86=E6=9E=90-=E4=BA=A7?=
=?UTF-8?q?=E9=87=8F=E5=88=86=E6=9E=90=EF=BC=8C=E4=BA=A7=E5=93=81=E8=B4=A8?=
=?UTF-8?q?=E9=87=8F=E5=88=86=E6=9E=90=EF=BC=8C=E8=AE=BE=E5=A4=87=E4=BA=A7?=
=?UTF-8?q?=E9=87=8F=E6=97=B6=E5=BA=8F=E5=9B=BE'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/i18n/en.js | 21 +-
src/i18n/zh-CN.js | 20 +
.../monitoring/equProductTimesequence.vue | 781 ++++++++++++++++++
.../equipmentHistoricalParameters.vue | 2 +-
.../modules/monitoring/productAnalysis.vue | 695 ++++++++++++++++
.../modules/monitoring/productQuality.vue | 557 +++++++++++++
.../monitoring/qualityInspectionCurrent.vue | 70 +-
7 files changed, 2105 insertions(+), 41 deletions(-)
create mode 100644 src/views/modules/monitoring/equProductTimesequence.vue
create mode 100644 src/views/modules/monitoring/productAnalysis.vue
create mode 100644 src/views/modules/monitoring/productQuality.vue
diff --git a/src/i18n/en.js b/src/i18n/en.js
index 555e6f6..8cbb1a4 100644
--- a/src/i18n/en.js
+++ b/src/i18n/en.js
@@ -51,7 +51,11 @@ t.routes['登录日志'] = 'Login Records'
t.routes['操作日志'] = 'Operations Records'
t.routes['设备效率分析'] = 'EQU Efficiency Analysis'
t.routes['设备异常分析'] = 'EQU Exceptions Analysis'
-t.routes['设备状态时序图'] = 'EQU Status Timesequence'
+t.routes['设备状态时序图'] = 'EQU Status Timeseq'
+t.routes['产品质量分析'] = 'Product Quality Analysis'
+t.routes['产量分析'] = 'Product Analysis'
+t.routes['生产节拍时序图'] = 'Product Beat Timeseq'
+t.routes['设备产量时序图'] = 'EQU Product Timeseq'
// 三级
t.routes['工厂'] = 'Factory'
@@ -143,6 +147,7 @@ t.normal = 'Normal'
t.shutdown = 'Shut Down'
t.malfunction = 'Malfunction' // ?
t.diagram = 'Device Status Sequence Diagram'
+t.diagram2 = 'Device Product Sequence Diagram'
t.addr = 'Address'
t.planStop = 'Plan to stop'
t.startTime = 'Start Time'
@@ -384,8 +389,20 @@ t.eq.month = 'month'
t.eq.realyield = 'Actual processing speed'
t.eq.designyield = 'Theoretical processing speed'
t.eq.viewtrend = 'View Trends'
+t.eq.productQuality = 'Product Quality Analysis'
+t.eq.productionAnalysis = 'Production Analysis'
+t.eq.productQuantity = 'Product Quantity'
+t.eq.line1= 'Line 1'
+t.eq.line2= 'Line 2'
+t.eq.line3= 'Line 3'
+t.eq.line4= 'Line 4'
-
+t.eq.sectionName = 'Section Name'
+t.eq.equipmentName = 'Equipment Name'
+t.eq.okNum = 'Qualified Quantity'
+t.eq.nokNum = 'Unqualified Quantity'
+t.eq.passRate = 'Qualified Rate'
+t.eq.passRatePercent = 'Qualified Rate(%)'
t.pl = {}
t.pl.title = 'Product Line'
diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js
index 9cb0aad..fdb5b20 100644
--- a/src/i18n/zh-CN.js
+++ b/src/i18n/zh-CN.js
@@ -51,6 +51,11 @@ t.routes['操作日志'] = '操作日志'
t.routes['设备效率分析'] = '设备效率分析'
t.routes['设备异常分析'] = '设备异常分析'
t.routes['设备状态时序图'] = '设备状态时序图'
+t.routes['产品质量分析'] = '产品质量分析'
+t.routes['产量分析'] = '产量分析'
+t.routes['生产节拍时序图'] = '生产节拍时序图'
+t.routes['设备产量时序图'] = '设备产量时序图'
+
// 三级
t.routes['工厂'] = '工厂'
@@ -141,6 +146,7 @@ t.normal = '正常' // ?
t.shutdown = '停机' // ?
t.malfunction = '故障' // ?
t.diagram = '设备状态时序图'
+t.diagram2 = '设备产量时序图'
t.addr = '地址' // 1
t.planStop = '计划停机' // ?
t.startTime = '开始时间' // 1
@@ -383,6 +389,20 @@ t.eq.month='月'
t.eq.realyield = '实际加工速度'
t.eq.designyield = '理论加工速度'
t.eq.viewtrend = '查看趋势'
+t.eq.productQuality = '产品质量分析'
+t.eq.productionAnalysis = '产量分析'
+t.eq.productQuantity = '产品数量'
+t.eq.line1= '产线1'
+t.eq.line2= '产线2'
+t.eq.line3= '产线3'
+t.eq.line4= '产线4'
+
+t.eq.sectionName = '工序'
+t.eq.equipmentName = '设备名称'
+t.eq.okNum = '合格数量'
+t.eq.nokNum = '不合格数量'
+t.eq.passRate = '合格率'
+t.eq.passRatePercent = '合格率(%)'
t.pl = {}
diff --git a/src/views/modules/monitoring/equProductTimesequence.vue b/src/views/modules/monitoring/equProductTimesequence.vue
new file mode 100644
index 0000000..e0ee851
--- /dev/null
+++ b/src/views/modules/monitoring/equProductTimesequence.vue
@@ -0,0 +1,781 @@
+
+
+
+
+ {{ $t('pl.name') }}
+
+
+
+
+
+
+
+
+
+ {{ $t('pl.process') }}
+
+
+
+
+
+
+
+
+
+ {{ $t('time') }}
+
+
+
+
+
+
+
+
+ {{ $t('query') }}
+
+
+
+
+ {{ $t('pl.add2') }}
+
+
+
+
+
+
+
+ {{ $t('pl.cancel') }}
+
+ {{ $t('pl.confirm') }}
+
+
+
+
+
+
+
+
+
+
+ {{ $t('diagram2'), }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/monitoring/equipmentHistoricalParameters.vue b/src/views/modules/monitoring/equipmentHistoricalParameters.vue
index 79f8348..c87f4ae 100644
--- a/src/views/modules/monitoring/equipmentHistoricalParameters.vue
+++ b/src/views/modules/monitoring/equipmentHistoricalParameters.vue
@@ -130,7 +130,7 @@ export default {
res.data[1].data &&
res.data[1].data.length > 0
) {
- // console.log(this.equipmentName)
+ console.log('res.data[1]',res.data[1])
this.setTableProps2(res.data[1].nameData)
this.setTableData2(res.data[1].data)
}
diff --git a/src/views/modules/monitoring/productAnalysis.vue b/src/views/modules/monitoring/productAnalysis.vue
new file mode 100644
index 0000000..3c66ad2
--- /dev/null
+++ b/src/views/modules/monitoring/productAnalysis.vue
@@ -0,0 +1,695 @@
+
+
+
+
+ {{ $t('pl.name') }}
+
+
+
+
+
+
+
+ {{ $t('time') }}
+
+
+
+
+
+
+
+ {{ $t('query') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('eq.productionAnalysis') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/monitoring/productQuality.vue b/src/views/modules/monitoring/productQuality.vue
new file mode 100644
index 0000000..230f56f
--- /dev/null
+++ b/src/views/modules/monitoring/productQuality.vue
@@ -0,0 +1,557 @@
+
+
+
+
+ {{ $t('pl.name') }}
+
+
+
+
+
+
+
+ {{ $t('time') }}
+
+
+
+
+
+
+
+ {{ $t('query') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('eq.productQuality') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/monitoring/qualityInspectionCurrent.vue b/src/views/modules/monitoring/qualityInspectionCurrent.vue
index f218eb9..0d7d9cf 100644
--- a/src/views/modules/monitoring/qualityInspectionCurrent.vue
+++ b/src/views/modules/monitoring/qualityInspectionCurrent.vue
@@ -2,7 +2,7 @@
- {{ $t('time')}}
+ {{ $t('time') }}
@@ -15,8 +15,7 @@
:range-separator="$t('to')"
:default-time="['00:00:00', '23:59:59']"
:picker-options="quickOptions"
- clearable
- />
+ clearable />
{{ $t('query') }}
@@ -28,32 +27,31 @@
{{ $t('inspect.ioTotal') }}
-
+
-
+
{{ $t('inspect.plTotal') }}
-
+
-
+
+ @refreshDataList="getDataList" />
@@ -77,7 +75,7 @@ const tableConfigStatic = [
{ name: i18n.t('inspect.inTotal'), prop: 'sumUp' },
{ name: i18n.t('inspect.outTotal'), prop: 'sumDown' },
{ name: i18n.t('inspect.checkTotal'), prop: 'sumCheck' },
- { name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
+ { name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: (val) => (val || val === 0 ? `${val}%` : '-') }
]
const tableConfigDynamic = [
{ type: 'index', width: 100, name: i18n.t('index') },
@@ -125,7 +123,7 @@ const FakeChart = {
right: 0,
width: '12%',
/** 修复文本太长时显示问题 */
- formatter: function(name) {
+ formatter: function (name) {
return echarts.format.truncateText(name, 120, '14px Microsoft Yahei', '...')
},
tooltip: {
@@ -153,7 +151,7 @@ const FakeChart = {
},
watch: {
categories: {
- handler: function(val, oldVal) {
+ handler: function (val, oldVal) {
if (val && val !== oldVal) {
this.defaultOpts.xAxis.data.push(...val)
}
@@ -161,7 +159,7 @@ const FakeChart = {
immediate: true
},
typeList: {
- handler: function(val, oldVal) {
+ handler: function (val, oldVal) {
if (val && val !== oldVal) {
this.defaultOpts.legend.data.push(...val)
}
@@ -169,7 +167,7 @@ const FakeChart = {
immediate: true
},
seriesData: {
- handler: function(val, oldVal) {
+ handler: function (val, oldVal) {
if (val && val !== oldVal) {
this.defaultOpts.series.push(...val)
}
@@ -177,7 +175,7 @@ const FakeChart = {
immediate: true
},
defaultOpts: {
- handler: function(val) {
+ handler: function (val) {
console.log('defaullt opts change: ', val)
this.setOptions()
},
@@ -205,7 +203,7 @@ const FakeChart = {
if (this.chart) this.chart.setOption(this.defaultOpts)
}
},
- render: function(h) {
+ render: function (h) {
return h('div', { attrs: { id: 'bar-chart' }, style: { background: '#eee', width: '100%', height: '300px', padding: '8px' } }, '')
}
}
@@ -269,16 +267,8 @@ export default {
this.echartCategories = null
this.echartCheckTypes.splice(0)
/** 设置默认日期 */
- const startTime =
- this.datetime[0] ||
- moment()
- .set({ hour: 0, minute: 0, second: 0 })
- .format('yyyy-MM-DDTHH:mm:ss')
- const endTime =
- this.datetime[1] ||
- moment()
- .set({ hour: 23, minute: 59, second: 59 })
- .format('yyyy-MM-DDTHH:mm:ss')
+ const startTime = this.datetime[0] || moment().set({ hour: 0, minute: 0, second: 0 }).format('yyyy-MM-DDTHH:mm:ss')
+ const endTime = this.datetime[1] || moment().set({ hour: 23, minute: 59, second: 59 }).format('yyyy-MM-DDTHH:mm:ss')
/** [1] 获取上下片数据 */
this.fetchList('sx', startTime, endTime).then(({ data: res }) => {
@@ -287,11 +277,12 @@ export default {
})
/** [2] 获取产线检测类型 */
this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
- // console.log('pl: ', res)
+ console.log('res: ', res)
/** TODO: 解析 nameData */
this.parseTableProps(res.data.nameData)
this.dataListDynamic = this.parseDynamicData(res.data.data) || []
+ console.log('this.dataListDynamic', this.dataListDynamic)
this.buildGraphData()
})
@@ -303,7 +294,7 @@ export default {
if (nameData.length) {
/** 处理 nameData */
- nameData.forEach(item => {
+ nameData.forEach((item) => {
if (!labelNameMap.get(item.name)) {
labelNameMap.set(item.name, 1)
subProps.push({ name: item.name, prop: item.name })
@@ -316,21 +307,22 @@ export default {
{ name: i18n.t('inspect.det'), prop: 'inspectionContent' },
...subProps,
{ name: i18n.t('inspect.typetotal'), prop: 'sumInput' },
- { name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
+ { name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: (val) => (val || val === 0 ? `${val}%` : '-') }
]
/** echarts related */
- this.echartCategories = subProps.map(item => item.name)
+ this.echartCategories = subProps.map((item) => item.name)
+ // console.log('this.echartCategories',this.echartCategories)
},
parseDynamicData(data) {
this.echartCheckTypes.splice(0)
- return data.map(item => {
+ return data.map((item) => {
/** echarts related */
this.echartCheckTypes.push(item.inspectionContent)
if (item.data.length) {
/** 解析子数组 */
- item.data.forEach(subitem => {
+ item.data.forEach((subitem) => {
item[subitem.dynamicName] = subitem.dynamicValue
})
}
@@ -342,13 +334,15 @@ export default {
/** 构造 echart 需要的数据 */
const result = []
- this.echartCheckTypes.forEach(ect => {
+ this.echartCheckTypes.forEach((ect) => {
result.push({ name: ect, type: 'bar', data: [] })
})
-
+ console.log('result', result)
+ console.log('echartCheckTypes',this.echartCheckTypes);
+ console.log('this.echartCategories',this.echartCategories);
this.dataListDynamic.forEach((inspection, index) => {
- console.log('inspection: ', inspection)
- this.echartCategories.forEach(cate => {
+ // console.log('inspection: ', inspection)
+ this.echartCategories.forEach((cate) => {
if (cate in inspection) {
result[index].data.push(inspection[cate])
} else {
@@ -376,7 +370,7 @@ export default {
startTime,
endTime
}
- }).catch(err => {
+ }).catch((err) => {
console.error(err)
})
case 'pl':
@@ -387,7 +381,7 @@ export default {
startTime,
endTime
}
- }).catch(err => {
+ }).catch((err) => {
console.error(err)
})
}