|
@@ -512,17 +512,21 @@ export class OfficeManagementComponent implements OnInit {
|
512
|
512
|
.subscribe((data) => {
|
513
|
513
|
that.btnLoading = false;
|
514
|
514
|
that.delModal = false;
|
515
|
|
- if (data.status == 200 && !data.data[0].msg) {
|
516
|
|
- if (
|
517
|
|
- that.listOfData.length == 1 &&
|
518
|
|
- that.pageIndex == Math.ceil(that.listLength / that.pageSize)
|
519
|
|
- ) {
|
520
|
|
- that.listLength--;
|
521
|
|
- that.pageIndex = Math.ceil(that.listLength / that.pageSize);
|
|
515
|
+ if (data.data && data.data[0]) {
|
|
516
|
+ if (!data.data[0].msg) {
|
|
517
|
+ if (
|
|
518
|
+ that.listOfData.length == 1 &&
|
|
519
|
+ that.pageIndex == Math.ceil(that.listLength / that.pageSize)
|
|
520
|
+ ) {
|
|
521
|
+ that.listLength--;
|
|
522
|
+ that.pageIndex = Math.ceil(that.listLength / that.pageSize);
|
|
523
|
+ }
|
|
524
|
+ that.showPromptModal("删除", true, "");
|
|
525
|
+ } else {
|
|
526
|
+ that.showPromptModal("删除", false, data.data[0].msg);
|
522
|
527
|
}
|
523
|
|
- that.showPromptModal("删除", true, "");
|
524
|
528
|
} else {
|
525
|
|
- that.showPromptModal("删除", false, data.data[0].msg);
|
|
529
|
+ that.showPromptModal("删除", false, "");
|
526
|
530
|
}
|
527
|
531
|
});
|
528
|
532
|
}
|