邵佳豪 3 years ago
parent
commit
41b035f216
  1. 5
      src/app/babylon/controller/inputController.ts
  2. 6
      src/app/babylon/controller/mode-manager.ts
  3. 11
      src/app/babylon/controller/scene-manager.ts
  4. 2
      src/app/babylon/controller/serve-manager.ts
  5. 5
      src/app/babylon/controller/status/status-manager.ts
  6. 6
      src/app/babylon/game.ts
  7. 9
      src/app/babylon/model/data/institution/facility/property-data/in/property-data-sygx.ts
  8. 24
      src/app/babylon/model/data/institution/facility/property-data/in/property-data-yqhsgx.ts
  9. 8
      src/app/babylon/tool/gizmo-tool.ts
  10. 9
      src/app/babylon/tool/load-tool.ts
  11. 3
      src/app/babylon/view/building-window/building-ui-item.ts
  12. 11
      src/app/babylon/view/building-window/building-window.ts
  13. 6
      src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts
  14. 59
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
  15. 1
      src/app/babylon/view/mark-window/mark-window.ts
  16. 81
      src/app/pages/left-domain/left-domain.component.html
  17. 9
      src/app/pages/left-domain/left-domain.component.scss
  18. 76
      src/app/pages/left-domain/left-domain.component.ts
  19. 5
      src/app/pages/pages.module.ts
  20. 40
      src/app/pages/plan/plan.component.html
  21. 33
      src/app/pages/plan/plan.component.scss
  22. 31
      src/app/pages/plan/plan.component.ts
  23. 13
      src/app/service/babylon/building-basic-infos.service.ts
  24. BIN
      src/assets/images/stepIcon.png
  25. 1
      src/styles.scss

5
src/app/babylon/controller/inputController.ts

@ -1304,8 +1304,11 @@ export class Keyboard {
private constructor() {
// 添加快捷键
document.addEventListener('keydown', (e: KeyboardEvent) => {
if (e.key == null) {
return;
}
let key = e.key.toLocaleLowerCase();
console.log(key);
// console.log(key);
if (key == "w" && e.shiftKey) {
this.W = true;
} else if (key == "w") {

6
src/app/babylon/controller/mode-manager.ts

@ -23,12 +23,12 @@ export class ModeManager {
/**
*
*/
public static s_isMakeMode = true;
public static s_isMakeMode = false;
/**
*
*/
public static isDebug = true;
public static isDebug = false;
@ -63,7 +63,7 @@ export class ModeManager {
*/
static set currentMode(modeType: ModeType) {
ModeManager.s_currentMode = modeType;
ModeManager.log("currentMode" + modeType);
}
//封装打印

11
src/app/babylon/controller/scene-manager.ts

@ -58,6 +58,7 @@ import { MarkData_multiArrow_CT, MarkData_multiArrow_JG } from '../model/data/ma
import { ModelInfo_mark_multiArrow } from '../model/info/mark/other/mark-plan-multi-arrow';
import { ModelInfo_mark_particle } from '../model/info/mark/other/mark-plan-particle-info';
import { FacilityPosType, ModelData_facility } from '../model/data/model-data/model-data-facility';
import { LoadTool } from '../tool/load-tool';
//场景管理器
export class SceneManager {
@ -556,7 +557,7 @@ export class SceneManager {
}
SceneManager.endLoadMesh(modelData.resPath, modelData.resName);
let box = SceneManager.importMeshSuccess(newMeshes, particleSystems, skeletons, animationGroups, modelInfo, needBox, modelData);
console.log("加载模型完成", modelData.resName);
//console.log("加载模型完成", modelData.resName);
onSuccess(newMeshes, box, modelInfo);
}, null,
function (scene: Scene, message: string, exception?: any) {
@ -568,14 +569,14 @@ export class SceneManager {
SceneManager.createModel(modelType, modelData, needBox, isNew, tag, onSuccess, onError, l_index);
console.log("重新开始加载" + l_index, modelData);
//console.log("重新开始加载" + l_index, modelData);
console.log(exception);
}
else {
modelInfo.dispose();
console.log(message);
console.log(exception);
// alert("模型加载失败: " + message + "==" + exception);
LoadTool.remove(modelData.resPath + modelData.resName);
console.log(message, exception);
alert("模型加载失败,请刷新页面重试: " + message + "==" + exception);
// alert(exception);
if (onError) {
onError(message)

2
src/app/babylon/controller/serve-manager.ts

@ -53,7 +53,7 @@ export class ServeManager {
let l_data = classToPlain(institutionData);
console.log("保存单位", l_data);
this.buildingBISrv.postBuildingBasicInfos(key, l_data)
this.buildingBISrv.postBuildingBasicInfos(key, 1, l_data)
.subscribe(data => {
console.log("保存单位成功:" + key, l_data);
if (onSuccess) {

5
src/app/babylon/controller/status/status-manager.ts

@ -54,6 +54,11 @@ export class StatusManager {
newStatus.onEnter();
return newStatus;
}
static dispose() {
StatusManager.s_allStatus = [];
StatusManager.s_currentStatus = null;
}
}

6
src/app/babylon/game.ts

@ -38,7 +38,10 @@ export class Game {
// 监听浏览器改变大小的事件,通过调用engine.resize()来自适应窗口大小
window.addEventListener("resize", function () {
Game.instance.engine.resize();
if (Game.instance != null) {
Game.instance.engine.resize();
}
});
}
@ -54,6 +57,7 @@ export class Game {
dispose() {
SceneManager.Instance.dispose();
StatusManager.dispose();
this.scene.dispose()
this.scene = null;
this.engine.dispose();

9
src/app/babylon/model/data/institution/facility/property-data/in/property-data-sygx.ts

@ -4,21 +4,22 @@ import { PropertyData_Base_IMG } from "../base/property-data-base-img";
import { PropertyData_Base } from "../property-data-base";
/**
*
* 线
*/
export class PropertyData_SYGX extends PropertyData_Base_IMG {
constructor(key: string) {
super(key, "", "", "", FacilityType.JY_SYGX);
super(key, "", "", "", FacilityType.JY_SYGX);
this.name = "未命名";
}
clone(key: string) {
let result = new PropertyData_SYGX(key);
result.name = this.name;
result.img = this.img;
result.pos = this.pos;
result.info = this.info,
result.is360 = this.is360;
result.is360 = this.is360;
return result;
}

24
src/app/babylon/model/data/institution/facility/property-data/in/property-data-yqhsgx.ts

@ -4,22 +4,28 @@ import { PropertyData_Base_IMG } from "../base/property-data-base-img";
import { PropertyData_Base } from "../property-data-base";
/**
*
* 线
*/
export class PropertyData_YQHSGX extends PropertyData_Base_IMG {
VRUType: string = ""; //油气回收系统类型
VRUPumpType: string = ""; //油气回收泵类型
constructor(key: string) {
super(key, "", "", "", FacilityType.JY_YQHSGX);
super(key, "", "", "", FacilityType.JY_YQHSGX);
this.name = "未命名";
}
clone(key: string) {
let result = new PropertyData_YQHSGX(key);
result.img = this.img;
result.pos = this.pos;
result.info = this.info,
result.is360 = this.is360;
return result;
let result = new PropertyData_YQHSGX(key);
result.name = this.name;
result.VRUType = this.VRUType;
result.VRUPumpType = this.VRUPumpType;
result.img = this.img;
result.pos = this.pos;
result.info = this.info,
result.is360 = this.is360;
return result;
}
}

8
src/app/babylon/tool/gizmo-tool.ts

@ -83,6 +83,10 @@ export class GizmoTool {
GizmoTool.onTransformUITypeChange(TransformUIType.Hide);
}
static dispose() {
}
static onBeforeRender(
eventData: Scene,
eventState: EventState
@ -194,8 +198,7 @@ export class GizmoTool {
//改变Gizmo目标
static changeGizmoAim(mesh: AbstractMesh, x: boolean = true, y = true, z = true) {
//console.trace("目标", ModeManager.currentMode);
GizmoTool.s_nowPickAim_mesh = mesh;
GizmoTool.s_gizmoManager.attachToMesh(mesh);
GizmoTool.s_gizmoManager.gizmos.positionGizmo.xGizmo.isEnabled = x;
@ -427,6 +430,7 @@ export class GizmoTool {
if (uiType == TransformUIType.Hide || !ModeManager.s_isMakeMode) { //隐藏选中框
GizmoTool.s_boundingBoxGizmo.attachedMesh = null;
}
}

9
src/app/babylon/tool/load-tool.ts

@ -1,3 +1,4 @@
import { PlanComponent } from "src/app/pages/plan/plan.component";
/**
*
@ -49,16 +50,16 @@ export class LoadTool {
*
*/
static onStart() {
console.log("开始加载");
//ThreeDimensionalHomeComponent.instance.maskLayerService.sendMessage(true)
// console.log("开始加载");
PlanComponent.instance.showLoading(true);
}
/**
*
*/
static onEnd() {
console.log("结束加载");
//ThreeDimensionalHomeComponent.instance.maskLayerService.sendMessage(false)
// console.log("结束加载");
PlanComponent.instance.showLoading(false);
}
}

3
src/app/babylon/view/building-window/building-ui-item.ts

@ -3,6 +3,7 @@
import { AbstractMesh, Mesh, TransformNode } from "@babylonjs/core";
import { ConfigManager } from "../../controller/config-manager";
import { InfoManager } from "../../controller/info-manager";
import { ModeManager, ModeType } from "../../controller/mode-manager";
import { SceneManager } from "../../controller/scene-manager";
import { IndoorStatus } from "../../controller/status/indoor-status";
import { StatusManager } from "../../controller/status/status-manager";
@ -161,7 +162,7 @@ export class BuildingUIItem {
*/
onSelect(select: boolean, animMove = true) {
if (select) {
if (this.buildingInfo.ModelInfo != null && this.buildingInfo.ModelInfo.modelBox != null) {
if (this.buildingInfo.ModelInfo != null && this.buildingInfo.ModelInfo.modelBox != null && ModeManager.currentMode == ModeType.Edit) {
GizmoTool.onPickMeshInfoObservable.notifyObservers(this.buildingInfo.ModelInfo);
//BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.buildingInfo.ModelInfo.modelBox, animMove);
}

11
src/app/babylon/view/building-window/building-window.ts

@ -128,7 +128,7 @@ export class BuildingWindow extends UIBase {
file.push(manifestFile); //临时关闭缓存文件
}
PlanComponent.instance.showLoading(true);
ServeManager.instance.uploadFile(0, file, resPath_out, (name: string, path: string, currentfile) => {
if (TsTool.stringContain(name, ".gltf")) {
if (TsTool.stringContain(name, ".gltf.manifest")) {
@ -150,6 +150,7 @@ export class BuildingWindow extends UIBase {
}
}
, () => {
PlanComponent.instance.showLoading(false);
let buildingInfo = buildingWindow.getBuildingInfo(buildingData.normalData.key);
buildingWindow.updateBuildingModel(buildingInfo, true);
// buildingWindow.three = ThreeDimensionalHomeComponent.instance;
@ -372,10 +373,10 @@ export class BuildingWindow extends UIBase {
}
}
console.log("选中建筑", modelInfo);
// console.log("选中建筑", modelInfo);
this.showJYZModules(JYZInfoMoudleType.AQSS, false);
this.showJYZModules(JYZInfoMoudleType.YQHSGX, false);
this.showJYZModules(JYZInfoMoudleType.YQHSGX, false);
this.showJYZModules(JYZInfoMoudleType.SYG, false);
this.recoverMoudleShow(null);
//this.onChangeCurrentBuildingItem(item);
@ -506,7 +507,7 @@ export class BuildingWindow extends UIBase {
if (firstType == BuildingType.Environment) {
instance.createOneBuildingItem(firstItem, 0, (uiItem, index) => {
instance.onChangeCurrentBuildingItem(uiItem, false);
uiItem.lookAt(false);
// uiItem.lookAt(false);
if (buildingDatas_Environment.length > 1) {
instance.addBuildings(BuildingType.Environment, 1);
}
@ -519,7 +520,7 @@ export class BuildingWindow extends UIBase {
else {
instance.createOneBuildingItem(firstItem, 0, (uiItem, index) => {
instance.onChangeCurrentBuildingItem(uiItem, false);
uiItem.lookAt(false);
// uiItem.lookAt(false);
if (buildingDatas_mormal.length > 1) {
instance.addBuildings(BuildingType.Normal, 1);
}

6
src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts

@ -98,10 +98,10 @@ export class FacilityInfoUIItem {
}
else {
this.facilityInfoInSceneWindow.selectFacilityItemToThree([this], false);
if (!this.facilityInfoInSceneWindow.getFacilityUIShowType(this.getType())) {
this.modelInfo.setIconEnable(select);
// if (!this.facilityInfoInSceneWindow.getFacilityUIShowType(this.getType())) {
// this.modelInfo.setIconEnable(select);
}
// }
this.facilityInfoInSceneWindow.playJYJSelectEffect(select, this.modelInfo)
}

59
src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

@ -178,31 +178,31 @@ export class FacilityInfoInSceneWindow extends UIBase {
*/
showFacilityByType(facilityType: FacilityType, show: boolean) {
if (ModeManager.currentMode == ModeType.Look) {
for (let i = 0; i < this.facilityInfoUIItemes.length; i++) {
let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility;
if (facilityType == null || facilityType == l_facilityData.facilityType) {
this.facilityInfoUIItemes[i].modelInfo.setEnable(show);
}
else if (show) {
this.facilityInfoUIItemes[i].modelInfo.setEnable(false);
}
}
// for (let i = 0; i < this.facilityInfoUIItemes.length; i++) {
// let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility;
// if (facilityType == null || facilityType == l_facilityData.facilityType) {
// this.facilityInfoUIItemes[i].modelInfo.setIconEnable(show);
// }
// }
}
else {
for (let i = 0; i < this.facilityInfoUIItemes.length; i++) {
let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility;
if (facilityType == null || facilityType == l_facilityData.facilityType) {
this.facilityInfoUIItemes[i].modelInfo.setIconEnable(show);
}
// if (ModeManager.currentMode == ModeType.Look) {
// for (let i = 0; i < this.facilityInfoUIItemes.length; i++) {
// let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility;
// if (facilityType == null || facilityType == l_facilityData.facilityType) {
// this.facilityInfoUIItemes[i].modelInfo.setEnable(show);
// }
// else if (show) {
// this.facilityInfoUIItemes[i].modelInfo.setEnable(false);
// }
// }
// // for (let i = 0; i < this.facilityInfoUIItemes.length; i++) {
// // let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility;
// // if (facilityType == null || facilityType == l_facilityData.facilityType) {
// // this.facilityInfoUIItemes[i].modelInfo.setIconEnable(show);
// // }
// // }
// }
// else {
for (let i = 0; i < this.facilityInfoUIItemes.length; i++) {
let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility;
if (facilityType == null || facilityType == l_facilityData.facilityType) {
this.facilityInfoUIItemes[i].modelInfo.setIconEnable(show);
}
}
// }
}
@ -483,7 +483,6 @@ export class FacilityInfoInSceneWindow extends UIBase {
if (this.currentSelectJYJInfo != null) {
let facilityItem: FacilityInfoUIItem = FacilityInfoInSceneWindow.instance.getFacilityItem(this.currentSelectJYJInfo);
facilityItem.onSelect(false);
// this.playJYJSelectEffect(false, this.currentSelectJYJInfo);
this.currentSelectJYJInfo = null;
}
@ -496,8 +495,6 @@ export class FacilityInfoInSceneWindow extends UIBase {
try {
let facilityInfosByType = BuildingWindow.instance.currentBuidngItem.buildingInfo.ModelInfo.facilityInfos;
for (let i = 0; i < facilityInfosByType.length; i++) {
if ((currentMoudle == null || currentMoudle == JYZInfoMoudleType.JYJ) && facilityInfosByType[i].type == FacilityType.JY_JYJ ||
(currentMoudle == null || currentMoudle == JYZInfoMoudleType.YG) && facilityInfosByType[i].type == FacilityType.JY_YG) {
@ -519,28 +516,18 @@ export class FacilityInfoInSceneWindow extends UIBase {
for (let j = 0; j < childMesh.length; j++) {
if (pickInfo.pickedMesh == childMesh[j]) {
result = allJYJInfo[i];
console.log("通过点击,找到加油机了");
break;
}
}
}
if (result != null) {
//this.playJYJSelectEffect(true, result);
if ((result.modelData as ModelData_facility).facilityType == FacilityType.JY_JYJ && currentMoudle == null) {
PlanComponent.instance.toggleHeaderFence(1);//在空状态下,点击加油机,跳转到加油机页签
}
let facilityItem: FacilityInfoUIItem = FacilityInfoInSceneWindow.instance.getFacilityItem(result);
console.log("场景中选中设备", facilityItem); //通知前端
this.selectFacilityItem(facilityItem);
// facilityItem.onSelect(true);
//FacilityInfoInSceneWindow.instance.selectFacilityItemToThree([facilityItem], true);
//console.log(facilityItem.getHeadUIPos());
}
}

1
src/app/babylon/view/mark-window/mark-window.ts

@ -189,6 +189,7 @@ export class MarkWindow extends UIBase {
*
*/
static openWindow(): MarkWindow {
console.log("进入沙盘");
if (MarkWindow.instance == null) {
SceneManager.s_markWindow = UIManager.open(MarkWindow);
}

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

@ -23,22 +23,20 @@
<div class="positionLeftTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionLeftBottom" *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" [(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">
<p>品牌</p>
<p>超大牌</p>
<p>油枪数量</p>
<p>油品品号</p>
<p>油泵类型</p>
</div>
<div class="tableContent">
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().brand"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().superBrand"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilGunNum"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilProductNo"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().brand"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilGunNum"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo"></p>
<p style="padding-left: 8px;">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editModel" [(ngModel)]="item.getPropertyData().oilPumpType">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilPumpType">
<nz-option nzValue="zxb" nzLabel="自吸泵"></nz-option>
<nz-option nzValue="qyb" nzLabel="潜油泵"></nz-option>
</nz-select>
@ -49,13 +47,13 @@
</div>
<!-- 加油机 -->
<!-- 油罐设备 -->
<div class="publicBox refueller oilTank" *ngIf="beforeFence === 2">
<div class="publicBox refueller" *ngIf="beforeFence === 2">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility(item)">
<!-- 选中样式 -->
<div class="positionLeftTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionLeftBottom" *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" [(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">
<p>油品品号</p>
@ -66,13 +64,13 @@
<p>油罐类型</p>
</div>
<div class="tableContent">
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilProductNo"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilTankVolume"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().safeVolume"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().quantity"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().tankFarm"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankVolume"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().safeVolume"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().quantity"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().tankFarm"></p>
<p style="padding-left: 8px;">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editModel" [(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="dcg" nzLabel="单层罐"></nz-option>
<nz-option nzValue="fsgc" nzLabel="防渗罐池"></nz-option>
@ -91,16 +89,63 @@
</ng-template>
</div>
<!-- 消防设施 -->
<!-- 输油管线 -->
<div class="publicBox refueller" *ngIf="beforeFence === 5">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility(item)">
<!-- 选中样式 -->
<div class="positionLeftTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionLeftBottom" *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>
<div class="propertyImage">
<p class="imgTitle" style="margin-top: 0px;">设计图纸</p>
<img src="../../../assets/images/upload.png">
<a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode"><input type="file"><i nz-icon nzType="plus" nzTheme="outline"></i></a>
</div>
</div>
</div>
<!-- 输油管线 -->
<!-- 油气回收 -->
<div class="publicBox refueller" *ngIf="beforeFence === 6">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility(item)">
<!-- 选中样式 -->
<div class="positionLeftTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionLeftBottom" *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>
<div class="table">
<div class="tableHeader" style="flex: 55%;">
<p>油气回收系统类型</p>
<p>油气回收泵类型</p>
</div>
<div class="tableContent" style="flex: 45%;">
<p style="padding-left: 8px;">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUType">
<nz-option nzValue="fss" nzLabel="分散式"></nz-option>
<nz-option nzValue="jzs" nzLabel="集中式"></nz-option>
</nz-select>
</p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUPumpType"></p>
</div>
</div>
<div class="propertyImage">
<p class="imgTitle">设计图纸</p>
<img src="../../../assets/images/upload.png">
<a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode"><input type="file"><i nz-icon nzType="plus" nzTheme="outline"></i></a>
</div>
</div>
</div>
<!-- 油气回收 -->
<!-- 处置预案 -->
<div class="publicBox disposalPlan" *ngIf="beforeFence === 7 && allMarkPlanData">
<div class="interval" *ngFor="let item of allMarkPlanData.datas;let key = index;">
<div class="publicDisposal disposalHeader">
{{item.name}}<label><i nz-icon nzType="plus-circle" nzTheme="outline" (click)="addNodePop = item.id;"></i><i nz-icon nzType="delete" nzTheme="outline" (click)="deleteDisposal(item)"></i></label>
{{item.name}}<label *ngIf="editMode"><i nz-icon nzType="plus-circle" nzTheme="outline" (click)="addNodePop = item.id;"></i><i nz-icon nzType="delete" nzTheme="outline" (click)="deleteDisposal(item)"></i></label>
</div>
<ul>
<li class="publicDisposal disposalContent" *ngFor="let items of item.nodes;let keys = index;">
<span (click)='selectNode(item,items)' [ngClass]="{'selectNode': selectNodeId == items.id && selectPlanId == item.id}">{{items.name}}</span>
<label><i nz-icon nzType="save" nzTheme="outline" (click)="saveDisposal(item.id,items.id)"></i><i nz-icon nzType="delete" nzTheme="outline" (click)="deleteDisposal(item,items)"></i></label>
<label *ngIf="editMode"><i nz-icon nzType="save" nzTheme="outline" (click)="saveDisposal(item.id,items.id)"></i><i nz-icon nzType="delete" nzTheme="outline" (click)="deleteDisposal(item,items)"></i></label>
</li>
</ul>
</div>
@ -151,7 +196,7 @@
<!-- 弹窗 -->
</div>
<div class="childBottom" *ngIf="beforeFence === 0">
<div class="childBottom" *ngIf="beforeFence === 0 && editMode">
<button (click)="editInfo()"><i nz-icon nzType="edit" nzTheme="outline"></i>编辑信息</button>
<button (click)="deriveExcel()"><i nz-icon nzType="file-excel" nzTheme="outline"></i>导出Excel</button>
</div>

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

@ -37,6 +37,12 @@
.title{ font-size: 16px; height: 20px; line-height: 20px; margin-bottom: 20px; .anticon{ margin-left: 5px; font-size: 16px; } } //头部header
.tableInput{ border: none; outline: none; background-color: transparent; width: 100%; height: 100%; }
.tableSelect{ width: 100%; height: 100%; color: #fff; }
.propertyImage{
padding-left: 15px;
img{ width: auto; max-height: 130px; display: block; margin-bottom: 10px; }
.imgTitle{ font-size: 14px; height: 20px; line-height: 20px; margin: 10px 0; }
.uploadImgBox{ margin: 0; width: 50px; height: 50px; line-height: 50px; text-align: center; }
}
.baseInfo{ //基本信息
.interval{ margin-top: 10px; border-bottom: 1px solid rgb(197, 226, 245); } //分隔div
@ -71,9 +77,6 @@
}
}
}
// .oilTank{ //油管设备
// }
.fireFacilities{ //消防设施
.treeRow{ width: 100%; display: flex; height: 30px; line-height: 30px; p:first-child{ flex: 1; }; p{ margin: 0; padding: 0; .anticon{ margin-right: 5px; font-size: 16px; } } }
}

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

@ -10,21 +10,28 @@ import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manag
import { AllMarkPlanData, MarkNodeData, MarkPlanData } from 'src/app/babylon/model/data/mark/mark-plan-data';
import { MarkWindow } from 'src/app/babylon/view/mark-window/mark-window';
import { NzMessageService } from 'ng-zorro-antd/message';
import { ModeManager, ModeType } from 'src/app/babylon/controller/mode-manager';
@Component({
selector: 'app-left-domain',
templateUrl: './left-domain.component.html',
styleUrls: ['./left-domain.component.scss']
styleUrls: ['./left-domain.component.scss', '../plan/publicPop.scss']
})
export class LeftDomainComponent implements OnInit {
constructor(private message: NzMessageService) { }
ngOnInit(): void {
let editMode = sessionStorage.getItem('isGasStation')
if (editMode == 'false') {
this.editMode = true
} else {
this.editMode = false
}
this.initComponent()
}
editModel: boolean = true; //编辑/查看模式
editMode: boolean = true; //编辑/查看模式
beforeFence: number; //当前选中功能栏
FacilityList: FacilityInfoUIItem[] = []; //统计设备 list
selectFacilityId: string = null; //选中设备 ID
@ -43,20 +50,24 @@ export class LeftDomainComponent implements OnInit {
//处理 设备data
handleFacility() {
if (this.beforeFence === 7) { //应急预案
MarkWindow.instance? this.allMarkPlanData= MarkWindow.instance.allMarkPlanData : null
EventManager.addListener(Event_GetAllMarkPlanData, (data: Event_GetAllMarkPlanData)=>{
MarkWindow.instance ? this.allMarkPlanData = MarkWindow.instance.allMarkPlanData : null
EventManager.addListener(Event_GetAllMarkPlanData, (data: Event_GetAllMarkPlanData) => {
this.allMarkPlanData = data.data
})
return
}
let list: FacilityInfoUIItem[] = []
FacilityInfoInSceneWindow.instance.facilityInfoUIItemes.forEach(item=>{
FacilityInfoInSceneWindow.instance.facilityInfoUIItemes.forEach(item => {
if (this.beforeFence === 1) { //加油机
item.getType() === "JY_JYJ"? list.push(item) : null
item.getType() === "JY_JYJ" ? list.push(item) : null
} else if (this.beforeFence === 2) { //油罐设备
item.getType() === "JY_YG"? list.push(item) : null
item.getType() === "JY_YG" ? list.push(item) : null
} else if (this.beforeFence === 3) { //消防设施
(item.getType()).slice(0,3) === "XF_"? list.push(item) : null
(item.getType()).slice(0, 3) === "XF_" ? list.push(item) : null
} else if (this.beforeFence === 5) { //输油管线
item.getType() === "JY_SYGX" ? list.push(item) : null
} else if (this.beforeFence === 6) { //油气回收
item.getType() === "JY_YQHSGX" ? list.push(item) : null
}
})
this.FacilityList = list
@ -83,8 +94,8 @@ export class LeftDomainComponent implements OnInit {
//处理 treeData
handleTreeData(list: FacilityInfoUIItem[]) {
this.treeData = []
list.forEach(item=>{
let isFind = this.treeData.find(element=>{ return (item.getType()).includes(element.key) })
list.forEach(item => {
let isFind = this.treeData.find(element => { return (item.getType()).includes(element.key) })
if (!isFind) { //不存在
if (item.getType().includes('XF_MHQ')) { //灭火器
let primaryNode = { title: '灭火器', key: 'XF_MHQ', selectable: false, expanded: true, children: [], }
@ -96,22 +107,22 @@ export class LeftDomainComponent implements OnInit {
this.treeData.push(primaryNode)
}
} else { //存在
if (item.getType().includes('XF_MHQ') && !isFind.children.find(elements=>{ return elements.key === item.getType() })) { //灭火器
if (item.getType().includes('XF_MHQ') && !isFind.children.find(elements => { return elements.key === item.getType() })) { //灭火器
let treeNode = { title: ConfigManager.getFacilityTypeName(item.getType()), key: item.getType(), selectable: false, }
isFind.children.push(treeNode)
}
}
})
//编辑模式
if (this.editModel) {
if (this.editMode) {
let isFind = this.treeData.find(item=>{ return item.key === 'XF_MHQ' })
if (!isFind) {
let primaryNode = { title: '灭火器', key: 'XF_MHQ', selectable: false, }
this.treeData.push(primaryNode)
}
for (let facility in FacilityType) {
if (facility.slice(0,3) === "XF_" && !facility.includes('XF_MHQ')) {
let isFind = this.treeData.find(item=>{ return item.key === facility })
if (facility.slice(0, 3) === "XF_" && !facility.includes('XF_MHQ')) {
let isFind = this.treeData.find(item => { return item.key === facility })
if (!isFind) {
let primaryNode = { title: ConfigManager.getFacilityTypeName(FacilityType[facility]), key: facility, selectable: false, }
this.treeData.push(primaryNode)
@ -125,8 +136,8 @@ export class LeftDomainComponent implements OnInit {
//获取设备 数量
getFacilityNum(type: string): number {
let num = 0
this.FacilityList.forEach(item=>{
item.getType().includes(type)? num = num + 1 : null
this.FacilityList.forEach(item => {
item.getType().includes(type) ? num = num + 1 : null
})
return num
}
@ -139,11 +150,11 @@ export class LeftDomainComponent implements OnInit {
FacilityInfoInSceneWindow.instance.showFacilityByType(null, false)
FacilityInfoInSceneWindow.instance.showFacilityByType(FacilityType[event.node.key], event.node.isSelected)
} else { //显示所有
this.treeData.forEach(item=>{
this.treeData.forEach(item => {
if (item.key != 'XF_MHQ') {
FacilityInfoInSceneWindow.instance.showFacilityByType(FacilityType[item.key], true)
} else {
item.children.forEach(element=>{ FacilityInfoInSceneWindow.instance.showFacilityByType(FacilityType[element.key], true) })
item.children.forEach(element => { FacilityInfoInSceneWindow.instance.showFacilityByType(FacilityType[element.key], true) })
}
})
}
@ -162,7 +173,7 @@ export class LeftDomainComponent implements OnInit {
MarkWindow.instance.createMarkPlaneData(e.name)
this.addDisposalPop = false
} else { //创建节点
MarkWindow.instance.createMarkNodeData(this.addNodePop,e.name)
MarkWindow.instance.createMarkNodeData(this.addNodePop, e.name)
this.addNodePop = null
}
}
@ -185,21 +196,28 @@ export class LeftDomainComponent implements OnInit {
if (!MarkWindow.instance.currentMarkNodeInfo) { //未选中节点
this.selectPlanId = item.id
this.selectNodeId = e.id
MarkWindow.instance.selectMarkNode(item.id,e.id)
MarkWindow.instance.selectMarkNode(item.id, e.id)
} else { //已选中节点
let isTrue = confirm('切换节点后,没保存的信息将会丢失!')
let isTrue = true;
if (ModeManager.currentMode == ModeType.Edit) {
isTrue = confirm('切换节点后,没保存的信息将会丢失!')
}
if (isTrue) {
this.selectPlanId = item.id
this.selectNodeId = e.id
MarkWindow.instance.selectMarkNode(item.id,e.id)
MarkWindow.instance.selectMarkNode(item.id, e.id)
}
}
} else if (this.selectPlanId === item.id && this.selectNodeId === e.id) { //取消选中
let isTrue = confirm('切换节点后,没保存的信息将会丢失!')
let isTrue = true;
if (ModeManager.currentMode == ModeType.Edit) {
isTrue = confirm('切换节点后,没保存的信息将会丢失!')
}
if (isTrue) {
this.selectPlanId = null
this.selectNodeId = null
MarkWindow.instance.selectMarkNode(null,null)
MarkWindow.instance.selectMarkNode(null, null)
}
}
}
@ -218,10 +236,10 @@ export class LeftDomainComponent implements OnInit {
this.saveDisposalDialog = true
} else {
if (this.selectPlanId === markPlanId && this.selectNodeId === nodeId) {
MarkWindow.instance.saveToOldNode(markPlanId,nodeId)
MarkWindow.instance.saveToOldNode(markPlanId, nodeId)
} else {
let isTrue = confirm('是否覆盖要保存的节点?')
isTrue? MarkWindow.instance.saveToOldNode(markPlanId,nodeId) : null
isTrue ? MarkWindow.instance.saveToOldNode(markPlanId, nodeId) : null
}
}
}
@ -236,7 +254,7 @@ export class LeftDomainComponent implements OnInit {
this.saveType = 2
this.allNodeList = []
MarkWindow.instance.allMarkPlanData.datas.forEach(item => {
item.nodes.forEach(element=>{
item.nodes.forEach(element => {
let node = {
id: element.id,
parrentId: item.id,
@ -255,14 +273,14 @@ export class LeftDomainComponent implements OnInit {
this.message.info('请完善表单')
return
}
MarkWindow.instance.createNewNodeAndSave(e.root.id,e.name)
MarkWindow.instance.createNewNodeAndSave(e.root.id, e.name)
this.saveType = null
} else { //保存到已有节点
if (!e.node) {
this.message.info('请完善表单')
return
}
MarkWindow.instance.saveToOldNode(e.node.parrentId,e.node.id)
MarkWindow.instance.saveToOldNode(e.node.parrentId, e.node.id)
this.saveType = null
}
}

5
src/app/pages/pages.module.ts

@ -31,6 +31,7 @@ import { NzMessageModule } from 'ng-zorro-antd/message';
import { NzSpinModule } from 'ng-zorro-antd/spin';
import { NzTreeModule } from 'ng-zorro-antd/tree';
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
import { NzStepsModule } from 'ng-zorro-antd/steps';
import { TodayWarningAdminComponent } from './today-warning-admin/today-warning-admin.component';
import { CriminalRecordsAdminComponent } from './criminal-records-admin/criminal-records-admin.component';
import { EquipmentInfoComponent } from './equipment-info/equipment-info.component';
@ -79,8 +80,8 @@ import { WarningDetailsComponent } from './today-warning-admin/warning-details/w
NzSpinModule,
NzTreeModule,
NzTreeSelectModule,
NzCollapseModule
NzCollapseModule,
NzStepsModule
],
entryComponents: [AddequipmentComponent, EditequipmentComponent,GetOutOfLineDetailsComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]

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

@ -16,10 +16,10 @@
<canvas id="center"></canvas>
<!-- 左侧子组件 -->
<div class="leftChildComponent" *ngIf="isShowChildComponent" [ngStyle]="{ 'left': isShowLeftBuilding? '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" (click)="noticeChildComponent(true)"></i><i nz-icon nzType="save" nzTheme="outline" *ngIf="selectFence === 7" (click)="noticeChildComponent(false)"></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>
<div (click)="toggleHeaderFence(selectFence)" title="关闭"><i nz-icon nzType="close-circle" nzTheme="outline"></i></div>
</div>
<div class="leftChildCenter"><app-left-domain #leftDomain></app-left-domain></div>
@ -27,8 +27,8 @@
<!-- 左侧子组件 -->
<!-- 左侧建筑栏 -->
<div class="showLeftBuilding" title="显示" *ngIf="!isShowLeftBuilding" (click)="toggleLeftBuilding(true)"><i nz-icon nzType="right" nzTheme="outline"></i></div>
<div class="leftBuilding" [ngClass]="{'isShowLeftBuilding': isShowLeftBuilding === false, 'publicMoveUp': selectFence === 7}">
<div class="showLeftBuilding" title="显示" *ngIf="!isShowLeftBuilding && editMode && userMode" (click)="toggleLeftBuilding(true)"><i nz-icon nzType="right" nzTheme="outline"></i></div>
<div class="leftBuilding" *ngIf="editMode && userMode" [ngClass]="{'isShowLeftBuilding': isShowLeftBuilding === false, 'publicMoveUp': selectFence === 7}">
<div class="hideLeft"><i nz-icon nzType="close" nzTheme="outline" title="隐藏" (click)="toggleLeftBuilding(false)"></i></div>
<div class="leftHeader">
<h1><label>模型列表</label></h1>
@ -48,7 +48,7 @@
<!-- 左侧建筑栏 -->
<!-- 右侧图标栏 -->
<div class="rightIcons" *ngIf="selectFence === 0 || selectFence === 7" [ngClass]="{'publicMoveUp': selectFence === 7}">
<div class="rightIcons" *ngIf="editMode && (selectFence === 0 || selectFence === 7)" [ngClass]="{'publicMoveUp': selectFence === 7}" [ngStyle]="{'width': selectFence === 0? '60px' : null}">
<div class="bottomCenter" id="bottomCenter">
<ng-container *ngIf="selectFence === 0">
<div class="everyIcon" (click)='selectBottomIcon(item)' *ngFor="let item of allFacilityUIItemes" [ngClass]="{'selectLeftIcon': beforeOneIcon == item.getIconID()}">
@ -72,19 +72,19 @@
<!-- 右上角快捷栏 -->
<div class="rightTopFast">
<div class="publicFast leftFunction">
<div class="publicFast leftFunction" *ngIf="editMode && userMode">
<button title="获取设备" (click)="getDevice()"></button>
<button title="清空设备" (click)="clearDevice()"></button>
</div>
<div class="publicFast leftFast">
<div class="publicFast leftFast" *ngIf="editMode && selectFence === 7">
<button title="平移" (click)="translation()" [ngClass]="{'selectRightTopFast': selectRightTopFast == 0}"></button>
<button title="旋转" (click)="revolve()" [ngClass]="{'selectRightTopFast': selectRightTopFast == 1}"></button>
<button title="缩放" (click)="scale()" [ngClass]="{'selectRightTopFast': selectRightTopFast == 2}"></button>
<button title="吸附" (click)="adsorb()" [ngClass]="{'leftFastIsTure': selectAdsorb }"></button>
<button title="切换至顶视图" (click)="toggleTopLevelView()" [ngClass]="{'leftFastIsTure': topLevelView }"></button>
<!-- <button title="吸附" (click)="adsorb()" [ngClass]="{'leftFastIsTure': selectAdsorb }"></button>
<button title="切换至顶视图" (click)="toggleTopLevelView()" [ngClass]="{'leftFastIsTure': topLevelView }"></button> -->
</div>
<div class="save">
<button (click)="preserve(false)" title="保存模块"><i nz-icon nzType="file-done" nzTheme="outline"></i></button>
<div class="save" *ngIf="editMode">
<button (click)="preserve(false)" title="保存模块" *ngIf="userMode"><i nz-icon nzType="file-done" nzTheme="outline"></i></button>
<button (click)="preserve(true)" title="保存"><i nz-icon nzType="save" nzTheme="outline"></i></button>
</div>
</div>
@ -101,7 +101,23 @@
<div class="planHeaderVideo"><a href="javascript:;" class="bottomPlanUpload" style="width: 100px;"><input type="file"><img src="../../../assets/images/uploadVideo.png"></a></div>
</div>
<div style="height: 5px;"></div>
<div class="pulicPlanDiv bottomPlanCenter"></div>
<div class="pulicPlanDiv bottomPlanCenter">
<label><button>处置预案</button></label>
<label>
<nz-steps>
<nz-step [nzIcon]="iconTemplate"></nz-step>
<nz-step [nzIcon]="iconTemplate"></nz-step>
<nz-step [nzIcon]="iconTemplate"></nz-step>
<ng-template #iconTemplate><img src="../../../assets/images/stepIcon.png"></ng-template>
</nz-steps>
</label>
<label>
<i nz-icon nzType="backward" nzTheme="outline"></i>
<i nz-icon nzType="pause" nzTheme="outline"></i>
<i nz-icon nzType="border" nzTheme="outline"></i>
<i nz-icon nzType="forward" nzTheme="outline"></i>
</label>
</div>
</div>
<!-- 底部处置预案 -->

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

@ -201,10 +201,11 @@
.bottomCenter{
width: 100%;
height: 100%;
text-align: center;
overflow-x: hidden;
overflow-y: auto;
.everyIcon {
width: 100px;
width: 60px;
height: 58px;
line-height: normal;
text-align: center;
@ -219,7 +220,7 @@
//右上角快捷栏
.rightTopFast{
width: 400px;
max-width: 400px;
height: 38px;
position: absolute;
right: 1px;
@ -292,5 +293,33 @@
}
.bottomPlanCenter{
height: 35px;
line-height: 38px;
display: flex;
overflow: hidden;
label{
display: block;
}
label:first-child{
width: 15%;
height: 100%;
text-align: center;
button {
width: 60%;
height: 30px;
line-height: 30px;
color: #23D9FF;
//padding: 0;
background: rgba(35, 153, 255, 0.41);
border: 1px solid rgba(35, 217, 255, 0.4);
}
}
label:nth-child(2){ flex: 1; overflow: hidden; img{ height: 35px; width: auto; vertical-align: top; } }
label:last-child{
width: 15%;
height: 100%;
text-align: center;
color: #fff;
.anticon{ font-size: 20px; margin: 0 10px; }
}
}
}

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

@ -3,7 +3,7 @@ import { Game } from 'src/app/babylon/game';
import { LoginSatus } from 'src/app/babylon/controller/status/login-status';
import { StatusManager } from 'src/app/babylon/controller/status/status-manager';
import { InsitutionDataSimple } from 'src/app/babylon/model/data/institution/institution-data-simple';
import { ModeManager } from 'src/app/babylon/controller/mode-manager';
import { ModeManager, ModeType } from 'src/app/babylon/controller/mode-manager';
import { ServeManager } from 'src/app/babylon/controller/serve-manager';
import { BuildingBasicInfosService } from 'src/app/service/babylon/building-basic-infos.service';
import { ObjectsService } from 'src/app/service/objects.service';
@ -38,13 +38,23 @@ export class PlanComponent implements OnInit {
public game: Game = new Game();
public beforeOneSatus; //当前 satus
public canvas: HTMLCanvasElement; //canvas 实例
public isShowLoading: boolean = false; //显隐 loading加载条
public editMode: boolean = true; //编辑/查看 模式
public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限
public isShowLoading: boolean = true; //显隐 loading加载条
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);
let editMode = sessionStorage.getItem('isGasStation')
if (editMode == 'false') {
this.editMode = true
ModeManager.currentMode = ModeType.Edit
} else {
this.editMode = false
ModeManager.currentMode = ModeType.Look
}
//监听 delete键盘事件
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
if (event.keyCode == 46) { //delete
@ -67,9 +77,9 @@ export class PlanComponent implements OnInit {
this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus);
this.beforeOneSatus.onSelectInsSuccess(find)
} else { //如果没有找到对应的单位key,则调用新建单位
let isAdd = confirm('没有单位name,是否进行初始化?')
let isAdd = confirm('没有单位' + key + ',是否进行初始化?')
if (isAdd) {
let name = 'ceshi';
let name = key;
loginStatus.createInsitution(key, name);
}
}
@ -107,7 +117,7 @@ export class PlanComponent implements OnInit {
let buildingWindow: BuildingWindow = this.beforeOneSatus.buildingWindow;
let fenceType: JYZInfoMoudleType = this.getFenceType(type)
if (this.selectFence != type) {
this.isShowChildComponent && this.leftDomain ? this.leftDomain.initComponent(type) : null; //手动初始化子组件
this.isShowChildComponent && this.leftDomain && type != 4 ? this.leftDomain.initComponent(type) : null; //手动初始化子组件
this.selectFence = type
this.isShowChildComponent = true
buildingWindow.changeJYZInfoModel(fenceType, true)
@ -365,14 +375,21 @@ export class PlanComponent implements OnInit {
this.message.info(title);
}
/**
*
* @param show
*/
showLoading(show: boolean) {
this.isShowLoading = show;
}
}
// 处置预案 所有图标
export class planIcons {
iconsName: string[] = ["灾情","内部力量","外部力量","其他"]
icons: MarkData[][] = [AllMarkData.CreateAllMarkData().marks_Disaster,AllMarkData.CreateAllMarkData().marks_Inside,AllMarkData.CreateAllMarkData().marks_Outside,AllMarkData.CreateAllMarkData().marks_Other,]
iconsName: string[] = ["灾情", "内部力量", "外部力量", "其他"]
icons: MarkData[][] = [AllMarkData.CreateAllMarkData().marks_Disaster, AllMarkData.CreateAllMarkData().marks_Inside, AllMarkData.CreateAllMarkData().marks_Outside, AllMarkData.CreateAllMarkData().marks_Other,]
}
//创建/编辑 建筑dataType
export class modelBuilding {

13
src/app/service/babylon/building-basic-infos.service.ts

@ -35,8 +35,8 @@ export class BuildingBasicInfosService {
* @param name
* @param data
*/
postBuildingBasicInfos(name: string, data: object): Observable<any> {
return this.postInfos(this.api_buildingInfo, name, data);
postBuildingBasicInfos(name: string, gasstationId: number, data: object): Observable<any> {
return this.postInfos(this.api_buildingInfo, data, { name: name, gasstationId: gasstationId });
}
/**
@ -53,7 +53,7 @@ export class BuildingBasicInfosService {
* @param data
*/
postMarkData(name: string, data: object): Observable<any> {
return this.postInfos(this.api_sandBox, name, data);
return this.postInfos(this.api_sandBox, data, { name: name });
}
@ -92,14 +92,11 @@ export class BuildingBasicInfosService {
* @param name
* @param data
*/
postInfos(api: string, name: string, data: object) {
let params = {
name: name,
};
postInfos(api: string, body: object, params = {}) {
let headers = this.headers;
return this.http.post<any>(api + this.c_post, `'${JSON.stringify(data)}'`, { headers, params })
return this.http.post<any>(api + this.c_post, `'${JSON.stringify(body)}'`, { headers, params })
.pipe(
catchError((err) => this.handleError(err))
);

BIN
src/assets/images/stepIcon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

1
src/styles.scss

@ -108,6 +108,7 @@ h1 {
.ant-tree,.ant-tree-node-content-wrapper:hover,.ant-tree-node-content-wrapper.ant-tree-node-selected { background-color: transparent; } //tree
.ant-tree-node-content-wrapper { width: 100%; } //tree
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector { color: #fff; } //select
.ant-select-single:not(.ant-select-customize-input) .ant-select-selector { border: none; border-radius: 0px; } //select
.ant-collapse,.ant-collapse-item,.ant-collapse-header,.ant-collapse-content{ border-radius: 0px; border: none; } //可展开面板

Loading…
Cancel
Save