From 316877c1d9e5b6d92334f30b03d97d7e833cd934 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 二月 2021 16:01:57 +0800
Subject: [PATCH] 2021-02-02

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

diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 33ecd5d..1312e0d 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -6,7 +6,7 @@
 import { Button, Modal, notification, message } from 'antd'
 
 import ExcelIn from './excelin'
-import Utils from '@/utils/utils.js'
+import Utils, { getExcelInSql } from '@/utils/utils.js'
 import options from '@/store/options.js'
 import Api from '@/api'
 import zhCN from '@/locales/zh-CN/main.js'
@@ -93,25 +93,28 @@
         duration: 5
       })
       return
-    }
-
-    if (btn.verify && btn.verify.sheet && btn.verify.columns && btn.verify.columns.length > 0) {
-      let primaryId = '' // 瀵煎叆鏃惰Id
-      if (btn.Ot === 'requiredSgl') {
-        primaryId = data[0][setting.primaryKey] || ''
-      }
-
-      this.setState({
-        primaryId: primaryId
-      }, () => {
-        this.refs.excelIn.exceltrigger()
-      })
-    } else {
+    } else if (!btn.verify || !btn.verify.sheet || !btn.verify.columns || btn.verify.columns.length === 0) {
       notification.warning({
         top: 92,
         message: 'excel瀵煎叆楠岃瘉淇℃伅鏈缃紒',
         duration: 5
       })
+      return
+    }
+
+    let primaryId = '' // 瀵煎叆鏃惰Id
+    if (btn.Ot === 'requiredSgl') {
+      primaryId = data[0][setting.primaryKey] || ''
+    }
+
+    this.setState({
+      primaryId: primaryId
+    }, () => {
+      this.refs.excelIn.exceltrigger()
+    })
+
+    if (window.GLOB.systemType === 'production') {
+      MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎叆Excel'})
     }
   }
 
@@ -235,7 +238,7 @@
       })
     }
 
-    let result = Utils.getExcelInSql(btn, data, this.state.dict, (this.props.BID || ''))
+    let result = getExcelInSql(btn, data, this.state.dict, (this.props.BID || ''))
 
     if (result.errors) {
       notification.warning({
@@ -342,13 +345,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
+            }
           }
         }
 

--
Gitblit v1.8.0