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/comtableconfig/index.jsx |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index 12db490..2eed00d 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -1546,6 +1546,36 @@
         }
       }
 
+      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
+      }
+
       if (config.type === 'user') { // 浣跨敤宸叉湁鑿滃崟鏃讹紝榛樿娣诲姞鍏宠仈鏍囩id
         config.action = config.action.map(item => {
           if (item.OpenType === 'popview' && !item.linkTab) {

--
Gitblit v1.8.0