Browse Source

修改打印记录导出

艽十艽 2 năm trước cách đây
mục cha
commit
3415acddc7
1 tập tin đã thay đổi với 8 bổ sung7 xóa
  1. 8 7
      src/views/PrintsLog/printlog/index.vue

+ 8 - 7
src/views/PrintsLog/printlog/index.vue

@@ -746,18 +746,18 @@ export default {
     },
     // 导出操作
     submitForms() {
-      if(this.form3.unitIds==null){
-        this.form3.unitIds=[]
-      }
-      if (this.form3.unitIds.length!="") {
-        this.form3.unitIds = this.form3.unitIds.join(",");
-      }
      if(this.form3.startt||this.form3.endt){
       const queryParamss = this.form3;
       this.$modal
         .confirm("是否确认导出集中文印记录数据项?")
         .then(() => {
           this.exportLoading = true;
+          if(this.form3.unitIds==null){
+            this.form3.unitIds=[]
+          }
+          if (this.form3.unitIds.length>0) {
+            this.form3.unitIds = this.form3.unitIds.join(",");
+          }
           return exportPrintlog(queryParamss);
         })
         .then((response) => {
@@ -765,7 +765,8 @@ export default {
           this.exportLoading = false;
           this.cancels();
         })
-        .catch(() => {});
+        .catch(() => {
+        });
      }else{
       this.$message.error('开始时间或结束时间不能为空')
       this.form3.unitIds=[]