From ae46c8e640ed64abd7605b289554377e0cdc0cb7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 04 十月 2023 22:10:30 +0800 Subject: [PATCH] 2023-10-04 --- src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index a20c959..7e032ca 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -447,9 +447,7 @@ const { btn } = this.props let imgCol = false - let columns = btn.verify.columns.filter(col => { - if (col.output === 'false') return false - + let columns = btn.verify.columns.map(col => { if (col.type === 'image') { imgCol = true } @@ -464,6 +462,7 @@ if (data && data[0]) { let errors = [] columns.forEach(col => { + if (col.output === 'false') return if (col.Column && data[0][col.Column] === undefined) { errors.push(col.Text) } @@ -509,7 +508,13 @@ columns.forEach((col, i) => { let val = item[col.Column] - if (col.type === 'number' && typeof(val) === 'number') { + if (col.output === 'false') { + if (col.type === 'number') { + val = 0 + } else { + val = '' + } + } else if (col.type === 'number' && typeof(val) === 'number') { if (col.abs === 'true') { val = Math.abs(val) } @@ -594,7 +599,13 @@ columns.forEach((col, i) => { let val = item[col.Column] - if (col.type === 'number' && typeof(val) === 'number') { + if (col.output === 'false') { + if (col.type === 'number') { + val = 0 + } else { + val = '' + } + } else if (col.type === 'number' && typeof(val) === 'number') { if (col.abs === 'true') { val = Math.abs(val) } -- Gitblit v1.8.0