|
@@ -403,15 +403,18 @@ |
|
@@ -403,15 +403,18 @@ |
403
|
},
|
403
|
},
|
404
|
//批量删除
|
404
|
//批量删除
|
405
|
batchRemove: function () {
|
405
|
batchRemove: function () {
|
406
|
- var ids = this.sels.map(item => item.permissionId).toString();
|
406
|
+ var ids = this.sels.map(item => item.permissionId);
|
407
|
this.$confirm('确认删除选中记录吗?', '提示', {
|
407
|
this.$confirm('确认删除选中记录吗?', '提示', {
|
408
|
type: 'warning'
|
408
|
type: 'warning'
|
409
|
}).then(() => {
|
409
|
}).then(() => {
|
410
|
this.listLoading = true;
|
410
|
this.listLoading = true;
|
411
|
//NProgress.start();
|
411
|
//NProgress.start();
|
412
|
- let para = { ids: ids };
|
|
|
413
|
- batchRemove(para).then((res) => {
|
|
|
414
|
- this.listLoading = false;
|
412
|
+ // let para = { ids: ids };
|
|
|
413
|
+ batchRemove(ids).then((response) => {
|
|
|
414
|
+ let res = response.data;
|
|
|
415
|
+ if (res.code !== '200') {
|
|
|
416
|
+ return this.$message.error(res.msg);
|
|
|
417
|
+ }
|
415
|
//NProgress.done();
|
418
|
//NProgress.done();
|
416
|
this.$message({
|
419
|
this.$message({
|
417
|
message: '删除成功',
|
420
|
message: '删除成功',
|
|
@@ -419,8 +422,10 @@ |
|
@@ -419,8 +422,10 @@ |
419
|
});
|
422
|
});
|
420
|
this.getTableList();
|
423
|
this.getTableList();
|
421
|
});
|
424
|
});
|
422
|
- }).catch(() => {
|
|
|
423
|
-
|
425
|
+ }).catch((err) => {
|
|
|
426
|
+ this.$message.error(err);
|
|
|
427
|
+ }).finally(() => {
|
|
|
428
|
+ this.listLoading = false;
|
424
|
});
|
429
|
});
|
425
|
},
|
430
|
},
|
426
|
showDrawer: function(){
|
431
|
showDrawer: function(){
|