|
@@ -6,6 +6,7 @@ import { MainService } from "../../services/main.service";
|
6
|
6
|
import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
|
7
|
7
|
import { ToolService } from "../../services/tool.service";
|
8
|
8
|
import { GenerateFloorComponent } from "src/app/share/generate-floor/generate-floor.component";
|
|
9
|
+import { NzMessageService } from "ng-zorro-antd";
|
9
|
10
|
|
10
|
11
|
@Component({
|
11
|
12
|
selector: "app-building-floor",
|
|
@@ -46,6 +47,7 @@ export class BuildingFloorComponent implements OnInit {
|
46
|
47
|
private fb: FormBuilder,
|
47
|
48
|
private route: ActivatedRoute,
|
48
|
49
|
private mainService: MainService,
|
|
50
|
+ private msg: NzMessageService,
|
49
|
51
|
private tool: ToolService
|
50
|
52
|
) {}
|
51
|
53
|
|
|
@@ -144,6 +146,10 @@ export class BuildingFloorComponent implements OnInit {
|
144
|
146
|
|
145
|
147
|
// 新增/编辑楼栋模态框
|
146
|
148
|
showCoopModal(type) {
|
|
149
|
+ if (type == "edit" && !this.checkedBuilding.id) {
|
|
150
|
+ this.msg.create("warning", "请选择需要编辑的楼栋!");
|
|
151
|
+ return;
|
|
152
|
+ }
|
147
|
153
|
this.coopModal = true;
|
148
|
154
|
this.add = type == "add";
|
149
|
155
|
if (type == "edit") {
|
|
@@ -313,6 +319,10 @@ export class BuildingFloorComponent implements OnInit {
|
313
|
319
|
|
314
|
320
|
//删除楼栋
|
315
|
321
|
showDelModal() {
|
|
322
|
+ if (!this.checkedBuilding.id) {
|
|
323
|
+ this.msg.create("warning", "请选择需要删除的楼栋!");
|
|
324
|
+ return;
|
|
325
|
+ }
|
316
|
326
|
this.delModal = true;
|
317
|
327
|
}
|
318
|
328
|
hideDelModal() {
|