|
|
@ -13,6 +13,7 @@ import { asBlob } from 'html-docx-js-typescript' |
|
|
|
// 要保存这个docx文件推荐引入file-saver哦,你可以用npm i -D file-saver来安装
|
|
|
|
// 要保存这个docx文件推荐引入file-saver哦,你可以用npm i -D file-saver来安装
|
|
|
|
import { saveAs } from 'file-saver' |
|
|
|
import { saveAs } from 'file-saver' |
|
|
|
import { MethodService } from 'src/app/service/method.service'; |
|
|
|
import { MethodService } from 'src/app/service/method.service'; |
|
|
|
|
|
|
|
import * as moment from 'moment'; |
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-unit', |
|
|
|
selector: 'app-unit', |
|
|
|
templateUrl: './unit.component.html', |
|
|
|
templateUrl: './unit.component.html', |
|
|
@ -27,6 +28,7 @@ export class UnitComponent implements OnInit { |
|
|
|
PageNumber = 1 |
|
|
|
PageNumber = 1 |
|
|
|
PageSize = 10 |
|
|
|
PageSize = 10 |
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
|
|
|
|
this.getBuildingTypes() |
|
|
|
this.getBuildingTypes() |
|
|
|
this.getAllOrganization() |
|
|
|
this.getAllOrganization() |
|
|
|
} |
|
|
|
} |
|
|
@ -76,11 +78,15 @@ export class UnitComponent implements OnInit { |
|
|
|
unit: '', |
|
|
|
unit: '', |
|
|
|
uniytype: '', |
|
|
|
uniytype: '', |
|
|
|
or: JSON.parse(sessionStorage.getItem('userData')).organizationId, |
|
|
|
or: JSON.parse(sessionStorage.getItem('userData')).organizationId, |
|
|
|
property: '' |
|
|
|
property: '', |
|
|
|
|
|
|
|
date:null |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
aaa(){ |
|
|
|
|
|
|
|
console.log(this.searchValue.date); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
nzLoading = false |
|
|
|
nzLoading = false |
|
|
|
totalCount |
|
|
|
totalCount |
|
|
|
|
|
|
|
|
|
|
@ -92,6 +98,8 @@ export class UnitComponent implements OnInit { |
|
|
|
BuildingTypeId: this.searchValue.uniytype, |
|
|
|
BuildingTypeId: this.searchValue.uniytype, |
|
|
|
OrganizationId: this.searchValue.or ? this.searchValue.or : OrganizationId, |
|
|
|
OrganizationId: this.searchValue.or ? this.searchValue.or : OrganizationId, |
|
|
|
CompanyLevel: this.searchValue.property, |
|
|
|
CompanyLevel: this.searchValue.property, |
|
|
|
|
|
|
|
PlanCheckStartTime:this.searchValue.date&&JSON.stringify(this.searchValue.date)!="[]"?moment(this.searchValue.date[0]).format('yyyy-MM-DD') + ' 00:00:00':null, |
|
|
|
|
|
|
|
PlanCheckEndTime:this.searchValue.date&&JSON.stringify(this.searchValue.date)!="[]"?moment(this.searchValue.date[1]).format('yyyy-MM-DD') + ' 23:59:59':null, |
|
|
|
PageNumber: this.PageNumber, |
|
|
|
PageNumber: this.PageNumber, |
|
|
|
PageSize: this.PageSize |
|
|
|
PageSize: this.PageSize |
|
|
|
} |
|
|
|
} |
|
|
@ -99,9 +107,14 @@ export class UnitComponent implements OnInit { |
|
|
|
params: params |
|
|
|
params: params |
|
|
|
}).subscribe((data: any) => { |
|
|
|
}).subscribe((data: any) => { |
|
|
|
this.nzLoading = false |
|
|
|
this.nzLoading = false |
|
|
|
// console.log(data);
|
|
|
|
console.log(data); |
|
|
|
this.totalCount = data.totalCount |
|
|
|
this.totalCount = data.totalCount |
|
|
|
this.listOfData = data.items |
|
|
|
this.listOfData = data.items |
|
|
|
|
|
|
|
this.listOfData.forEach(element => { |
|
|
|
|
|
|
|
if(element.lastPlanTaskTime){ |
|
|
|
|
|
|
|
element.lastPlanTaskTime=moment(element.lastPlanTaskTime).format('yyyy-MM-DD HH:ss') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
this.listOfData = [...this.listOfData] |
|
|
|
this.listOfData = [...this.listOfData] |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@ -119,7 +132,8 @@ export class UnitComponent implements OnInit { |
|
|
|
unit: '', |
|
|
|
unit: '', |
|
|
|
uniytype: '', |
|
|
|
uniytype: '', |
|
|
|
or: JSON.parse(sessionStorage.getItem('userData')).organizationId, |
|
|
|
or: JSON.parse(sessionStorage.getItem('userData')).organizationId, |
|
|
|
property: '' |
|
|
|
property: '', |
|
|
|
|
|
|
|
date:null |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.getCompanies() |
|
|
|
this.getCompanies() |
|
|
|
} |
|
|
|
} |
|
|
|