From e2ac71fbc53b7119ae87c5a3b08cdcf830b497e2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 06 三月 2020 18:52:03 +0800 Subject: [PATCH] 2020-03-06 --- src/templates/formtabconfig/index.jsx | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx index 0005835..ee46115 100644 --- a/src/templates/formtabconfig/index.jsx +++ b/src/templates/formtabconfig/index.jsx @@ -595,6 +595,7 @@ } let _groups = null + let fieldrepet = false // 瀛楁閲嶅 if (card.iscopy) { _groups = config.groups.map(group => { @@ -602,6 +603,10 @@ group.sublist.forEach((item, index) => { if (item.uuid === card.originUuid) { _index = index + } + + if (item.uuid !== res.uuid && item.field === res.field) { + fieldrepet = true } }) @@ -617,6 +622,10 @@ } else { _groups = config.groups.map(group => { group.sublist = group.sublist.map(item => { + if (item.uuid !== res.uuid && item.field === res.field) { + fieldrepet = true + } + if (item.uuid === res.uuid) { return res } else { @@ -630,6 +639,15 @@ }) } + if (fieldrepet) { + notification.warning({ + top: 92, + message: '瀛楁鍚嶉噸澶嶏紒', + duration: 10 + }) + return + } + this.setState({ config: {...config, groups: _groups}, optionLibs: optionLibs, -- Gitblit v1.8.0