| | |
| | | fileList: [], |
| | | uploadParams: {}, |
| | | uploading: false, |
| | | isUploadMultiple: true |
| | | isUploadMultiple: true, |
| | | currentDeviceDocClassCode: 'SEND', |
| | | currentTitleAfterClass: '' |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | * 点击导入文档或NC程序时触发 |
| | | * @param treeNodeInfo 点击树节点右键菜单导入程序时传入树节点信息 |
| | | * @param tableRowInfo 右键表格行时传入行信息 |
| | | * @param modalTitle 弹窗标题 |
| | | */ |
| | | handleImport(treeNodeInfo, tableRowInfo) { |
| | | handleImport(treeNodeInfo, tableRowInfo, modalTitle) { |
| | | this.isUploadMultiple = true |
| | | let attributionId // 文档所属层级Id |
| | | let attributionType // 文档所属层级类型 |
| | |
| | | if (treeNodeInfo) { |
| | | attributionId = treeNodeInfo.treeKey |
| | | attributionType = treeNodeInfo.type |
| | | if (attributionType === 5 || attributionType === 6) docClassCode = 'NC' |
| | | else if (attributionType === 4) docClassCode = 'SEND' |
| | | else docClassCode = 'OTHER' |
| | | docClassCode = treeNodeInfo.param |
| | | } else { |
| | | attributionId = tableRowInfo.attributionId |
| | | attributionType = tableRowInfo.attributionType |
| | | docClassCode = tableRowInfo.param |
| | | } |
| | | this.setModalTitle(modalTitle, docClassCode) |
| | | this.uploadParams = Object.assign({}, { attributionId, attributionType, docClassCode }) |
| | | console.log('uploadParams=====================', this.uploadParams) |
| | | this.visible = true |
| | | }, |
| | | |
| | |
| | | this.fileList = [] |
| | | }, |
| | | |
| | | /** |
| | | * 设置弹窗标题 |
| | | * @param modalTitle 弹窗标题 |
| | | * @param docClassCode 文档类型 |
| | | */ |
| | | setModalTitle(modalTitle, docClassCode) { |
| | | switch (docClassCode) { |
| | | case 'SEND': |
| | | this.title = modalTitle + '(发送)' |
| | | break |
| | | case 'REC': |
| | | this.title = modalTitle + '(接收)' |
| | | break |
| | | } |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, modalTitle, treeNodeInfo, tableRowInfo }) { |
| | | if (this[methodName]) { |
| | | this[methodName](treeNodeInfo, tableRowInfo) |
| | | this.title = modalTitle |
| | | this[methodName](treeNodeInfo, tableRowInfo, modalTitle) |
| | | } |
| | | } |
| | | } |