| | |
| | | methods: { |
| | | onContextMenuClick(treeKey, menuKey) { |
| | | const level = this.getCurrentMenuLevel |
| | | const treeNodeInfo = Object.assign({}, this.treeParams) |
| | | if (treeNodeInfo.equipmentId) treeNodeInfo.type = 4 |
| | | const { param } = this.treeParams |
| | | const treeNodeInfo = Object.assign({}, this.treeParams, { param }) |
| | | console.log('treeNodeInfo++++++++++++++++++++++++++++', treeNodeInfo) |
| | | if (treeNodeInfo.type === 2) treeNodeInfo.type = 4 |
| | | // 设备结构树节点中的设备层级为2,但在产品结构树中将设备层级的type设置为4,为保证两个结构树共用的方法能正常运行,因此在此处同样设置为4 |
| | | const menuKeyArray = menuKey.split('_') |
| | | const isCommonMethod = this.defaultContextMenuList[level].find(item => item.code === menuKey).isCommonMethod |
| | | // product_add => handleAdd 触发对应组件事件 |