| | |
| | | ], |
| | | //设备 |
| | | device: [ |
| | | { label: '导入NC文档', code: 'device_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入NC文档', code: 'device_nc_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '权限配置', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } |
| | | ] |
| | | } |
| | |
| | | }, |
| | | computed: { |
| | | getCurrentMenuLevel() { |
| | | if (!this.treeParams.equipmentId) return 'workshop' |
| | | if (this.treeParams.type===1) return 'workshop' |
| | | else return 'device' |
| | | } |
| | | }, |
| | |
| | | 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 |
| | | if (treeNodeInfo.type === 2) treeNodeInfo.type = 7 |
| | | // 设备结构树节点中的设备层级为2,但在产品结构树中将设备层级的type设置为7,因此在此处设置为7 |
| | | const menuKeyArray = menuKey.split('_') |
| | | const isCommonMethod = this.defaultContextMenuList[level].find(item => item.code === menuKey).isCommonMethod |
| | | // product_add => handleAdd 触发对应组件事件 |