quanyawei
2023-11-24 db844db9e655830a9d725b205984e7492ff5e474
src/views/toCarryOutLegislativeReforms/reform/index.vue
@@ -332,15 +332,20 @@
      this.$confirm('立即下载或者后台下载?', '提示', {
        confirmButtonText: '立即下载',
        cancelButtonText: '后台下载',
        distinguishCancelAndClose: true,
        type: 'warning'
      })
        .then(() => {
          this.loading = true
          this.exportData()
        })
        .catch(() => {
          this.loading = false
          this.exportData()
        .catch(action => {
          if (action === 'cancel') {
            this.loading = false
            this.exportData()
          } else {
            this.loading = false
          }
        })
    },
    exportData() {
@@ -371,6 +376,7 @@
          cancel = c
        }),
        onDownloadProgress(progress) {
          console.log('onDownloadProgress', progress)
          const loaded = progress.loaded
          // progress对象中的loaded表示已经下载的数量,total表示总数量,这里计算出百分比
          let downProgress = Math.round((loaded / totalSize) * 100)