Răsfoiți Sursa

feature:项目下载附件添加下载提示

ZZH-wl 2 ani în urmă
părinte
comite
48b6588fcb
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      src/views/proj/business/components/DetailsEnclosure.vue

+ 4 - 0
src/views/proj/business/components/DetailsEnclosure.vue

@@ -153,6 +153,7 @@
        * 下载文件以及自定义文件名称
        */
       downFile(row) {
+        this.$message.warning('开始下载,请稍后。')
         if (row.fileUrl.startsWith('dingtalk')) {
           this.downDingtalkFile(row)
           return
@@ -170,6 +171,7 @@
             link.href = window.URL.createObjectURL(xhr.response)
             link.download = fileName
             link.click()
+            this.$message.success('下载成功')
             body.removeChild(link)
             window.URL.revokeObjectURL(link.href)
           }
@@ -182,10 +184,12 @@
           .downDingTalkFile({ id: row.id })
           .then((res) => {
             if (res.code == 200) {
+              this.$message.success('下载成功')
               downloadFileByByte(res.data, row.fileName)
             }
           })
           .catch((err) => {
+            this.$message.error('下载失败')
             console.error(err)
           })
       },