king
2021-08-31 72419e2f826031a158173f46d723a672064e37cd
src/tabviews/custom/components/group/normal-group/index.jsx
@@ -25,9 +25,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 = {
@@ -90,7 +92,9 @@
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (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()})
      })
    }
  }
@@ -98,7 +102,7 @@
   * @description 主表数据加载
   */ 
  loadmaindata = (params) => {
    let param = getStructuredParams(params, this.props.config)
    let param = getStructuredParams(params, this.props.config, this.props.BID || '')
    Api.getLocalConfig(param).then(result => {
      if (result.status) {
@@ -130,11 +134,9 @@
    if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />)
    return config.components.map(item => {
      let _bid = ''
      if (bids && item.setting && item.setting.supModule) {
        _bid = bids[item.setting.supModule] || ''
      } else if (!bids && BID && (!item.setting || !item.setting.supModule)) {
        _bid = BID
      let _bid = BID || ''
      if (item.setting && item.setting.supModule) {
        _bid = bids ? bids[item.setting.supModule] || '' : ''
      }
      if (item.type === 'bar' || item.type === 'line') {
@@ -155,10 +157,16 @@
            <AntvDashboard config={item} data={data} BID={_bid} 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 === 'scatter') {
@@ -221,6 +229,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
      }