From 1d9b97f1d03d11e349e2582e8f191293f62f7c23 Mon Sep 17 00:00:00 2001 From: helloDy <1615073571@qq.com> Date: Fri, 17 Nov 2023 10:24:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/base/coreEquipment/index.vue | 2 ++ src/views/core/monitoring/data24/index.vue | 25 +++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/views/base/coreEquipment/index.vue b/src/views/base/coreEquipment/index.vue index 1e421925..e8914ba1 100644 --- a/src/views/base/coreEquipment/index.vue +++ b/src/views/base/coreEquipment/index.vue @@ -424,6 +424,7 @@ export default { // 表单参数 form: { id: null, + files: [] }, showUploadComponents: false, // 是否显示上传组件 }; @@ -506,6 +507,7 @@ export default { spec: undefined, description: undefined, remark: undefined, + files: [] }; this.resetForm('form'); }, diff --git a/src/views/core/monitoring/data24/index.vue b/src/views/core/monitoring/data24/index.vue index 3b5b1365..3f2c7e06 100644 --- a/src/views/core/monitoring/data24/index.vue +++ b/src/views/core/monitoring/data24/index.vue @@ -127,18 +127,19 @@ export default { lineData[it.recordTime + '_area'] = it.area }) console.log('你好', this.monitorList) - this.monitorList.forEach(m => { - console.log('455', m) - if (m.lineName === lineData.proLineName) { - m.data.forEach(bad => { - // 转成时间戳 - // console.log('233', Date.parse(bad.dynamicName)) - const stamp = Date.parse(bad.dynamicName) - lineData[stamp + '_bad'] = bad.dynamicValue - lineData[stamp + '_percent'] = (lineData[stamp + '_bad'] / lineData[stamp + '_down'] * 100).toFixed(2) + '%' - }) - } - }) + if (this.monitorList.length > 0) { + this.monitorList.forEach(m => { + if (m.lineName === lineData.proLineName) { + m.data.forEach(bad => { + // 转成时间戳 + // console.log('233', Date.parse(bad.dynamicName)) + const stamp = Date.parse(bad.dynamicName) + lineData[stamp + '_bad'] = bad.dynamicValue + lineData[stamp + '_percent'] = (lineData[stamp + '_bad'] / lineData[stamp + '_down'] * 100).toFixed(2) + '%' + }) + } + }) + } lineData['workOrderName'] = works.join(',') lineData['spec'] = specs.join(',') this.tableData.push(lineData)