From 35450c747d7497642119afb5db3bbbeec63c9214 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 17 十月 2021 12:03:23 +0800
Subject: [PATCH] 2021-10-17

---
 src/tabviews/commontable/index.jsx |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index 712a9c5..d139bbc 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -26,6 +26,7 @@
 const CardComponent = asyncSpinComponent(() => import('@/tabviews/zshare/cardcomponent'))
 const ChartComponent = asyncSpinComponent(() => import('@/tabviews/zshare/chartcomponent'))
 const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage'))
+const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic'))
 
 const { TabPane } = Tabs
 
@@ -66,7 +67,8 @@
     statFValue: [],       // 鍚堣鍊�
     absFields: [],        // 缁濆鍊煎瓧娈�
     loadCustomApi: true,  // 鍔犺浇澶栭儴璧勬簮
-    hasReqFields: false
+    hasReqFields: false,
+    autoMatic: null
   }
 
   /**
@@ -371,9 +373,20 @@
         config.setting.selected = 'false'
       }
 
+      let autoMatic = null
+      if (config.autoMatic && config.autoMatic.enable === 'true') {
+        _actions.forEach(item => {
+          if (item.uuid === config.autoMatic.action && (['pop', 'prompt', 'exec'].includes(item.OpenType) || (item.OpenType === 'funcbutton' && item.funcType === 'print'))) {
+            autoMatic = config.autoMatic
+            config.setting.selected = 'false'
+          }
+        })
+      }
+
       this.setState({
         loadingview: false,
         absFields,
+        autoMatic,
         chartId,
         config,
         statFields,
@@ -1056,7 +1069,7 @@
 
   render() {
     const { menuType } = this.props
-    const { BID, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, pickup, config, chartId, search, selectedData, shortcuts } = this.state
+    const { BID, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, pickup, config, chartId, search, selectedData, shortcuts, autoMatic } = this.state
 
     return (
       <div className="commontable" id={this.state.ContainerId}>
@@ -1171,6 +1184,7 @@
             })}
           </Tabs>))
         }
+        {menuType !== 'HS' && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null}
         {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
         {menuType !== 'HS' && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}

--
Gitblit v1.8.0