From 4d471c5e3aab21e4bd194eecc28ef8f33908152f Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 10 Nov 2020 15:10:20 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E4=BF=AE=E6=94=B9=E5=A4=84?= =?UTF-8?q?=E7=BD=AE=E9=A2=84=E6=A1=88=E9=A1=B5=E9=9D=A2=E4=BB=8E=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E8=8E=B7=E5=8F=96=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app-routing.module.ts | 4 +- .../collection-tools.component.ts | 51 +++++++++++++----- src/assets/images/处置预案.png | Bin 4079 -> 3483 bytes 3 files changed, 40 insertions(+), 15 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 58aab5e..9e471f0 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -27,9 +27,9 @@ const routes: Routes = [ ] }, {path:'plan', component:planComponent}, //平面图 - {path:'similarPlans/details', component:CollectionToolsComponent}, //预案甄选 + {path:'similarPlans', component:CollectionToolsComponent}, //预案甄选 {path:'planAssistance', component:PlanAssistanceComponent}, //预案赋能 - {path:'similarPlans', component:SimilarPlansComponent}, //预案甄选 表格 + // {path:'similarPlans', component:SimilarPlansComponent}, //预案甄选 表格 ]; @NgModule({ diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index a984150..1f5f66f 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -11,6 +11,7 @@ import {CanvasShareDataService,GameMode} from '../../canvas-share-data.service' import {CacheTokenService} from '../../http-interceptors/cache-token.service' import Viewer from 'viewerjs'; import { saveOneDialog } from './save'; +import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'app-collection-tools', templateUrl: './collection-tools.component.html', @@ -20,7 +21,7 @@ export class CollectionToolsComponent implements OnInit { @ViewChild('canvas',{static: true}) canvas:WorkingAreaComponent; //父组件中获得子组件的引用 - constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private element: ElementRef,public canvasData: CanvasShareDataService,public token: CacheTokenService) { } + constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private element: ElementRef,public canvasData: CanvasShareDataService,public token: CacheTokenService,public route: ActivatedRoute) { } // tree配置 private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数 return { @@ -520,6 +521,26 @@ export class CollectionToolsComponent implements OnInit { } + //根据科达 url地址 统一社会信用代码 查询单位信息 + queryCompanyData () { + return new Promise ((resolve,reject)=>{ + + 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 || ''); //建筑类型 + sessionStorage.setItem("companyId",data.items[0].id || ''); //单位ID + sessionStorage.setItem("planId",paramsData.planId || ''); //建筑类型 + resolve('success') + } else { //未查询到结果时 + reject('beDefeated') + } + }) //http + + }) //route + }) //Promise + } //右侧属性和消防要素切换 isProperty = true rightSwitch(type){ @@ -548,17 +569,21 @@ export class CollectionToolsComponent implements OnInit { ngAfterViewInit(): void { const token = sessionStorage.getItem('token'); // 判断 是否登录状态 if (token) { - // this.getAllLibrary() //获取素材库 - this.getAllBuildings(); // 获取所有建筑 - this.getAllFirePlan(); // 获取所有灾情 - this.getSitePlan(); // 获取总平面图 数据 - } else { - this.token.login().then(res => { - this.params.companyId = sessionStorage.getItem('companyId'); + this.queryCompanyData().then(res=>{ // this.getAllLibrary() //获取素材库 - this.getAllBuildings(); // 获取所有建筑 this.getAllFirePlan(); // 获取所有灾情 - this.getSitePlan(); //获取总平面图 数据 + this.getAllBuildings(); // 获取所有建筑 + this.getSitePlan(); // 获取总平面图 数据 + }) + } else { + this.token.login().then(res => { + this.queryCompanyData().then(res=>{ + this.params.companyId = sessionStorage.getItem('companyId'); + // this.getAllLibrary() //获取素材库 + this.getAllFirePlan(); // 获取所有灾情 + this.getAllBuildings(); // 获取所有建筑 + this.getSitePlan(); // 获取总平面图 数据 + }) }); } // 监听canvas组件选中素材事件 @@ -2030,14 +2055,14 @@ export class CollectionToolsComponent implements OnInit { }) export class CreateBuilding { - constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } + constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public route: ActivatedRoute) { } allBuildingType:any//所有的建筑类型 selected:any; //选中的建筑 ngOnInit(): void { this.getAllBuildingType() } - + //获得所有单位类型 getAllBuildingType(){ this.http.get("/api/BuildingTypes/Simple").subscribe(data=>{ @@ -2090,7 +2115,7 @@ export class EditBuilding { allBuildingType:any//所有的建筑类型 ngOnInit(): void { - this.getAllBuildingType() + // this.getAllBuildingType() } getAllBuildingType(){ diff --git a/src/assets/images/处置预案.png b/src/assets/images/处置预案.png index 760cb582a87aa4c49b2eee950791f3d7a9fb05f4..4bcec0aaf049642717536496e157fba6625afc2b 100644 GIT binary patch delta 3482 zcmV;L4Q2B0ADbJHBYzEINklS2CN|iPKht;v4PGE78z813 zDi%f%po$~dLZmbTHBtCTwX}FQM4_sqMoJ?R3Dgi$g(&2s8`2UPl$62-GDLA2R2*S8 z&_GME1ICPvjg39F$Da4@S=~GH-n=nmW37<-Pmg5D^X|FloqzAINBAfF!!- z0B)%fn0X3-3IGR)$V#POW-b8WzlFLF6H(_aq<70mF>|gWb~FA`8ew37OVZQ18GxyX z2tn0EbaXWCEZg2ipw$4f0fY=g6pn^#+fvcJ^Oi{psx=IHMbYc-=IpH7P(KdZoy0iK zgyrMFg|wp2rhlcS9ap%~Xmq}#m(lJLnZ*#ih8PQ2&>FU^%c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