魏熙美 5 年前
父节点
当前提交
18fe0d69ba

+ 1
- 1
src/router.js 查看文件

11
   {
11
   {
12
     path: '/',
12
     path: '/',
13
     name: 'index',
13
     name: 'index',
14
-    redirect: '/dashboard',
14
+    redirect: '/indexEcharts',
15
     component: () => import('@/layout/index.vue'),
15
     component: () => import('@/layout/index.vue'),
16
     children: [
16
     children: [
17
       ...pages,
17
       ...pages,

+ 4
- 4
src/store/modules/apartment.js 查看文件

57
         }).then((data) => {
57
         }).then((data) => {
58
           
58
           
59
           resolve(data)
59
           resolve(data)
60
-        }).catch(() => {
61
-          reject()
60
+        }).catch((err) => {
61
+          reject(err)
62
         })
62
         })
63
       })
63
       })
64
     },
64
     },
70
           data:payload
70
           data:payload
71
         }).then((data) => {
71
         }).then((data) => {
72
           resolve(data)
72
           resolve(data)
73
-        }).catch(() => {
74
-          reject()
73
+        }).catch((err) => {
74
+          reject(err)
75
         })
75
         })
76
       })
76
       })
77
     },
77
     },

+ 9
- 1
src/views/activity/add.vue 查看文件

197
 
197
 
198
     handleAvatarSuccess (res) {
198
     handleAvatarSuccess (res) {
199
       this.activityQuery.url = res.data
199
       this.activityQuery.url = res.data
200
-      this.updateDetail({...this.dynamic, imgUrl: res.data})
200
+      this.updateDetail({...this.dynamic, imgUrl: res.data}).then((res) => {
201
+
202
+      }).catch((err) => {
203
+          this.$notify.error(err.msg || err.message)
204
+      })
201
       this.loading.close()
205
       this.loading.close()
202
     },
206
     },
203
     shareImageHandleAvatarSuccess(res, file) { // 海报图
207
     shareImageHandleAvatarSuccess(res, file) { // 海报图
236
         ).then(() => {
240
         ).then(() => {
237
           this.onCancel()
241
           this.onCancel()
238
           
242
           
243
+        }).catch((err) => {
244
+            this.$notify.error(err)
239
         })
245
         })
240
         this.$router.push({ name: "activity-list" });
246
         this.$router.push({ name: "activity-list" });
241
           } else {
247
           } else {
288
           phoneEditor.txt.html(data.url)
294
           phoneEditor.txt.html(data.url)
289
         })
295
         })
290
       }
296
       }
297
+    }).catch((err) => {
298
+        this.$notify.error(err)
291
     })
299
     })
292
   }
300
   }
293
 }
301
 }

+ 2
- 0
src/views/activity/edit.vue 查看文件

266
         this.activityQuery.shareImg = data.shareImg
266
         this.activityQuery.shareImg = data.shareImg
267
         this.shareImageUrl = data.shareImg
267
         this.shareImageUrl = data.shareImg
268
 
268
 
269
+        }).catch((err) => {
270
+            this.$notify.error(err.msg || err.message)
269
         })
271
         })
270
     },
272
     },
271
     formateDate(dt) {
273
     formateDate(dt) {

+ 14
- 11
src/views/activity/list.vue 查看文件

185
         }).then(() => {
185
         }).then(() => {
186
            this.filterData.dynamicId = id
186
            this.filterData.dynamicId = id
187
           this.finishActivity(
187
           this.finishActivity(
188
-          JSON.stringify(this.filterData)
189
-        ).then((res) => {
190
-           this.getList();
191
-          this.getBuildList()   
192
-        })    
193
-          this.$message({
194
-            type: 'success',
195
-            message: '成功!'
196
-          });
197
-        }).catch(() => {       
198
-        });
188
+                JSON.stringify(this.filterData)
189
+          ).then((res) => {
190
+              this.getList();
191
+              this.getBuildList()
192
+          }).catch((err) => {
193
+              this.$notify.error(err.msg || err.message)
194
+          })
195
+              this.$message({
196
+                type: 'success',
197
+                message: '成功!'
198
+              });
199
+        }).catch((err) => {
200
+            this.$notify.error(err.msg || err.message)
201
+        })
199
     },
202
     },
200
     top(row){
203
     top(row){
201
       const weight = Math.abs(row.weight - 1)
204
       const weight = Math.abs(row.weight - 1)

+ 1
- 1
src/views/building/edit.vue 查看文件

525
         this.addBuilding({
525
         this.addBuilding({
526
           onSuccess: this.onCancel,
526
           onSuccess: this.onCancel,
527
           detail: JSON.stringify(building)
527
           detail: JSON.stringify(building)
528
-        });
528
+        })
529
       } else {
529
       } else {
530
         // 修改
530
         // 修改
531
         this.editBuilding({
531
         this.editBuilding({

+ 8
- 0
src/views/building/list.vue 查看文件

269
           status: 1
269
           status: 1
270
         }).then(() => {
270
         }).then(() => {
271
           this.getList()
271
           this.getList()
272
+        }).catch((err) => {
273
+            this.$notify.error(err.msg || err.message)
272
         })
274
         })
273
       })
275
       })
274
     },
276
     },
286
           status: 0
288
           status: 0
287
         }).then(() => {
289
         }).then(() => {
288
           this.getList()
290
           this.getList()
291
+        }).catch((err) => {
292
+            this.$notify.error(err.msg || err.message)
289
         })
293
         })
290
       })
294
       })
291
     },
295
     },
303
           id: row.buildingId
307
           id: row.buildingId
304
         }).then(() => {
308
         }).then(() => {
305
           this.getList()
309
           this.getList()
310
+        }).catch((err) => {
311
+            this.$notify.error(err.msg || err.message)
306
         })
312
         })
313
+      }).catch((err) => {
314
+          this.$notify.error(err.msg || err.message)
307
       })
315
       })
308
     },
316
     },
309
     getCityName() { // 查询城市
317
     getCityName() { // 查询城市

+ 11
- 4
src/views/carouselFigure/advertisement.vue 查看文件

178
           type: "warning"
178
           type: "warning"
179
         }).then(() => {
179
         }).then(() => {
180
           this.updateExtendContent(contentId, status)
180
           this.updateExtendContent(contentId, status)
181
-        });
181
+        }).catch((err) => {
182
+          this.$notify.error(err.msg || err.message)
183
+        })
182
       },
184
       },
183
       Prohibit(contentId, status) {
185
       Prohibit(contentId, status) {
184
         this.$confirm("确认停用此轮播图?", "提示", {
186
         this.$confirm("确认停用此轮播图?", "提示", {
187
           type: "warning"
189
           type: "warning"
188
         }).then(() => {
190
         }).then(() => {
189
           this.updateExtendContent(contentId, status)
191
           this.updateExtendContent(contentId, status)
190
-        });
192
+        }).catch((err) => {
193
+          this.$notify.error(err.msg || err.message)
194
+        })
191
       },
195
       },
192
       handleDel(contentId, status) {
196
       handleDel(contentId, status) {
193
         this.$confirm("确认删除此数据?", "提示", {
197
         this.$confirm("确认删除此数据?", "提示", {
199
             this.$message.error("当前活动处于发布状态,不允许删除!");
203
             this.$message.error("当前活动处于发布状态,不允许删除!");
200
             return false;
204
             return false;
201
           }
205
           }
202
-        });
206
+        }).catch((err) => {
207
+          this.$notify.error(err.msg || err.message)
208
+        })
203
       },
209
       },
204
       updateExtendContent(contentId, status) { // 修改轮播状态
210
       updateExtendContent(contentId, status) { // 修改轮播状态
205
         this.$store.dispatch('carouselFigure/updateExtendContent', { contentId: contentId, status: status }).then((res) => {
211
         this.$store.dispatch('carouselFigure/updateExtendContent', { contentId: contentId, status: status }).then((res) => {
206
           this.getList();
212
           this.getList();
207
-        }).catch(() =>{
213
+        }).catch((err) =>{
214
+          this.$notify.error(err)
208
           console.log('carouselFigure/updateExtendContent err')
215
           console.log('carouselFigure/updateExtendContent err')
209
         })
216
         })
210
       },
217
       },

+ 9
- 3
src/views/carouselFigure/edit.vue 查看文件

350
         ).then(() => {
350
         ).then(() => {
351
           this.getAparmentList();
351
           this.getAparmentList();
352
           this.showHx = false;
352
           this.showHx = false;
353
-        });
353
+        }).catch((err) => {
354
+          this.$notify.error(err.msg || err.message)
355
+        })
354
       } else {
356
       } else {
355
         this.editApartment(
357
         this.editApartment(
356
           JSON.stringify({
358
           JSON.stringify({
360
         ).then(() => {
362
         ).then(() => {
361
           this.getAparmentList();
363
           this.getAparmentList();
362
           this.showHx = false;
364
           this.showHx = false;
363
-        });
365
+        }).catch((err) => {
366
+          this.$notify.error(err.msg || err.message)
367
+        })
364
       }
368
       }
365
     },
369
     },
366
     addHx() {
370
     addHx() {
371
     getAparmentList() {
375
     getAparmentList() {
372
       this.getApartments({ buildingId: this.$route.query.id }).then(data => {
376
       this.getApartments({ buildingId: this.$route.query.id }).then(data => {
373
         this.aparments = data;
377
         this.aparments = data;
374
-      });
378
+      }).catch((err) => {
379
+        this.$notify.error(err)
380
+      })
375
     },
381
     },
376
     handleEdit(row){
382
     handleEdit(row){
377
       this.showPlace = row.name
383
       this.showPlace = row.name

+ 4
- 0
src/views/dynamic/edit.vue 查看文件

111
           detail: JSON.stringify(this.detail)
111
           detail: JSON.stringify(this.detail)
112
         }).then(() => {
112
         }).then(() => {
113
           this.onCancel()
113
           this.onCancel()
114
+        }).catch((err) => {
115
+          this.$notify.error(err)
114
         })
116
         })
115
       } else {
117
       } else {
116
         // 修改
118
         // 修改
118
           detail: JSON.stringify(this.detail)
120
           detail: JSON.stringify(this.detail)
119
         }).then(() => {
121
         }).then(() => {
120
           this.onCancel()
122
           this.onCancel()
123
+        }).catch((err) => {
124
+          this.$notify.error(err)
121
         })
125
         })
122
       }
126
       }
123
     },
127
     },

+ 9
- 9
src/views/index.js 查看文件

1
 
1
 
2
 const pages = [
2
 const pages = [
3
-  {
4
-    path: 'dashboard',
5
-    name: 'dashboard',
6
-    component: () => import('./Dashboard.vue'),
7
-    meta: {
8
-      menuShow: true,
9
-      title: 'Dashboard',
10
-    }
11
-  },
3
+  // {
4
+  //   path: 'dashboard',
5
+  //   name: 'dashboard',
6
+  //   component: () => import('./Dashboard.vue'),
7
+  //   meta: {
8
+  //     menuShow: true,
9
+  //     title: 'Dashboard',
10
+  //   }
11
+  // },
12
   {
12
   {
13
     path: 'indexEcharts',
13
     path: 'indexEcharts',
14
     name: 'indexEcharts',
14
     name: 'indexEcharts',

+ 9
- 3
src/views/project/edit.vue 查看文件

501
         ).then(() => {
501
         ).then(() => {
502
           this.getAparmentList();
502
           this.getAparmentList();
503
           this.showHx = false;
503
           this.showHx = false;
504
-        });
504
+        }).catch((err) => {
505
+          this.$notify.error(err.msg || err.message)
506
+        })
505
       } else {
507
       } else {
506
         this.editApartment(
508
         this.editApartment(
507
           JSON.stringify({
509
           JSON.stringify({
511
         ).then(() => {
513
         ).then(() => {
512
           this.getAparmentList();
514
           this.getAparmentList();
513
           this.showHx = false;
515
           this.showHx = false;
514
-        });
516
+        }).catch((err) => {
517
+          this.$notify.error(err.msg || err.message)
518
+        })
515
       }
519
       }
516
     },
520
     },
517
     addHx() {
521
     addHx() {
522
     getAparmentList() {
526
     getAparmentList() {
523
       this.getApartments({ buildingId: this.$route.query.id }).then(data => {
527
       this.getApartments({ buildingId: this.$route.query.id }).then(data => {
524
         this.aparments = data;
528
         this.aparments = data;
525
-      });
529
+      }).catch((err) => {
530
+        this.$notify.error(err)
531
+      })
526
     },
532
     },
527
     handleEdit(row) {
533
     handleEdit(row) {
528
       this.aparmentImg = [];
534
       this.aparmentImg = [];