| | |
| | | this.setState({visible: true}) |
| | | } |
| | | |
| | | resetconfig = (item, Tab, copyBtns) => { |
| | | resetconfig = (item, Tab, copyBtns, uuids = {}) => { |
| | | item.floor = Tab.floor + 1 |
| | | item.tabId = Tab.uuid |
| | | item.parentId = Tab.parentId |
| | | |
| | | if (item.type === 'tabs') { |
| | | item.uuid = MenuUtils.getuuid() |
| | | uuids[item.uuid] = MenuUtils.getuuid() |
| | | item.uuid = uuids[item.uuid] |
| | | item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4) |
| | | item.name = item.setting.name |
| | | |
| | | item.subtabs.forEach(tab => { |
| | | tab.uuid = MenuUtils.getuuid() |
| | | uuids[tab.uuid] = MenuUtils.getuuid() |
| | | tab.uuid = uuids[tab.uuid] |
| | | tab.parentId = item.uuid |
| | | |
| | | if (item.floor >= 3) { |
| | |
| | | } |
| | | |
| | | tab.components = tab.components.map(cell => { |
| | | cell = this.resetconfig(cell, tab, copyBtns) |
| | | cell = this.resetconfig(cell, tab, copyBtns, uuids) |
| | | return cell |
| | | }) |
| | | }) |
| | | } else if (item.type === 'group') { |
| | | item.uuid = MenuUtils.getuuid() |
| | | uuids[item.uuid] = MenuUtils.getuuid() |
| | | item.uuid = uuids[item.uuid] |
| | | item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4) |
| | | item.name = item.setting.name |
| | | |
| | |
| | | cell.tabId = Tab.uuid |
| | | cell.parentId = Tab.parentId |
| | | |
| | | cell = MenuUtils.resetComponentConfig(cell, copyBtns) |
| | | cell = MenuUtils.resetComponentConfig(cell, copyBtns, uuids) |
| | | |
| | | return cell |
| | | }) |
| | | } else { |
| | | item = MenuUtils.resetComponentConfig(item, copyBtns) |
| | | item = MenuUtils.resetComponentConfig(item, copyBtns, uuids) |
| | | } |
| | | |
| | | return item |