zoukankan      html  css  js  c++  java
  • vue Execel//模板下载

    <a href="#" @click="templateDownload()">模板下载</a>
     
    //模板下载
    templateDownload() {
    this.$axios({
    url: '/chenfan_refuse/otherRecord/otherRecordExcelDownload',
    method: 'get',
    responseType: 'blob'
    }).then((data) => {
    const blob = new Blob([data], { type: 'text/plain;charset=utf-8' })
    const url = window.URL.createObjectURL(blob)
    const a = document.createElement('a')
    a.href = url
    a.download = '其它入库单新建.xlsx'
    document.body.appendChild(a)
    a.click()
    window.URL.revokeObjectURL(url)
    document.body.removeChild(a)
    this.$Loading.finish();//结束进度条
    })
    },
  • 相关阅读:
    Mybatis学习笔记14
    Mybatis学习笔记13
    Mybatis学习笔记12
    poj 2513
    poj 2001
    poj 1080
    poj 1703
    poj 1521
    poj 1384
    poj 1726
  • 原文地址:https://www.cnblogs.com/wssdx/p/11468660.html
Copyright © 2011-2022 走看看