|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: sueRimn |
|
|
|
|
* @Date: 2021-06-16 13:56:54 |
|
|
|
|
* @LastEditors: sueRimn |
|
|
|
|
* @LastEditTime: 2021-06-16 16:26:51 |
|
|
|
|
* @LastEditTime: 2021-06-17 10:01:26 |
|
|
|
|
*/ |
|
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
@ -19,29 +19,36 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
constructor(private http: HttpClient, private route: ActivatedRoute) { } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
planName: string //预案名称
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.planName = this.route.snapshot.queryParams.planName |
|
|
|
|
this.getTemplateData() |
|
|
|
|
this.getUnitData() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获得单位信息
|
|
|
|
|
getUnitData(){ |
|
|
|
|
// let paramsdata:any = {
|
|
|
|
|
// Name: this.route.snapshot.queryParams.unitId || '',
|
|
|
|
|
// }
|
|
|
|
|
// this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{
|
|
|
|
|
// this.allKeyUnitInfo = data
|
|
|
|
|
// data.items.forEach( (item,index) => {
|
|
|
|
|
// item.integrity = this.wanzhengduArr[index]
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
unitData:any |
|
|
|
|
getUnitData() { |
|
|
|
|
let paramsdata: any = { |
|
|
|
|
Name: this.route.snapshot.queryParams.unitName || '', |
|
|
|
|
} |
|
|
|
|
this.http.get("/api/Companies", { params: paramsdata }).subscribe((data: any) => { |
|
|
|
|
data.items.forEach(element => { |
|
|
|
|
if (element.id == this.route.snapshot.queryParams.companyId) { |
|
|
|
|
this.unitData = element |
|
|
|
|
console.log('单位列表信息', this.unitData) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selectedItem:string = '封面' |
|
|
|
|
clickTitleItem(item){ |
|
|
|
|
//console.log(item,key)
|
|
|
|
|
selectedItem: string = '封面' |
|
|
|
|
clickTitleItem(item) { |
|
|
|
|
item == '封面' ? this.selectedItem = '封面' : this.selectedItem = item.groupName |
|
|
|
|
} |
|
|
|
|
planTemplateData: any |
|
|
|
@ -60,3 +67,14 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface unitData { |
|
|
|
|
name: string, |
|
|
|
|
organizationName: number, |
|
|
|
|
buildingTypes: buildingTypes[] |
|
|
|
|
} |
|
|
|
|
export interface buildingTypes { |
|
|
|
|
id: string, |
|
|
|
|
name: string, |
|
|
|
|
} |
|
|
|
|