From b24691f4e391e80607532fe66087bde015ee2dee Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 14 四月 2020 15:34:08 +0800 Subject: [PATCH] 2020-04-14 --- src/templates/formtabconfig/index.jsx | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx index 23a97f2..08f9acb 100644 --- a/src/templates/formtabconfig/index.jsx +++ b/src/templates/formtabconfig/index.jsx @@ -1036,7 +1036,6 @@ let config = JSON.parse(JSON.stringify(this.state.config)) this.menuformRef.handleConfirm().then(res => { - if (config.isAdd) { if (config.groups[0] && config.groups[0].sublist[0] && config.groups[0].sublist[0].origin) { config.groups[0].sublist = config.groups[0].sublist.filter(item => !item.origin) @@ -1044,6 +1043,36 @@ if (config.tabs[0] && config.tabs[0].origin) { config.tabs = config.tabs.filter(item => !item.origin) } + } + + let btnNames = config.action.map(item => item.label) + btnNames = Array.from(new Set(btnNames)) + if (btnNames.length < config.action.length) { + notification.warning({ + top: 92, + message: '鎸夐挳鍚嶇О涓嶅彲鐩稿悓锛�', + duration: 10 + }) + return + } + + let tabNames = [] + let tablength = 0 + config.tabgroups.forEach(group => { + config[group].forEach(tab => { + tabNames.push(tab.label) + }) + tablength += config[group].length + }) + tabNames = Array.from(new Set(tabNames)) + + if (tabNames.length < tablength) { + notification.warning({ + top: 92, + message: '鏍囩鍚嶇О涓嶅彲鐩稿悓锛�', + duration: 10 + }) + return } let _LongParam = '' @@ -2112,7 +2141,7 @@ </div> } style={{ width: '100%' }}> <Icon type="setting" onClick={this.changeSetting} /> - <Icon type="snippets" title={this.state.dict['header.form.paste']} onClick={() => {this.setState({pasteVisible: true})}} /> + {/* <Icon type="snippets" title={this.state.dict['header.form.paste']} onClick={() => {this.setState({pasteVisible: true})}} /> */} <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃悳绱€�嬩腑锛岄�夋嫨瀵瑰簲鎼滅储妗嗘嫋鑷虫澶勬坊鍔狅紱鎴栫偣鍑绘寜閽�婃坊鍔犳悳绱㈡潯浠躲�嬫壒閲忔坊鍔狅紝閫夋嫨鎵归噺娣诲姞鏃讹紝闇�鎻愬墠閫夋嫨浣跨敤琛ㄣ��"> <Icon type="question-circle" /> </Tooltip> @@ -2137,6 +2166,7 @@ /> </span> )}> + {group.isDefault ? <Icon type="snippets" title={this.state.dict['header.form.paste']} onClick={() => {this.setState({pasteVisible: true})}} /> : null} <DragElement type="search" groupId={group.uuid} -- Gitblit v1.8.0