From f0bf8c399c354c22227f8f1a76ed806098db59c0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:51:02 +0800 Subject: [PATCH] 2024-05-21 --- src/tabviews/zshare/actionList/printbutton/index.jsx | 47 +++++++++++++++++++++-------------------------- 1 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 6627f32..8373813 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -130,12 +130,13 @@ /** * @description 瑙﹀彂鎸夐挳鎿嶄綔 */ - actionTrigger = (triggerId, record, type) => { - const { BID, btn, selectedData, setting } = this.props + actionTrigger = (triggerId, record, type, lid) => { + const { BID, btn, selectedData, setting, LID } = this.props const { loading, disabled } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return + if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return if (setting.supModule && !BID) { notification.warning({ @@ -143,8 +144,6 @@ message: '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) - return - } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { return } @@ -915,6 +914,9 @@ _param.username = sessionStorage.getItem('User_Name') || '' _param.fullname = sessionStorage.getItem('Full_Name') || '' } + if (btn.dataM === 'true') { + _param.dataM = sessionStorage.getItem('dataM') === 'true' ? 'Y' : '' + } return _param }) @@ -1007,7 +1009,11 @@ } let isDataM = sessionStorage.getItem('dataM') === 'true' + let custompage = /@pageSize@|@orderBy@/i.test(_dataresource + _customScript + _tailScript) let regoptions = [ + { reg: /@orderBy@/ig, value: btn.verify.setting.order }, + { reg: /@pageSize@/ig, value: '9999' }, + { reg: /@pageIndex@/ig, value: '1'}, { reg: /@ID@/ig, value: `'${ID}'`}, { reg: /@BID@/ig, value: `'${BID || ''}'`}, { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`}, @@ -1125,7 +1131,11 @@ let LText = '' if (_dataresource) { - LText = `/*system_query*/select ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${btn.verify.setting.order}) as rows from ${_dataresource}) tmptable order by tmptable.rows ` + if (custompage) { + LText = `/*system_query*/select ${arrFields} from ${_dataresource} ` + } else { + LText = `/*system_query*/select ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${btn.verify.setting.order}) as rows from ${_dataresource}) tmptable order by tmptable.rows ` + } } if (_customScript) { @@ -2357,39 +2367,24 @@ if (hidden) return null let label = '' - let icon = '' - let type = 'link' - let className = '' - if (btn.show === 'button') { - label = btn.label - icon = btn.icon || '' - } else if (btn.show === 'link') { - label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span> - icon = '' + if (btn.show === 'link') { + label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon} /> : ''}</span> } else if (btn.show === 'icon') { - icon = btn.icon || '' - } else if (!btn.$toolbtn) { - icon = btn.icon || '' - label = btn.label - className = 'mk-btn mk-' + btn.class + label = !loading ? <MkIcon type={btn.icon} /> : null } else { - type = '' - icon = btn.icon || '' - label = btn.label - className = 'mk-btn mk-' + btn.class + label = <span>{!loading && btn.icon ? <MkIcon style={{marginRight: '8px'}} type={btn.icon} /> : ''}{btn.label}</span> } return <> <Button - type={type} + type="link" id={'button' + btn.uuid} title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} loading={loading} disabled={disabled} style={btn.style || null} - icon={icon} - className={className} + className={btn.hover || ''} onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} >{label}</Button> <span onClick={(e) => {e.stopPropagation()}}>{this.getModels()}</span> -- Gitblit v1.8.0