From 6afdec0062dacbded57e166230eb22cc55ced0c1 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 08 五月 2021 14:30:21 +0800
Subject: [PATCH] 2021-05-08

---
 src/tabviews/zshare/actionList/exceloutbutton/index.jsx |   73 +++++++++++++++++++++++++++++++-----
 1 files changed, 62 insertions(+), 11 deletions(-)

diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index 8da8de9..ea6c15d 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -111,6 +111,9 @@
     }
 
     MKEmitter.emit('getexceloutparam', btn.$menuId, btn.uuid)
+    if (window.GLOB.systemType === 'production') {
+      MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎嚭Excel'})
+    }
   }
 
   /**
@@ -190,13 +193,21 @@
           if (btn.sysInterface === 'true' && options.cloudServiceApi) {
             param.rduri = options.cloudServiceApi
           } else if (btn.sysInterface !== 'true') {
-            param.rduri = btn.interface
+            if (window.GLOB.systemType === 'production' && btn.proInterface) {
+              param.rduri = btn.proInterface
+            } else {
+              param.rduri = btn.interface
+            }
           }
         } else {
           if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) {
             param.rduri = window.GLOB.mainSystemApi
           } else if (btn.sysInterface !== 'true') {
-            param.rduri = btn.interface
+            if (window.GLOB.systemType === 'production' && btn.proInterface) {
+              param.rduri = btn.proInterface
+            } else {
+              param.rduri = btn.interface
+            }
           }
         }
   
@@ -228,13 +239,21 @@
               if (btn.sysInterface === 'true' && options.cloudServiceApi) {
                 res.rduri = options.cloudServiceApi
               } else if (btn.sysInterface !== 'true') {
-                res.rduri = btn.interface
+                if (window.GLOB.systemType === 'production' && btn.proInterface) {
+                  res.rduri = btn.proInterface
+                } else {
+                  res.rduri = btn.interface
+                }
               }
             } else {
               if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) {
                 res.rduri = window.GLOB.mainSystemApi
               } else if (btn.sysInterface !== 'true') {
-                res.rduri = btn.interface
+                if (window.GLOB.systemType === 'production' && btn.proInterface) {
+                  res.rduri = btn.proInterface
+                } else {
+                  res.rduri = btn.interface
+                }
               }
             }
   
@@ -289,13 +308,21 @@
           if (btn.sysInterface === 'true' && options.cloudServiceApi) {
             res.rduri = options.cloudServiceApi
           } else if (btn.sysInterface !== 'true') {
-            res.rduri = btn.interface
+            if (window.GLOB.systemType === 'production' && btn.proInterface) {
+              res.rduri = btn.proInterface
+            } else {
+              res.rduri = btn.interface
+            }
           }
         } else {
           if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) {
             res.rduri = window.GLOB.mainSystemApi
           } else if (btn.sysInterface !== 'true') {
-            res.rduri = btn.interface
+            if (window.GLOB.systemType === 'production' && btn.proInterface) {
+              res.rduri = btn.proInterface
+            } else {
+              res.rduri = btn.interface
+            }
           }
         }
 
@@ -353,13 +380,21 @@
         if (btn.sysInterface === 'true' && options.cloudServiceApi) {
           param.rduri = options.cloudServiceApi
         } else if (btn.sysInterface !== 'true') {
-          param.rduri = btn.interface
+          if (window.GLOB.systemType === 'production' && btn.proInterface) {
+            param.rduri = btn.proInterface
+          } else {
+            param.rduri = btn.interface
+          }
         }
       } else {
         if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) {
           param.rduri = window.GLOB.mainSystemApi
         } else if (btn.sysInterface !== 'true') {
-          param.rduri = btn.interface
+          if (window.GLOB.systemType === 'production' && btn.proInterface) {
+            param.rduri = btn.proInterface
+          } else {
+            param.rduri = btn.interface
+          }
         }
       }
       
@@ -398,12 +433,17 @@
       let _header = []
       let _topRow = {}
       let colwidth = []
+      let abses = []
 
       btn.verify.columns.forEach(col => {
         if (_topRow[col.Column]) return
 
         _header.push(col.Column)
         _topRow[col.Column] = col.Text
+
+        if (col.abs === 'true') {
+          abses.push(col.Column)
+        }
 
         colwidth.push({width: col.Width || 20})
       })
@@ -412,10 +452,17 @@
 
       table.push(_topRow)
 
-      data && data.forEach(item => {
+      data && data.forEach((item, index) => {
         let _row = {}
+
+        item.$Index = index + 1
+
         _header.forEach(field => {
-          _row[field] = item[field]
+          if (item[field] && abses.includes(field)) {
+            _row[field] = Math.abs(item[field])
+          } else {
+            _row[field] = item[field]
+          }
         })
 
         table.push(_row)
@@ -559,6 +606,7 @@
       let allSearch = Utils.getAllSearchOptions(search)
       let userName = sessionStorage.getItem('User_Name') || ''
       let fullName = sessionStorage.getItem('Full_Name') || ''
+      let city = sessionStorage.getItem('city') || ''
 
       if (sessionStorage.getItem('isEditState') === 'true') {
         userName = sessionStorage.getItem('CloudUserName') || ''
@@ -573,6 +621,9 @@
       })
 
       regoptions.push({
+        reg: new RegExp('@login_city@', 'ig'),
+        value: city
+      }, {
         reg: new RegExp('@userName@', 'ig'),
         value: userName
       }, {
@@ -739,7 +790,7 @@
           type="link"
           title={show === 'icon' ? btn.label : ''}
           loading={loading}
-          style={btn.btnstyle}
+          style={btn.style}
           icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'download') : (btn.icon || ''))}
           onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
         >{show === 'icon' ? '' : btn.label}</Button>

--
Gitblit v1.8.0