-
+
@@ -103,7 +110,8 @@ export default {
currentPage: 1,
pageSize: 10,
total: 0,
- isAllSelected: false
+ isAllSelected: false,
+ loading: false,
};
},
created() {
@@ -137,22 +145,24 @@ export default {
},
fetchUsers() {
- Api.admin.getUserList(
- {
- page: this.currentPage,
- limit: this.pageSize,
- mobile: this.searchPhone,
- },
- ({ data }) => {
- if (data.code === 0) {
- this.userList = data.data.list.map(item => ({
- ...item,
- selected: false
- }));
- this.total = data.data.total;
- }
- }
- );
+ this.loading = true;
+ Api.admin.getUserList(
+ {
+ page: this.currentPage,
+ limit: this.pageSize,
+ mobile: this.searchPhone,
+ },
+ ({ data }) => {
+ this.loading = false; // 结束加载
+ if (data.code === 0) {
+ this.userList = data.data.list.map(item => ({
+ ...item,
+ selected: false
+ }));
+ this.total = data.data.total;
+ }
+ }
+ );
},
handleSearch() {
this.currentPage = 1;
@@ -682,5 +692,21 @@ export default {
}
}
+:deep(.el-loading-mask) {
+ background-color: rgba(255, 255, 255, 0.6) !important;
+ backdrop-filter: blur(2px);
+}
+:deep(.el-loading-spinner .circular) {
+ width: 28px;
+ height: 28px;
+}
+:deep(.el-loading-spinner .path) {
+ stroke: #6b8cff;
+}
+:deep(.el-loading-text) {
+ color: #6b8cff !important;
+ font-size: 14px;
+ margin-top: 8px;
+}
From ec9fa32c81527af295e0e6df3c18c15b61f09343 Mon Sep 17 00:00:00 2001
From: CGD <3030332422@qq.com>
Date: Mon, 21 Apr 2025 11:36:10 +0800
Subject: [PATCH 2/2] =?UTF-8?q?update:=E6=B7=BB=E5=8A=A0=E5=A4=9A=E4=B8=AA?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6"=E4=BF=9D=E5=AD=98"=E6=97=B6=E7=9A=84loading?=
=?UTF-8?q?=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/AddModelDialog.vue | 25 +++++++--
.../src/components/ModelEditDialog.vue | 25 +++++++--
.../src/components/ParamDialog.vue | 21 +++++++-
main/manager-web/src/views/ModelConfig.vue | 4 +-
.../src/views/ParamsManagement.vue | 51 ++++++++++---------
5 files changed, 92 insertions(+), 34 deletions(-)
diff --git a/main/manager-web/src/components/AddModelDialog.vue b/main/manager-web/src/components/AddModelDialog.vue
index 9a4a6022..5add8a77 100644
--- a/main/manager-web/src/components/AddModelDialog.vue
+++ b/main/manager-web/src/components/AddModelDialog.vue
@@ -77,7 +77,12 @@
-
+
保存
@@ -94,6 +99,7 @@ export default {
},
data() {
return {
+ saving: false,
providers: [],
dialogVisible: false,
providersLoaded: false,
@@ -175,6 +181,7 @@ export default {
},
handleClose() {
+ this.saving = false;
this.$emit('update:visible', false);
},
initDynamicConfig() {
@@ -185,8 +192,11 @@ export default {
this.formData.configJson = newConfig;
},
confirm() {
+ this.saving = true;
+
if (!this.formData.supplier) {
this.$message.error('请选择供应器');
+ this.saving = false;
return;
}
@@ -206,11 +216,18 @@ export default {
}
};
- this.$emit('confirm', submitData);
- this.$emit('update:visible', false);
- this.resetForm();
+ try {
+ this.$emit('confirm', submitData);
+ this.$emit('update:visible', false);
+ this.resetForm();
+ } catch (e) {
+ console.error(e);
+ } finally {
+ this.saving = false;
+ }
},
resetForm() {
+ this.saving = false;
this.formData = {
modelName: '',
modelCode: '',
diff --git a/main/manager-web/src/components/ModelEditDialog.vue b/main/manager-web/src/components/ModelEditDialog.vue
index 9a534116..f4d582c6 100644
--- a/main/manager-web/src/components/ModelEditDialog.vue
+++ b/main/manager-web/src/components/ModelEditDialog.vue
@@ -76,7 +76,12 @@