diff --git a/package.json b/package.json index bdebe94..8bc2e9f 100644 --- a/package.json +++ b/package.json @@ -80,4 +80,4 @@ "tslint": "~5.15.0", "typescript": "~3.7.5" } -} +} \ No newline at end of file diff --git a/src/app/babylon/controller/mode-manager.ts b/src/app/babylon/controller/mode-manager.ts index 146f793..49ab662 100644 --- a/src/app/babylon/controller/mode-manager.ts +++ b/src/app/babylon/controller/mode-manager.ts @@ -23,7 +23,7 @@ export class ModeManager { /** * 制作模式代表内部编辑人员,可新增单位、上传模型,查看模式代表交付的模式 */ - public static s_isMakeMode = false; + public static s_isMakeMode = true; /** * 调试模式 diff --git a/src/app/babylon/controller/scene-manager.ts b/src/app/babylon/controller/scene-manager.ts index b78552e..c488456 100644 --- a/src/app/babylon/controller/scene-manager.ts +++ b/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(); } diff --git a/src/app/babylon/tool/babylon-tool.ts b/src/app/babylon/tool/babylon-tool.ts index 6f49c77..f5b43c5 100644 --- a/src/app/babylon/tool/babylon-tool.ts +++ b/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; } diff --git a/src/app/babylon/view/mark-window/mark-window.ts b/src/app/babylon/view/mark-window/mark-window.ts index cc3e42a..f670dd4 100644 --- a/src/app/babylon/view/mark-window/mark-window.ts +++ b/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; } diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html index 07cb815..bdded79 100644 --- a/src/app/pages/left-domain/left-domain.component.html +++ b/src/app/pages/left-domain/left-domain.component.html @@ -47,11 +47,7 @@
-
- -
-
- +

@@ -77,11 +73,7 @@
-
- -
-
- +

@@ -119,11 +111,7 @@
-
- -
-
- +

@@ -149,11 +137,7 @@
-
- -
-
- +

diff --git a/src/app/pages/left-domain/left-domain.component.scss b/src/app/pages/left-domain/left-domain.component.scss index 6169419..263e294 100644 --- a/src/app/pages/left-domain/left-domain.component.scss +++ b/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; } //右上角 diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html index acd06b0..282e742 100644 --- a/src/app/pages/plan/plan.component.html +++ b/src/app/pages/plan/plan.component.html @@ -13,9 +13,12 @@
- - - + + + + + +
@@ -78,8 +81,9 @@
-
-
{{beforeOnePropertyData.getPropertyData().name}}
+
+
+
@@ -90,15 +94,16 @@
-
品牌 :
-
油枪数量 :
-
油品品号 :
+
品牌 :
+
油枪数量 :
+
油品品号 :
-
-
{{beforeOnePropertyData.getPropertyData().name}}
-
油品品号 :
-
油罐容积 :
-
安全容积 :
+
+
+
+
油品品号 :
+
油罐容积 :
+
安全容积 :
@@ -141,7 +146,7 @@
- +
diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss index c55e072..13fc933 100644 --- a/src/app/pages/plan/plan.component.scss +++ b/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; diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index a03de7e..3f662bd 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/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) diff --git a/src/assets/images/save3DPlan.png b/src/assets/images/save3DPlan.png new file mode 100644 index 0000000..b1be15b Binary files /dev/null and b/src/assets/images/save3DPlan.png differ diff --git a/src/assets/images/selectHeightFinding.png b/src/assets/images/selectHeightFinding.png new file mode 100644 index 0000000..7adef3d Binary files /dev/null and b/src/assets/images/selectHeightFinding.png differ diff --git a/src/assets/images/selectMeasuredArea.png b/src/assets/images/selectMeasuredArea.png new file mode 100644 index 0000000..1f1d96d Binary files /dev/null and b/src/assets/images/selectMeasuredArea.png differ diff --git a/src/assets/images/selectRangeFinding.png b/src/assets/images/selectRangeFinding.png new file mode 100644 index 0000000..eb1516e Binary files /dev/null and b/src/assets/images/selectRangeFinding.png differ