From 31ec63f0419895876cbaba99637a884a32d33d0d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 01 九月 2021 10:31:45 +0800 Subject: [PATCH] 2021-09-01 --- src/templates/sharecomponent/tabscomponent/tabform/index.jsx | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/templates/sharecomponent/tabscomponent/tabform/index.jsx b/src/templates/sharecomponent/tabscomponent/tabform/index.jsx index 60b183a..ba87b46 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 => { @@ -54,7 +54,7 @@ try { let _form = document.getElementById('label') _form.select() - } catch { + } catch (e) { console.warn('琛ㄥ崟focus澶辫触锛�') } } @@ -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