benbendu
// 导出参与人名单
        exportPlayerInfo () {
            let form = {
                activityId: this.activityId
            }
            API.exportPlayerInfo(form).then(res => {
                if (+res.status === 200) {
                    if (+res.data.code === -1) {
                        this.sentMsg(res.data.message)
                        return
                    }
                    let elink = document.createElement(\'a\')
                    elink.download = this.table.title + \'.xls\'
                    elink.style.display = \'none\'

                    let blob = new Blob([res.body])
                    elink.href = window.URL.createObjectURL(blob)

                    document.body.appendChild(elink)
                    elink.click()
                    document.body.removeChild(elink)
                } else {
                    this.sentMsg(res.data.message || \'下载失败\')
                }
            }, res => {
                this.sentMsg()
            })
        },

分类:

技术点:

相关文章:

  • 2021-10-29
  • 2021-07-05
  • 2021-09-27
  • 2021-11-02
  • 2021-11-27
猜你喜欢
  • 2021-11-28
  • 2021-09-08
  • 2021-12-15
  • 2021-09-27
  • 2021-09-27
  • 2021-04-13
相关资源
相似解决方案