lsc 2 年之前
父節點
當前提交
acb37b5afb
共有 1 個文件被更改,包括 6 次插入2 次删除
  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;