1 line
28 KiB
JavaScript
1 line
28 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-b88f"],{34:function(e,t){},A0nZ:function(e,t,i){"use strict";var a=i("iCc5"),s=i.n(a),n=i("Gvnp");t.a=function e(t){s()(this,e);var i={length:t.Length,width:t.Width,height:t.Height,position:{x:t.Position.X,y:t.Position.Y,z:t.Position.Z},style:{transparent:1,opacity:.4,color:1560252,depthTest:0}},a=new n.a(i);return a.name=t.Name,a.uuid=t.No,a.direction=t.Direction,a.storage_type=t.Storage_Type,a.type=t.type,"goods"===t.type&&(a.weights=t.weights),a.state=t.state,a}},CNAP:function(e,t,i){"use strict";i.d(t,"a",function(){return s});var a=i("Womt");function s(e,t){(new a.TextureLoader).load("/static/images/floor.jpg",function(i){i.wrapS=i.wrapT=a.RepeatWrapping,i.repeat.set(10,10);var s=new a.BoxGeometry(e.length,1,e.depth),n=new a.MeshBasicMaterial({map:i,side:a.DoubleSide}),o=new a.Mesh(s,n);o.position.y=-.5,o.name="地面",t.addObject(o)})}},CvMc:function(e,t,i){"use strict";var a=i("t3Un");t.a={GetAgvsList:function(){return Object(a.a)({url:"/agv/GetAgvsList",method:"post"})},CancelTask:function(e){return Object(a.a)({url:"/agv/cancelTask",method:"post",data:e})},GetAgvStatus:function(e){return Object(a.a)({url:"/agv/getAgvStatus",method:"post",data:e})},GetTaskRecord:function(e){return Object(a.a)({url:"/agv/getTaskRecord",method:"post",data:e})},retrievePallet:function(e){return Object(a.a)({url:"/agv/retrievePallet",method:"post",data:e})},BatchRetrievePallet:function(e){return Object(a.a)({url:"/agv/BatchRetrievePallet",method:"post",data:e})},setWorkStoreTunnel:function(e){return Object(a.a)({url:"/agv/setWorkStoreTunnel",method:"post",data:e})},getWorkStoreTunnel:function(e){return Object(a.a)({url:"/agv/getWorkStoreTunnel",method:"post",data:e})},productOutStore:function(e){return Object(a.a)({url:"/agv/ProductOutStore",method:"post",data:e})},productBatchOutStore:function(e){return Object(a.a)({url:"/agv/ProductBatchOutStore",method:"post",data:e})},productBatchBackStore:function(e){return Object(a.a)({url:"/agv/ProductBatchBackStore",method:"post",data:e})},productInStoreNow:function(){return Object(a.a)({url:"/agv/productInStoreNow",method:"post"})},palletInStore:function(e){return Object(a.a)({url:"/agv/PalletOutStacker",method:"post",data:e})},palletOutStoreNow:function(){return Object(a.a)({url:"/agv/palletOutStoreNow",method:"post"})}}},FgYo:function(e,t,i){"use strict";var a=i("TGos");i.n(a).a},Gvnp:function(e,t,i){"use strict";var a=i("iCc5"),s=i.n(a),n=i("Womt");function o(){}o.hasObj=function(e){return null!=e&&void 0!==e},o.createMaterial=function(e,t,i){var a=16711680,s=null,r=null,_=0,c=0,l=0,h=1;o.hasObj(i)&&(a=i.color||16711680,s=i.image||null,_=i.allowRepeat||0,c=i.transparent||0,l=i.opacity||0,h=i.depthTest);var u=new n.MeshPhongMaterial({map:r,color:a});return null!=s&&(r=(new n.TextureLoader).load(s),1==_&&(r.repeat.x=e/128,r.repeat.y=t/128,r.repeat.y=5,r.wrapS=r.wrapT=n.RepeatWrapping),u=new n.MeshBasicMaterial({map:r})),1==c&&(u.transparent=!0),0==h&&(u.depthTest=!1),u.opacity=l,u},o.transPosition=function(e,t){return e.X=e.X+t.X,e.Y=e.Y+t.Y,e.Z=e.Z+t.Z,e},o.getQueryVariable=function(e){for(var t=window.location.search.substring(1).split("&"),i=0;i<t.length;i++){var a=t[i].split("=");if(a[0]==e)return a[1]}return!1};t.a=function e(t){s()(this,e),this.length=t.length||1,this.width=t.width||1,this.height=t.height||1,this.Name=t.objName,this.Direction=t.Direction,this.positionX=t.position.x||0,this.positionY=t.position.y||0,this.positionZ=t.position.z||0,this.style=t.style||{color:16711680},this.stypeType=this.style.type||0;var i=o.createMaterial(this.width,this.height,this.style);1==this.stypeType&&((i=[]).push(o.createMaterial(this.width,this.height,this.style.up)),i.push(o.createMaterial(this.width,this.height,this.style.down)),i.push(o.createMaterial(this.width,this.height,this.style.right)),i.push(o.createMaterial(this.width,this.height,this.style.left)),i.push(o.createMaterial(this.width,this.height,this.style.fore)),i.push(o.createMaterial(this.width,this.height,this.style.behind)));var a=new n.BoxGeometry(this.length,this.height,this.width),r=new n.Mesh(a,i);return r.name=this.Name,r.direction=this.direction,r.position.x=this.positionX,r.position.y=this.positionY,r.position.z=this.positionZ,r}},KONn:function(e,t,i){"use strict";i.r(t);var a=i("VyA9"),s={data:function(){return{}},mounted:function(){this.createStore()},beforeDestroy:function(){this.store.clearPage()},methods:{createStore:function(){var e=this.$route.query.area_no,t=document.getElementById("container"),i=document.getElementById("vehicle_list"),s=document.getElementById("label");this.store=new a.a(t,i,s,e),this.store.start()}}},n=(i("FgYo"),i("KHd+")),o=Object(n.a)(s,function(){this.$createElement;this._self._c;return this._m(0)},[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{position:"absolute",width:"100%",height:"100%"}},[t("div",{staticClass:"container",attrs:{id:"container"}}),this._v(" "),t("div",{attrs:{id:"label"}})])}],!1,null,"d054a358",null);o.options.__file="store3dsub.vue";t.default=o.exports},McB7:function(e,t,i){"use strict";var a=i("iCc5"),s=i.n(a),n=i("Womt");t.a=function e(t,i,a,o,r){s()(this,e);var _=new n.Raycaster,c=new n.Vector2,l=[];window.addEventListener("click",function(e){var s,n;e.changedTouches?(s=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY):(s=e.clientX,n=e.clientY);var h=o.getBoundingClientRect();c.x=(s-h.x)/o.clientWidth*2-1,c.y=-(n-h.y)/o.clientHeight*2+1,_.setFromCamera(c,i);var u=_.intersectObjects([t],!0);if(0!=u.length){var d=u[0].object;if(console.log("selectObject",d),"Store"===d.type||"goods"===d.type){r.style.cssText="display:block;position:absolute;",r.style.left=s,r.style.top=n-40,r.style.cssText+="width:200px;top:100px;left:100px;z-index:99999;background-color:#66666666; ","Store"===d.type?r.style.cssText+="height:150px;":"goods"===d.type&&(r.style.cssText+="height:300px;"),r.style.cssText+="border-radius:5px; ",r.style.cssText+="padding-left:10px; ",r.style.cssText+="padding-top:10px; ",r.style.cssText+="font-size:20px; ",r.style.cssText+="line-height:30px; ",r.style.cssText+="top:"+(n-80)+"px",r.style.cssText+=";left:"+s+"px";var p="";if("goods"===d.type){p=(p=p+"<p>库位名称:"+d.name+"</p>")+"<p>现存货物数:"+d.state+"</p>";for(var g=0;g<d.weights.length;g++)p=p+"<p>包重:"+d.weights[g]+"kg </p>"}else p=(p=p+"<p>巷道号:"+d.name+"</p>")+"<p>存储货物数量:"+d.state+"包 </p>";r.innerHTML=p,(l=[]).push(d),a.selectedObjects=l}else r.style.cssText="display:none;"}else r.style.cssText="display:none;"}),window.addEventListener("dblclick",function(e){var s,n;s=e.clientX,n=e.clientY;var h=o.getBoundingClientRect();c.x=(s-h.x)/o.clientWidth*2-1,c.y=-(n-h.y)/o.clientHeight*2+1,_.setFromCamera(c,i);var u=_.intersectObjects([t],!0);if(0!=u.length){var d=u[0].object;if("Store"==d.type){var p=u[0].object.uuid;(l=[]).push(d),a.selectedObjects=l,window.top.location.href="#/store3d/store3dsub?area_no="+p}}else r.style.cssText="display:none;"})}},Nf6j:function(e,t,i){"use strict";var a=i("iCc5"),s=i.n(a),n=i("Womt");i("WY20"),i("So0U");t.a=function e(t,i,a,o,r){s()(this,e);parseInt(r.showLength/2),parseInt(r.showWidth/2);for(var _=0;_<t.length;_++)if(parseInt(t[_].state)>=0){var c=parseInt(t[_].l/r.showScaleX)||1,l=parseInt(t[_].w/r.showScaleY)||1,h=(t[_].x-r.centerBinX)/r.showScaleX,u=(t[_].y-r.centerBinY)/r.showScaleY,d=new n.PlaneGeometry(c,l),p=new n.MeshPhongMaterial({color:617108,side:n.DoubleSide}),g=new n.Mesh(d,p);g.position.y=2,g.position.z=u,g.position.x=h,g.rotation.x=-Math.PI/2,r.addObject(g)}}},PP8T:function(e,t,i){"use strict";var a=i("iCc5"),s=i.n(a),n=i("Womt"),o=(i("Gvnp"),i("A0nZ"));t.a=function e(t,i,a,r,_){if(s()(this,e),0!=i.length){var c=i[0].l/_.showScaleX,l=i[0].w/_.showScaleY,h=c,u=.6*l;if(t.w>t.h){var d=h;h=u,u=d}for(var p=new n.BoxGeometry(h,.6*l,u),g=new n.BoxGeometry(h,6,u),m=["/static/images/side.jpg","/static/images/side.jpg","/static/images/side1.jpg","/static/images/side.jpg","/static/images/side.jpg","/static/images/side.jpg"],M=["/static/images/side1.jpg","/static/images/side1.jpg","/static/images/side1.jpg","/static/images/side1.jpg","/static/images/side1.jpg","/static/images/side1.jpg"],w=["/static/images/pallet_lr.jpg","/static/images/pallet_lr.jpg","/static/images/pallet_ud.jpg","/static/images/pallet_ud.jpg","/static/images/pallet_fb.jpg","/static/images/pallet_fb.jpg"],f=[],b=[],O=[],E=0;E<m.length;E++)f.push(new n.MeshPhongMaterial({color:"white",map:n.ImageUtils.loadTexture(m[E],void 0,void 0)})),b.push(new n.MeshPhongMaterial({color:"white",map:n.ImageUtils.loadTexture(M[E],void 0,void 0)})),O.push(new n.MeshPhongMaterial({color:"white",map:n.ImageUtils.loadTexture(w[E],void 0,void 0)}));for(var v=new n.InstancedMesh(p,new n.MeshFaceMaterial(f),300),P=new n.InstancedMesh(p,new n.MeshFaceMaterial(b),1e3),D=new n.InstancedMesh(g,new n.MeshFaceMaterial(O),30),S=new n.Object3D,y=parseInt(_.showLength/2),I=parseInt(_.showWidth/2),B=0,C=0,j=0,T=0;T<i.length;T++){if(i[T].state>0&&0===i[T].storage_type)for(var L=0;L<i[T].state;L++){var A=(i[T].x-_.centerBinX)/_.showScaleX,k=(i[T].y-_.centerBinY)/_.showScaleY;S.position.set(A,.6*l/2+.6*l*L+2,k),S.updateMatrix(),0!==L?P.setMatrixAt(B++,S.matrix):v.setMatrixAt(C++,S.matrix)}if(i[T].state>0&&1==i[T].storage_type)for(var x=0;x<i[T].state;x++){var W=i[T].x/_.showScaleX-y,R=(r.y-i[T].y)/_.showScaleY-I;S.position.set(W,6*x+6,R),S.updateMatrix(),D.setMatrixAt(j++,S.matrix)}}_.addObject(v),_.addObject(P),_.addObject(D);for(var U=0;U<i.length;U++){A=(i[U].x-_.centerBinX)/_.showScaleX,k=(i[U].y-_.centerBinY)/_.showScaleY;var K={Length:h+5,Width:u+5,Height:94,Storage_Type:i[U].storage_type,Position:{X:A,Y:47,Z:k},Name:i[U].name,No:i[U].id,type:"goods",state:i[U].state,weights:i[U].weights},G=new o.a(K);_.addObject(G)}}}},TGos:function(e,t,i){},VyA9:function(module,__webpack_exports__,__webpack_require__){"use strict";var babel_runtime_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("gDS+"),babel_runtime_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(babel_runtime_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0__),babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("iCc5"),babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__),babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("V7oC"),babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__),three__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("Womt"),stats_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("MZFn"),stats_js__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(stats_js__WEBPACK_IMPORTED_MODULE_4__),_tweenjs_tween_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("IrXD"),_Floor__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("CNAP"),_Route__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("rNma"),_AGVCar__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("qO91"),_StoreAreas__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("y4LO"),_StoreBinsSub__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("Nf6j"),_StoreBuilding__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("ZbKm"),_StoreStatusSub__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("PP8T"),_ObjectSelect__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("McB7"),three_outlinepass__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("fwjr"),three_outlinepass__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(three_outlinepass__WEBPACK_IMPORTED_MODULE_14__),three_examples_jsm_controls_OrbitControls__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("RyHr"),three_examples_jsm_controls_PointerLockControls__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("sxfH"),_api_store__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("c/X4"),_api_task__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("sZnh"),_api_agv__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("CvMc"),_api_position__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("bm9Z"),jszip_lib_support__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("Mi3D"),jszip_lib_support__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(jszip_lib_support__WEBPACK_IMPORTED_MODULE_21__),_class=function(){function _class(e,t,i,a){babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this,_class),this.scene=null,this.camera=null,this.container=e,this.label=i,this.panel=t,this.area_id=a,this.renderer=null,this.objects=[],this.firstTime=1,this.time=0,this.origin=[],this.roomRateShow=1,this.goodTypes=[],this.objectsRoomRate=[],this.velocity=new three__WEBPACK_IMPORTED_MODULE_3__.Vector3,this.direction=new three__WEBPACK_IMPORTED_MODULE_3__.Vector3,this.prevTime=performance.now(),this.moveForward=!1,this.moveBackward=!1,this.moveLeft=!1,this.moveRight=!1,this.canJump=!1,this.objectLockPointer=[],this.spriteIsShow=1,this.storeIsShow=0,this.groupIsShow=0,this.shelfIsShow=0,this.time_now=(new Date).getTime()/1e3,this.time_old=(new Date).getTime()/1e3,this.timerVehicle=null,this.timerStore=null,this.showScaleX=1,this.showScaleY=1,this.showLength=0,this.showWidth=0,this.agvList=[],this.storestatus0=null,this.storestatus1=null,this.stats=null,this.area=null,this.bins_select=null,this.centerBinX=null,this.centerBinY=null}return babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(_class,[{key:"initMain",value:function(){this.initScene(),this.initCamera(),this.initRenderer(),this.initOrbitControl(),this.getAreaInfo(),this.initAxisHelper(),this.initLight(),this.initComposer(),this.initObjectSelect(),this.initReSize(),this.initStoreModel()}},{key:"getAreaInfo",value:function getAreaInfo(){var _this=this,Store3DModel=eval("("+window.localStorage.getItem("Store3DModel")+")"),area=Store3DModel.data.areas.find(function(e){return e.id===parseInt(_this.area_id)});this.area=area;for(var bins_select=[],bins=Store3DModel.data.bins,i=0;i<bins.length;i++)bins[i].area_id===parseInt(this.area_id)&&bins_select.push(bins[i]);this.bins_select=bins_select,console.log(this.area),console.log(this.bins_select);var centerBinX=-1,centerBinY=-1;bins_select.length%2==1?(centerBinX=this.bins_select[Math.floor(bins_select.length/2)].x,centerBinY=this.bins_select[Math.floor(bins_select.length/2)].y):(centerBinX=(this.bins_select[Math.floor(bins_select.length/2)-1].x+this.bins_select[Math.floor(bins_select.length/2)].x)/2,centerBinY=(this.bins_select[Math.floor(bins_select.length/2)-1].y+this.bins_select[Math.floor(bins_select.length/2)].y)/2),this.centerBinX=centerBinX,this.centerBinY=centerBinY}},{key:"initStoreModel",value:function(){var e=this;_api_store__WEBPACK_IMPORTED_MODULE_17__.a.GetStoreModel().then(function(t){var i=babel_runtime_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0___default()(t.data);window.localStorage.setItem("Store3DModel",i),e.calcShowParam(),e.initFloor(),e.initBins(),e.initStock()})}},{key:"initObjectSelect",value:function(){new _ObjectSelect__WEBPACK_IMPORTED_MODULE_13__.a(this.scene,this.camera,this.outlinePass,this.container,this.label)}},{key:"calcShowParam",value:function calcShowParam(){var Store3DModel=eval("("+window.localStorage.getItem("Store3DModel")+")"),real_length=parseInt(Store3DModel.data.size.x-Store3DModel.data.origin.x),real_width=parseInt(Store3DModel.data.size.y-Store3DModel.data.origin.y);real_length>real_width&&(this.showLength=container.clientWidth,this.showWidth=parseInt(this.showLength*real_width/real_length)),this.showScaleX=1*real_length/this.showLength,this.showScaleY=1*real_width/this.showWidth}},{key:"start",value:function(){var e=this;this.timerVehicle=setInterval(function(){e.updateVehicleList()},5e3),this.timerStore=setInterval(function(){e.updateStore(e)},1e4),this.initMain(),this.animate()}},{key:"clearPage",value:function(){this.scene=null,this.camera=null,this.outlinePass=null,this.orbitControl=null,cancelAnimationFrame(this.myReq),this.renderer.dispose(),this.renderer.forceContextLoss(),this.renderer.domElement=null,this.renderer=null,this.composer=null,clearInterval(this.timerVehicle),clearInterval(this.timerStore)}},{key:"initScene",value:function(){this.scene=new three__WEBPACK_IMPORTED_MODULE_3__.Scene}},{key:"initFloor",value:function(){var e=[];e.length=parseInt(this.area.w/this.showScaleX),e.depth=parseInt(this.area.h/this.showScaleY),new _Floor__WEBPACK_IMPORTED_MODULE_6__.a(e,this)}},{key:"initAgvCar",value:function(){var e=this;_api_agv__WEBPACK_IMPORTED_MODULE_19__.a.GetAgvStatus({type:"FORKLIFT"}).then(function(t){var i=JSON.parse(babel_runtime_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0___default()(t)).data.data[0];console.log(i),(new _AGVCar__WEBPACK_IMPORTED_MODULE_8__.a).Load(e,"showAgvCar","froklift",0)})}},{key:"initStoreBuilding",value:function initStoreBuilding(){var Store3DModel=eval("("+window.localStorage.getItem("Store3DModel")+")");new _StoreBuilding__WEBPACK_IMPORTED_MODULE_11__.a(Store3DModel.data.charge,Store3DModel.data.origin,this)}},{key:"showAgvCar",value:function(e,t,i){var a=[];a.name=t,a.index=i,a.object=e,0===i?e.position.set(0,0,0):e.position.set(-1200,20,1200),this.agvList.push(a),this.addObject(e)}},{key:"initStats",value:function(){var e=new stats_js__WEBPACK_IMPORTED_MODULE_4__;return e.domElement.style.position="absolute",e.domElement.style.left="0px",e.domElement.style.top="0px",document.body.appendChild(e.domElement),e}},{key:"initStock",value:function initStock(){var Store3DModel=eval("("+window.localStorage.getItem("Store3DModel")+")");new _StoreStatusSub__WEBPACK_IMPORTED_MODULE_12__.a(this.area,this.bins_select,Store3DModel.data.origin,Store3DModel.data.size,this)}},{key:"initAreas",value:function initAreas(){var Store3DModel=eval("("+window.localStorage.getItem("Store3DModel")+")");new _StoreAreas__WEBPACK_IMPORTED_MODULE_9__.a(Store3DModel.data.areas,Store3DModel.data.bins,Store3DModel.data.origin,Store3DModel.data.size,this)}},{key:"initBins",value:function initBins(){var Store3DModel=eval("("+window.localStorage.getItem("Store3DModel")+")");new _StoreBinsSub__WEBPACK_IMPORTED_MODULE_10__.a(this.bins_select,this.area,Store3DModel.data.origin,Store3DModel.data.size,this)}},{key:"initCamera",value:function(){this.camera=new three__WEBPACK_IMPORTED_MODULE_3__.PerspectiveCamera(60,container.clientWidth/container.clientHeight,.1,1e4),this.camera.position.x=0,this.camera.position.y=130,this.camera.position.z=130,this.camera.lookAt(0,0,0),this.scene.add(this.camera)}},{key:"initRenderer",value:function(){this.renderer=new three__WEBPACK_IMPORTED_MODULE_3__.WebGLRenderer({antialias:!0,alpha:!0,logarithmicDepthBuffer:!0}),this.renderer.setSize(container.clientWidth,container.clientHeight),this.renderer.setClearColor(16119285),this.renderer.setPixelRatio(window.devicePixelRatio),container.appendChild(this.renderer.domElement)}},{key:"initComposer",value:function(){this.composer=new three_outlinepass__WEBPACK_IMPORTED_MODULE_14__.EffectComposer(this.renderer);var e=new three_outlinepass__WEBPACK_IMPORTED_MODULE_14__.RenderPass(this.scene,this.camera);this.outlinePass=new three_outlinepass__WEBPACK_IMPORTED_MODULE_14__.OutlinePass(new three__WEBPACK_IMPORTED_MODULE_3__.Vector2(container.clientWidth,container.clientHeight),this.scene,this.camera),this.composer.addPass(e),this.composer.addPass(this.outlinePass)}},{key:"removeObject",value:function(e){}},{key:"initLight",value:function(){var e=new three__WEBPACK_IMPORTED_MODULE_3__.AmbientLight(16777215,1);e.position.set(0,0,0),this.addObject(e);var t=new three__WEBPACK_IMPORTED_MODULE_3__.DirectionalLight(16777215,.3);t.position.set(0,200,0),this.addObject(t);var i=new three__WEBPACK_IMPORTED_MODULE_3__.PointLight(16777215,.3);i.position.set(-500,200,0),this.addObject(i);var a=new three__WEBPACK_IMPORTED_MODULE_3__.PointLight(16777215,.3);a.position.set(500,200,0),this.addObject(a)}},{key:"initOrbitControl",value:function(){this.orbitControl=new three_examples_jsm_controls_OrbitControls__WEBPACK_IMPORTED_MODULE_15__.a(this.camera,this.renderer.domElement),this.orbitControl.enableDamping=!0,this.orbitControl.dampingFactor=.5,this.orbitControl.minDistance=0,this.orbitControl.maxDistance=2e4,this.orbitControl.maxPolarAngle=Math.PI/2.2}},{key:"initAxisHelper",value:function(){var e=new three__WEBPACK_IMPORTED_MODULE_3__.AxisHelper(1e3);this.addObject(e)}},{key:"addObject",value:function(e){this.scene.add(e),this.objects.push(e)}},{key:"initReSize",value:function(){var e=this;window.addEventListener("resize",function(){var t=container.clientWidth,i=container.clientHeight;e.camera.aspect=t/i,console.log("------------------------"),console.log(e.camera.aspect),e.camera.updateProjectionMatrix(),e.renderer.setSize(t,i),e.composer.setSize(t,i)},!1)}},{key:"animate",value:function(){requestAnimationFrame(this.animate.bind(this)),null!=this.composer&&this.composer.render()}},{key:"updateVehicleList",value:function updateVehicleList(){var _this5=this,Store3DModel=eval("("+window.localStorage.getItem("Store3DModel")+")"),vehicle_list=document.getElementById("vehicle_list");vehicle_list.innerHTML="";var param={type:"FORKLIFT"};_api_agv__WEBPACK_IMPORTED_MODULE_19__.a.GetAgvStatus(param).then(function(e){var t=JSON.parse(babel_runtime_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0___default()(e)).data.data[0],i=parseInt(_this5.showLength/2),a=parseInt(_this5.showWidth/2),s=parseInt((t.posX-Store3DModel.data.origin.x)/_this5.showScaleX-i)||0,n=parseInt(a-(t.posY-Store3DModel.data.origin.y)/_this5.showScaleY)||0;_this5.agvList[0].object.position.set(s,0,n),_this5.agvList[0].object.lookAt(s,0,n)})}},{key:"updateStore",value:function(e){var t=this;_api_store__WEBPACK_IMPORTED_MODULE_17__.a.GetStoreModel().then(function(e){var i=babel_runtime_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0___default()(e.data);window.localStorage.setItem("Store3DModel",i),t.scene.remove(t.storestatus0),t.scene.remove(t.storestatus1),t.initStock()}),_api_task__WEBPACK_IMPORTED_MODULE_18__.a.UpdateTaskState().then(function(e){})}}]),_class}();__webpack_exports__.a=_class},ZbKm:function(e,t,i){"use strict";var a=i("iCc5"),s=i.n(a),n=i("Womt");i("WY20"),i("So0U");t.a=function e(t,i,a){s()(this,e);for(var o=["/static/images/powery.png","/static/images/powery.png","/static/images/powerz.png","/static/images/power.png","/static/images/power.png","/static/images/powery.png"],r=[],_=0;_<o.length;_++)r.push(new n.MeshPhongMaterial({color:"white",map:n.ImageUtils.loadTexture(o[_],void 0,void 0)}));var c=parseInt(a.showLength/2),l=parseInt(a.showWidth/2),h=parseInt((t.x-i.x)/a.showScaleX-c)||0,u=parseInt(l-(t.y-i.y)/a.showScaleY)||0,d=new n.BoxGeometry(30,50,30),p=new n.MeshFaceMaterial(r),g=new n.Mesh(d,p);g.position.y=25,g.position.x=h,g.position.z=u,a.addObject(g)}},bm9Z:function(e,t,i){"use strict";i("t3Un")},"c/X4":function(e,t,i){"use strict";var a=i("t3Un");t.a={GetBinsInfo:function(e){return Object(a.a)({url:"/storage/GetBinsInfo",method:"post",data:e})},GetStoreModel:function(){return Object(a.a)({url:"/store/GetStoreModel",method:"post"})},GetStoreModel2:function(){return Object(a.a)({url:"/store/GetStoreModel2",method:"post"})},ImportBinModelData:function(e){return Object(a.a)({url:"/store/ImportBinModel",method:"post",data:e})},SetStoreModel:function(e){return Object(a.a)({url:"/store/SetStoreModel",method:"post",data:e})},SaveStockInfo:function(e){return Object(a.a)({url:"/store/SaveStockInfo",method:"post",data:e})},saveBasicInfo:function(e){return Object(a.a)({url:"/store/SaveBasicInfo",method:"post",data:e})},getBasicInfo:function(){return Object(a.a)({url:"/store/GetBasicInfo",method:"post"})},getStoreStatData:function(){return Object(a.a)({url:"/store/GetStoreStatData",method:"post"})},getCheckRecord:function(){return Object(a.a)({url:"/store/GetCheckRecord",method:"post"})},getBatchList:function(){return Object(a.a)({url:"/storage/GetBatchList",method:"post"})},getAllBatchList:function(){return Object(a.a)({url:"/storage/GetAllBatchList",method:"post"})},getProductionBatchList:function(){return Object(a.a)({url:"/erp/GetProductionBatchList",method:"post"})},addBatchNumber:function(e){return Object(a.a)({url:"/storage/AddBatchNumber",method:"post",data:e})},GetCurrentBatchAndPackage:function(){return Object(a.a)({url:"/storage/GetCurrentBatchAndPackage",method:"post"})},SetCurrentBatchAndPackage:function(e){return Object(a.a)({url:"/storage/SetCurrentBatchAndPackage",method:"post",data:e})},getBatchInfo:function(e){return Object(a.a)({url:"/storage/GetBatchInfo",method:"post",data:e})},SetBinStoreInfo:function(e){return Object(a.a)({url:"/storage/SetBinStoreInfo",method:"post",data:e})},GetBinStoreInfo:function(e){return Object(a.a)({url:"/storage/GetBinStoreInfo",method:"post",data:e})},getInOutInfo:function(e){return Object(a.a)({url:"/storage/getInOutInfo",method:"post",data:e})},getProductByBatch:function(e){return Object(a.a)({url:"/storage/getProductByBatch",method:"post",data:e})}}},qO91:function(e,t,i){"use strict";var a=i("iCc5"),s=i.n(a),n=i("V7oC"),o=i.n(n),r=i("Womt"),_=i("5kJi"),c=i("QIYC"),l=function(){function e(t){s()(this,e),t=t||{scale:.1},this.scale=t.scale}return o()(e,[{key:"Load",value:function(e,t,i,a){(new c.a).load("/static/obj/Double-Fork-AGV.mtl",function(s){s.preload();var n=new _.a;n.setMaterials(s),n.load("/static/obj/Double-Fork-AGV.obj",function(s){s.scale.set(.03,.03,.03),s.traverse(function(e){e instanceof r.Mesh&&(e.geometry.applyMatrix((new r.Matrix4).makeRotationY(Math.PI/2)),e.material.transparent=!0)}),e[t](s,i,a)})})}}]),e}();t.a=l},rNma:function(e,t,i){"use strict";i("Womt")},sZnh:function(e,t,i){"use strict";var a=i("t3Un");t.a={GetTaskRecord:function(e){return Object(a.a)({url:"/agv/getTaskRecord",method:"post",data:e})}}},y4LO:function(e,t,i){"use strict";var a=i("iCc5"),s=i.n(a),n=i("Womt"),o=(i("WY20"),i("So0U")),r=i("MT78"),_=i.n(r),c=function e(t,i){s()(this,e);var a=document.createElement("div");a.style.width="200px",a.style.height="200px",this.signChart=_.a.init(a);var o={backgroundColor:"rgba(0, 0, 0, 0)",title:{text:t.Name,textStyle:{color:"#096a94",fontSize:40,fontWeight:"bold"},left:"center",bottom:"42%",itemGap:60},tooltip:{show:!1},legend:{},series:[{name:"内圈",type:"pie",hoverAnimation:!1,tooltip:{},radius:[0,"0%"],color:["#096a94","#096a94","#096a94","#096a94"],label:{normal:{show:!1,position:"center",color:"#fff",formatter:function(e){return e.value}}},labelLine:{normal:{show:!1}},data:[{value:0,itemStyle:{normal:{color:"#096a94"}}}]}]};this.signChart.setOption(o);var r=this.signChart;window.onresize=function(){r.resize()},this.signChart.on("finished",function(){var e=(new n.TextureLoader).load(r.getDataURL()),a=new n.SpriteMaterial({transparent:!0,map:e,side:n.DoubleSide}),s=new n.Sprite(a);s.type="StoreSign",s.scale.set(250,250,1),s.uuid=t.No,s.name=t.Name;var o=t.Height-50;s.position.set(t.Position.X,o,t.Position.Z),i.addObject(s),i.objectLockPointer.push(s)})},l=i("A0nZ");t.a=function e(t,i,a,n,r){s()(this,e),(new o.a).load("/static/font/helvetiker_regular.typeface.json",function(e){for(var a=[999999999,999999999],s=[999999999,999999999],n=[0,0],o=[0,0],r=0;r<2;r++)for(var c=0;c<t.length;c++)t[c].area_type==r&&(t[c].x>n[r]&&(n[r]=t[c].x+t[c].w),t[c].y>o[r]&&(o[r]=t[c].y+t[c].h),t[c].x<a[r]&&(a[r]=t[c].x),t[c].y<s[r]&&(s[r]=t[c].y));for(var l=0;l<t.length;l++)_(t[l],i)});var _=function(e,t){for(var i=999999999,a=999999999,s=0,o=0,_=0;_<t.length;_++)t[_].x>=e.x&&t[_].x<=e.x+e.w&&t[_].y>=e.y&&t[_].y<=e.y+e.h&&(t[_].x>s&&(s=t[_].x+t[_].w/2),t[_].y>o&&(o=t[_].y+t[_].h/2),t[_].x<i&&(i=t[_].x-t[_].w/2),t[_].y<a&&(a=t[_].y-t[_].h/2));var h=parseInt(r.showLength/2),u=parseInt(r.showWidth/2),d=parseInt((s-i)/r.showScaleX)||1,p=parseInt((o-a)/r.showScaleY)||1;p<5&&(p=20);var g=(s+i)/2/r.showScaleX-h,m=(n.y-(o+a)/2)/r.showScaleY-u,M={Length:d,Width:p,Height:150,Storage_Type:e.storage_type,Position:{X:g,Y:75,Z:m},Name:e.name,No:e.id,state:e.goods_count,type:"Store"},w=new l.a(M);r.addObject(w),new c(M,r)}}}}]); |