Browse Source

配资总览页面添加加载动画

liyuan 3 weeks ago
parent
commit
9884a05fc6
1 changed files with 9 additions and 7 deletions
  1. 9 7
      src/views/overviewAllocation/index.vue

+ 9 - 7
src/views/overviewAllocation/index.vue

@@ -75,13 +75,7 @@ export default {
                 yearMonth: '',
                 region: ""
             },
-            baseList: Array(8).fill({
-                company: "青岛鑫动力轮胎有限公司",
-                storeCount: 486,
-                sales: 1235,
-                inventory: 2800,
-                amount: 324
-            })
+            baseList: []
         };
     },
     created() {
@@ -95,8 +89,16 @@ export default {
             this.getBaseData();
         },
         getBaseData() {
+            const loading = this.$loading({
+                lock: true,
+                text: '正在请求数据,请稍后...',
+                spinner: 'el-icon-loading',
+                background: 'rgba(0,0,0,0.8)'
+            });
             capitalSummary(this.query).then(res => {
                 this.baseList = res.data.data;
+            }).finally(() => {
+                loading.close();
             });
         }
     }