From f9816a4078fdba44115c69025d9982997f23b484 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 29 四月 2024 16:00:49 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/zshare/actionList/printbutton/index.jsx |   40 ++++++++++++++++++----------------------
 1 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index 6627f32..86a4840 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -915,6 +915,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 +1010,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 +1132,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 +2368,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.$toolbtn ? (btn.hover || '') : ''}
         onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
       >{label}</Button>
       <span onClick={(e) => {e.stopPropagation()}}>{this.getModels()}</span>

--
Gitblit v1.8.0