From 19dbe384582e17a5c8d4deeb1d1f74abf99c8e52 Mon Sep 17 00:00:00 2001 From: zwq Date: Fri, 10 Jan 2025 15:07:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/core/analysis/index.js | 27 +- src/api/core/monitoring/auto.js | 29 +- src/api/core/monitoring/data.js | 21 +- src/views/base/equipmentBindSection/index.vue | 11 +- .../analysis/balanceAnalysis/BarChart.vue | 198 +++++ .../analysis/balanceAnalysis/eq-detail.vue | 273 +++++++ .../analysis/balanceAnalysis/index-old.vue | 296 +++++++ .../core/analysis/balanceAnalysis/index.vue | 460 +++++------ .../components/EquipmentInfoForm.vue | 4 +- src/views/core/base/equipment/index.vue | 2 +- .../base/productionLine/add-or-updata.vue | 5 +- src/views/core/base/productionLine/index.vue | 19 +- src/views/core/monitoring/auto/index.vue | 12 +- src/views/core/monitoring/data/BarChart.vue | 170 ++++ src/views/core/monitoring/data/baseTable.vue | 273 +++++++ src/views/core/monitoring/data/index-old.vue | 314 ++++++++ src/views/core/monitoring/data/index.vue | 738 ++++++++++++------ src/views/core/monitoring/data24/index.vue | 12 +- .../core/monitoring/lineAuto/baseTable.vue | 273 +++++++ src/views/core/monitoring/lineAuto/index.vue | 462 +++++++++++ .../core/monitoring/productAuto/index.vue | 358 +++++++++ .../monitoring/sectionStatistics/index.vue | 11 +- .../sectionStatisticsSearch/index.vue | 5 +- .../equipment/analysis/efficiency/index.vue | 12 +- .../equipment/analysis/exception/index.vue | 8 +- .../equipment/analysis/quality/index.vue | 4 +- .../monitoring/equipmentFullParams/index.vue | 28 +- 27 files changed, 3498 insertions(+), 527 deletions(-) create mode 100644 src/views/core/analysis/balanceAnalysis/BarChart.vue create mode 100644 src/views/core/analysis/balanceAnalysis/eq-detail.vue create mode 100644 src/views/core/analysis/balanceAnalysis/index-old.vue create mode 100644 src/views/core/monitoring/data/BarChart.vue create mode 100644 src/views/core/monitoring/data/baseTable.vue create mode 100644 src/views/core/monitoring/data/index-old.vue create mode 100644 src/views/core/monitoring/lineAuto/baseTable.vue create mode 100644 src/views/core/monitoring/lineAuto/index.vue create mode 100644 src/views/core/monitoring/productAuto/index.vue diff --git a/src/api/core/analysis/index.js b/src/api/core/analysis/index.js index af791ff5..60dd489f 100644 --- a/src/api/core/analysis/index.js +++ b/src/api/core/analysis/index.js @@ -1,8 +1,8 @@ /* * @Author: zhp * @Date: 2023-09-12 14:07:04 - * @LastEditTime: 2023-09-13 09:53:45 - * @LastEditors: zhp + * @LastEditTime: 2025-01-08 15:47:17 + * @LastEditors: zwq * @Description: */ import request from '@/utils/request' @@ -22,3 +22,26 @@ export function getCT(data) { data: data }) } +// 获取产线平衡分析数据(new) +export function getNewCTNow(data) { + return request({ + url: '/analysis/production-analysis/getNewCTNow', + method: 'post', + data: data + }) +} +// 获取产线平衡分析数据趋势图(new) +export function getNewCTCharts(data) { + return request({ + url: '/analysis/production-analysis/getNewCTCharts', + method: 'post', + data: data + }) +} +// 获取产线平衡分析数据设备list(new) +export function getNewCTDet(id) { + return request({ + url: '/analysis/production-analysis/getNewCTDet?lineId='+id, + method: 'get', + }) +} diff --git a/src/api/core/monitoring/auto.js b/src/api/core/monitoring/auto.js index 87b81a50..11de1094 100644 --- a/src/api/core/monitoring/auto.js +++ b/src/api/core/monitoring/auto.js @@ -1,9 +1,9 @@ /* * @Author: Do not edit * @Date: 2023-09-12 09:44:53 - * @LastEditTime: 2023-09-13 16:11:41 - * @LastEditors: DY - * @Description: + * @LastEditTime: 2025-01-07 09:57:36 + * @LastEditors: zwq + * @Description: */ import request from '@/utils/request' @@ -17,9 +17,26 @@ export function getPdlAutoReport(data) { } // 获得所有工厂产线列表 -export function getPdList() { +export function getPdList(id) { return request({ - url: '/base/production-line/listAll', + url: '/base/production-line/listAll' + (id ? '?id=' + id : ''), method: 'get' }) -} \ No newline at end of file +} +// 获得产线自动报表 +export function getLineAuto(data) { + return request({ + url: '/monitoring/production-monitor/getPdlAutoReportNew', + method: 'post', + data: data + }) +} + +// 获得产品自动报表 +export function getProductAuto(data) { + return request({ + url: '/monitoring/production-monitor/getProcessAutoReportNew', + method: 'post', + data: data + }) +} diff --git a/src/api/core/monitoring/data.js b/src/api/core/monitoring/data.js index f9f44367..17bd4127 100644 --- a/src/api/core/monitoring/data.js +++ b/src/api/core/monitoring/data.js @@ -3,7 +3,7 @@ * @Date: 2023-09-12 09:44:53 * @LastEditTime: 2023-09-14 10:25:46 * @LastEditors: DY - * @Description: + * @Description: */ import request from '@/utils/request' @@ -22,4 +22,21 @@ export function getPdList() { url: '/base/production-line/listAll', method: 'get' }) -} \ No newline at end of file +} +// 产线统计数据查询-历史 +export function getPdlAutoReportNewSearch(data) { + return request({ + url: '/monitoring/production-monitor/getPdlAutoReportNewSearch', + method: 'post', + data: data + }) +} + +// 产线统计数据查询-当前 +export function getPdlAutoReportNewSearchNow(data) { + return request({ + url: '/monitoring/production-monitor/getPdlAutoReportNewSearchNow', + method: 'post', + data: data + }) +} diff --git a/src/views/base/equipmentBindSection/index.vue b/src/views/base/equipmentBindSection/index.vue index f0c2238f..a86d8eaf 100644 --- a/src/views/base/equipmentBindSection/index.vue +++ b/src/views/base/equipmentBindSection/index.vue @@ -98,7 +98,7 @@ export default { prop: 'sectionDataType', label: '工段数据类型', filter: (val) => - val != null ? ['无类型', '进口计数', '出口计数'][val] : '-', + val != null ? ['无类型', '进口计数', '出口计数', '进出口计数'][val] : '-', }, // { // action: 'show-alert', @@ -209,8 +209,8 @@ export default { label: '产线数据类型', options: [ { label: '无类型', value: 0 }, - { label: '进口统计', value: 1 }, - { label: '出口统计', value: 2 }, + { label: '进口计数', value: 1 }, + { label: '出口计数', value: 2 }, ], prop: 'lineDataType', }, @@ -219,8 +219,9 @@ export default { label: '工段数据类型', options: [ { label: '无类型', value: 0 }, - { label: '进口统计', value: 1 }, - { label: '出口统计', value: 2 }, + { label: '进口计数', value: 1 }, + { label: '出口计数', value: 2 }, + { label: '进出口计数', value: 3 }, ], prop: 'sectionDataType', }, diff --git a/src/views/core/analysis/balanceAnalysis/BarChart.vue b/src/views/core/analysis/balanceAnalysis/BarChart.vue new file mode 100644 index 00000000..d2b88bcd --- /dev/null +++ b/src/views/core/analysis/balanceAnalysis/BarChart.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/core/analysis/balanceAnalysis/eq-detail.vue b/src/views/core/analysis/balanceAnalysis/eq-detail.vue new file mode 100644 index 00000000..3cea3c16 --- /dev/null +++ b/src/views/core/analysis/balanceAnalysis/eq-detail.vue @@ -0,0 +1,273 @@ + + + + diff --git a/src/views/core/analysis/balanceAnalysis/index-old.vue b/src/views/core/analysis/balanceAnalysis/index-old.vue new file mode 100644 index 00000000..4e0564bd --- /dev/null +++ b/src/views/core/analysis/balanceAnalysis/index-old.vue @@ -0,0 +1,296 @@ + + + diff --git a/src/views/core/analysis/balanceAnalysis/index.vue b/src/views/core/analysis/balanceAnalysis/index.vue index 44ba8518..dda15b11 100644 --- a/src/views/core/analysis/balanceAnalysis/index.vue +++ b/src/views/core/analysis/balanceAnalysis/index.vue @@ -1,104 +1,162 @@ + diff --git a/src/views/core/base/equipment/components/EquipmentInfoForm.vue b/src/views/core/base/equipment/components/EquipmentInfoForm.vue index 4e69aeda..381696d3 100644 --- a/src/views/core/base/equipment/components/EquipmentInfoForm.vue +++ b/src/views/core/base/equipment/components/EquipmentInfoForm.vue @@ -99,7 +99,7 @@ + placeholder="请输入"> diff --git a/src/views/core/base/equipment/index.vue b/src/views/core/base/equipment/index.vue index 64b4caac..63c79a65 100644 --- a/src/views/core/base/equipment/index.vue +++ b/src/views/core/base/equipment/index.vue @@ -295,7 +295,7 @@ export default { { input: true, prop: 'tvalue', - label: '设备TT值', + label: '设备理论生产能效(片/min)', rules: [ { required: true, message: '不能为空', trigger: 'blur' }, { diff --git a/src/views/core/base/productionLine/add-or-updata.vue b/src/views/core/base/productionLine/add-or-updata.vue index a8ea9cba..002f832c 100644 --- a/src/views/core/base/productionLine/add-or-updata.vue +++ b/src/views/core/base/productionLine/add-or-updata.vue @@ -12,6 +12,7 @@ :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" + label-position="top" label-width="90px"> @@ -48,11 +49,11 @@ - + + placeholder="请输入数量" /> diff --git a/src/views/core/base/productionLine/index.vue b/src/views/core/base/productionLine/index.vue index 31a4fcd3..e1245921 100644 --- a/src/views/core/base/productionLine/index.vue +++ b/src/views/core/base/productionLine/index.vue @@ -48,6 +48,7 @@ import { exportProductionLineExcel, getStatus, } from '@/api/core/base/productionLine'; +import { getFactoryPage } from '@/api/core/base/factory'; const tableProps = [ { @@ -121,6 +122,13 @@ export default { ].filter((v) => v), tableData: [], formConfig: [ + { + type: 'select', + label: '工厂', + selectOptions: [], + param: 'factoryId', + onchange: true, + }, { type: 'input', label: '产线名称', @@ -168,7 +176,15 @@ export default { components: { AddOrUpdate, }, - created() {}, + created() { + const params = { + pageSize: 100, + pageNo: 1, + }; + getFactoryPage(params).then((res) => { + this.formConfig[0].selectOptions = res.data.list || []; + }); + }, methods: { // 获取数据列表 getDataList() { @@ -197,6 +213,7 @@ export default { case 'search': this.listQuery.pageNo = 1; this.listQuery.pageSize = 10; + this.listQuery.factoryId = val.factoryId || undefined; this.listQuery.name = val.name; this.getDataList(); break; diff --git a/src/views/core/monitoring/auto/index.vue b/src/views/core/monitoring/auto/index.vue index 280a76cd..94092d39 100644 --- a/src/views/core/monitoring/auto/index.vue +++ b/src/views/core/monitoring/auto/index.vue @@ -1,7 +1,7 @@ @@ -92,7 +92,8 @@ const tableProps = [ }, { prop: 'outputArea', - label: '产出面积/㎡' + label: '产出面积/㎡', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, { prop: 'lossNum', @@ -100,11 +101,13 @@ const tableProps = [ }, { prop: 'lossArea', - label: '损耗面积/㎡' + label: '损耗面积/㎡', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, { prop: 'lossRatio', - label: '损耗比例%' + label: '损耗比例%', + filter: (val) => (val != null ? val.toFixed(2) : '-'), } ]; @@ -180,7 +183,6 @@ export default { startPlaceholder: '开始时间', endPlaceholder: '结束时间', param: 'timeVal', - defaultSelect: [], width: 350 }, { diff --git a/src/views/core/monitoring/data/BarChart.vue b/src/views/core/monitoring/data/BarChart.vue new file mode 100644 index 00000000..13d3685b --- /dev/null +++ b/src/views/core/monitoring/data/BarChart.vue @@ -0,0 +1,170 @@ + + + diff --git a/src/views/core/monitoring/data/baseTable.vue b/src/views/core/monitoring/data/baseTable.vue new file mode 100644 index 00000000..4b292da6 --- /dev/null +++ b/src/views/core/monitoring/data/baseTable.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/src/views/core/monitoring/data/index-old.vue b/src/views/core/monitoring/data/index-old.vue new file mode 100644 index 00000000..92723381 --- /dev/null +++ b/src/views/core/monitoring/data/index-old.vue @@ -0,0 +1,314 @@ + + + + diff --git a/src/views/core/monitoring/data/index.vue b/src/views/core/monitoring/data/index.vue index 888e2401..75219ffa 100644 --- a/src/views/core/monitoring/data/index.vue +++ b/src/views/core/monitoring/data/index.vue @@ -1,138 +1,297 @@ - + diff --git a/src/views/core/monitoring/data24/index.vue b/src/views/core/monitoring/data24/index.vue index 3c28dc1c..4aa67999 100644 --- a/src/views/core/monitoring/data24/index.vue +++ b/src/views/core/monitoring/data24/index.vue @@ -69,10 +69,14 @@ export default { label: times.slice(0, 10) + ' ' + times.slice(11), align: 'center', children: [ - { prop: times + '_in', label: '投入数量' }, - { prop: times + '_out', label: '产出数量' }, - { prop: times + '_junk', label: '报废数量' }, - { prop: times + '_area', label: '产出面积' } + { prop: times + '_in', label: '投入数量', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, + { prop: times + '_out', label: '产出数量', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, + { prop: times + '_junk', label: '报废数量', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, + { prop: times + '_area', label: '产出面积', + filter: (val) => (val != null ? val.toFixed(2) : '-'), } ] } this.arr.push(subprop) diff --git a/src/views/core/monitoring/lineAuto/baseTable.vue b/src/views/core/monitoring/lineAuto/baseTable.vue new file mode 100644 index 00000000..4b292da6 --- /dev/null +++ b/src/views/core/monitoring/lineAuto/baseTable.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/src/views/core/monitoring/lineAuto/index.vue b/src/views/core/monitoring/lineAuto/index.vue new file mode 100644 index 00000000..b9ec39ff --- /dev/null +++ b/src/views/core/monitoring/lineAuto/index.vue @@ -0,0 +1,462 @@ + + + + diff --git a/src/views/core/monitoring/productAuto/index.vue b/src/views/core/monitoring/productAuto/index.vue new file mode 100644 index 00000000..5b425304 --- /dev/null +++ b/src/views/core/monitoring/productAuto/index.vue @@ -0,0 +1,358 @@ + + + + diff --git a/src/views/core/monitoring/sectionStatistics/index.vue b/src/views/core/monitoring/sectionStatistics/index.vue index def6ef4a..93b3e4dd 100644 --- a/src/views/core/monitoring/sectionStatistics/index.vue +++ b/src/views/core/monitoring/sectionStatistics/index.vue @@ -1,7 +1,7 @@ @@ -95,7 +95,8 @@ const tableProps = [ }, { prop: 'outputArea', - label: '产出面积/㎡' + label: '产出面积/㎡', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, { prop: 'lossNum', @@ -103,11 +104,13 @@ const tableProps = [ }, { prop: 'lossArea', - label: '损耗面积/㎡' + label: '损耗面积/㎡', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, { prop: 'lossRatio', - label: '损耗比例%' + label: '损耗比例%', + filter: (val) => (val != null ? val.toFixed(2) : '-'), } ]; diff --git a/src/views/core/monitoring/sectionStatisticsSearch/index.vue b/src/views/core/monitoring/sectionStatisticsSearch/index.vue index d8440161..7116b772 100644 --- a/src/views/core/monitoring/sectionStatisticsSearch/index.vue +++ b/src/views/core/monitoring/sectionStatisticsSearch/index.vue @@ -73,10 +73,12 @@ const tableProps = [ { prop: 'lossArea', label: '损耗面积/m²', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, { prop: 'lossRate', label: '损耗比例/%', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, ]; @@ -328,7 +330,8 @@ export default { switch (val.btnName) { case 'search': console.log(val.timeSlot); - + this.formConfig[2].startPlaceholder = '开始时间'; + this.formConfig[2].endPlaceholder = '结束时间'; // this.listQuery.pageNo = 1; // this.listQuery.pageSize = 10; this.listQuery.proLineId = val.proLineId ? val.proLineId : undefined; diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue index e272b2c0..52fdddc6 100644 --- a/src/views/equipment/analysis/efficiency/index.vue +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -196,14 +196,14 @@ export default { }, ], }, - { - prop: 'oee', - label: 'OEE', - filter: (val) => (val != null ? val.toFixed(2) : '-'), - }, + // { + // prop: 'oee', + // label: 'OEE', + // filter: (val) => (val != null ? val.toFixed(2) : '-'), + // }, { prop: 'teep', - label: 'TEEP', + label: '设备生产能效比例', filter: (val) => (val != null ? val.toFixed(2) : '-'), }, // { diff --git a/src/views/equipment/analysis/exception/index.vue b/src/views/equipment/analysis/exception/index.vue index 07760753..fe036697 100644 --- a/src/views/equipment/analysis/exception/index.vue +++ b/src/views/equipment/analysis/exception/index.vue @@ -84,14 +84,18 @@ export default { width: 240, prop: 'mtbf', label: '平均故障间隔时间[MTBF](h)', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, { width: 240, prop: 'mttr', label: '平均维修时间[MTTR](h)', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, - { width: 128, prop: 'workTime', label: '工作时长(h)' }, - { width: 128, prop: 'downTime', label: '故障时长(h)' }, + { width: 128, prop: 'workTime', label: '工作时长(h)', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, + { width: 128, prop: 'downTime', label: '故障时长(h)', + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, { prop: 'downCount', label: '故障次数' }, ], searchBarFormConfig: [ diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue index c1dfa1d2..174d54bc 100644 --- a/src/views/equipment/analysis/quality/index.vue +++ b/src/views/equipment/analysis/quality/index.vue @@ -158,7 +158,7 @@ export default { // width: 160, prop: 'passRate', label: '合格率', - filter: (val) => (val != null ? val.toFixed(2) : '-'), + filter: (val) => (val != null ? val.toFixed(2) : '-'), }, ], lineChartConfig: { @@ -315,6 +315,8 @@ export default { // debugger; switch (btn.btnName) { case 'search': + this.searchBarFormConfig[2].startPlaceholder = '开始时间'; + this.searchBarFormConfig[2].endPlaceholder = '结束时间'; this.queryParams.lineId = btn.lineId; this.queryParams.productId = btn.productId; this.queryParams.recordTime = btn.recordTime diff --git a/src/views/monitoring/equipmentFullParams/index.vue b/src/views/monitoring/equipmentFullParams/index.vue index 5301d076..522aecf8 100644 --- a/src/views/monitoring/equipmentFullParams/index.vue +++ b/src/views/monitoring/equipmentFullParams/index.vue @@ -12,7 +12,9 @@ ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -
+
0) { - this.queryParams.time = timeVal; + this.queryParams.recordTime = timeVal; } else { - this.queryParams.time = []; + this.queryParams.recordTime = []; } await this.handleQuery(); }, @@ -270,7 +279,6 @@ export default { grid-template-columns: 1fr 1fr; gap: 18px; } - .tables >>> .baseTable { overflow-x: hidden; }