From e543372cc70a19ff2630c79d8421c2c593e54e5f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 02 六月 2021 17:15:21 +0800
Subject: [PATCH] 2021-06-02

---
 src/templates/sharecomponent/tabscomponent/tabform/index.jsx |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/templates/sharecomponent/tabscomponent/tabform/index.jsx b/src/templates/sharecomponent/tabscomponent/tabform/index.jsx
index 60b183a..8f2cd9f 100644
--- a/src/templates/sharecomponent/tabscomponent/tabform/index.jsx
+++ b/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)

--
Gitblit v1.8.0