|
@@ -309,18 +309,21 @@ export class GroupManagementComponent implements OnInit {
|
309
|
309
|
}
|
310
|
310
|
// 确认删除
|
311
|
311
|
confirmDel() {
|
312
|
|
- let that = this;
|
313
|
|
- that.btnLoading = true;
|
314
|
|
- that.mainService
|
315
|
|
- .coopData("rmvData", "group2", [that.checkedGroup["id"]])
|
|
312
|
+ this.btnLoading = true;
|
|
313
|
+ this.mainService
|
|
314
|
+ .coopData("rmvData", "group2", [this.checkedGroup["id"]])
|
316
|
315
|
.subscribe((data) => {
|
317
|
|
- that.hideDelModal();
|
318
|
|
- that.btnLoading = false;
|
319
|
|
- if (data.status == 200) {
|
320
|
|
- that.showPromptModal("删除", true, "");
|
321
|
|
- this.checkedGroup = {};
|
|
316
|
+ this.hideDelModal();
|
|
317
|
+ this.btnLoading = false;
|
|
318
|
+ if (data.data && data.data[0]) {
|
|
319
|
+ if (!data.data[0].msg) {
|
|
320
|
+ this.showPromptModal("删除", true, "");
|
|
321
|
+ this.checkedGroup = {};
|
|
322
|
+ } else {
|
|
323
|
+ this.showPromptModal("删除", false, data.data[0].msg);
|
|
324
|
+ }
|
322
|
325
|
} else {
|
323
|
|
- that.showPromptModal("删除", false, data.msg);
|
|
326
|
+ this.showPromptModal("删除", false, "");
|
324
|
327
|
}
|
325
|
328
|
});
|
326
|
329
|
}
|