From 55f90a71028beba2b9b858ed1ae72d750b9e3f2f Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 4 Sep 2023 09:41:31 +0800 Subject: [PATCH 01/21] =?UTF-8?q?add=20=E8=AE=BE=E5=A4=87=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=89=A9=E4=BD=99=E9=83=A8=E5=88=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipment/analysis/efficiency/index.vue | 29 +++++++++++++++++++ .../equipment/analysis/exception/index.vue | 29 +++++++++++++++++++ .../equipment/analysis/quality/index.vue | 29 +++++++++++++++++++ .../equipment/timing-diagram/output/index.vue | 29 +++++++++++++++++++ .../equipment/timing-diagram/status/index.vue | 29 +++++++++++++++++++ 5 files changed, 145 insertions(+) create mode 100644 src/views/equipment/analysis/efficiency/index.vue create mode 100644 src/views/equipment/analysis/exception/index.vue create mode 100644 src/views/equipment/analysis/quality/index.vue create mode 100644 src/views/equipment/timing-diagram/output/index.vue create mode 100644 src/views/equipment/timing-diagram/status/index.vue diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue new file mode 100644 index 00000000..08b33b34 --- /dev/null +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -0,0 +1,29 @@ + + + + + + + diff --git a/src/views/equipment/analysis/exception/index.vue b/src/views/equipment/analysis/exception/index.vue new file mode 100644 index 00000000..0acd5fd1 --- /dev/null +++ b/src/views/equipment/analysis/exception/index.vue @@ -0,0 +1,29 @@ + + + + + + + diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue new file mode 100644 index 00000000..76409721 --- /dev/null +++ b/src/views/equipment/analysis/quality/index.vue @@ -0,0 +1,29 @@ + + + + + + + diff --git a/src/views/equipment/timing-diagram/output/index.vue b/src/views/equipment/timing-diagram/output/index.vue new file mode 100644 index 00000000..ac1927aa --- /dev/null +++ b/src/views/equipment/timing-diagram/output/index.vue @@ -0,0 +1,29 @@ + + + + + + + diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue new file mode 100644 index 00000000..a3fe9e47 --- /dev/null +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -0,0 +1,29 @@ + + + + + + + From 6f71b6a7c0ed5c4800152e689e6ef2cb5369e208 Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 4 Sep 2023 13:54:37 +0800 Subject: [PATCH 02/21] =?UTF-8?q?add=20=E4=BA=A7=E5=93=81=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=E5=88=86=E6=9E=90-=E5=9B=BE=E5=BD=A2=E5=BC=B9?= =?UTF-8?q?=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../analysis/quality/components/lineChart.vue | 34 +++ .../equipment/analysis/quality/index.vue | 280 +++++++++++++++++- 2 files changed, 301 insertions(+), 13 deletions(-) create mode 100644 src/views/equipment/analysis/quality/components/lineChart.vue diff --git a/src/views/equipment/analysis/quality/components/lineChart.vue b/src/views/equipment/analysis/quality/components/lineChart.vue new file mode 100644 index 00000000..546f3d2f --- /dev/null +++ b/src/views/equipment/analysis/quality/components/lineChart.vue @@ -0,0 +1,34 @@ + + + + + + + diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue index 76409721..af911c12 100644 --- a/src/views/equipment/analysis/quality/index.vue +++ b/src/views/equipment/analysis/quality/index.vue @@ -6,24 +6,278 @@ --> - From fbd78c6aa519400c54c38e27b80f310eead97222 Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 4 Sep 2023 14:35:13 +0800 Subject: [PATCH 03/21] =?UTF-8?q?update=20=E4=BA=A7=E5=93=81=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../analysis/quality/components/lineChart.vue | 29 ++++++-- .../equipment/analysis/quality/index.vue | 68 +++++++++++++++++-- 2 files changed, 86 insertions(+), 11 deletions(-) diff --git a/src/views/equipment/analysis/quality/components/lineChart.vue b/src/views/equipment/analysis/quality/components/lineChart.vue index 546f3d2f..f3a93bc8 100644 --- a/src/views/equipment/analysis/quality/components/lineChart.vue +++ b/src/views/equipment/analysis/quality/components/lineChart.vue @@ -6,29 +6,44 @@ --> diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue index af911c12..47de831b 100644 --- a/src/views/equipment/analysis/quality/index.vue +++ b/src/views/equipment/analysis/quality/index.vue @@ -29,7 +29,7 @@ @close="dialogClose" @cancel="dialogClose" @confirm="dialogClose"> - + @@ -72,8 +72,8 @@ export default { dateType: 'daterange', // datetimerange // format: 'yyyy-MM-dd HH:mm:ss', format: 'yyyy-MM-dd', - // valueFormat: 'yyyy-MM-dd HH:mm:ss', - valueFormat: 'timestamp', + valueFormat: 'yyyy-MM-dd HH:mm:ss', + // valueFormat: 'timestamp', rangeSeparator: '-', startPlaceholder: '开始日期', endPlaceholder: '结束日期', @@ -150,7 +150,67 @@ export default { align: 'center', }, ], - + lineChartConfig: { + grid: { + top: 88, + left: 56, + right: 56, + bottom: 56, + }, + legend: { + top: 0, + left: 0, + padding: 5, + icon: 'roundRect', + itemWidth: 12, + itemHeight: 12, + itemGap: 20, + textStyle: { + fontSize: 14, + lineHeight: 14 + }, + }, + xAxis: { + type: 'category', + data: ['设备1', '设备2', '设备3', '设备4', '设备5'], + }, + yAxis: { + type: 'value', + name: '合格率', + nameLocation: 'end', + nameTextStyle: { + fontSize: 14, + align: 'right' + }, + nameGap: 26 + }, + series: [ + { + name: '产线1', + data: [150, 230, 224, 218, 135], + type: 'line', + smooth: true, + }, + { + name: '产线2', + data: [111, 224, 42, 11, 24], + type: 'line', + smooth: true, + }, + { + name: '产线3', + data: [218, 112, 331, 44, 99], + type: 'line', + smooth: true, + }, + { + name: '产线4', + data: [3, 221, 42, 553, 311], + type: 'line', + smooth: true, + }, + ], + }, // 查询参数 queryParams: { pageNo: 1, From ffedc7c256114044a5a1d10e5580c7d72f91076a Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 4 Sep 2023 14:50:52 +0800 Subject: [PATCH 04/21] =?UTF-8?q?add=20=E8=AE=BE=E5=A4=87=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipment/analysis/exception/index.vue | 216 ++++++++++++++++-- 1 file changed, 201 insertions(+), 15 deletions(-) diff --git a/src/views/equipment/analysis/exception/index.vue b/src/views/equipment/analysis/exception/index.vue index 0acd5fd1..47425378 100644 --- a/src/views/equipment/analysis/exception/index.vue +++ b/src/views/equipment/analysis/exception/index.vue @@ -6,24 +6,210 @@ --> - + From 55e8de1136a6e88d11cfcaa49d196d0d4271e897 Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 4 Sep 2023 15:24:22 +0800 Subject: [PATCH 05/21] =?UTF-8?q?update=20=E5=AE=8C=E6=88=90=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=BC=82=E5=B8=B8=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipment/analysis/exception/index.vue | 193 ++++++++---------- 1 file changed, 86 insertions(+), 107 deletions(-) diff --git a/src/views/equipment/analysis/exception/index.vue b/src/views/equipment/analysis/exception/index.vue index 47425378..c8246cdb 100644 --- a/src/views/equipment/analysis/exception/index.vue +++ b/src/views/equipment/analysis/exception/index.vue @@ -65,57 +65,44 @@ export default { : undefined, ].filter((v) => v), tableProps: [ + { prop: 'lineName', label: '产线', align: 'center' }, + { prop: 'sectionName', label: '工段', align: 'center' }, + { prop: 'equipmentName', label: '设备', align: 'center' }, { - prop: 'createTime', - label: '添加时间', - fixed: true, - width: 180, - filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), - }, - { prop: 'name', label: '设备分组名称', align: 'center' }, - { prop: 'code', label: '检测分组编码', align: 'center' }, - { prop: 'remark', label: '备注', align: 'center' }, - { - _action: 'equipment-group-show-alert', - label: '报警', + width: 188, + prop: 'mtbf', + label: '平均故障间隔时间[MTBF](h)', align: 'center', - subcomponent: { - props: ['injectData'], - render: function (h) { - const _this = this; - return h( - 'el-button', - { - props: { type: 'text', size: 'mini' }, - on: { - click: function () { - console.log('inejctdata', _this.injectData); - _this.$emit('emitData', { - action: _this.injectData._action, - // value: _this.injectData.id, - value: _this.injectData, - }); - }, - }, - }, - '查看报警' - ); - }, - }, }, + { + width: 180, + prop: 'mttr', + label: '平均维修时间[MTTR](h)', + align: 'center', + }, + { prop: 'workTime', label: '工作时长(h)', align: 'center' }, + { prop: 'downTime', label: '故障时长(h)', align: 'center' }, + { prop: 'downCount', label: '故障次数', align: 'center' }, ], searchBarFormConfig: [ { - type: 'input', - label: '分组名称', - placeholder: '请输入设备分组名称', - param: 'name', + type: 'select', + label: '请选择月份', + placeholder: '请选择月份', + param: 'month', + selectOptions: Array(12) + .fill(0) + .map((v, i) => ({ + id: i + 1, + name: `${i + 1}月`, + })), }, { - type: 'input', - label: '分组编码', - placeholder: '请输入设备分组编码', - param: 'codes', + __index: 'line', + type: 'select', + label: '产线', + placeholder: '请选择产线', + param: 'lineId', }, { type: 'button', @@ -123,86 +110,78 @@ export default { name: 'search', color: 'primary', }, - { - type: 'separate', - }, - { - type: this.$auth.hasPermi('base:equipment-group:create') - ? 'button' - : '', - btnName: '新增', - name: 'add', - plain: true, - color: 'success', - }, - // { - // type: this.$auth.hasPermi('base:equipment-group:export') ? 'button' : '', - // btnName: '导出', - // name: 'export', - // color: 'warning', - // }, ], - rows: [ - [ - { - input: true, - label: '分组名称', - prop: 'name', - rules: [{ required: true, message: '不能为空', trigger: 'blur' }], - // bind: { - // disabled: true, // some condition, like detail mode... - // } - }, - ], - [ - { - input: true, - label: '分组编码', - prop: 'code', - url: '/base/equipment-group/getCode', - }, - ], - [ - { - input: true, - label: '备注', - prop: 'remark', - // rules: [{ required: true, message: '不能为空', trigger: 'blur' }], - bind: { - placeholder: '请输入备注', - }, - }, - ], - ], - // 是否显示弹出层 - open: false, // 查询参数 queryParams: { - pageNo: 1, - pageSize: 10, - code: null, - name: null, + lineId: null, + factoryId: null, + recordTime: null, }, - // 表单参数 - form: {}, }; }, computed: {}, + created() { + this.fillLineOptions(); + }, methods: { - getList() { + async fillLineOptions() { + const { data } = await this.$axios({ + url: '/base/production-line/listAll', + method: 'get', + }); + const cfg = this.searchBarFormConfig.find( + (item) => item.__index == 'line' + ); + this.$set( + cfg, + 'selectOptions', + data.map((item) => ({ + id: item.id, + name: item.name, + })) + ); + }, + + async getList() { this.loading = true; // 执行查询 - getEquipmentGroupPage(this.queryParams).then((response) => { - this.list = response.data.list; - this.total = response.data.total; - this.loading = false; + const { data } = await this.$axios({ + url: '/analysis/equipment-analysis/efficiency', + method: 'get', + params: { + lineId: this.queryParams.lineId || null, + recordTime: this.queryParams.recordTime || null, + }, }); }, + + handleSearchBarBtnClick(btn) { + switch (btn.btnName) { + case 'search': + if (btn.month) { + this.queryParams.recordTime = [ + moment() + .month(btn.month - 1) + .format('YYYY-MM')+'-01 00:00:00', + moment() + .month(btn.month) + .format('YYYY-MM')+'-01 00:00:00', + ]; + } else { + this.queryParams.recordTime = null; + } + this.queryParams.lineId = btn.lineId || null; + this.handleQuery(); + break; + } + }, + /** 搜索按钮操作 */ handleQuery() { - this.queryParams.pageNo = 1; + // this.queryParams.pageNo = 1; this.getList(); }, + /** 重置按钮操作 */ resetQuery() { this.resetForm('queryForm'); From e16b6f8ec415cd1ed53b3ec5ab7d4719223d5223 Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 5 Sep 2023 16:07:50 +0800 Subject: [PATCH 06/21] =?UTF-8?q?update=20=E8=AE=BE=E5=A4=87=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=97=B6=E5=BA=8F=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipment/timing-diagram/status/index.vue | 384 +++++++++++++++++- 1 file changed, 372 insertions(+), 12 deletions(-) diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index a3fe9e47..9ab4bcfa 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -6,24 +6,384 @@ --> From 2dd40261a44989d5a059a57b0b2159da38d92444 Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 5 Sep 2023 16:26:52 +0800 Subject: [PATCH 07/21] =?UTF-8?q?update=20=E8=AE=BE=E5=A4=87=E7=8A=B6?= =?UTF-8?q?=E6=80=81=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/views/equipment/timing-diagram/status/index.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index 9ab4bcfa..08ac31c9 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -20,25 +20,25 @@
运行中
-
+
故障
-
+
-
停止运行
+
计划停机
From e5fed362341f0a7df3a39d728268f54cb81fd7f0 Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 5 Sep 2023 16:30:24 +0800 Subject: [PATCH 08/21] =?UTF-8?q?update=20=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 --- .../equipment/timing-diagram/output/index.vue | 188 ++++++++++++++++-- 1 file changed, 173 insertions(+), 15 deletions(-) diff --git a/src/views/equipment/timing-diagram/output/index.vue b/src/views/equipment/timing-diagram/output/index.vue index ac1927aa..714639f6 100644 --- a/src/views/equipment/timing-diagram/output/index.vue +++ b/src/views/equipment/timing-diagram/output/index.vue @@ -6,24 +6,182 @@ --> - + From edc5d64acc8b5e9c19a05619ac6cf533b49d575b Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 5 Sep 2023 17:01:53 +0800 Subject: [PATCH 09/21] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=95=88=E7=8E=87=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipment/analysis/efficiency/index.vue | 346 +++++++++++++++++- 1 file changed, 331 insertions(+), 15 deletions(-) diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue index 08b33b34..bf318e51 100644 --- a/src/views/equipment/analysis/efficiency/index.vue +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -6,24 +6,340 @@ --> - + From a505f34abcd7beee74a3f05e3362030c6df83887 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 6 Sep 2023 09:56:05 +0800 Subject: [PATCH 10/21] =?UTF-8?q?update=20=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 --- .../output/components/lineChart.vue | 49 ++++++ .../equipment/timing-diagram/output/index.vue | 162 +++++++++++++----- .../equipment/timing-diagram/status/index.vue | 3 + 3 files changed, 173 insertions(+), 41 deletions(-) create mode 100644 src/views/equipment/timing-diagram/output/components/lineChart.vue diff --git a/src/views/equipment/timing-diagram/output/components/lineChart.vue b/src/views/equipment/timing-diagram/output/components/lineChart.vue new file mode 100644 index 00000000..1ca240df --- /dev/null +++ b/src/views/equipment/timing-diagram/output/components/lineChart.vue @@ -0,0 +1,49 @@ + + + + + + + diff --git a/src/views/equipment/timing-diagram/output/index.vue b/src/views/equipment/timing-diagram/output/index.vue index 714639f6..3d78c2bd 100644 --- a/src/views/equipment/timing-diagram/output/index.vue +++ b/src/views/equipment/timing-diagram/output/index.vue @@ -15,46 +15,10 @@ @headBtnClick="handleSearchBarBtnClick" />
-
-
-
-
运行中
-
- -
-
-
故障
-
- -
-
-
计划停机
-
-
-
+

{{ eq.key }}

-
+

请添加设备

@@ -63,9 +27,11 @@ diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index 57eda27c..2aafc1c6 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -113,6 +113,27 @@

请添加设备

+ + + + + + +
@@ -177,6 +198,8 @@ export default { recordTime: [], }, graphList: [], + open: false, + eqList: [], // demo: [ // [ // { @@ -203,6 +226,7 @@ export default { created() { this.initProductline(); this.initWorksection(); + this.initEquipment(); this.getList(); }, methods: { @@ -235,6 +259,22 @@ export default { } }, + /** 准备设备数据 */ + async initEquipment() { + const { code, data } = await this.$axios({ + url: '/base/equipment/listAll', + method: 'get', + }); + if (code == 0) { + this.eqList = data.map((item) => { + return { + name: item.name, + id: item.id, + }; + }); + } + }, + /** 准备产线数据 */ async initProductline() { const { code, data } = await this.$axios({ @@ -276,11 +316,28 @@ export default { this.queryParams.recordTime = payload.recordTime || null; this.getList(); break; - case 'compare': - this.$message.info('暂未实现该接口') - break; + case 'compare': + this.open = true; + break; } }, + + async submitForm() { + const { code, data } = await this.$axios({ + url: '/analysis/equipment-analysis/status', + method: 'get', + params: this.queryParams, + }); + if (code == 0) { + const newEqlist = this.objectToArray(data); + if (!newEqlist || newEqlist.length == 0) { + this.$message.error('该设备没有状态数据'); + return; + } + this.graphList.push(newEqlist[0]); + } + this.open = false; + }, }, }; From 052f54833c7c7f153b7a73d17f7d5911c7968ffe Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 6 Sep 2023 11:28:10 +0800 Subject: [PATCH 12/21] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=E6=95=88?= =?UTF-8?q?=E7=8E=87=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipment/analysis/efficiency/index.vue | 250 +++++++++--------- 1 file changed, 123 insertions(+), 127 deletions(-) diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue index bf318e51..5643d3f3 100644 --- a/src/views/equipment/analysis/efficiency/index.vue +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -15,17 +15,18 @@ - + @clickBtn="handleTableBtnClick" /> --> @@ -44,7 +45,7 @@ @close="cancel" @cancel="cancel" @confirm="submitForm"> - +
@@ -61,34 +62,99 @@ export default { data() { return { searchBarKeys: ['name', 'code'], - tableBtn: [ - this.$auth.hasPermi('base:equipment-group:update') - ? { - type: 'edit', - btnName: '修改', - } - : undefined, - this.$auth.hasPermi('base:equipment-group:delete') - ? { - type: 'delete', - btnName: '删除', - } - : undefined, - ].filter((v) => v), + // tableBtn: [ + // this.$auth.hasPermi('base:equipment-group:update') + // ? { + // type: 'edit', + // btnName: '修改', + // } + // : undefined, + // this.$auth.hasPermi('base:equipment-group:delete') + // ? { + // type: 'delete', + // btnName: '删除', + // } + // : undefined, + // ].filter((v) => v), tableProps: [ + { prop: 'duration', label: '工厂', align: 'center' }, + { prop: 'duration', label: '产线', align: 'center' }, + { prop: 'duration', label: '工段', align: 'center' }, + { prop: 'duration', label: '设备', align: 'center' }, { - prop: 'createTime', - label: '添加时间', - fixed: true, - width: 180, - filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), + label: '有效时间', + align: 'center', + children: [ + { + width: 128, + prop: 'duration', + label: '工作时长', + align: 'center', + }, + { width: 128, prop: 'duration1', label: '百分比', align: 'center' }, + ], }, - { prop: 'name', label: '设备分组名称', align: 'center' }, - { prop: 'code', label: '检测分组编码', align: 'center' }, - { prop: 'remark', label: '备注', align: 'center' }, { - _action: 'equipment-group-show-alert', - label: '报警', + label: '关机时间', + align: 'center', + children: [ + { + width: 128, + prop: 'duration', + label: '停机时长', + align: 'center', + }, + { width: 128, prop: 'duration1', label: '百分比', align: 'center' }, + ], + }, + { + label: '中断损失', + align: 'center', + children: [ + { + width: 128, + prop: 'duration', + label: '故障时长', + align: 'center', + }, + { width: 128, prop: 'duration1', label: '百分比', align: 'center' }, + { + width: 128, + prop: 'duration1', + label: '时间开动率', + align: 'center', + }, + ], + }, + { + label: '速度损失', + align: 'center', + children: [ + { + width: 128, + prop: 'duration', + label: '实际加工速度', + align: 'center', + }, + { + width: 128, + prop: 'duration1', + label: '理论加工速度', + align: 'center', + }, + { + width: 128, + prop: 'duration1', + label: '速度开动率', + align: 'center', + }, + ], + }, + { prop: 'duration1', label: 'OEE', align: 'center' }, + { prop: 'duration1', label: 'TEEP', align: 'center' }, + { + _action: 'view-trend', + label: '趋势', align: 'center', subcomponent: { props: ['injectData'], @@ -109,7 +175,7 @@ export default { }, }, }, - '查看报警' + '查看趋势' ); }, }, @@ -117,16 +183,30 @@ export default { ], searchBarFormConfig: [ { - type: 'input', - label: '分组名称', - placeholder: '请输入设备分组名称', + type: 'select', + label: '工厂', + placeholder: '请选择工厂', param: 'name', + selectOptions: [], }, { - type: 'input', - label: '分组编码', - placeholder: '请输入设备分组编码', + type: 'select', + label: '产线', + placeholder: '请选择产线', param: 'codes', + selectOptions: [], + }, + // 选项切换 + { + type: 'datePicker', + label: '时间', + dateType: 'daterange', + format: 'yyyy-MM-dd', + valueFormat: 'yyyy-MM-dd HH:mm:ss', + rangeSeparator: '-', + startPlaceholder: '开始时间', + endPlaceholder: '结束时间', + param: 'createTime', }, { type: 'button', @@ -138,52 +218,19 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi('base:equipment-group:create') - ? 'button' - : '', - btnName: '新增', + type: 'button', + btnName: 'OEE', name: 'add', plain: true, color: 'success', }, - // { - // type: this.$auth.hasPermi('base:equipment-group:export') ? 'button' : '', - // btnName: '导出', - // name: 'export', - // color: 'warning', - // }, - ], - rows: [ - [ - { - input: true, - label: '分组名称', - prop: 'name', - rules: [{ required: true, message: '不能为空', trigger: 'blur' }], - // bind: { - // disabled: true, // some condition, like detail mode... - // } - }, - ], - [ - { - input: true, - label: '分组编码', - prop: 'code', - url: '/base/equipment-group/getCode', - }, - ], - [ - { - input: true, - label: '备注', - prop: 'remark', - // rules: [{ required: true, message: '不能为空', trigger: 'blur' }], - bind: { - placeholder: '请输入备注', - }, - }, - ], + { + type: 'button', + btnName: 'TEEP', + name: 'add', + plain: true, + color: 'warning', + }, ], // 是否显示弹出层 open: false, @@ -264,16 +311,6 @@ export default { this.open = true; this.title = '添加设备分组(用于同类型不同厂家的设备区分)'; }, - /** 修改按钮操作 */ - handleUpdate(row) { - this.reset(); - const id = row.id; - getEquipmentGroup(id).then((response) => { - this.form = response.data; - this.open = true; - this.title = '修改设备分组(用于同类型不同厂家的设备区分)'; - }); - }, /** 提交按钮 */ submitForm() { this.$refs['form'].validate((valid) => { @@ -297,47 +334,6 @@ export default { }); }); }, - /** 删除按钮操作 */ - handleDelete(row) { - const id = row.id; - this.$modal - .confirm( - '是否确认删除设备分组(用于同类型不同厂家的设备区分)编号为"' + - id + - '"的数据项?' - ) - .then(function () { - return deleteEquipmentGroup(id); - }) - .then(() => { - this.getList(); - this.$modal.msgSuccess('删除成功'); - }) - .catch(() => {}); - }, - /** 导出按钮操作 */ - handleExport() { - // 处理查询参数 - let params = { ...this.queryParams }; - params.pageNo = undefined; - params.pageSize = undefined; - this.$modal - .confirm( - '是否确认导出所有设备分组(用于同类型不同厂家的设备区分)数据项?' - ) - .then(() => { - this.exportLoading = true; - return exportEquipmentGroupExcel(params); - }) - .then((response) => { - this.$download.excel( - response, - '设备分组(用于同类型不同厂家的设备区分).xls' - ); - this.exportLoading = false; - }) - .catch(() => {}); - }, }, }; From cd437ed7d3e4cdad53f511dad51c9081d9dddaf6 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 6 Sep 2023 14:33:49 +0800 Subject: [PATCH 13/21] =?UTF-8?q?update=20=E6=95=88=E7=8E=87=E5=88=86?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixins/lb/basicPageMixin.js | 1 - .../equipment/analysis/efficiency/index.vue | 314 +++++++++++------- 2 files changed, 193 insertions(+), 122 deletions(-) diff --git a/src/mixins/lb/basicPageMixin.js b/src/mixins/lb/basicPageMixin.js index 3a59732b..8eab17ff 100644 --- a/src/mixins/lb/basicPageMixin.js +++ b/src/mixins/lb/basicPageMixin.js @@ -31,7 +31,6 @@ export default { // dialogFormConfig: [], // 占位 }; }, - mounted() {}, methods: { // 过滤后端传回的详情数据 filterData(data, keys) { diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue index 5643d3f3..2898a8c2 100644 --- a/src/views/equipment/analysis/efficiency/index.vue +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -17,10 +17,10 @@ + - + @pagination="getList" /> --> - +
+

设备可视化

+
+
+

查看趋势

+
From d63d49ccc9c5782c91d7f34cdec8a1ea6864e233 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 6 Sep 2023 15:09:48 +0800 Subject: [PATCH 14/21] add pie chart --- .../efficiency/components/pieChart.vue | 98 +++++++++++++++++++ .../equipment/analysis/efficiency/index.vue | 12 ++- 2 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 src/views/equipment/analysis/efficiency/components/pieChart.vue diff --git a/src/views/equipment/analysis/efficiency/components/pieChart.vue b/src/views/equipment/analysis/efficiency/components/pieChart.vue new file mode 100644 index 00000000..74db4ada --- /dev/null +++ b/src/views/equipment/analysis/efficiency/components/pieChart.vue @@ -0,0 +1,98 @@ + + + + + + + diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue index 2898a8c2..51c76f25 100644 --- a/src/views/equipment/analysis/efficiency/index.vue +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -47,7 +47,7 @@ @cancel="cancel" @confirm="submitForm">
-

设备可视化

+

查看趋势

@@ -59,11 +59,12 @@ - + From fa02c3933d29026cf2727e20b4a3b5bcd69b9c90 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 6 Sep 2023 16:18:59 +0800 Subject: [PATCH 15/21] =?UTF-8?q?remove=20=E4=BA=A7=E5=93=81=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=E7=9B=91=E6=8E=A7=E5=8F=AF=E8=A7=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/equipment/analysis/quality/index.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue index 47de831b..2f9dcae2 100644 --- a/src/views/equipment/analysis/quality/index.vue +++ b/src/views/equipment/analysis/quality/index.vue @@ -22,7 +22,7 @@ @emitFun="handleEmitFun"> - - + -->
@@ -98,12 +98,12 @@ export default { // { // type: 'separate', // }, - { - type: 'button', - btnName: '图形分析', - name: 'graphVersion', - color: 'text btn-graph', - }, + // { + // type: 'button', + // btnName: '图形分析', + // name: 'graphVersion', + // color: 'text btn-graph', + // }, ], // 动态的 props tableProps: [ From 76100ad07dba9ad8d9fbcd6fbaf4a43a6fe6d262 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 6 Sep 2023 16:37:22 +0800 Subject: [PATCH 16/21] =?UTF-8?q?update=20=E8=AE=BE=E5=A4=87=E5=85=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monitoring/equipmentFullParams/index.vue | 143 ++++++++++-------- .../utils/local-data-manager.js | 29 ++++ 2 files changed, 109 insertions(+), 63 deletions(-) create mode 100644 src/views/monitoring/equipmentFullParams/utils/local-data-manager.js diff --git a/src/views/monitoring/equipmentFullParams/index.vue b/src/views/monitoring/equipmentFullParams/index.vue index 05c4c16c..1dcdd722 100644 --- a/src/views/monitoring/equipmentFullParams/index.vue +++ b/src/views/monitoring/equipmentFullParams/index.vue @@ -16,10 +16,18 @@ + @@ -58,8 +116,7 @@ export default { .chart-wrapper { height: 100%; flex: 1; - background: #f1f1f1; - padding: 12px; + // background: #f9f9f9; } .chart { diff --git a/src/views/monitoring/equipmentProcessAmount/index.vue b/src/views/monitoring/equipmentProcessAmount/index.vue index ccbe715e..4119be8d 100644 --- a/src/views/monitoring/equipmentProcessAmount/index.vue +++ b/src/views/monitoring/equipmentProcessAmount/index.vue @@ -48,7 +48,8 @@
- + +
没有设备