From e9c48bd7356462ba9257540b130a47a65ad1861d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 26 八月 2021 17:17:11 +0800
Subject: [PATCH] 2021-08-26

---
 src/tabviews/custom/components/share/tabtransfer/index.jsx |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/src/tabviews/custom/components/share/tabtransfer/index.jsx b/src/tabviews/custom/components/share/tabtransfer/index.jsx
index 62512b7..0fad518 100644
--- a/src/tabviews/custom/components/share/tabtransfer/index.jsx
+++ b/src/tabviews/custom/components/share/tabtransfer/index.jsx
@@ -28,9 +28,11 @@
 const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor'))
 const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box'))
 const NormalForm = asyncComponent(() => import('@/tabviews/custom/components/form/normal-form'))
+const TabForm = asyncComponent(() => import('@/tabviews/custom/components/form/tab-form'))
 const NormalTree = asyncComponent(() => import('@/tabviews/custom/components/tree/antd-tree'))
 const CarouselDataCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/data-card'))
 const CarouselPropCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/prop-card'))
+const Balcony = asyncComponent(() => import('@/tabviews/custom/components/card/balcony'))
 
 class TabTransfer extends Component {
   static propTpyes = {
@@ -106,7 +108,9 @@
     const { self } = this.state
     
     if (!self && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
-      this.setState({mainSearch: fromJS(nextProps.mainSearch).toJS()})
+      this.setState({mainSearch: null}, () => {
+        this.setState({mainSearch: fromJS(nextProps.mainSearch).toJS()})
+      })
     }
   }
 
@@ -152,7 +156,7 @@
     if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />)
 
     return config.components.map(item => {
-      let BID = ''
+      let BID = this.props.BID || ''
       if (item.setting && item.setting.supModule) {
         BID = bids[item.setting.supModule] || ''
       }
@@ -184,13 +188,13 @@
       } else if (item.type === 'search') {
         return (
           <Col span={item.width} key={item.uuid}>
-            <MainSearch config={item} menuType={menuType} refreshdata={this.resetSearch} />
+            <MainSearch config={item} BID={BID} menuType={menuType} refreshdata={this.resetSearch} />
           </Col>
         )
       } else if (item.type === 'tabs') {
         return (
           <Col span={item.width} key={item.uuid}>
-            <AntvTabs config={item} bids={bids} mainSearch={mainSearch} menuType={menuType} />
+            <AntvTabs config={item} BID={BID} bids={bids} mainSearch={mainSearch} menuType={menuType} />
           </Col>
         )
       } else if (item.type === 'card' && item.subtype === 'datacard') {
@@ -232,13 +236,19 @@
       } else if (item.type === 'group' && item.subtype === 'normalgroup') {
         return (
           <Col span={item.width} key={item.uuid}>
-            <NormalGroup config={item} bids={bids} mainSearch={mainSearch} menuType={menuType} />
+            <NormalGroup config={item} BID={BID} bids={bids} mainSearch={mainSearch} menuType={menuType} />
           </Col>
         )
-      } else if (item.type === 'form') {
+      } else if (item.type === 'form' && item.subtype === 'stepform') {
         return (
           <Col span={item.width} key={item.uuid}>
             <NormalForm config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} />
+          </Col>
+        )
+      } else if (item.type === 'form' && item.subtype === 'tabform') {
+        return (
+          <Col span={item.width} key={item.uuid}>
+            <TabForm config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} />
           </Col>
         )
       } else if (item.type === 'tree') {
@@ -259,6 +269,12 @@
             <SandBox config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} />
           </Col>
         )
+      } else if (item.type === 'balcony') {
+        return (
+          <Col span={item.width} key={item.uuid}>
+            <Balcony config={item} data={data} BID={BID} menuType={menuType} />
+          </Col>
+        )
       } else {
         return null
       }

--
Gitblit v1.8.0