From bbbfa9644d4d77bee3196026b366091d4734e19c Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 25 Sep 2023 15:47:39 +0800 Subject: [PATCH] bugfix --- src/views/base/equipmentPlc/index.vue | 1 + src/views/base/equipmentPlcParam/index.vue | 2 +- .../equipment/analysis/efficiency/index.vue | 33 ++- .../analysis/quality/components/lineChart.vue | 23 +- .../equipment/timing-diagram/status/index.vue | 229 +++++++++++++++++- .../monitoring/equipmentAlarmLog/index.vue | 7 +- .../equipmentProcessAmount/graph.vue | 21 +- .../equipmentProcessAmount/index.vue | 8 +- .../monitoring/equipmentRecentHours/index.vue | 11 +- .../equipmentStatusAndParams/index.vue | 4 +- 10 files changed, 296 insertions(+), 43 deletions(-) diff --git a/src/views/base/equipmentPlc/index.vue b/src/views/base/equipmentPlc/index.vue index 59c6fa71..09a47404 100644 --- a/src/views/base/equipmentPlc/index.vue +++ b/src/views/base/equipmentPlc/index.vue @@ -211,6 +211,7 @@ export default { switch: true, label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集 prop: 'collection', + value: 1, bind: { 'active-value': 1, 'inactive-value': 0, diff --git a/src/views/base/equipmentPlcParam/index.vue b/src/views/base/equipmentPlcParam/index.vue index 6d932706..e2454c75 100644 --- a/src/views/base/equipmentPlcParam/index.vue +++ b/src/views/base/equipmentPlcParam/index.vue @@ -419,7 +419,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除设备数采详情编号为"' + id + '"的数据项?') + .confirm('是否确认删除"' + row.name + '"的参数绑定?') .then(function () { return deleteEquipmentPlcParam(id); }) diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue index 3f2e2853..87695fb6 100644 --- a/src/views/equipment/analysis/efficiency/index.vue +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -55,7 +55,10 @@
-
+
@@ -253,7 +256,7 @@ export default { rangeSeparator: '-', startPlaceholder: '开始时间', endPlaceholder: '结束时间', - param: 'recordTime', + param: 'timerange', }, { parent: 'dateFilterType', @@ -264,7 +267,7 @@ export default { placeholder: '选择日期', format: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd', - param: 'recordTime', + param: 'timeday', }, ], }, @@ -383,22 +386,18 @@ export default { if (btnName == 'search') { this.queryParams.factoryId = payload.factoryId || null; this.queryParams.lineId = payload.lineId || null; - if (payload.recordTime != null) { - if (typeof payload.recordTime == 'string') { - if (payload.recordTime.trim() !== '') { - this.queryParams.recordTime = [ - `${payload.recordTime} 00:00:00`, - `${payload.recordTime} 23:59:59`, - ]; - } - } else { - this.queryParams.recordTime = payload.recordTime; - } - } else { - this.queryParams.recordTime = null; + if (0 == payload.dateFilterType) { + this.queryParams.recordTime = payload.timerange; + } else if (1 == payload.dateFilterType) { + this.queryParams.recordTime = [ + `${payload.timeday} 00:00:00`, + `${payload.timeday} 23:59:59`, + ]; } - this.getList(); + } else { + this.queryParams.recordTime = null; } + this.getList(); }, cancel() { diff --git a/src/views/equipment/analysis/quality/components/lineChart.vue b/src/views/equipment/analysis/quality/components/lineChart.vue index b91b93f1..025af935 100644 --- a/src/views/equipment/analysis/quality/components/lineChart.vue +++ b/src/views/equipment/analysis/quality/components/lineChart.vue @@ -37,8 +37,14 @@ export default { option() { const opt = []; this.list.map((eq) => { - /** [设备名, ok数量, 不ok数量] */ - opt.push([eq.equipmentName, eq.okQuantity, eq.nokQuantity]); + /** [设备名, ok数量, 不ok数量, 加工数量, 合格率] */ + opt.push([ + eq.equipmentName, + eq.okQuantity, + eq.nokQuantity, + eq.totalQuantity, + eq.passRate.toFixed(2), + ]); }); return { color: ['#288AFF', '#8EF0AB'], @@ -51,7 +57,7 @@ export default { legend: { itemWidth: 12, itemHeight: 12, - right: 0 + right: 0, }, grid: { left: '1%', @@ -104,6 +110,17 @@ export default { stack: 's', data: opt.map((item) => item[2]), }, + { + name: '加工数量', + type: 'bar', + barWidth: 20, + data: opt.map((item) => item[3]), + }, + { + name: '合格率', + type: 'line', + data: opt.map((item) => item[4]), + }, ], }; }, diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index ac4769a9..5e80e852 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -6,7 +6,9 @@ -->