diff --git a/src/jlmap3d/jl3ddevice/component/moveanimate.js b/src/jlmap3d/jl3ddevice/component/moveanimate.js new file mode 100644 index 000000000..ed16bea95 --- /dev/null +++ b/src/jlmap3d/jl3ddevice/component/moveanimate.js @@ -0,0 +1,674 @@ + +export function Moveanimate(main){ + let scope = this; + + this.helpbox = null; + this.textplane = null; + //动画列表 + this.animatelist = []; + this.playlist = null; + this.playorder = 0; + //动画播放器开关 + this.enable = true; + //动画开关状态 + this.status = true; + //当前动画模型 + this.nowmodelname = undefined; + //定义所有继电器部件动画 + // this.initlist = function(modellist){ + // + // for(let j=0,lenj=modellist.length;j=1){ + let point = scope.playlist[scope.playorder][i].curve.getPointAt(1); + //更新模型坐标 + scope.playlist[scope.playorder][i].connectmodel.position.x = point.x; + scope.playlist[scope.playorder][i].connectmodel.position.y = point.y; + scope.playlist[scope.playorder][i].connectmodel.position.z = point.z; + scope.playlist[scope.playorder][i].enable = false; + scope.playlist[scope.playorder][i].status = "end"; + scope.playlist[scope.playorder][i].progress = 0; + + + if(i >= scope.playlist[scope.playorder].length-1){ + if(scope.playorder >= scope.playlist.length-1 ){ + scope.playlist = null; + scope.status = true; + scope.enable = false; + main.animationmsgshowoff(); + scope.nowmodelname = undefined; + scope.playorder = null; + break; + }else{ + scope.playorder += 1; + } + } + + + }else{ + // console.log(scope.animatelist[k].connectmodel); + if(scope.nowmodelname != scope.playlist[scope.playorder][i].connectmodel.name){ + scope.nowmodelname = scope.playlist[scope.playorder][i].connectmodel.name; + main.animationmsgshowon(scope.playlist[scope.playorder][i].connectmodel); + } + //根据动画进度获取动画轨迹上点 + scope.status = false; + let point = scope.playlist[scope.playorder][i].curve.getPointAt(scope.playlist[scope.playorder][i].progress); + + //更新模型坐标 + scope.playlist[scope.playorder][i].connectmodel.position.x = point.x; + scope.playlist[scope.playorder][i].connectmodel.position.y = point.y; + scope.playlist[scope.playorder][i].connectmodel.position.z = point.z; + + if(scope.helpbox){ + scope.helpbox.update(); + } + if(scope.textplane){ + + scope.textplane.position.x = scope.playlist[scope.playorder][i].connectmodel.matrixWorld.elements[12]; + scope.textplane.position.y = scope.playlist[scope.playorder][i].connectmodel.matrixWorld.elements[13]+100; + scope.textplane.position.z = scope.playlist[scope.playorder][i].connectmodel.matrixWorld.elements[14]; + } + //判断模型转向 + if(scope.playlist[scope.playorder][i].directchange){ + let tangent = scope.playlist[scope.playorder][i].curve.getPointAt(scope.playlist[scope.playorder][i].progress+0.001); + // scope.animatelist[k] + tangent = null; + } + //增加动画进度,释放点变量 + scope.playlist[scope.playorder][i].progress += scope.playlist[scope.playorder][i].speed; + point = null; + + } + + } + + } + } + } + + +} diff --git a/src/jlmap3d/jl3ddevice/component/textconfig.js b/src/jlmap3d/jl3ddevice/component/textconfig.js new file mode 100644 index 000000000..6cf74ae43 --- /dev/null +++ b/src/jlmap3d/jl3ddevice/component/textconfig.js @@ -0,0 +1,119 @@ + +export function Textconfig(){ + let scope = this; + + this.devicelist = []; + + this.jdqinit = function(){ + + } + + this.jdqraycast = function(){ + + } + + //配置继电器文字信息 + this.initdevicetext = function(selectmodel){ + if(scope.devicelist.length>0){ + scope.devicelist = []; + } + + for(let i=0,leni=selectmodel.children.length;i +
+
+ + + + + +
+
+

设备名称:{{part.text}}

+
+
+
+
+
+ + + +
+
+ + +
+ + + + + + + + diff --git a/src/views/jlmap3d/device/component/devicemsg.vue b/src/views/jlmap3d/device/component/devicemsg.vue new file mode 100644 index 000000000..607e104f8 --- /dev/null +++ b/src/views/jlmap3d/device/component/devicemsg.vue @@ -0,0 +1,93 @@ + + + + + + diff --git a/src/views/jlmap3d/device/jl3ddevice.vue b/src/views/jlmap3d/device/jl3ddevice.vue index a3f793f14..1cbb8da7b 100644 --- a/src/views/jlmap3d/device/jl3ddevice.vue +++ b/src/views/jlmap3d/device/jl3ddevice.vue @@ -1,6 +1,12 @@ @@ -115,4 +156,30 @@ left: 0; z-index: -12; } + + .windowbutton{ + width:25px; + height:25px; + position: absolute; + right:40px; + top:5px; + background-color:#00ff00; + } + .backbutton{ + width:25px; + height:25px; + position: absolute; + right:10px; + top:5px; + background-color:#ffff00; + } + + #canvastexture { + position: absolute; + float: left; + left: 0; + z-index: -12; + } + + diff --git a/src/views/jlmap3d/devicetrain/jl3ddevicetrain.vue b/src/views/jlmap3d/devicetrain/jl3ddevicetrain.vue index bcf9301b6..aae5efe36 100644 --- a/src/views/jlmap3d/devicetrain/jl3ddevicetrain.vue +++ b/src/views/jlmap3d/devicetrain/jl3ddevicetrain.vue @@ -528,12 +528,6 @@ word-wrap:break-word; letter-spacing:2px; } - #canvastexture { - position: absolute; - float: left; - left: 0; - z-index: -12; - } #testjlmap3d { } diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index 0c0f7342f..db9268783 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -69,7 +69,14 @@ - + + + @@ -571,12 +578,11 @@ export default { window.open(routeData.href, '_blank', 'noopener noreferrer'); }, devicemodel() { - if (this.deviceShow == false) { - this.deviceShow = true; - } else { - this.deviceShow = false; - } - + if (this.deviceShow == false) { + this.deviceShow = true; + } else { + this.deviceShow = false; + } }, showScheduling() { this.$refs.scheduling.doShow();