| | |
| | | ], |
| | | //设备 |
| | | 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' |
| | | } |
| | | }, |
| | |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="2" tab="其他文档" v-if="currentTreeNodeInfo.type !==5 && currentTreeNodeInfo.type!==6"> |
| | | <a-tab-pane :key="2" tab="其他文档"> |
| | | <OtherDocumentTableList ref="otherDocumentTableListRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/> |
| | | </a-tab-pane> |
| | |
| | | |
| | | // 控制基础右键菜单关闭 |
| | | handleBaseContextMenuClose() { |
| | | this.$refs.baseContextmenuRef.menuVisible = false |
| | | if(this.$refs.baseContextmenuRef)this.$refs.baseContextmenuRef.menuVisible = false |
| | | document.body.removeEventListener('click', this.handleBaseContextMenuClose) |
| | | }, |
| | | |
| | |
| | | { label: '添加部件', code: 'product_add_child', icon: 'plus', isCommonMethod: false }, |
| | | { label: '编辑产品信息', code: 'product_edit', icon: 'edit', isCommonMethod: false }, |
| | | // { label: '导出文档', code: 'product_export', icon: 'export', isCommonMethod: true }, |
| | | { label: '导入其他文档', code: 'product_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入其他文档', code: 'product_other_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '检索电子样板', code: 'product_search', icon: 'search', isCommonMethod: true }, |
| | | { label: '删除', code: 'product_delete', icon: 'delete', isCommonMethod: true }, |
| | | { label: '权限配置', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } |
| | |
| | | { label: '创建工序', code: 'component_add_relative', icon: 'plus', isCommonMethod: false }, |
| | | { label: '编辑部件信息', code: 'component_edit', icon: 'edit', isCommonMethod: false }, |
| | | // { label: '导出文档', code: 'component_export', icon: 'export', isCommonMethod: true }, |
| | | { label: '导入其他文档', code: 'component_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入其他文档', code: 'component_other_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '检索电子样板', code: 'component_search', icon: 'search', isCommonMethod: true }, |
| | | { label: '引用部件',code: 'component_borrow',icon: 'plus',isCommonMethod: false}, |
| | | { label: '删除', code: 'component_delete', icon: 'delete', isCommonMethod: true }, |
| | |
| | | // { label: '创建工序', code: 'parts_add_relative', icon: 'plus', isCommonMethod: false }, |
| | | { label: '编辑零件信息', code: 'parts_edit', icon: 'edit', isCommonMethod: false }, |
| | | // { label: '导出文档', code: 'parts_export', icon: 'export', isCommonMethod: true }, |
| | | { label: '导入其他文档', code: 'parts_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入其他文档', code: 'parts_other_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '检索电子样板', code: 'parts_search', icon: 'search', isCommonMethod: true }, |
| | | { label: '删除', code: 'parts_delete', icon: 'delete', isCommonMethod: true }, |
| | | { label: '权限配置', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } |
| | |
| | | { label: '创建工艺规程版本', code: 'version_add', icon: 'plus', isCommonMethod: false }, |
| | | { label: '创建工序', code: 'version_add_child', icon: 'plus', isCommonMethod: false }, |
| | | { label: '编辑工艺规程版本信息', code: 'version_edit', icon: 'edit', isCommonMethod: false }, |
| | | { label: '导入其他文档', code: 'version_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入其他文档', code: 'version_other_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '检索电子样板', code: 'version_search', icon: 'search', isCommonMethod: true }, |
| | | { label: '删除', code: 'version_delete', icon: 'delete', isCommonMethod: true }, |
| | | { label: '权限配置', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } |
| | |
| | | { label: '编辑工序信息', code: 'process_edit', icon: 'edit', isCommonMethod: false }, |
| | | { label: '删除', code: 'process_delete', icon: 'delete', isCommonMethod: true }, |
| | | // { label: '导出NC程序', code: 'process_export', icon: 'export', isCommonMethod: true }, |
| | | { label: '导入NC程序', code: 'process_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入NC程序', code: 'process_nc_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入其他文档', code: 'process_other_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '权限配置', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } |
| | | ], |
| | | //工步 |
| | |
| | | { label: '添加设备类', code: 'processStep_add_type', icon: 'plus', isCommonMethod: true }, |
| | | { label: '删除', code: 'processStep_delete', icon: 'delete', isCommonMethod: true }, |
| | | // { label: '导出NC程序', code: 'processStep_export', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入NC程序', code: 'processStep_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入NC程序', code: 'processStep_nc_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '导入其他文档', code: 'processStep_other_import', icon: 'import', isCommonMethod: true }, |
| | | { label: '权限配置', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } |
| | | ] |
| | | } |
| | |
| | | return 'processStep' |
| | | } |
| | | }, |
| | | getCurrentDocClassCode() { |
| | | switch (+this.treeParams.type) { |
| | | case 1: |
| | | return 'OTHER' |
| | | case 2: |
| | | return 'OTHER' |
| | | case 3: |
| | | return 'OTHER' |
| | | case 4: |
| | | return 'OTHER' |
| | | case 5: |
| | | return 'NC' |
| | | case 6: |
| | | return 'NC' |
| | | } |
| | | } |
| | | // getCurrentDocClassCode() { |
| | | // switch (+this.treeParams.type) { |
| | | // case 1: |
| | | // return 'OTHER' |
| | | // case 2: |
| | | // return 'OTHER' |
| | | // case 3: |
| | | // return 'OTHER' |
| | | // case 4: |
| | | // return 'OTHER' |
| | | // case 5: |
| | | // return 'NC' |
| | | // case 6: |
| | | // return 'NC' |
| | | // } |
| | | // } |
| | | }, |
| | | methods: { |
| | | onContextMenuClick(treeKey, menuKey) { |
| | | const level = this.getCurrentMenuLevel |
| | | const param = this.getCurrentDocClassCode |
| | | console.log('level---------------------', level) |
| | | console.log('param---------------------', param) |
| | | const treeNodeInfo = Object.assign({}, this.treeParams, { param }) |
| | | const treeNodeInfo = Object.assign({}, this.treeParams) |
| | | console.log('treeNodeInfo******************', treeNodeInfo) |
| | | const menuKeyArray = menuKey.split('_') |
| | | const isCommonMethod = this.defaultContextMenuList[level].find(item => item.code === menuKey).isCommonMethod |
| | |
| | | }, |
| | | methods: { |
| | | /** |
| | | * 点击导入文档或NC程序时触发 |
| | | * 点击导入NC程序时触发 |
| | | * @param treeNodeInfo 点击树节点右键菜单导入程序时传入树节点信息 |
| | | * @param tableRowInfo 右键表格行时传入行信息 |
| | | * @param modalTitle 弹窗标题 |
| | | */ |
| | | handleImport(treeNodeInfo, tableRowInfo, modalTitle) { |
| | | handleNcImport(treeNodeInfo, tableRowInfo, modalTitle) { |
| | | this.isUploadMultiple = true |
| | | let attributionId // 文档所属层级Id |
| | | let attributionType // 文档所属层级类型 |
| | |
| | | if (treeNodeInfo) { |
| | | attributionId = treeNodeInfo.treeKey |
| | | attributionType = treeNodeInfo.type |
| | | docClassCode = treeNodeInfo.param |
| | | if(treeNodeInfo.param==='SEND'|| treeNodeInfo.param==='REC') docClassCode = treeNodeInfo.param |
| | | else docClassCode = 'NC' |
| | | } else { |
| | | // 若工序及工步层级下有设备类时则导入NC的参数需要调整 |
| | | attributionId = tableRowInfo.param === 'deviceCustomType' ? tableRowInfo.id : tableRowInfo.attributionId |
| | | attributionType = tableRowInfo.attributionType |
| | | docClassCode = tableRowInfo.param === 'deviceCustomType' ? 'NC' : tableRowInfo.param |
| | | if(tableRowInfo.param==='SEND'|| tableRowInfo.param==='REC') docClassCode = tableRowInfo.param |
| | | else docClassCode = 'NC' |
| | | } |
| | | this.setModalTitle(modalTitle, docClassCode) |
| | | this.uploadParams = Object.assign({}, { attributionId, attributionType, docClassCode }) |
| | | console.log('uploadParams=====================', this.uploadParams) |
| | | console.log('NC=======uploadParams=====================', this.uploadParams) |
| | | this.visible = true |
| | | }, |
| | | |
| | | /** |
| | | * 点击导入其他文档时触发 |
| | | * @param treeNodeInfo 点击树节点右键菜单导入程序时传入树节点信息 |
| | | * @param tableRowInfo 右键表格行时传入行信息 |
| | | * @param modalTitle 弹窗标题 |
| | | */ |
| | | handleOtherImport(treeNodeInfo, tableRowInfo, modalTitle){ |
| | | this.isUploadMultiple = true |
| | | let attributionId // 文档所属层级Id |
| | | let attributionType // 文档所属层级类型 |
| | | const docClassCode= 'OTHER' // 文档类型 |
| | | if (treeNodeInfo) { |
| | | attributionId = treeNodeInfo.treeKey |
| | | attributionType = treeNodeInfo.type |
| | | } else { |
| | | attributionId = tableRowInfo.attributionId |
| | | attributionType = tableRowInfo.attributionType |
| | | } |
| | | this.uploadParams = Object.assign({}, { attributionId, attributionType, docClassCode }) |
| | | console.log('OTHER======uploadParams=====================', this.uploadParams) |
| | | this.visible = true |
| | | }, |
| | | |
| | |
| | | deviceCustomType:[ |
| | | { label: '编辑设备类信息', code: 'type_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, |
| | | { label: '删除', code: 'type_delete', subMenu: [], icon: 'delete', isCommonMethod: false }, |
| | | { label: '导入NC程序', code: 'type_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '导入NC程序', code: 'type_nc_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | ], |
| | | //NC文档 |
| | | NC: [ |
| | | { label: '编辑文档信息', code: 'document_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, |
| | | { label: '指派到设备', code: 'document_assign', subMenu: [], icon: 'cluster', isCommonMethod: false }, |
| | | { label: '导入NC程序', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '导入NC程序', code: 'document_nc_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '下载', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: '删除', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: '批量删除', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | |
| | | //其它文档 |
| | | OTHER: [ |
| | | { label: '编辑文档信息', code: 'document_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, |
| | | { label: '导入文档', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '导入文档', code: 'document_other_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '下载', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: '删除', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: '批量删除', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | |
| | | //已发送文档 |
| | | SEND: [ |
| | | { label: '编辑文档信息', code: 'document_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, |
| | | { label: '导入NC程序', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '导入NC程序', code: 'document_nc_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '下载', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: '删除', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: '批量删除', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | |
| | | //已接收文档 |
| | | REC: [ |
| | | { label: '编辑文档信息', code: 'document_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, |
| | | { label: '导入NC程序', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '导入NC程序', code: 'document_nc_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: '下载', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: '删除', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: '批量删除', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, |