邵佳豪 3 years ago
parent
commit
6b3c4ec187
  1. 2
      src/app/babylon/controller/mode-manager.ts
  2. 2
      src/app/babylon/controller/scene-manager.ts
  3. 2
      src/app/babylon/tool/babylon-tool.ts
  4. 18
      src/app/babylon/view/mark-window/mark-window.ts
  5. 24
      src/app/pages/left-domain/left-domain.component.html
  6. 11
      src/app/pages/left-domain/left-domain.component.scss
  7. 33
      src/app/pages/plan/plan.component.html
  8. 17
      src/app/pages/plan/plan.component.scss
  9. 20
      src/app/pages/plan/plan.component.ts
  10. BIN
      src/assets/images/save3DPlan.png
  11. BIN
      src/assets/images/selectHeightFinding.png
  12. BIN
      src/assets/images/selectMeasuredArea.png
  13. BIN
      src/assets/images/selectRangeFinding.png

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

@ -23,7 +23,7 @@ export class ModeManager {
/**
*
*/
public static s_isMakeMode = false;
public static s_isMakeMode = true;
/**
*

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

@ -431,7 +431,7 @@ export class SceneManager {
if (ev.altKey && ev.key == 'd' && ModeManager.isDebug) {
SceneManager.showDebug = !SceneManager.showDebug;
if (SceneManager.showDebug) {
SceneManager.Instance.scene.debugLayer.show();
SceneManager.Instance.scene.debugLayer.show({ embedMode: true });
} else {
SceneManager.Instance.scene.debugLayer.hide();
}

2
src/app/babylon/tool/babylon-tool.ts

@ -433,7 +433,7 @@ export class BabylonTool {
public static limitPI(value: number) {
let result = value;
while (result < 0) {
while (result < - Math.PI) {
result += Math.PI * 2;
}

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

@ -40,9 +40,9 @@ import { WeatherTool } from "./weather-tool";
export class MarkWindow extends UIBase {
/**
* Key
*
*/
readonly c_leaveNode: string = "node_leave_";
readonly c_leaveNodeName: string = "";
static instance: MarkWindow;
@ -255,10 +255,16 @@ export class MarkWindow extends UIBase {
let copyNodeData = classToClass(this.currentMarkNodeDataCopy);//覆盖数据
copyNodeData.id = oldNodeData.id;
copyNodeData.index = oldNodeData.index;
if (newName != null && newName != this.c_leaveNode) {
if (newName != null && newName != this.c_leaveNodeName) {
copyNodeData.name = newName;
}
// copyNodeData.name = oldNodeData.name;
if (copyNodeData.name == this.c_leaveNodeName) //如果来自空节点,则保留原名
{
copyNodeData.name = oldNodeData.name;
}
console.log("记录的数据", copyNodeData.texture, this.currentMarkNodeInfo.nodeData.texture);
markPlaneData.setNodeData(nodeId, copyNodeData);//覆盖数据
this.saveAllMarkPlanData();
@ -368,8 +374,10 @@ export class MarkWindow extends UIBase {
//清空
this.currentMarkNodeDataCopy = nodeCopy;//更新备份数据
this.currentMarkNodeInfo = new MarkNodeInfo(markPlanData, this.currentMarkNodeDataCopy);
//this.currentMarkNodeDataCopy = classToClass(this.currentMarkNodeInfo.nodeData); //更新备份数据
this.updateNodeInfo(readDescribe);
PlanComponent.instance.updateBeforePlanNode();
// let instance = this;
// if (readDescribe) { //镜头移动完,开始说话
// setTimeout(() => {
@ -1022,7 +1030,7 @@ export class MarkWindow extends UIBase {
*
*/
createLeaveNode() {
let result = new MarkNodeData(0, this.c_leaveNode);
let result = new MarkNodeData(0, this.c_leaveNodeName);
return result;
}

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

@ -47,11 +47,7 @@
<!-- 基本信息 -->
<!-- 加油机 -->
<div class="publicBox refueller" *ngIf="beforeFence === 1">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, 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>
<!-- 选中样式 -->
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p>
<div class="table">
<div class="tableHeader">
@ -77,11 +73,7 @@
<!-- 加油机 -->
<!-- 油罐设备 -->
<div class="publicBox refueller" *ngIf="beforeFence === 2">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, 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>
<!-- 选中样式 -->
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p>
<div class="table">
<div class="tableHeader">
@ -119,11 +111,7 @@
<!-- 消防设施 -->
<!-- 输油管线 -->
<div class="publicBox refueller" *ngIf="beforeFence === 5">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, 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>
<!-- 选中样式 -->
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p>
<div class="table">
<div class="tableHeader" style="flex: 50%;">
@ -149,11 +137,7 @@
<!-- 输油管线 -->
<!-- 油气回收 -->
<div class="publicBox refueller" *ngIf="beforeFence === 6">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, 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>
<!-- 选中样式 -->
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p>
<div class="table">
<div class="tableHeader" style="flex: 55%;">

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

@ -33,7 +33,7 @@
}
}
.publicBox{ width: 100%; height: 100%; overflow-y: auto; padding: 0 20px; }
.publicBox{ width: 100%; height: 100%; overflow-y: auto; padding: 0 10px; }
.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; }
@ -43,9 +43,14 @@
img{ width: 120px; height: auto; max-height: 100px; display: block; margin-bottom: 10px; }
.uploadImgBox{ margin: 0; width: 50px; height: 50px; line-height: 50px; text-align: center; }
}
//选中弹窗样式
.selectFacility{
border: 1px solid rgba(114, 183, 255, 0.47843137254901963);
background: linear-gradient(180deg, rgba(35, 153, 255, 0.56) 0%, rgba(0, 13, 33, 0) 100%);
}
.baseInfo{ //基本信息
.interval{ margin-top: 10px; border-bottom: 1px solid rgb(107, 117, 122); } //分隔div
.interval{ margin-top: 10px; border-bottom: 1px solid rgb(107, 117, 122); padding: 0 10px; } //分隔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; }
@ -54,7 +59,7 @@
.textImage{ margin-bottom: 15px; height: auto; line-height: normal; img{ width: auto; height: 130px; } }
}
.refueller{ //加油机
.interval{ margin-top: 10px; position: relative; cursor: pointer; } //分隔div
.interval{ margin-top: 10px; position: relative; cursor: pointer; padding: 10px; box-sizing: content-box; } //分隔div
.positionLeftTop { position: absolute; width: 10px; height: 10px; left: -5px; top: -5px; border-left: 1px solid #fff; border-top: 1px solid #fff; } //左上角
.positionLeftBottom { position: absolute; width: 10px; height: 10px; left: -5px; bottom: -5px; border-left: 1px solid #fff; border-bottom: 1px solid #fff; } //左下角
.positionRightTop { position: absolute; width: 10px; height: 10px; right: -5px; top: -5px; border-right: 1px solid #fff; border-top: 1px solid #fff; } //右上角

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

@ -13,9 +13,12 @@
<div class="rightFence">
<img src="../../../assets/images/awningShow.png" [hidden]="!isOpenAwning" (click)="toggleHeaderAwning(false)">
<img src="../../../assets/images/awningHide.png" [hidden]="isOpenAwning" (click)="toggleHeaderAwning(true)">
<img src="../../../assets/images/rangeFinding.png" title="测量距离" (click)="toggleMeasure(1)" [ngClass]="{'selectRightTopFast': selectMeasure == 1}">
<img src="../../../assets/images/heightFinding.png" title="测量高度" (click)="toggleMeasure(2)" [ngClass]="{'selectRightTopFast': selectMeasure == 2}">
<img src="../../../assets/images/measuredArea.png" title="测量面积" (click)="toggleMeasure(3)" [ngClass]="{'selectRightTopFast': selectMeasure == 3}">
<img src="../../../assets/images/rangeFinding.png" title="测量距离" [hidden]="selectMeasure === 1" (click)="toggleMeasure(1)">
<img src="../../../assets/images/selectRangeFinding.png" title="测量距离" [hidden]="selectMeasure != 1" (click)="toggleMeasure(1)">
<img src="../../../assets/images/heightFinding.png" title="测量高度" [hidden]="selectMeasure === 2" (click)="toggleMeasure(2)">
<img src="../../../assets/images/selectHeightFinding.png" title="测量高度" [hidden]="selectMeasure != 2" (click)="toggleMeasure(2)">
<img src="../../../assets/images/measuredArea.png" title="测量面积" [hidden]="selectMeasure === 3" (click)="toggleMeasure(3)">
<img src="../../../assets/images/selectMeasuredArea.png" title="测量面积" [hidden]="selectMeasure != 3" (click)="toggleMeasure(3)">
</div>
</div>
@ -78,8 +81,9 @@
</div>
</div>
<div class="nature natureLook" *ngIf="isShowNature && (selectFence === 1 || selectFence === 2) && beforeOnePropertyData" [ngStyle]="{'top': naturePosition.top,'left': naturePosition.left}">
<div *ngIf="selectFence === 1">
<div class="natureTitle">{{beforeOnePropertyData.getPropertyData().name}}</div>
<div *ngIf="selectFence === 1" class="naturePosition">
<div class="positionLeftTop"></div><div class="positionLeftBottom"></div><div class="positionRightTop"></div><div class="positionRightBottom"></div>
<div class="natureTitle"><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().name" [disabled]="!editMode"></div>
<div class="flowPower">
<div>
<img src="../../../assets/images/flow.png">
@ -90,15 +94,16 @@
<label><p>功率</p><p><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().power" [disabled]="!editMode"></p></label>
</div>
</div>
<div class="everyNature"><span>品牌 :</span><label>{{beforeOnePropertyData.getPropertyData().brand}}</label></div>
<div class="everyNature"><span>油枪数量 :</span><label>{{beforeOnePropertyData.getPropertyData().oilGunNum}}</label></div>
<div class="everyNature"><span>油品品号 :</span><label>{{beforeOnePropertyData.getPropertyData().oilProductNo}}</label></div>
<div class="everyNature"><span>品牌 :</span><label><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().brand" [disabled]="!editMode"></label></div>
<div class="everyNature"><span>油枪数量 :</span><label><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().oilGunNum" [disabled]="!editMode"></label></div>
<div class="everyNature"><span>油品品号 :</span><label><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().oilProductNo" [disabled]="!editMode"></label></div>
</div>
<div *ngIf="selectFence === 2">
<div class="natureTitle">{{beforeOnePropertyData.getPropertyData().name}}</div>
<div class="everyNature"><span>油品品号 :</span><label>{{beforeOnePropertyData.getPropertyData().oilProductNo}}</label></div>
<div class="everyNature"><span>油罐容积 :</span><label>{{beforeOnePropertyData.getPropertyData().oilTankVolume}}</label></div>
<div class="everyNature"><span>安全容积 :</span><label>{{beforeOnePropertyData.getPropertyData().safeVolume}}</label></div>
<div *ngIf="selectFence === 2" class="naturePosition">
<div class="positionLeftTop"></div><div class="positionLeftBottom"></div><div class="positionRightTop"></div><div class="positionRightBottom"></div>
<div class="natureTitle"><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().name" [disabled]="!editMode"></div>
<div class="everyNature"><span>油品品号 :</span><label><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().oilProductNo" [disabled]="!editMode"></label></div>
<div class="everyNature"><span>油罐容积 :</span><label><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().oilTankVolume" [disabled]="!editMode"></label></div>
<div class="everyNature"><span>安全容积 :</span><label><input type="text" [(ngModel)]="beforeOnePropertyData.getPropertyData().safeVolume" [disabled]="!editMode"></label></div>
</div>
</div>
<!-- 右侧属性栏 -->
@ -141,7 +146,7 @@
</div>
<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>
<img src="../../../assets/images/save3DPlan.png" (click)="preserve(true)" title="保存">
</div>
</div>
<!-- 右上角快捷栏 -->

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

@ -187,6 +187,7 @@
right: 1%;
color: #C4E2FC;
font-size: 14px;
border: 1px solid rgba(54, 162, 255, 0.47843137254901963);
background: linear-gradient(360deg, #000D21 0%, rgba(0, 59, 110, 0.8) 100%);
.natureHeader{ text-align: right; height: 10px; .anticon{ font-size: 18px; margin: 5px 5px 0 0; } }
.natureContent{
@ -201,8 +202,16 @@
}
}
.natureLook{
padding: 20px;
color: #fff;
.naturePosition{
padding: 20px;
position: relative;
.positionLeftTop { position: absolute; width: 10px; height: 10px; left: -1px; top: -1px; border-left: 2px solid #2399FF; border-top: 2px solid #2399FF; } //左上角
.positionLeftBottom { position: absolute; width: 10px; height: 10px; left: -1px; bottom: -1px; border-left: 2px solid #2399FF; border-bottom: 2px solid #2399FF; } //左下角
.positionRightTop { position: absolute; width: 10px; height: 10px; right: -1px; top: -1px; border-right: 2px solid #2399FF; border-top: 2px solid #2399FF; } //右上角
.positionRightBottom { position: absolute; width: 10px; height: 10px; right: -1px; bottom: -1px; border-right: 2px solid #2399FF; border-bottom: 2px solid #2399FF; } //右下角
}
input{ border: none; outline: none; background-color: transparent; width: 100%; height: 100%; }
.flowPower{
width: 200px;
height: 50px;
@ -213,12 +222,13 @@
img { width: 40%; height: auto; vertical-align: top; }
label { display: inline-block; width: 60%; height: 100%; overflow: hidden; }
p{ width: 100%; height: 25px; line-height: 25px; margin: 0; }
input{ border: none; outline: none; background-color: transparent; width: 100%; height: 100%; }
}
.everyNature{
margin-bottom: 8px;
font-size: 12px;
span{ margin-right: 10px; }
display: flex;
label{ display: block; flex: 1; }
span{ display: block; width: 60px; height: 100%; }
}
}
@ -284,6 +294,7 @@
button{ background-color: #0080FF; border-radius: 5px; }
button:first-child{ margin-right: 10px; }
.anticon{ font-size: 20px; line-height: 40px; } //字体图标
img { cursor: pointer; width: 38px; height: 38px; vertical-align: top; }
}
.publicFast {
padding: 0px 3px;

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

@ -418,12 +418,8 @@ export class PlanComponent implements OnInit {
//刷新设备属性 弹窗位置
renovateDialogPosition() {
// window.setTimeout(() => {
this.naturePosition.left = `${this.beforeOnePropertyData.getHeadUIPos().x - 150}px`
this.naturePosition.top = `${this.beforeOnePropertyData.getHeadUIPos().y + 100}px`
// }, 0)
this.naturePosition.left = `${this.beforeOnePropertyData.getHeadUIPos().x - 75}px`
this.naturePosition.top = `${this.beforeOnePropertyData.getHeadUIPos().y - 150}px`
}
//上传设备 图片
@ -481,10 +477,18 @@ export class PlanComponent implements OnInit {
})
}
/**
* BeforePlanNode
*/
updateBeforePlanNode() {
this.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData
}
//选中 底部一级节点 开启自动播放
selectChildNode(item: MarkPlanData) {
if (item.nodes.length) {
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
this.isSuspend = false
this.nzCurrent = 0
this.beforeEmergencyPlan = item
this.updateProgressList().then(res => {
@ -597,6 +601,7 @@ export class PlanComponent implements OnInit {
}
this.updateTimer ? window.clearTimeout(this.updateTimer) : null //清除定时器
this.updateProgressList().then(res => {
this.isSuspend = false
this.nzCurrent = 0
this.publicToggleNode()
})
@ -695,6 +700,9 @@ export class PlanComponent implements OnInit {
ServeManager.instance.openFileSelect(file, url, (name: string, path: string) => { //上传
if (!isVideo) { //img
this.beforePlanNode.texture = ObjectsService.getFullPath(path + name)
console.log("上传图片保存数据", this.beforePlanNode);
this.initViewer()
} else { //video
this.beforePlanNode.video = ObjectsService.getFullPath(path + name)

BIN
src/assets/images/save3DPlan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/assets/images/selectHeightFinding.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/images/selectMeasuredArea.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
src/assets/images/selectRangeFinding.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Loading…
Cancel
Save