| | |
| | | receiveCurrentTreeNodeInfo(treeNodeInfo) { |
| | | console.log('treeNodeInfo', treeNodeInfo) |
| | | const { id, type } = treeNodeInfo |
| | | // 从树组件接受树节点信息后从父组件流入子组件 |
| | | // 从树组件接受树节点信息后从父组件流入子组件并重置数据 |
| | | this.currentClickedTypeInfo = this.currentRightClickedTableRowInfo = {} |
| | | this.currentTreeNodeInfo = treeNodeInfo |
| | | this.currentNCDocumentAttributionInfo = Object.assign({}, { |
| | | attributionId: id, |
| | | attributionType: type, |
| | | docClassCode: 'NC' |
| | | }) |
| | | // 清空上一节点已经加载过得文档列表tabKey |
| | | this.hasLoadedDataTabKeyArray = [] |
| | | |
| | | if (+type === 5 || +type === 6) { |
| | | this.activeTabKey = 1 |
| | | this.$nextTick(() => { |
| | |
| | | this.hasLoadedDataTabKeyArray.push(this.activeTabKey) |
| | | }, |
| | | |
| | | /** |
| | | * 接受当前点击的设备类信息 |
| | | * @param record 当前点击的设备类行信息 |
| | | */ |
| | | receiveCurrentClickedTypeInfo(record) { |
| | | const { id, attributionType } = record |
| | | this.currentClickedTypeInfo = Object.assign({}, record) |
| | |
| | | */ |
| | | handleTableContextMenuOpen(record) { |
| | | this.currentRightClickedTableRowInfo = Object.assign({}, record) |
| | | console.log('currentRightClickedTableRowInfo', this.currentRightClickedTableRowInfo) |
| | | this.$refs.tableContextMenuRef.currentMenuLevel = record.param |
| | | this.$refs.tableContextMenuRef.menuStyle.top = event.clientY + 'px' |
| | | this.$refs.tableContextMenuRef.menuStyle.left = event.clientX + 'px' |
| | |
| | | this.hasLoadedDataTabKeyArray.push(activeTabKey) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 文档以及NC程序导入/出库/入库成功后触发重新加载文档列表 |
| | | * 文档以及NC程序导入/出库/入库/取消出库/发布/归档成功后触发重新加载文档列表 |
| | | * @param docClassCode 文档类别 |
| | | * @param attributionType 文档父级type类型 |
| | | * @param attributionId 文档父级Id |
| | |
| | | console.log('docClassCode, attributionType, attributionId', docClassCode, attributionType, attributionId) |
| | | // 在此处设备NC文档父级参数是可此方法是结构树以及设备类两种不同导入方式的共同出口 |
| | | this.currentNCDocumentAttributionInfo = Object.assign({}, { docClassCode, attributionId, attributionType }) |
| | | // 若引入设备类则只需要判断当前出现的文档所属是否是当前左键选中的文档,若不是当前选中的文档则不刷新文档列表(避免无效刷新) |
| | | if (this.currentRightClickedTableRowInfo.hasOwnProperty('deviceManagementId')) { |
| | | if (this.currentClickedTypeInfo.id !== attributionId) return |
| | | } else { |
| | | if (this.currentTreeNodeInfo.id !== attributionId) return |
| | | |
| | | // 判断当前右侧展示的文档的所属是否是当前左键选中树节点或设备类,若不是当前左键选中的则在导入后不刷新右侧的文档列表(避免无效刷新) |
| | | // 判断是否是在文档列表中进行出库/入库/发布/归档等操作,若是在文档列表中操作则操作成功后直接刷新文档列表 |
| | | if (!this.currentRightClickedTableRowInfo.hasOwnProperty('docId')) { |
| | | if (this.currentRightClickedTableRowInfo.hasOwnProperty('deviceManagementId')) { |
| | | // 此种情况是在引入设备类并在设备类列表中进行NC文档导入 |
| | | if (this.currentClickedTypeInfo.id !== attributionId) return |
| | | } else { |
| | | // 此种情况是在结构树节点上进行文档导入 |
| | | if (this.currentTreeNodeInfo.id !== attributionId) return |
| | | } |
| | | } |
| | | |
| | | if (docClassCode === 'NC') { |
| | | this.$nextTick(() => { |
| | | if (this.$refs.ncDocumentTableListRef) this.$refs.ncDocumentTableListRef.loadData(1) |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 重归档当前右键选中文档且后续无法继续发布或归档 |
| | | * 归档当前右键选中文档且后续无法继续发布或归档 |
| | | * @param menuLabel |
| | | */ |
| | | handlePigeonhole(menuLabel) { |