From 437c6d72f76072e5ab1b09e78101370805113c4b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 01 十月 2023 18:46:37 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index be84eac..30385fe 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -448,8 +448,6 @@ let imgCol = false let columns = btn.verify.columns.filter(col => { - if (col.output === 'false') return false - 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) } @@ -766,7 +777,7 @@ _setting.arr_field = _setting.arr_field.join(',') _setting.execute = btn.verify.defaultSql !== 'false' _setting.dataresource = btn.verify.dataresource || '' - _setting.primaryKey = _setting.primaryKey || setting.primaryKey || 'ID' + _setting.primaryKey = btn.verify.primaryKey || setting.primaryKey || 'ID' if (!_setting.execute) { _setting.dataresource = '' @@ -813,8 +824,11 @@ _orderBy = btn.verify.order || '' } else { _setting = {...setting} + _setting.$name = btn.logLabel _setting.laypage = pagination _setting.arr_field = _setting.all_field || _setting.arr_field + + delete _setting.sub_field } let primaryId = '' -- Gitblit v1.8.0