| | |
| | | primaryId = data[0][setting.primaryKey] || '' |
| | | } |
| | | |
| | | let newtab = { |
| | | MenuNo: '', |
| | | MenuID: btn.uuid, |
| | | MenuName: btn.label, |
| | | type: btn.tabTemplate, |
| | | selected: true, |
| | | param: { |
| | | parentId: this.props.MenuID, |
| | | btn: btn, |
| | | data: data[0] || null, |
| | | primaryId: primaryId |
| | | let newtab = {} |
| | | |
| | | if (btn.tabTemplate === 'FormTab') { |
| | | newtab = { |
| | | MenuNo: '', |
| | | MenuID: btn.uuid, |
| | | MenuName: btn.label, |
| | | type: btn.tabTemplate, |
| | | selected: true, |
| | | param: { |
| | | parentId: this.props.MenuID, |
| | | btn: btn, |
| | | data: data[0] || null, |
| | | primaryId: primaryId |
| | | } |
| | | } |
| | | } else if (btn.tabTemplate === 'ThdMenu') { |
| | | let _type = 'CommonTable' |
| | | if (btn.linkThdMenu && btn.linkThdMenu.PageParam) { |
| | | try { |
| | | _type = JSON.parse(btn.linkThdMenu.PageParam).Template |
| | | } catch { |
| | | _type = 'CommonTable' |
| | | } |
| | | } |
| | | |
| | | newtab = { |
| | | MenuNo: btn.linkThdMenu.MenuNo, |
| | | MenuID: btn.linkThdMenu.MenuID, |
| | | MenuName: btn.linkThdMenu.MenuName, |
| | | type: _type, |
| | | selected: true, |
| | | param: { |
| | | BID: primaryId |
| | | } |
| | | } |
| | | } |
| | | |