From e5ed3b092c8436b3e1980a35299d33528bef81dc Mon Sep 17 00:00:00 2001 From: lb Date: Thu, 17 Nov 2022 09:31:02 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=8A=A5=E8=A1=A8=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/EquipmentManager/mockData.js | 8 +++--- src/views/report-manage/ReportSortChoise.vue | 26 +++++++++++++++++--- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/views/EquipmentManager/mockData.js b/src/views/EquipmentManager/mockData.js index e1d3793..6e4b6ef 100644 --- a/src/views/EquipmentManager/mockData.js +++ b/src/views/EquipmentManager/mockData.js @@ -73,9 +73,9 @@ const LifeRemainComponent = { computed: { statusColor() { const colors = [ - 'rgba(255,84,76,0.6)', // red < 0 - '#FFBD43', // yellow < 10 - 'rgba(142,254,83,0.6)' // green >= 10 + 'rgba(255,84,76,0.6)', // red < 10% + '#FFBD43', // yellow < 20% + 'rgba(142,254,83,0.6)' // green ] return this.injectData.remain < 0 ? colors[0] : this.injectData.remain < 10 ? colors[1] : colors[2] } @@ -160,6 +160,8 @@ export const sparepartsProps = [ { prop: 'location', label: '库位', align: 'center' } ] + +// TODO: 2022.11.17 修改数据和剩余寿命组件 export const sparepartsDatalist = [ { 'name': '激光打孔', 'eq': 'A2一次固化机', 'pl': 'C线', 'update_time': '2007-08-31 09:15:24', 'remain': -32, 'stock': 457, 'location': '库位74' }, { 'name': '磨边单元', 'eq': 'B1一次冷却机', 'pl': 'C线', 'update_time': '2016-10-02 22:23:09', 'remain': -95, 'stock': 5600, 'location': '库位10' }, diff --git a/src/views/report-manage/ReportSortChoise.vue b/src/views/report-manage/ReportSortChoise.vue index 0d1e00e..fc7af8d 100644 --- a/src/views/report-manage/ReportSortChoise.vue +++ b/src/views/report-manage/ReportSortChoise.vue @@ -27,14 +27,18 @@ @@ -212,7 +216,21 @@ export default { init() { list({}).then(res => { this.allNum = 0 - this.sortList = res.data + this.sortList = res.data.map(item => { + if (item.name === '能源') { + return { ...item, reportNames: ['产线电量日能耗统计'] } + } else if (item.name === '订单') { + return { ...item, reportNames: ['订单历史记录', '在线订单进度'] } + } else if (item.name === '设备') { + return { ...item, reportNames: ['设备报警', '设备加工数量统计', '设备OEE'] } + } else if (item.name === '人员') { + return { ...item, reportNames: ['班组加工数量统计'] } + } else if (item.name === '产线') { + return { ...item, reportNames: ['产线日产量统计', '产线历史产量记录'] } + } else { + return item + } + }) res.data.forEach(item => { this.allNum += item.quantity })