刘向辉 3 years ago
parent
commit
72c99fec42
  1. 18
      src/app/pages/left-domain/left-domain.component.html
  2. 19
      src/app/pages/left-domain/left-domain.component.ts
  3. 2
      src/app/pages/oil-station-info/oil-station-info.component.html
  4. 4
      src/app/pages/plan/plan.component.html
  5. 1
      src/app/pages/plan/plan.component.scss
  6. 84
      src/app/pages/plan/plan.component.ts
  7. 5
      src/styles.scss

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

@ -101,8 +101,7 @@
<p style="padding-left: 8px;"> <p style="padding-left: 8px;">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankType"> <nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankType">
<nz-option nzValue="scg" nzLabel="双层罐"></nz-option> <nz-option nzValue="scg" nzLabel="双层罐"></nz-option>
<nz-option nzValue="dcg" nzLabel="单层罐"></nz-option> <nz-option nzValue="dcg" nzLabel="单层罐+防渗罐池"></nz-option>
<nz-option nzValue="fsgc" nzLabel="防渗罐池"></nz-option>
</nz-select> </nz-select>
</p> </p>
</div> </div>
@ -126,8 +125,18 @@
<div class="positionRightTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionRightBottom" *ngIf="selectFacilityId === item.getID()"></div> <div class="positionRightTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionRightBottom" *ngIf="selectFacilityId === item.getID()"></div>
<!-- 选中样式 --> <!-- 选中样式 -->
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p> <p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p>
<div class="table">
<div class="tableHeader" style="flex: 50%;">
<p>连接的加油机</p>
<p>连接的油罐</p>
</div>
<div class="tableContent" style="flex: 50%;">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkJYJ"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkYG"></p>
</div>
</div>
<div class="propertyImage" id="pipelineViewer{{item.getID()}}"> <div class="propertyImage" id="pipelineViewer{{item.getID()}}">
<p class="imgTitle" style="margin-top: 0px;">设计图纸</p> <p class="imgTitle">设计图纸</p>
<img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img"> <img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img">
<a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a> <a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a>
</div> </div>
@ -186,6 +195,9 @@
</div> </div>
<!-- 处置预案 --> <!-- 处置预案 -->
<!-- 弹窗 --> <!-- 弹窗 -->
<nz-modal nzClassName="baseInfoDialog" [(nzVisible)]="isShowBaseDialog" nzFooter="null" (nzOnCancel)="closeBaseInfoDialog()" nzWidth="70%">
<app-oil-station-info *ngIf="isShowBaseDialog"></app-oil-station-info>
</nz-modal>
<nz-modal [(nzVisible)]="addDisposalPop || addNodePop" nzTitle="创建预案/节点" (nzOnCancel)="addDisposalPop = false; addNodePop = null;" (nzOnOk)="addDisposal(form.value)" [nzOkDisabled]='nodeName.invalid'> <nz-modal [(nzVisible)]="addDisposalPop || addNodePop" nzTitle="创建预案/节点" (nzOnCancel)="addDisposalPop = false; addNodePop = null;" (nzOnOk)="addDisposal(form.value)" [nzOkDisabled]='nodeName.invalid'>
<form nz-form #form='ngForm'> <form nz-form #form='ngForm'>
<nz-form-item> <nz-form-item>

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

@ -36,6 +36,7 @@ export class LeftDomainComponent implements OnInit {
FacilityList: FacilityInfoUIItem[] = []; //统计设备 list FacilityList: FacilityInfoUIItem[] = []; //统计设备 list
selectFacilityId: string = null; //选中设备 ID selectFacilityId: string = null; //选中设备 ID
baseInfo: any; //基本信息 baseInfo: any; //基本信息
isShowBaseDialog: boolean = false; //显隐 编辑信息/导出Excel 弹窗
//初始化组件 //初始化组件
initComponent(type?: number) { initComponent(type?: number) {
@ -351,17 +352,29 @@ export class LeftDomainComponent implements OnInit {
} }
} }
originalData: any; //sessionStorage 原始数据
//编辑信息 //编辑信息
editInfo() { editInfo() {
this.originalData = sessionStorage.getItem('userdata')
let userdata = { organization: PlanComponent.instance.companyData, hideCloseBtn: true }
sessionStorage.setItem('userdata', JSON.stringify(userdata))
this.isShowBaseDialog = true
} }
//导出Excel //导出Excel
deriveExcel() { deriveExcel() {
this.originalData = sessionStorage.getItem('userdata')
let userdata = { organization: PlanComponent.instance.companyData, hideCloseBtn: true }
sessionStorage.setItem('userdata', JSON.stringify(userdata))
this.isShowBaseDialog = true
} }
//关闭 编辑信息/导出Excel 弹窗
closeBaseInfoDialog() {
sessionStorage.setItem('userdata', this.originalData)
this.isShowBaseDialog = false
}
} }

2
src/app/pages/oil-station-info/oil-station-info.component.html

@ -372,7 +372,7 @@
</form> </form>
</div> </div>
</div> </div>
<div class="backbtn"> <div class="backbtn" *ngIf="userdata && !userdata.hideCloseBtn">
<button nz-button (click)="goback()">返回</button> <button nz-button (click)="goback()">返回</button>
</div> </div>
</div> </div>

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

@ -57,6 +57,10 @@
<!-- 右侧属性栏 --> <!-- 右侧属性栏 -->
<div class="nature" *ngIf="isShowNature && selectFence === 0 && beforeOnePropertyData && beforeOnePropertyData.getPropertyData()" [ngStyle]="{'right': editMode? '5%' : null}"> <div class="nature" *ngIf="isShowNature && selectFence === 0 && beforeOnePropertyData && beforeOnePropertyData.getPropertyData()" [ngStyle]="{'right': editMode? '5%' : null}">
<div class="natureHeader"><i nz-icon nzType="close-circle" nzTheme="outline" title="关闭" (click)="isShowNature = false;"></i></div> <div class="natureHeader"><i nz-icon nzType="close-circle" nzTheme="outline" title="关闭" (click)="isShowNature = false;"></i></div>
<div class="natureContent" *ngIf="beforeOnePropertyData.getPropertyData().textDirection != undefined">
<div class="natureTitle">方向</div>
<div><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().textDirection" [disabled]="!editMode"></div>
</div>
<div class="natureContent" *ngIf="beforeOnePropertyData.getPropertyData().info != undefined"> <div class="natureContent" *ngIf="beforeOnePropertyData.getPropertyData().info != undefined">
<div class="natureTitle">详情</div> <div class="natureTitle">详情</div>
<div><textarea [(ngModel)]="beforeOnePropertyData.getPropertyData().info" [disabled]="!editMode"></textarea></div> <div><textarea [(ngModel)]="beforeOnePropertyData.getPropertyData().info" [disabled]="!editMode"></textarea></div>

1
src/app/pages/plan/plan.component.scss

@ -194,6 +194,7 @@
padding: 0 20px; padding: 0 20px;
margin-bottom: 5px; margin-bottom: 5px;
.natureTitle{ margin-bottom: 5px; height: 20px; line-height: 20px; } .natureTitle{ margin-bottom: 5px; height: 20px; line-height: 20px; }
input{ width: 100%; height: 28px; background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; padding: 0; resize: none; outline: none; }
textarea{ width: 100%; height: 75px; background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; padding: 0; resize: none; outline: none; } textarea{ width: 100%; height: 75px; background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; padding: 0; resize: none; outline: none; }
.natureImg{ margin-bottom: 5px; img{ width: auto; height: auto; max-height: 120px; } } .natureImg{ margin-bottom: 5px; img{ width: auto; height: auto; max-height: 120px; } }
.natureUpload{ margin: 0; text-align: center; width: 50px; height: 50px; line-height: 50px; } .natureUpload{ margin: 0; text-align: center; width: 50px; height: 50px; line-height: 50px; }

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

@ -29,6 +29,7 @@ import { EventManager as babylonEventManager } from 'src/app/babylon/controller/
import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manager/events/event-get-markplandata-success'; import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manager/events/event-get-markplandata-success';
import { FacilityInfoInSceneWindow } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window'; import { FacilityInfoInSceneWindow } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window';
import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-facility'; import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-facility';
import { HttpClient } from '@angular/common/http';
@ -39,7 +40,7 @@ import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-f
}) })
export class PlanComponent implements OnInit { export class PlanComponent implements OnInit {
constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager, private message: NzMessageService) { } constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager, private message: NzMessageService, private http: HttpClient) { }
static instance: PlanComponent; static instance: PlanComponent;
public game: Game = new Game(); public game: Game = new Game();
@ -49,7 +50,7 @@ export class PlanComponent implements OnInit {
public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限 public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限
public bucketName: string = ObjectsService.getFullPath("文件路径"); //当前桶名 public bucketName: string = ObjectsService.getFullPath("文件路径"); //当前桶名
public isShowLoading: boolean = true; //显隐 loading加载条 public isShowLoading: boolean = true; //显隐 loading加载条
public companyData: any; //当前加油站 信息 public companyData: any; //当前加油站所属组织机构 data
ngOnInit(): void { ngOnInit(): void {
PlanComponent.instance = this; PlanComponent.instance = this;
@ -78,43 +79,46 @@ export class PlanComponent implements OnInit {
} }
ngAfterViewInit(): void { ngAfterViewInit(): void {
let simpleData: InsitutionDataSimple = new InsitutionDataSimple(); this.getGasStationBaseInfo().then((res: any)=>{ //获取单位 基本信息
simpleData.id = 1; //来自选中的单位的信息 ,测试:1 console.log(res,"当前加油站信息")
simpleData.key = "ceshi"; //正式: id.tostring(),测试:"ceshi" let simpleData: InsitutionDataSimple = new InsitutionDataSimple();
simpleData.name = this.companyData.displayName || "测试"; //来自选中的单位的信息 ,测试:"测试" simpleData.id = res.id || 1; //来自选中的单位的信息 ,测试:1
simpleData.key = `${res.id}` || "ceshi"; //测试:"ceshi"
let has3dData = true;//是否有三维数据,来自选中单位的信息 simpleData.name = res.stationName || "测试"; //来自选中的单位的信息 ,测试:"测试"
let loginStatus = StatusManager.getStatus<LoginSatus>(LoginSatus);
if (ModeManager.institutionDemoKey == ModeManager.c_demoKey_null) { //无指定测试单位,则为正式启动,根据当前单位key寻找 let has3dData = res.hasBuildingInfo; //是否有三维数据,来自选中单位的信息
if (has3dData) { //如果已经有三维数据,直接进入 let loginStatus = StatusManager.getStatus<LoginSatus>(LoginSatus);
this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus); if (ModeManager.institutionDemoKey == ModeManager.c_demoKey_null) { //无指定测试单位,则为正式启动,根据当前单位key寻找
this.beforeOneSatus.onSelectInsSuccess(simpleData) if (has3dData) { //如果已经有三维数据,直接进入
} else { //如果没有三维数据 this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus);
if (ModeManager.s_isMakeMode) //内部制作模式下,询问新建 this.beforeOneSatus.onSelectInsSuccess(simpleData)
{ } else { //如果没有三维数据
let isAdd = confirm('没有单位' + simpleData.key + ',是否进行初始化?') if (ModeManager.s_isMakeMode) //内部制作模式下,询问新建
if (isAdd) { {
let name = simpleData.name; let isAdd = confirm('没有单位' + simpleData.key + ',是否进行初始化?')
let id = simpleData.id;// 单位id if (isAdd) {
loginStatus.createInsitution(simpleData.key, name, id); let name = simpleData.name;
let id = simpleData.id;// 单位id
loginStatus.createInsitution(simpleData.key, name, id);
}
}
else //非内部制作模式,不开启
{
console.log("没有单位" + simpleData.key);
} }
} }
else //非内部制作模式,不开启
{
console.log("没有单位" + simpleData.key);
}
}
} else {
//let find = data.find(item => { return item.key === ModeManager.institutionDemoKey })
let find = simpleData; //测试单位
if (find) {
sessionStorage.setItem('unitId', find.key)
this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus);
this.beforeOneSatus.onSelectInsSuccess(find)
} else { } else {
//this.modelInit(data) //开发模式 选择单位 弹窗 //let find = data.find(item => { return item.key === ModeManager.institutionDemoKey })
let find = simpleData; //测试单位
if (find) {
sessionStorage.setItem('unitId', find.key)
this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus);
this.beforeOneSatus.onSelectInsSuccess(find)
} else {
//this.modelInit(data) //开发模式 选择单位 弹窗
}
} }
} })
} }
ngOnDestroy(): void { //组件销毁前 销毁canvas ngOnDestroy(): void { //组件销毁前 销毁canvas
@ -122,6 +126,16 @@ export class PlanComponent implements OnInit {
this.game = null; this.game = null;
} }
//获取 当前加油站基本信息
getGasStationBaseInfo() {
return new Promise((resolve, reject) => {
let params = { organizationUnitId: this.companyData.id }
this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any)=>{
resolve(data.result)
})
})
}
//开发模式 选择单位 弹窗 //开发模式 选择单位 弹窗
modelInit(InsList) { } modelInit(InsList) { }

5
src/styles.scss

@ -125,6 +125,11 @@ h1 {
.ant-input { background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; } .ant-input { background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; }
textarea { resize: none; outline: none; } textarea { resize: none; outline: none; }
} }
.baseInfoDialog{
height: 80%;
.ant-modal-footer { padding: 0; }
.ant-modal-body,.ant-modal-content { height: 100%; background: radial-gradient(closest-side at 50% 55%, #004988 0%, #00122D 100%); }
}
.videoDialog{ .videoDialog{
height: 80%; height: 80%;
.ant-modal-footer { padding: 0; } .ant-modal-footer { padding: 0; }

Loading…
Cancel
Save