浏览代码

科室删除提示修改

seimin 3 年之前
父节点
当前提交
3432877b66
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/app/views/office-management/office-management.component.ts

+ 2 - 2
src/app/views/office-management/office-management.component.ts

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