king
2021-01-07 2292d1826e69e21c8a411c217faef635fe57d458
src/menu/pastecontroller/index.jsx
@@ -23,13 +23,20 @@
    this.setState({visible: true})
  }
  resetconfig = (item, Tab) => {
  resetconfig = (item, Tab, isgroup) => {
    item.uuid = Utils.getuuid()
    item.floor = Tab ? (Tab.floor + 1) : 1
    if (Tab) {
    if (Tab && !isgroup) {
      item.tabId = Tab.uuid
      item.parentId = Tab.parentId
    } else if (Tab) {
      item.floor = Tab.floor || 1
      item.parentId = Tab.parentId
    }
    if (item.dataName) {
      item.dataName = Utils.getdataName()
    }
    if (item.type === 'tabs') {
@@ -134,8 +141,18 @@
  pasteSubmit = () => {
    const { Tab } = this.props
    let isgroup = Tab && Tab.type === 'group' ? true : false
    this.pasteFormRef.handleConfirm().then(res => {
      if (!['tabs', 'datacard', 'propcard', 'mainsearch', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
      if (!isgroup && !['tabs', 'datacard', 'propcard', 'mainsearch', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
        notification.warning({
          top: 92,
          message: '配置信息格式错误!',
          duration: 5
        })
        return
      } else if (isgroup && !['datacard', 'propcard', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
        notification.warning({
          top: 92,
          message: '配置信息格式错误!',
@@ -151,7 +168,7 @@
        return
      }
      res = this.resetconfig(res, Tab)
      res = this.resetconfig(res, Tab, isgroup)
      delete res.copyType