king
2021-06-02 e543372cc70a19ff2630c79d8421c2c593e54e5f
src/templates/sharecomponent/tabscomponent/tabform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Select, Icon, Tooltip, Radio, InputNumber } from 'antd'
import { Form, Row, Col, Input, Select, Icon, Tooltip, Radio, InputNumber, notification } from 'antd'
import { formRule } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
import './index.scss'
@@ -26,9 +26,9 @@
  UNSAFE_componentWillMount () {
    const { formlist } = this.props
    let type = formlist.filter(cell => cell.key === 'type')[0].initVal
    // let type = formlist.filter(cell => cell.key === 'type')[0].initVal
    let _tabs = this.props.tabs.filter(tab => tab.type === type)
    let _tabs = this.props.tabs.filter(tab => tab.type === 'SubTable')
    this.setState({
      formlist: formlist.map(item => {
@@ -272,8 +272,17 @@
          }
          if (values.level === undefined) {
            values.level = ''
          } else if (values.supMenu && values.supMenu === 'mainTable' && values.level === 0) {
            notification.warning({
              top: 92,
              message: '显示级别为0时,上级标签不可关联主表!',
              duration: 5
            })
            return
          }
          values.type = 'SubTable' // 类型为子表
          resolve(values)
        } else {
          reject(err)