浏览代码

flot terminer

scorpio 2 年之前
父节点
当前提交
94a2d2404d
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/views/home/component/dispatch.vue

+ 3 - 3
src/views/home/component/dispatch.vue

@@ -392,17 +392,17 @@ export default {
       }
     },
     exportFile() {
-      this.$message.success('开始下载,请稍后...')
       const data = {
         projectId: this.projectId,
         year: this.year,
         month: this.month
       }
       this.$api.dispatch.exportFile(data).then(res => {
-        if (Object.hasOwn(res, 'code')) {
-          this.$message.error(res.msg)
+        if (res.size === 0) {
+          this.$message.error('下载错误,请稍后再试...')
           return
         }
+        this.$message.success('开始下载,请稍后...')
         this.download(res)
       })
     },