Browse Source

基本信息对接

dev
陈鹏飞 3 years ago
parent
commit
bb8406e77b
  1. 45
      src/app/pages/left-domain/left-domain.component.html
  2. 3
      src/app/pages/left-domain/left-domain.component.scss
  3. 14
      src/app/pages/left-domain/left-domain.component.ts
  4. 2
      src/app/pages/plan/plan.component.html
  5. 34
      src/app/pages/plan/plan.component.ts

45
src/app/pages/left-domain/left-domain.component.html

@ -2,17 +2,46 @@
<div class="childCenter">
<!-- 基本信息 -->
<div class="publicBox baseInfo" *ngIf="beforeFence === 0">
<div class="publicBox baseInfo" *ngIf="beforeFence === 0 && baseInfo">
<div class="interval">
<p class="title">北京市第十九加油站<button class="titleBotton">自营</button></p>
<p class="text"><img src="../../../assets/images/baseInfo/position.png" class="textIcon">北京市朝阳区朝外大街关东店33号</p>
<p class="text"><img src="../../../assets/images/baseInfo/building.png" class="textIcon">山东省淄博市</p>
<p class="text"><img src="../../../assets/images/baseInfo/date.png" class="textIcon">2020.7.26开业</p>
<p class="text"><img src="../../../assets/images/baseInfo/road.png" class="textIcon">4车道</p>
<p class="title">{{baseInfo.stationName || '暂无数据'}}<button class="titleBotton">{{baseInfo.stationType == 0? '自营' : '加盟'}}</button></p>
<p class="text"><img src="../../../assets/images/baseInfo/position.png" class="textIcon">{{baseInfo.address || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/building.png" class="textIcon">{{baseInfo.locationName || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/date.png" class="textIcon">{{baseInfo.openTime | date:"yyyy/MM/dd HH:mm:ss" || '0:00:00'}} 开业</p>
<p class="text"><img src="../../../assets/images/baseInfo/road.png" class="textIcon">{{baseInfo.laneCount || '0'}} 车道</p>
</div>
<div class="interval">
<div class="interval" *ngIf="baseInfo.govUnitDetail && baseInfo.govUnitDetail.policeStation">
<p class="title">辖区派出所</p>
<p class="text"><img src="../../../assets/images/baseInfo/police.png" class="textIcon">{{baseInfo.govUnitDetail.policeStation.name || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/position.png" class="textIcon">{{baseInfo.govUnitDetail.policeStation.address || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/phone.png" class="textIcon">{{baseInfo.govUnitDetail.policeStation.contactInformation || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/road.png" class="textIcon">{{baseInfo.govUnitDetail.policeStation.distance || '0公里'}}</p>
</div>
<div class="interval" *ngIf="baseInfo.govUnitDetail && baseInfo.govUnitDetail.hospital">
<p class="title">辖区医院</p>
<p class="text"><img src="../../../assets/images/baseInfo/hospital.png" class="textIcon">{{baseInfo.govUnitDetail.hospital.name || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/position.png" class="textIcon">{{baseInfo.govUnitDetail.hospital.address || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/phone.png" class="textIcon">{{baseInfo.govUnitDetail.hospital.contactInformation || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/road.png" class="textIcon">{{baseInfo.govUnitDetail.hospital.distance || '0公里'}}</p>
</div>
<div class="interval" *ngIf="baseInfo.govUnitDetail && baseInfo.govUnitDetail.fireBrigade">
<p class="title">辖区消防队</p>
<p class="text"><img src="../../../assets/images/baseInfo/police.png" class="textIcon">{{baseInfo.govUnitDetail.fireBrigade.name || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/position.png" class="textIcon">{{baseInfo.govUnitDetail.fireBrigade.address || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/phone.png" class="textIcon">{{baseInfo.govUnitDetail.fireBrigade.contactInformation || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/road.png" class="textIcon">{{baseInfo.govUnitDetail.fireBrigade.distance || '0公里'}}</p>
</div>
<div class="interval baseInfoImg" *ngIf="baseInfo.businessLicenseImage">
<p class="title">营业执照</p>
<p class="textImage"><img src="../../../assets/images/upload.png"></p>
<p class="textImage"><img [src]="baseInfo.businessLicenseImage"></p>
</div>
<div class="interval baseInfoImg" *ngIf="baseInfo.dangerousChemicalLicenseImage">
<p class="title">危险化学品经营许可证</p>
<p class="textImage"><img [src]="baseInfo.dangerousChemicalLicenseImage"></p>
</div>
<div class="interval baseInfoImg" *ngIf="baseInfo.gasSellLicenseImage">
<p class="title">成品油零售经营许可证</p>
<p class="textImage"><img [src]="baseInfo.gasSellLicenseImage"></p>
</div>
</div>
<!-- 基本信息 -->

3
src/app/pages/left-domain/left-domain.component.scss

@ -45,7 +45,8 @@
}
.baseInfo{ //基本信息
.interval{ margin-top: 10px; border-bottom: 1px solid rgb(197, 226, 245); } //分隔div
.interval{ margin-top: 10px; border-bottom: 1px solid rgb(107, 117, 122); } //分隔div
.baseInfoImg{ border: none; }
p{ height: 20px; line-height: 20px; }
.titleBotton{ background: #2399FF; border-radius: 3px; height: 20px; line-height: 20px; font-size: 12px; margin-left: 5px; padding: 0 5px; border: none; outline: none; }
.text{ font-size: 14px; margin-bottom: 15px; }

14
src/app/pages/left-domain/left-domain.component.ts

@ -15,6 +15,7 @@ import { DataManager } from 'src/app/babylon/controller/data-manager';
import { ServeManager } from 'src/app/babylon/controller/serve-manager';
import { ObjectsService } from 'src/app/service/objects.service';
import Viewer from 'viewerjs';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-left-domain',
@ -23,7 +24,7 @@ import Viewer from 'viewerjs';
})
export class LeftDomainComponent implements OnInit {
constructor(private message: NzMessageService, private element: ElementRef) { }
constructor(private message: NzMessageService, private element: ElementRef, private http: HttpClient) { }
ngOnInit(): void {
this.editMode = PlanComponent.instance.editMode
@ -34,6 +35,7 @@ export class LeftDomainComponent implements OnInit {
beforeFence: number; //当前选中功能栏
FacilityList: FacilityInfoUIItem[] = []; //统计设备 list
selectFacilityId: string = null; //选中设备 ID
baseInfo: any; //基本信息
//初始化组件
initComponent(type?: number) {
@ -48,6 +50,16 @@ export class LeftDomainComponent implements OnInit {
//处理 设备data
handleFacility() {
if (this.beforeFence === 0) { //基本信息
if (!this.baseInfo) {
let params = { organizationUnitId: PlanComponent.instance.companyData.id }
this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any)=>{
data.result.govUnitDetail? data.result.govUnitDetail = JSON.parse(data.result.govUnitDetail) : null
this.baseInfo = data.result
})
}
return
}
if (this.beforeFence === 7) { //应急预案
this.selectPlanId = null
this.selectNodeId = null

2
src/app/pages/plan/plan.component.html

@ -23,7 +23,7 @@
<canvas id="center"></canvas>
<!-- 左侧子组件 -->
<div class="leftChildComponent" *ngIf="isShowChildComponent && selectFence != 4 || (!editMode && selectFence != 7)" [ngStyle]="{ 'left': isShowLeftBuilding && editMode && userMode? '15%' : null }" [ngClass]="{'publicMoveUp': selectFence === 7}">
<div class="leftChildComponent" *ngIf="isShowChildComponent && selectFence != 4" [ngStyle]="{ 'left': isShowLeftBuilding && editMode && userMode? '15%' : null }" [ngClass]="{'publicMoveUp': selectFence === 7}">
<div class="leftChildHeader">
<div><i nz-icon nzType="star" nzTheme="outline"></i></div>
<div>{{allFence[selectFence]}}<i nz-icon nzType="plus-circle" nzTheme="outline" *ngIf="selectFence === 7 && editMode" (click)="noticeChildComponent(true)"></i><i nz-icon nzType="save" nzTheme="outline" *ngIf="selectFence === 7 && editMode" (click)="noticeChildComponent(false)"></i></div>

34
src/app/pages/plan/plan.component.ts

@ -49,12 +49,14 @@ export class PlanComponent implements OnInit {
public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限
public bucketName: string = ObjectsService.getFullPath("文件路径"); //当前桶名
public isShowLoading: boolean = true; //显隐 loading加载条
public companyData: any; //当前加油站 信息
ngOnInit(): void {
PlanComponent.instance = this;
ServeManager.Init(this.buildingBISrv, this.objectsSrv);
this.canvas = this.element.nativeElement.querySelector('#center') as HTMLCanvasElement;
this.game.init(this.canvas);
this.companyData = (JSON.parse(sessionStorage.getItem('userdataOfgasstation'))).organization || {}
let editMode = sessionStorage.getItem('isGasStation')
if (editMode == 'false') {
this.editMode = true
@ -77,9 +79,9 @@ export class PlanComponent implements OnInit {
ngAfterViewInit(): void {
let simpleData: InsitutionDataSimple = new InsitutionDataSimple();
simpleData.id = 1; //来自选中的单位的信息 ,测试:1
simpleData.key = "ceshi"; //正式: id.tostring(),测试:"ceshi"
simpleData.name = "测试"; //来自选中的单位的信息 ,测试:"测试"
simpleData.id = 1; //来自选中的单位的信息 ,测试:1
simpleData.key = "ceshi"; //正式: id.tostring(),测试:"ceshi"
simpleData.name = this.companyData.displayName || "测试"; //来自选中的单位的信息 ,测试:"测试"
let has3dData = true;//是否有三维数据,来自选中单位的信息
let loginStatus = StatusManager.getStatus<LoginSatus>(LoginSatus);
@ -92,8 +94,8 @@ export class PlanComponent implements OnInit {
{
let isAdd = confirm('没有单位' + simpleData.key + ',是否进行初始化?')
if (isAdd) {
let name = simpleData.key;
let id = 2;// 单位id
let name = simpleData.name;
let id = simpleData.id;// 单位id
loginStatus.createInsitution(simpleData.key, name, id);
}
}
@ -144,7 +146,7 @@ export class PlanComponent implements OnInit {
if (type === 7) { //初始化 应急预案 data
this.isShowChildComponent && this.leftDomain? this.leftDomain.initComponent(type) : null; //手动初始化子组件
this.selectFence = type
this.isShowChildComponent = true
this.editMode? this.isShowChildComponent = true : this.isShowChildComponent = false
buildingWindow.changeJYZInfoModel(fenceType, true)
MarkWindow.instance ? this.allMarkPlanData = MarkWindow.instance.allMarkPlanData : null;
babylonEventManager.addListener(Event_GetAllMarkPlanData, (data: Event_GetAllMarkPlanData) => {
@ -434,17 +436,15 @@ export class PlanComponent implements OnInit {
//选中 底部一级节点 开启自动播放
selectChildNode(item: MarkPlanData) {
if (this.isShowChildComponent && this.leftDomain) {
if (item.nodes.length) {
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
this.nzCurrent = 0
this.beforeEmergencyPlan = item
this.updateProgressList().then(res => {
this.publicToggleNode()
})
} else {
this.message.info('暂无数据节点');
}
if (item.nodes.length) {
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
this.nzCurrent = 0
this.beforeEmergencyPlan = item
this.updateProgressList().then(res => {
this.publicToggleNode()
})
} else {
this.message.info('暂无数据节点');
}
}

Loading…
Cancel
Save