From 3d71e181be80c0a1cbb03aff2afecb4351496d46 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 25 十一月 2022 11:19:21 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/custom/components/form/tab-form/index.jsx |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx
index a9c4818..519040b 100644
--- a/src/tabviews/custom/components/form/tab-form/index.jsx
+++ b/src/tabviews/custom/components/form/tab-form/index.jsx
@@ -55,8 +55,8 @@
     if (config.wrap.datatype !== 'static') {
       _sync = config.setting.sync === 'true'
 
-      if (_sync && data && data[config.dataName]) {
-        _data = data[config.dataName]
+      if (_sync && data) {
+        _data = data[config.dataName] || {$$empty: true}
         if (Array.isArray(_data)) {
           _data = _data[0] || {$$empty: true}
         }
@@ -140,7 +140,7 @@
       this.setState({sync: false, data: _data, group: null}, () => {
         this.setState({group: _group})
       })
-    } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
+    } else if (config.setting.useMSearch && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
       this.setState({}, () => {
         this.loadData()
       })
@@ -214,11 +214,7 @@
         param: {$BID: id || ''}
       }
 
-      if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
-        MKEmitter.emit('modifyTabs', newtab, 'replace')
-      } else {
-        MKEmitter.emit('modifyTabs', newtab, 'plus', true)
-      }
+      MKEmitter.emit('modifyTabs', newtab, true)
     }
   }
 
@@ -304,6 +300,8 @@
   render() {
     const { config, loading, BID, BData, data, group, dict } = this.state
 
+    if (config.setting.supModule && !BID) return null
+    
     return (
       <div className="custom-tab-form-box" id={'anchor' + config.uuid} style={{...config.style}}>
         {loading ?

--
Gitblit v1.8.0