zangbin 3 gadi atpakaļ
vecāks
revīzija
6bf1476041

+ 11 - 0
web-ui/src/views/module/agent/agent.vue

@@ -628,14 +628,25 @@ export default {
           this.form.provinceName = this.startArea.provinceName
           this.form.cityName = this.startArea.cityName
           this.form.districtName = this.startArea.districtName
+
+
+          const loading = this.$loading({
+            lock: true,
+            text: 'Loading',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
+
           if (this.form.id != null) {
             updateAgent(this.form).then(response => {
+              loading.close();
               this.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             addAgent(this.form).then(response => {
+              loading.close();
               this.msgSuccess("新增成功");
               this.open = false;
               this.getList();

+ 11 - 4
web-ui/src/views/module/agent/info.vue

@@ -574,26 +574,33 @@ export default {
           this.form.provinceName = this.startArea.provinceName
           this.form.cityName = this.startArea.cityName
           this.form.districtName = this.startArea.districtName
+
+          const loading = this.$loading({
+            lock: true,
+            text: 'Loading',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
           
           // 不允许重复提交
           this.subLoading = true
           if (this.form.id != null) {
             updateAgent(this.form).then(response => {
+              loading.close();
               this.msgSuccess("修改成功");
-              this.subLoading = false
               this.open = false;
               this.getList();
             }).catch((error) => {
-              this.subLoading = true
+              loading.close();
             });
           } else {
             addAgent(this.form).then(response => {
+              loading.close();
               this.msgSuccess("新增成功");
-              this.subLoading = false
               this.open = false;
               this.getList();
             }).catch((error) => {
-              this.subLoading = true
+              loading.close();
             });
           }
         }