king
2021-01-04 c986f2f56bb153a9b6cebc74b4d9334c85ddfdda
src/menu/pastecontroller/index.jsx
@@ -23,12 +23,15 @@
    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
    }
@@ -134,8 +137,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 +164,7 @@
        return
      }
      res = this.resetconfig(res, Tab)
      res = this.resetconfig(res, Tab, isgroup)
      delete res.copyType