Browse Source

盲票导出优化

Liugl 3 năm trước cách đây
mục cha
commit
130805e719
1 tập tin đã thay đổi với 18 bổ sung13 xóa
  1. 18 13
      src/views/business/ticket/index.vue

+ 18 - 13
src/views/business/ticket/index.vue

@@ -301,18 +301,23 @@ export default {
 
     /** 导出按钮操作 */
     handleExport() {
-     const boxIds = this.ids;
-      this.$confirm('是否确认导出所选盲票数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportTicket({ids:boxIds});
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
+     const boxIds = this.ids || [];
+     if(boxIds.length == 0){
+         this.$alert("请选择你要导出的盲票组!",'提示',{type:'warning'});
+     }else{
+       this.$confirm('是否确认导出所选盲票数据项?', "警告", {
+           confirmButtonText: "确定",
+           cancelButtonText: "取消",
+           type: "warning"
+         }).then(() => {
+           this.exportLoading = true;
+           return exportTicket({ids:boxIds});
+         }).then(response => {
+           this.download(response.msg);
+           this.exportLoading = false;
+         }).catch(() => {});
+     }
+
     },
   },
   mounted() {},
@@ -326,6 +331,6 @@ export default {
       display: none !important;
     }
   }
-  
+
 }
 </style>