Browse Source

工时同步功能增加loading

ljb 7 months ago
parent
commit
54bbea91fd

+ 10 - 1
src/views/yf-cost-manage/basic-data-setting/working-hours-records.vue

@@ -396,11 +396,20 @@ export default window.$crudCommon({
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
+      const loading = this.$loading({
+        lock: true,
+        text: '数据同步中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
         obj[type].method({ yearAndMonth: this.params.yearAndMonth }).then(() => {
           this.$message.success('同步成功!');
           this.page.currentPage = 1;
           this.getList();
-        })
+          loading.close();
+        }).catch(() => {
+          loading.close();
+        });
       });
     },
   },