Tang 3 anni fa
parent
commit
21465b369d

+ 10 - 8
src/views/education/classManageMent/classList/manageClass/baseInfo.vue

@@ -402,10 +402,11 @@ export default {
       if (!arr) {
         return;
       }
-      if (arr < this.timeArrays[0] || arr >= this.timeArrays[1]) {
-        this.$message.warning("超出商品学习有效期,请重新选择");
-        this.listData.classStartTime = "";
-      } else if (
+      // if (arr < this.timeArrays[0] || arr >= this.timeArrays[1]) {
+      //   this.$message.warning("超出商品学习有效期,请重新选择");
+      //   this.listData.classStartTime = "";
+      // } else
+       if (
         this.listData.classEndTime &&
         arr > this.listData.classEndTime
       ) {
@@ -417,10 +418,11 @@ export default {
       if (!arr) {
         return;
       }
-      if (arr < this.timeArrays[0] || arr > this.timeArrays[1]) {
-        this.$message.warning("超出商品学习有效期,请重新选择");
-        this.listData.classEndTime = "";
-      } else if (
+      // if (arr < this.timeArrays[0] || arr > this.timeArrays[1]) {
+      //   this.$message.warning("超出商品学习有效期,请重新选择");
+      //   this.listData.classEndTime = "";
+      // } else
+       if (
         this.listData.classStartTime &&
         arr <= this.listData.classStartTime
       ) {

+ 24 - 11
src/views/education/classManageMent/learningHoursRecordList/index.vue

@@ -425,17 +425,14 @@ export default {
       this.$modal.loading("正在导出数据,请稍后...");
       this.$api
         .inquireGradegradeListexport(data)
-        .then((res) => {
-          let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
-          let link = document.createElement("a");
-          document.body.appendChild(link);
-          let fileName = "导出数据" + ".xlsx";
-          link.dowmload = fileName;
-          link.href = url;
-          link.click();
-          link.remove();
-          this.$message.success("批量导出成功");
-          // this.dialogDR = false;
+        .then(async(res) => {
+          for (let k in res.data) {
+          if (res.data[k].code === 200) {
+            await this.dowmFunc(res, k);
+          } else {
+            this.$message.error("code值错误:", res.data[k].code);
+          }
+        }
         })
         .catch((err) => {
           /**
@@ -452,6 +449,22 @@ export default {
           this.$modal.closeLoading();
         });
     },
+    dowmFunc(res, k) {
+      return new Promise((resolve, reject) => {
+        let url =
+          baseUrls.baseURL + "common/download?fileName=" + res.data[k].msg;
+        let link = document.createElement("a");
+        let fileName = "导入模板" + ".xlsx";
+        document.body.appendChild(link);
+        link.href = url;
+        link.dowmload = fileName;
+        link.click();
+        link.remove();
+        setTimeout(() => {
+          resolve();
+        }, 200);
+      });
+    },
     /**
      * 导出前收集条件
      */