| | |
| | | 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 |
| | | } |
| | | |
| | |
| | | |
| | | 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: '配置信息格式错误!', |
| | |
| | | return |
| | | } |
| | | |
| | | res = this.resetconfig(res, Tab) |
| | | res = this.resetconfig(res, Tab, isgroup) |
| | | |
| | | delete res.copyType |
| | | |