From 65b47e0eb58ead373145811cd154c100af5a3c9f Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 11 九月 2025 17:30:30 +0800 Subject: [PATCH] 倍率报表保留2位小数 --- src/views/mdc/base/modules/MagnificationReport/MagnificationReportList.vue | 43 ++++--------------------------------------- 1 files changed, 4 insertions(+), 39 deletions(-) diff --git a/src/views/mdc/base/modules/MagnificationReport/MagnificationReportList.vue b/src/views/mdc/base/modules/MagnificationReport/MagnificationReportList.vue index 6aafb62..d8f7468 100644 --- a/src/views/mdc/base/modules/MagnificationReport/MagnificationReportList.vue +++ b/src/views/mdc/base/modules/MagnificationReport/MagnificationReportList.vue @@ -121,48 +121,13 @@ props: { nodeTree: '', Type: '', nodePeople: '' }, data() { return { - disableMixinCreated: true, tableHeads: [], dataList: [], spinning: false, /* 鍒嗛〉鍙傛暟 */ queryParam: {}, - dates: [moment().subtract(1, 'day').startOf('day'), moment().subtract(1, 'day').endOf('day')], + dates: [moment().subtract(7, 'day').startOf('day'), moment().subtract(1, 'day').endOf('day')], // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: 'center', - customRender: function(t, r, index) { - return parseInt(index) + 1 - } - }, - { - title: '璁惧缂栧彿', - align: 'center', - dataIndex: 'equipmentId', - width: 300 - }, - { - title: '涓昏酱鍊嶇巼骞冲潎鍊�', - align: 'center', - dataIndex: 'spindlebeilv' - }, - { - title: '杩涚粰鍊嶇巼骞冲潎鍊�', - align: 'center', - dataIndex: 'feedbeilv' - }, - { - title: '鏃ユ湡', - align: 'center', - dataIndex: 'theDate', - width: 300 - } - ], url: { list: '/mdc/magnification/beilvList' } @@ -171,7 +136,7 @@ filters: { numFilter(value) { if (value) { - return parseFloat((value * 100).toFixed(2)) + return value.toFixed(2) } else { return '0' } @@ -320,7 +285,7 @@ list[k][field + 'span'] = 1 list[k][field + 'dis'] = false for (var i = k + 1; i <= list.length - 1; i++) { - if (list[k][field] == list[i][field] && list[k][field] != '') { + if (list[k][field] === list[i][field] && list[k][field] !== '') { list[k][field + 'span']++ list[k][field + 'dis'] = false list[i][field + 'span'] = 1 @@ -358,7 +323,7 @@ }, searchReset() { - this.dates = [moment().subtract(1, 'day').startOf('day'), moment().subtract(1, 'day').endOf('day')] + this.dates = [moment().subtract(7, 'day').startOf('day'), moment().subtract(1, 'day').endOf('day')] this.queryParam = { startTime: moment(this.dates[0]).format('YYYY-MM-DD'), endTime: moment(this.dates[1]).format('YYYY-MM-DD') -- Gitblit v1.9.3