From 41c55c1f103658b997f7a828a7067bdb228f1df0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 04 十月 2022 23:35:10 +0800
Subject: [PATCH] 2022-10-04

---
 src/tabviews/zshare/actionList/excelInbutton/index.jsx |   31 +++++++++++++------------------
 1 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 612666b..0388670 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -1,7 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import moment from 'moment'
-import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
 import { Button, Modal, notification, message } from 'antd'
 
@@ -343,7 +342,7 @@
       param.LText = Utils.formatOptions(result.sql)
       param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
       param.secretkey = Utils.encrypt(param.LText, param.timestamp)
-      if (this.props.menuType === 'HS' && param.timestamp) { // 浜戠楠岃瘉
+      if (window.GLOB.mkHS && param.timestamp) { // 浜戠楠岃瘉
         param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
       }
 
@@ -410,9 +409,11 @@
         // 澶栭儴璇锋眰
         _outParam = fromJS(res).toJS()
 
-        if (this.props.menuType === 'HS') {
+        if (window.GLOB.mkHS) {
           if (btn.sysInterface === 'true' && options.cloudServiceApi) {
             param.rduri = options.cloudServiceApi
+            param.userid = sessionStorage.getItem('CloudUserID') || ''
+            param.LoginUID = sessionStorage.getItem('CloudLoginUID') || ''
           } else if (btn.sysInterface !== 'true') {
             if (window.GLOB.systemType === 'production' && btn.proInterface) {
               param.rduri = btn.proInterface
@@ -429,6 +430,10 @@
             } else {
               param.rduri = btn.interface
             }
+            let host = window.GLOB.baseurl.replace(/http(s):\/\//, '')
+            if (param.rduri.indexOf(host) === -1 && /\/dostars/.test(param.rduri)) {
+              param.$login = true
+            }
           }
         }
 
@@ -436,7 +441,7 @@
           res.func = btn.outerFunc
         }
         
-        if (this.props.menuType === 'HS' && res.func === 's_sDataDictb_excelIn') { // s_sDataDictb_excelIn 浜戠楠岃瘉
+        if (window.GLOB.mkHS && res.func === 's_sDataDictb_excelIn') { // s_sDataDictb_excelIn 浜戠楠岃瘉
           param.LText = Utils.formatOptions(result.sql)
           param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
           param.secretkey = Utils.encrypt(param.LText, param.timestamp)
@@ -505,7 +510,7 @@
       className = 'mk-btn mk-' + btn.class
     }
 
-    return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
+    return <>
       <Button
         type={type}
         title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')}
@@ -514,21 +519,11 @@
         style={btn.style}
         icon={icon}
         className={className}
-        onClick={() => {this.actionTrigger()}}
+        onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
       >{label}</Button>
       <ExcelIn btn={btn} triggerExcelIn={() => this.setState({ loading: true })} returndata={this.getexceldata} ref="excelIn" />
-    </div>
+    </>
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    menuType: state.editLevel
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(ExcelInButton)
\ No newline at end of file
+export default ExcelInButton
\ No newline at end of file

--
Gitblit v1.8.0