zouyu
2023-12-25 2f0f12423dfc7e1dc66c0023ca1b83b2f8b13642
src/api/quality/rawMaterial.js
@@ -110,3 +110,23 @@
  })
}
export function downloadProcessConfigFile(data) {
  return request({
    url: '/mes/rawInsProduct/processConfig/'+data.bucket+'/'+data.fileName,
    method: 'post',
    responseType: 'blob'
  }).then((response) => {
    // 处理返回的文件流
    const blob = response.data
    const link = document.createElement('a')
    link.href = URL.createObjectURL(blob)
    link.download = data.originalFileName
    document.body.appendChild(link)
    link.click()
    window.setTimeout(function() {
      URL.revokeObjectURL(blob)
      document.body.removeChild(link)
    }, 0)
  })
}