|
|
|
@ -528,8 +528,8 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.route.queryParams.subscribe(paramsData=>{ |
|
|
|
|
let params = {USCI: paramsData.usci || ''} |
|
|
|
|
this.http.get("/api/Companies",{params:params}).subscribe((data:any)=>{ |
|
|
|
|
if (data.items.length) { //查询到结果时
|
|
|
|
|
sessionStorage.setItem("buildingTypeId",data.items[0].buildingTypes[0].id || ''); //建筑类型
|
|
|
|
|
if (data.items && data.items.length) { //查询到结果时
|
|
|
|
|
data.items[0].buildingTypes[0]? sessionStorage.setItem("buildingTypeId",data.items[0].buildingTypes[0].id || '') : sessionStorage.setItem("buildingTypeId",'') //建筑类型
|
|
|
|
|
sessionStorage.setItem("companyId",data.items[0].id || ''); //单位ID
|
|
|
|
|
sessionStorage.setItem("planId",paramsData.planComponentId || ''); //建筑类型
|
|
|
|
|
resolve('success') |
|
|
|
@ -570,7 +570,6 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
const token = sessionStorage.getItem('token'); // 判断 是否登录状态
|
|
|
|
|
if (token) { |
|
|
|
|
this.queryCompanyData().then(res=>{ |
|
|
|
|
// this.getAllLibrary() //获取素材库
|
|
|
|
|
this.getAllFirePlan(); // 获取所有灾情
|
|
|
|
|
this.getAllBuildings(); // 获取所有建筑
|
|
|
|
|
this.getSitePlan(); // 获取总平面图 数据
|
|
|
|
@ -579,7 +578,6 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.token.login().then(res => { |
|
|
|
|
this.queryCompanyData().then(res=>{ |
|
|
|
|
this.params.companyId = sessionStorage.getItem('companyId'); |
|
|
|
|
// this.getAllLibrary() //获取素材库
|
|
|
|
|
this.getAllFirePlan(); // 获取所有灾情
|
|
|
|
|
this.getAllBuildings(); // 获取所有建筑
|
|
|
|
|
this.getSitePlan(); // 获取总平面图 数据
|
|
|
|
|