1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7b20793a"],{"3b2f":function(module,__webpack_exports__,__webpack_require__){"use strict";var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("96cf"),regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__),E_CFD_cfd_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("1da1"),core_js_modules_es6_string_iterator__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("5df3"),core_js_modules_es6_string_iterator__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es6_string_iterator__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es6_map__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("f400"),core_js_modules_es6_map__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es6_map__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("ac6a"),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_4__),three__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("5a89"),three_examples_jsm_controls_OrbitControls_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("4721"),_YZOGridHelper_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("defc"),_HCFD_Util_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("7dac"),_utils_request__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("b775"),three_examples_jsm_libs_dat_gui_module_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("b9d8"),element_ui__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("5c96"),element_ui__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(element_ui__WEBPACK_IMPORTED_MODULE_11__);__webpack_exports__["a"]={data:function(){return{container_show:!0,scene:null,renderer:null,camera:null,controls:null,maxX:0,maxY:0,maxZ:0,minX:0,minY:0,minZ:0,camerahight:5,mufactor:.2,meshs:[],zones:[],percentage:0,movetage:0,nowIndex:0,moveflag:!1,clock:null,baseColors:[],camerahight_ele:10,meshList:[],meshShow:null,meshSelect:[],gui:new three_examples_jsm_libs_dat_gui_module_js__WEBPACK_IMPORTED_MODULE_10__["a"],worker:null,canWidth:500,canHeight:500,points:[]}},destroyed:function(){this.gui.destroy(),this.worker=null},mounted:function(){this.initScene()},created:function(){this.worker=this.$worker.create([{message:"showVabsMesh",func:function(e,_){return _.forEach((function(_,t){var i={variablemap:new Map};e.push(i),_.coordinatesList.forEach((function(e){var _=e[1],t=e[2],s=null==e[3]?0:e[3];"undefined"==typeof i.variablemap.get("y")&&i.variablemap.set("y",[]),i.variablemap.get("y").push(_),"undefined"==typeof i.variablemap.get("z")&&i.variablemap.set("z",[]),i.variablemap.get("z").push(t),"undefined"==typeof i.variablemap.get("t")&&i.variablemap.set("t",[]),i.variablemap.get("t").push(s)}))})),e}}])},methods:{loadingOpen:function(){element_ui__WEBPACK_IMPORTED_MODULE_11__["Loading"].service({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"})},loadingClose:function(){var e=element_ui__WEBPACK_IMPORTED_MODULE_11__["Loading"].service({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});e.close()},clear:function(){var e=this;this.meshs.forEach((function(_){e.scene.remove(_)})),this.meshs=[]},guiHide:function(e){"show"===e?this.gui.show():this.gui.hide()},init:function(){this.clock=new three__WEBPACK_IMPORTED_MODULE_5__["j"],this.scene=new three__WEBPACK_IMPORTED_MODULE_5__["P"];var e=new _YZOGridHelper_js__WEBPACK_IMPORTED_MODULE_7__["a"](200,20,2894892,8947848),_=new three__WEBPACK_IMPORTED_MODULE_5__["c"](20);this.scene.add(_),this.scene.add(e),this.renderer=new three__WEBPACK_IMPORTED_MODULE_5__["W"]({antialias:!0,alpha:!0}),this.camera=new three__WEBPACK_IMPORTED_MODULE_5__["H"](20,1,.2,2e3),this.camera.up.x=0,this.camera.up.y=0,this.camera.up.z=1,this.controls=new three_examples_jsm_controls_OrbitControls_js__WEBPACK_IMPORTED_MODULE_6__["a"](this.camera,this.renderer.domElement)},initScene:function(){this.init(),this.renderer.setSize(this.canWidth,this.canHeight),this.$refs.container_vabs.appendChild(this.renderer.domElement),this.show();var e=this,_=function _(){requestAnimationFrame(_),e.renderer.render(e.scene,e.camera)};_()},imgControl:function imgControl(){this.gui.destroy(),this.gui=new three_examples_jsm_libs_dat_gui_module_js__WEBPACK_IMPORTED_MODULE_10__["a"];var _this=this;_this.meshShow=new function(){var _this2=this;this.show=function(){var k=0;_this.meshSelect=[],_this.meshList.forEach((function(mesh){k++,eval("_this.meshSelect.push(_this.meshShow.mesh"+k+")")})),_this.showVabsMesh()};var i=0;_this.meshList.forEach((function(mesh){i++,eval("_this2.mesh"+i+"= true;"),_this.meshSelect.push(!0)}))};var i=0;_this.meshList.forEach((function(e){i++,_this.gui.add(_this.meshShow,"mesh"+i)})),_this.gui.add(_this.meshShow,"show"),_this.gui.open()},show:function(){var e=(new three__WEBPACK_IMPORTED_MODULE_5__["e"]).setFromObject(this.scene),_=e.size().y,t=_/(2*Math.tan(this.camera.fov*Math.PI/360)),i=this.scene.position;this.camera.position.set(1.5*t,i.y,i.z),this.camera.lookAt(i),this.camera.updateMatrix()},showVabsMesh:function(){var e=this;this.clear();var _=this;_.loadingOpen(),_.worker.postAll([{message:"showVabsMesh",args:[_.zones,_.meshList]}]).then((function(t){_.zones=t[0];var i=[],s=new three__WEBPACK_IMPORTED_MODULE_5__["y"]({color:1044735});_.meshList.forEach((function(e,t){if(_.meshSelect[t]){var a=_.zones[t],r=a.variablemap.get("y"),n=a.variablemap.get("z");e.elemList.forEach((function(e){var i=[];e[0];i.push(0,r[e[1]-1],n[e[1]-1],0,r[e[2]-1],n[e[2]-1],0,r[e[3]-1],n[e[3]-1]);for(var a=4;a<e.length;a++)0!=e[a]&&i.push(0,r[e[a]-1],n[e[a]-1]);var o=new three__WEBPACK_IMPORTED_MODULE_5__["h"];o.setAttribute("position",new three__WEBPACK_IMPORTED_MODULE_5__["t"](i,3));var c=new three__WEBPACK_IMPORTED_MODULE_5__["z"](o,s);c.position.x+=_.points[t].x1,c.position.y+=_.points[t].x2,c.position.z+=_.points[t].x3,_.meshs.push(c),_.scene.add(c)}))}i.push(_.points[t].x1,_.points[t].x2,_.points[t].x3)}));var a=new three__WEBPACK_IMPORTED_MODULE_5__["h"];a.setAttribute("position",new three__WEBPACK_IMPORTED_MODULE_5__["t"](i,3));var r=new three__WEBPACK_IMPORTED_MODULE_5__["z"](a,s);_.meshs.push(r),_.scene.add(r),e.show(),e.loadingClose()}))},getProjectData:function(){var e=Object(E_CFD_cfd_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["a"])(regeneratorRuntime.mark((function e(_){var t,i=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t={transCode:"A00107",projectId:_},e.next=3,Object(_utils_request__WEBPACK_IMPORTED_MODULE_9__["c"])(t).then((function(e){if(e.parameterObj){var _=JSON.parse(e.parameterObj);console.log("parameterObj:",_),i.points=_.gebtParamList.gebtLineFiveList,i.meshList=_.vabsParamList,i.imgControl(),i.showVabsMesh()}})).catch((function(e){}));case 3:case"end":return e.stop()}}),e)})));function _(_){return e.apply(this,arguments)}return _}(),positive:function(e){"x"==e&&this.camera.position.set(this.camerahight_ele*this.camerahight,0,0),"y"==e&&this.camera.position.set(0,this.camerahight_ele*this.camerahight,0),"z"==e&&this.camera.position.set(0,0,this.camerahight_ele*this.camerahight),this.camera.lookAt(this.scene.position),this.camera.updateMatrix()},negative:function(e){"x"==e&&this.camera.position.set(-1*this.camerahight_ele*this.camerahight,0,0),"y"==e&&this.camera.position.set(0,-1*this.camerahight_ele*this.camerahight,0),"z"==e&&this.camera.position.set(0,0,-1*this.camerahight_ele*this.camerahight),this.camera.lookAt(this.scene.position),this.camera.updateMatrix()},large:function(){var e=this;this.meshs.forEach((function(_){var t=_.scale.x*(1+e.mufactor),i=_.scale.y*(1+e.mufactor),s=_.scale.z*(1+e.mufactor);_.scale.set(t,i,s)}))},small:function(){var e=this;this.meshs.forEach((function(_){var t=_.scale.x*(1-e.mufactor),i=_.scale.y*(1-e.mufactor),s=_.scale.z*(1-e.mufactor);_.scale.set(t,i,s)}))},canwh:function(e,_){this.renderer.setSize(e,_)}}}},6103:function(e,_,t){"use strict";t.r(_);var i=function(){var e=this,_=e.$createElement,t=e._self._c||_;return t("div",[t("vabsload",{ref:"vabsm"}),e._v(" "),t("el-button",{on:{click:function(_){return e.$refs.vabsm.getProjectData("bf0054fa9cdd488caf81b4f8d8e8a609")}}},[e._v("显示")])],1)},s=[],a=t("e146"),r=(t("b775"),{data:function(){return{}},mounted:function(){},components:{vabsload:a["a"]},methods:{}}),n=r,o=t("2877"),c=Object(o["a"])(n,i,s,!1,null,null,null);_["default"]=c.exports},"7dac":function(e,_,t){"use strict";t.d(_,"a",(function(){return i}));t("c5f6"),t("28a5"),t("a481");var i=function(e){while(e.indexOf(" ")>0)e=e.replace(" "," ");return e}},defc:function(e,_,t){"use strict";t.d(_,"a",(function(){return o}));var i=t("4f7c"),s=t("a775"),a=t("9ca7"),r=t("cdfc"),n=t("72e8");function o(e,_,t,o){e=e||10,_=_||10,t=new n["a"](void 0!==t?t:4473924),o=new n["a"](void 0!==o?o:8947848);for(var c=_/2,h=e/_,u=e/2,l=[],m=[],E=0,p=0,d=-u;E<=_;E++,d+=h){l.push(0,-u,d,0,u,d),l.push(0,d,-u,0,d,u);var f=E===c?t:o;f.toArray(m,p),p+=3,f.toArray(m,p),p+=3,f.toArray(m,p),p+=3,f.toArray(m,p),p+=3}var O=new r["a"];O.setAttribute("position",new a["b"](l,3)),O.setAttribute("color",new a["b"](m,3));var M=new s["a"]({vertexColors:!0,toneMapped:!1});i["a"].call(this,O,M),this.type="GridHelper"}o.prototype=Object.assign(Object.create(i["a"].prototype),{constructor:o,copy:function(e){return i["a"].prototype.copy.call(this,e),this.geometry.copy(e.geometry),this.material.copy(e.material),this},clone:function(){return(new this.constructor).copy(this)}})},e146:function(e,_,t){"use strict";var i=function(){var e=this,_=e.$createElement,t=e._self._c||_;return t("div",[t("div",{directives:[{name:"show",rawName:"v-show",value:e.container_show,expression:"container_show"}],ref:"container_vabs",staticClass:"vabsload"})])},s=[],a=t("3b2f"),r=a["a"],n=t("2877"),o=Object(n["a"])(r,i,s,!1,null,null,null);_["a"]=o.exports}}]);
|