From 397615fff40b62bed4d47d38fc579b7fcc26fcef Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 21 十一月 2023 15:58:16 +0800
Subject: [PATCH] 首页统计loading优化
---
Source/UBCS-WEB/src/views/wel/Statistic.vue | 35 +++++++++++++++++------------------
1 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/wel/Statistic.vue b/Source/UBCS-WEB/src/views/wel/Statistic.vue
index 691cf38..0eda3f5 100644
--- a/Source/UBCS-WEB/src/views/wel/Statistic.vue
+++ b/Source/UBCS-WEB/src/views/wel/Statistic.vue
@@ -9,6 +9,7 @@
top='-40px'>
<el-table
ref="TableBox"
+ v-loading="TableLoading"
:data="Crud.data"
border
style="width: 100%"
@@ -66,6 +67,7 @@
name: "Statistic",
data() {
return {
+ TableLoading: false,
loading: true,
Crud: {
form: '',
@@ -120,30 +122,27 @@
// console.log(row)
this.SelectRow = row;
},
- SaveHandler() {
+ async SaveHandler() {
if (this.SelectRow.length <= 0) {
- this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
+ this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹紒');
+ return;
}
- let mdmNameList = [];
- mdmNameList = this.SelectRow.map(item => {
- return item.code
- })
- console.log(mdmNameList)
- save(this.userId, mdmNameList).then(res => {
- console.log(res)
- if (res.data.code === 200) {
- this.$message.success('淇濆瓨鎴愬姛锛�')
- //娓呴櫎宸叉湁鏁扮粍涓璸ush鏁版嵁
+ this.TableLoading = true;
+ try {
+ const {data: {code}} = await save(this.userId, this.SelectRow.map(item => item.code));
+ if (code === 200) {
+ this.$message.success('淇濆瓨鎴愬姛锛�');
this.newData = [];
- this.option.data = []
- this.MasterGetList()
+ this.option.data = [];
+ this.MasterGetList();
this.dialogTableVisible = false;
- //瀛椾綋鍜岃竟妗嗛噸鏂板姞杞�
+ this.TableLoading = false;
this.loading = true;
- this.FontInfo()
+ this.FontInfo();
}
- })
+ } catch {
+ this.TableLoading = false;
+ }
},
MoreHandler() {
this.dialogTableVisible = true;
--
Gitblit v1.9.3