| | |
| | | } |
| | | } |
| | | |
| | | openView = () => { |
| | | openView = (e) => { |
| | | const { card, data, cards, onClick } = this.props |
| | | |
| | | onClick && onClick() |
| | | |
| | | if (!card.setting.click || data.$disabled) return |
| | | |
| | | if (card.setting.click === 'menus' && cards.subtype === 'datacard' && card.$cardType !== 'extendCard') { |
| | | e.stopPropagation() |
| | | |
| | | if (card.setting.click === 'menus') { |
| | | let menu = null |
| | | |
| | | if (card.menus && card.menus.length > 0) { |
| | |
| | | menu = m |
| | | }) |
| | | } |
| | | if (!menu || !menu.MenuID) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未查询到菜单信息!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | if (!menu) return |
| | | |
| | | let newtab = { |
| | | MenuID: menu.MenuID, |
| | |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (key === 'children') return |
| | | newtab.param[key] = data[key] |
| | | }) |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | } else if (card.setting.click === 'menu' && card.setting.menu) { |
| | | } else if (card.setting.click === 'menu') { |
| | | let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | |
| | |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (key === 'children') return |
| | | newtab.param[key] = data[key] |
| | | }) |
| | | } |