king
2020-03-06 e2ac71fbc53b7119ae87c5a3b08cdcf830b497e2
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,