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 | 2 src/tabviews/zshare/mutilform/index.jsx | 6 +- src/tabviews/custom/components/card/cardcellList/index.jsx | 16 ++----- src/tabviews/custom/components/share/normalTable/index.jsx | 10 +--- src/tabviews/zshare/actionList/normalbutton/index.jsx | 6 +- src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 20 +++------- src/tabviews/zshare/actionList/printbutton/index.jsx | 6 +- src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 2 8 files changed, 25 insertions(+), 43 deletions(-) diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 9208d9a..4661704 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -774,9 +774,7 @@ let func = new Function('data', card.formula) val = func(_data) } catch (e) { - if (window.GLOB.debugger === true) { - console.warn(e) - } + console.warn(e) val = '' } } else if (card.$sync) { @@ -794,10 +792,8 @@ // eslint-disable-next-line _val = eval(_val) } catch (e) { - if (window.GLOB.debugger === true) { - console.info(_val) - console.warn(e) - } + console.info(_val) + console.warn(e) _val = 0 } } @@ -820,10 +816,8 @@ // eslint-disable-next-line _val = eval(_val) } catch (e) { - if (window.GLOB.debugger === true) { - console.info(_val) - console.warn(e) - } + console.info(_val) + console.warn(e) _val = '' } } diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 90c6088..849c996 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -337,9 +337,7 @@ let func = new Function('data', col.formula) content = func([record]) } catch (e) { - if (window.GLOB.debugger === true) { - console.warn(e) - } + console.warn(e) content = '' } } else { @@ -352,10 +350,8 @@ // eslint-disable-next-line content = eval(content) } catch (e) { - if (window.GLOB.debugger === true) { - console.info(content) - console.warn(e) - } + console.info(content) + console.warn(e) content = '' } diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index 4ce4d1b..5f5eb04 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -441,9 +441,7 @@ let func = new Function('data', col.formula) content = func([record]) } catch (e) { - if (window.GLOB.debugger === true) { - console.warn(e) - } + console.warn(e) content = '' } } else { @@ -457,10 +455,8 @@ // eslint-disable-next-line content = eval(content) } catch (e) { - if (window.GLOB.debugger === true) { - console.info(content) - console.warn(e) - } + console.info(content) + console.warn(e) content = '' } } @@ -850,9 +846,7 @@ let func = new Function('data', col.formula) content = func([record]) } catch (e) { - if (window.GLOB.debugger === true) { - console.warn(e) - } + console.warn(e) content = '' } } else { @@ -866,10 +860,8 @@ // eslint-disable-next-line content = eval(content) } catch (e) { - if (window.GLOB.debugger === true) { - console.info(content) - console.warn(e) - } + console.info(content) + console.warn(e) content = '' } } diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 30385fe..7e032ca 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -447,7 +447,7 @@ const { btn } = this.props let imgCol = false - let columns = btn.verify.columns.filter(col => { + let columns = btn.verify.columns.map(col => { if (col.type === 'image') { imgCol = true } diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 017454a..816e450 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -2887,10 +2887,10 @@ // eslint-disable-next-line let func = new Function('value', 'data', item.func) _item.value = func(_item.value, _data) + _item.value = _item.value !== undefined ? _item.value : '' } catch (e) { - if (window.GLOB.debugger === true) { - console.warn(e) - } + console.warn(e) + _item.value = '' } } else { _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 5327ea2..4bd500f 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -2153,10 +2153,10 @@ // eslint-disable-next-line let func = new Function('value', 'data', item.func) _item.value = func(_item.value, _data) + _item.value = _item.value !== undefined ? _item.value : '' } catch (e) { - if (window.GLOB.debugger === true) { - console.warn(e) - } + console.warn(e) + _item.value = '' } } else { _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 6ad9729..b1f23a7 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -1223,10 +1223,10 @@ // eslint-disable-next-line let func = new Function('value', 'data', item.func) _item.value = func(_item.value, record) + _item.value = _item.value !== undefined ? _item.value : '' } catch (e) { - if (window.GLOB.debugger === true) { - console.warn(e) - } + console.warn(e) + _item.value = '' } } else { _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index 5b520c4..6555fcc 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -970,7 +970,7 @@ <Button className="excel-col-add mk-red" title="娓呯┖Excel鍒�" onClick={this.clearField}> 娓呯┖Excel鍒� </Button> - <div style={{color: '#959595', fontSize: '13px', paddingLeft: '10px'}}>濡傞渶瀵煎嚭搴忓彿锛岃浣跨敤瀛楁 $Index锛涙暟鍊肩被鍨嬪鍑烘椂鍙繘琛屾暟鎹鐞嗭紙鍙栫粷瀵瑰�笺�佷繚鐣欏皬鏁颁綅锛夛紱绾㈣壊鏍囬瀵煎嚭鏃跺垪澶存枃瀛椾负绾㈣壊銆�</div> + <div style={{color: '#959595', fontSize: '13px', paddingLeft: '10px'}}>濡傞渶瀵煎嚭搴忓彿锛岃浣跨敤瀛楁 $Index锛涙暟鍊肩被鍨嬪鍑烘椂鍙彇缁濆鍊间互鍙婅缃皬鏁颁綅锛涘鍑轰负鍚︽椂锛屼笉浣跨敤琛屼俊鎭紱绾㈣壊鏍囬瀵煎嚭鏃跺垪澶存枃瀛椾负绾㈣壊銆�</div> <EditTable actions={['edit', 'move', 'copy', 'del']} type="excelcolumn" wrappedComponentRef={(inst) => this.columnRef = inst} data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/> </TabPane> {card.intertype === 'system' ? <TabPane tab={ -- Gitblit v1.8.0