lsc 2 years ago
parent
commit
acb37b5afb
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/components/index.vue

+ 6 - 2
src/components/index.vue

@@ -199,6 +199,7 @@ export default {
       typeb: "",
       typed: "",
       typeE: [],
+      loading:"",
     };
   },
   methods: {
@@ -306,7 +307,9 @@ export default {
     selectAll() {
       this.zoneListId = 0;
       this.isListAjax = true;
-      const loading = this.openLoading(document.querySelector(".main_box"));
+      if(!this.loading){
+        this.loading = this.openLoading(document.querySelector(".main_box"));
+      }
       let params = {
         uid: this.userid,
         oid: this.oid,
@@ -323,7 +326,8 @@ export default {
       this.ajax
         .get(this.$store.state.api + "selectTypeCourse", params)
         .then((res) => {
-          loading.close();
+          this.loading.close();
+          this.loading = ''
           this.isListAjax = false;
           this.zoneClass = res.data[0];
           this.total = res.data[0].length ? res.data[0][0].num : 0;