| | |
| | | const openFile = async(path)=>{ |
| | | const ext = path.split('.').pop().toLowerCase(); |
| | | if (ext === 'doc') { |
| | | ElMessageBox.confirm('暂不支持线上预览.doc文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => { |
| | | ElMessageBox.confirm('暂不支持线上预览.doc、.xls、.xlsx文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => { |
| | | window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank'); |
| | | }).catch(() => { |
| | | console.log('取消预览') |
| | |
| | | }; |
| | | }) |
| | | ); |
| | | item.productItems = item.productItems.map(i => i.fileName) |
| | | |
| | | const productList = item.projectDocuments.map(i => i.fileName) |
| | | const processList = item.processInspections.map(i => i.fileName) |
| | | item.productItems = productList.concat(processList).map(item => { |
| | | return { |
| | | name:item |
| | | } |
| | | }) |
| | | console.log('item.productItems', item.productItems) |
| | | try { |
| | | generateWordDocument(templatePath.value, item, item.itemName + `_${item.stage}审批表.docx`); |