|
@@ -34,6 +34,7 @@ export class FormManagementComponent implements OnInit {
|
34
|
34
|
this.getList();
|
35
|
35
|
this.coopBtns = this.tool.initCoopBtns(this.route);
|
36
|
36
|
this.getTaskTypes();
|
|
37
|
+ this.getBuildings();
|
37
|
38
|
}
|
38
|
39
|
|
39
|
40
|
// 初始化权限按钮
|
|
@@ -52,6 +53,7 @@ export class FormManagementComponent implements OnInit {
|
52
|
53
|
idx: this.formManagementListPageIndex - 1,
|
53
|
54
|
sum: this.formManagementListPageSize,
|
54
|
55
|
workOrder: {
|
|
56
|
+ buildingIds: this.buildings.filter(v => v.checked).map(v => v.value).toString() || undefined,
|
55
|
57
|
hosId: this.hosId,
|
56
|
58
|
gdState: {id: "433"},
|
57
|
59
|
serTaskTypes: this.tasktypeId,
|
|
@@ -114,11 +116,40 @@ export class FormManagementComponent implements OnInit {
|
114
|
116
|
});
|
115
|
117
|
}
|
116
|
118
|
|
|
119
|
+ //获取楼栋
|
|
120
|
+ buildings:any[] = [];
|
|
121
|
+ getBuildings() {
|
|
122
|
+ let postData:any = {
|
|
123
|
+ idx: 0,
|
|
124
|
+ sum: 9999,
|
|
125
|
+ building: {
|
|
126
|
+ hosId: this.hosId
|
|
127
|
+ }
|
|
128
|
+ };
|
|
129
|
+ this.isLoading = true;
|
|
130
|
+ this.mainService
|
|
131
|
+ .getFetchDataList("simple/data", "building", postData)
|
|
132
|
+ .subscribe((result) => {
|
|
133
|
+ this.isLoading = false;
|
|
134
|
+ if (result.status == 200) {
|
|
135
|
+ let buildings = result.list || [];
|
|
136
|
+ this.buildings = buildings.map(v => ({
|
|
137
|
+ value: v.id,
|
|
138
|
+ label: v.buildingName,
|
|
139
|
+ checked: false,
|
|
140
|
+ }))
|
|
141
|
+ }
|
|
142
|
+ });
|
|
143
|
+ }
|
|
144
|
+
|
117
|
145
|
// 切换右侧菜单Tab
|
118
|
146
|
fixedTab: string = "";
|
119
|
147
|
checkFixedTab(type: string) {
|
120
|
148
|
this.dateRange = [startOfHour(subDays(new Date().setHours(9), 1)), startOfHour(new Date().setHours(9))];
|
121
|
149
|
this.tasktypeId = undefined;
|
|
150
|
+ this.buildings.forEach(v => {
|
|
151
|
+ v.checked = false;
|
|
152
|
+ });
|
122
|
153
|
this.fixedTab = type;
|
123
|
154
|
}
|
124
|
155
|
|