(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b87bc970"],{"04c7":function(e,t,n){"use strict";n("b13b")},"07ac":function(e,t,n){var a=n("23e7"),s=n("6f53").values;a({target:"Object",stat:!0},{values:function(e){return s(e)}})},"1aa9":function(e,t,n){var a={"./Data processing, please do not scan.mp3":"d66e","./Installation diagram Switching successful.mp3":"e3ac","./Invalid QR code.mp3":"49a4","./Invalid barcode.mp3":"d1a4","./Scan successful.mp3":"c271","./There is no cabinet data in the current scene.mp3":"a6ab","./二维码无效.mp3":"48ca","./安装图切换成功.mp3":"97ee","./当前场景不存在柜体数据.mp3":"da99","./扫描成功.mp3":"f75e","./数据处理中，请勿扫描.mp3":"6b46","./条码无效.mp3":"3884"};function s(e){var t=i(e);return n(t)}function i(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}s.keys=function(){return Object.keys(a)},s.resolve=i,e.exports=s,s.id="1aa9"},"2a54":function(e,t,n){"use strict";n("cee5")},3884:function(e,t,n){e.exports=n.p+"static/media/条码无效.6bbe28c0.mp3"},"48ca":function(e,t,n){e.exports=n.p+"static/media/二维码无效.0758bd4b.mp3"},"49a4":function(e,t,n){e.exports=n.p+"static/media/Invalid QR code.0111c314.mp3"},"4a8d":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n("5a89");class s extends a["C"]{constructor(e){super(e)}load(e,t,n,s){const i=this,o=new a["p"](this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(e){const n=i.parse(JSON.parse(e));t&&t(n)}),n,s)}parse(e){return new i(e)}}class i{constructor(e){this.isFont=!0,this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],a=o(e,t,this.data);for(let s=0,i=a.length;s<i;s++)n.push(...a[s].toShapes());return n}}function o(e,t,n){const a=Array.from(e),s=t/n.resolution,i=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*s,o=[];let c=0,l=0;for(let d=0;d<a.length;d++){const e=a[d];if("\n"===e)c=0,l-=i;else{const t=r(e,s,c,l,n);c+=t.offsetX,o.push(t.path)}}return o}function r(e,t,n,s,i){const o=i.glyphs[e]||i.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".");const r=new a["Z"];let c,l,d,u,h,f,p,m;if(o.o){const e=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let a=0,i=e.length;a<i;){const i=e[a++];switch(i){case"m":c=e[a++]*t+n,l=e[a++]*t+s,r.moveTo(c,l);break;case"l":c=e[a++]*t+n,l=e[a++]*t+s,r.lineTo(c,l);break;case"q":d=e[a++]*t+n,u=e[a++]*t+s,h=e[a++]*t+n,f=e[a++]*t+s,r.quadraticCurveTo(h,f,d,u);break;case"b":d=e[a++]*t+n,u=e[a++]*t+s,h=e[a++]*t+n,f=e[a++]*t+s,p=e[a++]*t+n,m=e[a++]*t+s,r.bezierCurveTo(h,f,p,m,d,u);break}}}return{offsetX:o.ha*t,path:r}}},6766:function(e,t,n){"use strict";n("8a22")},"69ff":function(e,t,n){var a={"./Data processing, please do not scan.mp3":"d66e","./Installation diagram Switching successful.mp3":"e3ac","./Invalid QR code.mp3":"49a4","./Invalid barcode.mp3":"d1a4","./Scan successful.mp3":"c271","./There is no cabinet data in the current scene.mp3":"a6ab","./二维码无效.mp3":"48ca","./安装图切换成功.mp3":"97ee","./当前场景不存在柜体数据.mp3":"da99","./扫描成功.mp3":"f75e","./数据处理中，请勿扫描.mp3":"6b46","./条码无效.mp3":"3884"};function s(e){var t=i(e);return n(t)}function i(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}s.keys=function(){return Object.keys(a)},s.resolve=i,e.exports=s,s.id="69ff"},"6b46":function(e,t,n){e.exports=n.p+"static/media/数据处理中，请勿扫描.aa98370f.mp3"},"6c01":function(e,t,n){"use strict";n("b0c0");var a=function(e){document.onkeypress=function(t){var n=document.activeElement,a=n.tagName,s=n.name,i=a.toLocaleLowerCase();if("input"!==i||"scanInput"===s)switch(t.path&&"BUTTON"==t.path[0].nodeName&&"Enter"==t.code&&t.preventDefault(),t.key){case"Enter":e.inputEnterEvent();break;case"Delete":e.scanText="";break;case"Backspace":var o=e.scanText;o.length>0&&(e.scanText=o.substring(0,o.length-1));break;default:"scanInput"!==s&&(e.scanText+=t.key)}}};t["a"]=a},"6f53":function(e,t,n){var a=n("83ab"),s=n("df75"),i=n("fc6a"),o=n("d1e7").f,r=function(e){return function(t){var n,r=i(t),c=s(r),l=c.length,d=0,u=[];while(l>d)n=c[d++],a&&!o.call(r,n)||u.push(e?[n,r[n]]:r[n]);return u}};e.exports={entries:r(!0),values:r(!1)}},"78e9":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"panelDetail"},[n("ul",{staticClass:"listTitle"},[n("li",{staticClass:"number"},[e._v(e._s(e.$t("info.72")))]),n("li",{staticClass:"name"},[e._v(e._s(e.$t("info.5")))]),n("li",{staticClass:"color"},[e._v(e._s(e.$t("info.6")))]),n("li",{staticClass:"width"},[e._v(e._s(e.$t("info.7")))]),n("li",{staticClass:"height"},[e._v(e._s(e.$t("info.8")))]),n("li",{staticClass:"depth"},[e._v(e._s(e.$t("info.9")))])]),n("div",{staticClass:"listContent"},[n("van-collapse",{model:{value:e.collapseActive,callback:function(t){e.collapseActive=t},expression:"collapseActive"}},e._l(e.panelData,(function(t){return n("van-collapse-item",{key:t.CstIndex,attrs:{title:t.CstName?t.CstName:e.$t("info.10")+t.CstIndex,name:t.CstIndex}},[n("ul",{staticClass:"panelList"},e._l(t.list,(function(t,a){return n("li",{key:a,class:{hightLight:t.Id===e.panelShortid}},[n("span",{staticClass:"number"},[e._v(e._s(t.panelNumber))]),n("span",{staticClass:"name"},[e._v(e._s(t.Name))]),n("span",{staticClass:"color"},[e._v(e._s(t.Material))]),n("span",{staticClass:"width"},[e._v(e._s(t.width))]),n("span",{staticClass:"height"},[e._v(e._s(t.height))]),n("span",{staticClass:"depth"},[e._v(e._s(t.depth))])])})),0)])})),1),0===e.panelData.length?n("div",{staticClass:"empty"},[e._v(" "+e._s(e.$t("info.11"))+" ")]):e._e()],1)])},s=[],i=(n("99af"),n("7db0"),n("4160"),n("a9e3"),n("ac1f"),n("1276"),n("159b"),n("3835")),o={data:function(){return{collapseActive:[],panelData:[]}},props:{panelShortid:{type:String},panelList:{type:Array},panelCodeList:{type:Array,default:function(){return[]}}},watch:{panelList:function(e){var t=this;if(e){var n=[],a={};e.forEach((function(e){var s=t.panelCodeList.find((function(t){return t.shortid===e.Id}));if(s&&s.code){e.Code=s.code;var o=s.code.substring(s.code.length-3,s.code.length);e.panelNumber=String(Number(o))}var r=e.Size.split("*"),c=Object(i["a"])(r,3),l=c[0],d=c[1],u=c[2];if(e.width=l,e.height=d,e.depth=u,a[e.CstIndex])n.forEach((function(t){t.CstIndex===e.CstIndex&&t.list.push(e)}));else{t.collapseActive.push(e.CstIndex);var h={CstName:e.CstName,CstIndex:e.CstIndex,list:[e]};n.push(h),a[e.CstIndex]=e.CstIndex}})),n.forEach((function(e){e.list.sort((function(e,t){return e.panelNumber-t.panelNumber}))})),this.panelData=[].concat(n)}},panelShortid:function(e){e&&this.$nextTick((function(){var e=document.querySelector(".hightLight");e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}))}}},r=o,c=(n("04c7"),n("2877")),l=Object(c["a"])(r,a,s,!1,null,"1cf46140",null);t["a"]=l.exports},"7db5":function(e,t,n){"use strict";n.r(t);var a,s,i,o,r,c,l=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"pageRef",staticClass:"panelScan"},[n("div",{staticClass:"detailedSummary"},[n("ul",{staticClass:"infoList"},[e.showDiagramList?n("li",{staticClass:"allowPointer"},[n("div",{staticClass:"selectWrapper"},[n("span",{on:{click:function(t){e.showActionSheet=!0}}},[e._v(" "+e._s(e.currentOrderCode)+" "),n("i",{class:["iconfont iconxiala",e.showActionSheet?"up":"dowm"]})])])]):e._e(),e._l(e.newPanelParameters,(function(t,a){return n("li",{key:a},[n("span",[e._v(e._s(t.Name)+"：")]),n("span",[e._v(e._s(t.Value))])])}))],2),e.isMobile?n("div",{class:["showAllPanel",e.$i18n.locale]},[n("div",{staticClass:"iconWrapper",on:{click:e.showAllPanel}},[n("i",{staticClass:"iconfont iconxianshi"}),n("span",[e._v(e._s(e.$t("info.27")))])]),n("div",{staticClass:"iconWrapper",on:{click:e.showGridEvent}},[n("i",{staticClass:"iconfont",class:[e.showGrid?"iconyincangwangge":"iconwangge"]}),n("span",[e._v(e._s(e.showGrid?e.$t("info.74"):e.$t("info.73")))])]),n("div",{staticClass:"iconWrapper",on:{click:e.switchModelShape}},[n("i",{staticClass:"iconfont iconxiankuang"}),n("span",[e._v(e._s(e.modelText))])]),n("div",{staticClass:"iconWrapper",on:{click:e.hideSelectedPanel}},[n("i",{staticClass:"iconfont iconyincangbukejian"}),n("span",[e._v(e._s(e.$t("info.40")))])]),n("div",{staticClass:"iconWrapper",on:{click:e.viewComponentList}},[n("i",{staticClass:"iconfont iconiconfront-"}),n("span",[e._v(e._s(e.$t("info.12")))])])]):e._e()]),n("div",{staticClass:"mainWrapper"},[n("div",{ref:"modelRef",staticClass:"model",attrs:{id:"container"}}),e.isMobile?e._e():n("div",{ref:"panelData",staticClass:"panelData"},[n("panel-list",{attrs:{panelList:e.currentModelPanelData,panelCodeList:e.panelCodeList,panelShortid:e.currentPanelId}})],1)]),n("div",{ref:"menuBar",class:["toolbar",e.$i18n.locale]},[n("ul",[e._l(e.menuBarList,(function(t,a){return n("li",{key:a,on:{click:function(t){return t.stopPropagation(),e.menuBarEvents(a)}}},[n("i",{class:["iconfont",t.icon,e.selectedIndex===a?"active":""]}),n("span",[e._v(e._s(t.activeName||t.name1))])])})),e.isMobile?e._e():n("li",{on:{click:e.hideSelectedPanel}},[n("i",{staticClass:"iconfont iconyincangbukejian"}),n("span",[e._v(e._s(e.$t("info.40")))])]),e.isMobile?e._e():n("li",{on:{click:e.showAllPanel}},[n("i",{staticClass:"iconfont iconxianshi"}),n("span",[e._v(e._s(e.$t("info.27")))])]),e.isMobile?e._e():n("li",{on:{click:e.showGridEvent}},[n("i",{staticClass:"iconfont",class:[e.showGrid?"iconyincangwangge":"iconwangge"]}),n("span",[e._v(e._s(e.showGrid?e.$t("info.74"):e.$t("info.73")))])]),e.isMobile?e._e():n("li",{on:{click:e.switchModelShape}},[n("i",{staticClass:"iconfont iconxiankuang"}),n("span",[e._v(e._s(e.modelText))])]),e.isMobile?e._e():n("li",{on:{click:e.viewComponentList}},[n("i",{staticClass:"iconfont iconiconfront-"}),n("span",[e._v(e._s(e.$t("info.12")))])])],2)]),n("van-action-sheet",{attrs:{actions:e.weChatOrderList,"cancel-text":e.$t("info.29"),"close-on-click-action":""},on:{select:e.selectOrder},model:{value:e.showActionSheet,callback:function(t){e.showActionSheet=t},expression:"showActionSheet"}}),n("van-popup",{attrs:{position:"bottom"},model:{value:e.showModelList,callback:function(t){e.showModelList=t},expression:"showModelList"}},[n("div",{staticClass:"modelWrapper"},[n("div",{staticClass:"modelTitle"},[n("span",[e._v(e._s(e.$t("info.32")))]),n("i",{staticClass:"iconfont iconguanbi",on:{click:function(t){e.showModelList=!1}}})]),n("ul",{staticClass:"modelList"},e._l(e.modelList,(function(t,a){return n("li",{key:t.Id,on:{click:function(t){return t.stopPropagation(),e.selectRoomModel(a)}}},[n("img",{class:{active:t.Id===e.defaultCstId},attrs:{src:t.ImageUrl,alt:""}}),n("span",[e._v(e._s(t.Name))])])})),0)])]),n("part-list",{attrs:{showPartListLayer:e.showPartListLayer,panelCodeList:e.panelCodeList,currentCstData:e.currentCstData},on:{"update:showPartListLayer":function(t){e.showPartListLayer=t},"update:show-part-list-layer":function(t){e.showPartListLayer=t}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.scanText,expression:"scanText"},{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"scanInput",attrs:{name:"scanInput"},domProps:{value:e.scanText},on:{input:function(t){t.target.composing||(e.scanText=t.target.value)}}}),n("router-view")],1)},d=[],u=(n("99af"),n("4de4"),n("7db0"),n("4160"),n("a630"),n("caad"),n("d81d"),n("b0c0"),n("a9e3"),n("d3b7"),n("07ac"),n("ac1f"),n("2532"),n("3ca3"),n("5319"),n("1276"),n("cfc3"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("170b"),n("b39a"),n("72f7"),n("159b"),n("ddb0"),n("5530")),h=n("3835"),f=n("2909"),p=(n("96cf"),n("1da1")),m=(n("e17f"),n("2241")),v=n("bc3a"),b=n.n(v),g=n("5a89"),w=n("cf1c"),x={deleteExpiredDataFromIndexedDB:function(){var e=Object(p["a"])(regeneratorRuntime.mark((function e(t,n){var a,s,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=30,e.next=3,w["a"].readAll(t,n);case 3:s=e.sent,s&&s.length>0&&(i=(new Date).getTime(),s.forEach(function(){var e=Object(p["a"])(regeneratorRuntime.mark((function e(s){var o,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(o=new Date(s.addedTime).getTime(),r=Math.floor((i-o)/1e3/60/60/24),!(r>a)){e.next=5;break}return e.next=5,w["a"].deleteData(t,n,s.houseId);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:case"end":return e.stop()}}),e)})));function t(t,n){return e.apply(this,arguments)}return t}(),centerTheGroupModel:function(e){var t=new g["c"],n=new g["eb"];e.children.forEach((function(e){"panel"===e.userData.meshType&&t.expandByObject(e)})),t.getCenter(n),e.position.x-=n.x,e.position.y-=n.y,e.position.z=0},convertToMatrix4:function(e){var t=new g["H"];return t.set(e[0].x,e[1].x,e[2].x,e[3].x,e[0].y,e[1].y,e[2].y,e[3].y,e[0].z,e[1].z,e[2].z,e[3].z,e[0].w,e[1].w,e[2].w,e[3].w),t},getIntersects:function(e,t,n,a){e.preventDefault();var s=new g["T"],i=new g["db"],o=(null===a||void 0===a?void 0:a.offsetWidth)||document.body.offsetWidth,r=(null===a||void 0===a?void 0:a.offsetHeight)||document.body.offsetHeight;e.touches?(i.x=(e.touches[0].pageX-document.body.getBoundingClientRect().left)/o*2-1,i.y=-(e.touches[0].pageY-document.body.getBoundingClientRect().top)/r*2+1):(i.x=(e.clientX-document.body.getBoundingClientRect().left)/o*2-1,i.y=-(e.clientY-document.body.getBoundingClientRect().top)/r*2+1),s.setFromCamera(i,n);var c=s.intersectObjects(t.children,!0);return c}},y=x,C=n("6c01"),I=n("466f"),_=n("affd"),L=n("e731"),P=n("78e9"),D=n("cf55"),$=n("e642"),T=n("4a8d"),M=n("4721"),j={name:"model1",data:function(){return{meshList:[],modelText:this.$t("info.31"),materialType:"panelBasicMaterial",IndexedDB:void 0,projectInfo:{},defaultCstId:"",defaultPanelId:"",currentPanelId:"",currentModelPanelList:[],currentModelPanelData:[],currentModelHardwareList:[],currentRouterName:"model1",toolbarHeight:0,newPanelId:"",newHouseId:"",selectedIndex:void 0,menuBarList:[{icon:"iconmoxingzhongxin",activeName:"",name1:this.$t("info.32"),name2:this.$t("info.32")},{icon:"iconiconfontscan",activeName:"",name1:this.$t("info.33"),name2:this.$t("info.33")},{icon:"iconbankuai",activeName:this.$t("info.34"),name1:this.$t("info.34"),name2:this.$t("info.35")},{icon:"iconqiehuan1",activeName:this.$t("info.36"),name1:this.$t("info.36"),name2:this.$t("info.37")},{icon:"iconshuzi",activeName:this.$t("info.38"),name1:this.$t("info.38"),name2:this.$t("info.39")},{icon:"iconjinduchaxun",activeName:"",name1:this.$t("info.193"),name2:this.$t("info.193")}],menuBarListBackup:[],showModelList:!1,cabinetParameters:[],panelParameters:[],panelCodeList:[],selectedPanel:void 0,modelList:[],textStyleFont:{},showPartListLayer:!1,currentCstData:{},scanText:"",dataProcessing:!1,isMobile:!0,showGrid:!0,cabinetGroupName:"",showDiagramList:!1,showActionSheet:!1,weChatOrderList:[],currentOrderCode:"",timeOutList:[]}},components:{"part-list":L["a"],"panel-list":P["a"]},beforeRouteUpdate:function(e,t,n){var a=this;if(this.currentRouterName=e.name,"model1"===e.name){var s="".concat(this.cabinetGroupName?this.cabinetGroupName+"-":"").concat(this.$t("info.183"));I["a"].setWebPageTitle(s)}if("scanPage2"===t.name){this.selectedIndex=void 0;var i=localStorage.getItem("ScanedUrl"),c=localStorage.getItem("panelId"),l=localStorage.getItem("houseId");if(localStorage.removeItem("ScanedUrl"),localStorage.removeItem("panelId"),localStorage.removeItem("houseId"),i){var d=i.split("?")[1];if(!d){var u=i,h=this.panelCodeList.find((function(e){return e.code===u}));if(!h)return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),void n();r.children=[];var f=h.shortid,p=h.houseId;return this.panelCodeList=[],this.meshList=[],this.panelParameters=[],this.resetOrbitControls(!0),this.restoreDefaultMaterials(),this.getAllModelData(f,p),void n()}if(!i.includes("/#/m1"))return location.replace(i),void location.reload();var v=I["a"].getUrlParameter(i),b=v.p,g=v.h;if(!g)return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),void n();var w=setTimeout((function(){m["a"].confirm({title:"".concat(a.$t("info.3"),"！"),message:"".concat(a.$t("info.41"),"！"),cancelButtonText:a.$t("info.29"),confirmButtonText:a.$t("info.70")}).then((function(){a.newPanelId=b,a.newHouseId=g,r.children=[],a.panelCodeList=[],a.meshList=[],a.panelParameters=[],o.reset(),a.resetOrbitControls(!0),a.restoreDefaultMaterials(),a.getAllModelData(b,g),n()})).catch((function(){n()}))}));this.timeOutList.push(w)}c&&(this.panelCodeList=[],this.meshList=[],this.panelParameters=[],r.children=[],this.resetOrbitControls(!0),this.restoreDefaultMaterials(),this.getAllModelData(c,l),n())}n()},computed:{newPanelParameters:function(){var e=[];return this.panelParameters.filter((function(t){return!e.includes(t.Name)}))}},watch:{cabinetGroupName:function(e){var t=this.$t("info.183");e&&(t="".concat(e,"-").concat(t)),I["a"].setWebPageTitle(t)}},created:function(){"en"===this.$i18n.locale&&(this.menuBarList=this.menuBarList.filter((function(e){return"iconjinduchaxun"!==e.icon}))),this.isMobile=I["a"].isMobile();var e=localStorage.getItem("gridType");if(e&&(this.showGrid="showGrid"===e),!this.$store.state.isInitializedWxConfig){var t={link:location.href};Object(D["b"])(t)}},mounted:function(){this.initPage()},beforeDestroy:function(){this.timeOutList.forEach((function(e){e&&clearTimeout(e)}))},methods:{initPage:function(){var e=Object(p["a"])(regeneratorRuntime.mark((function e(){var t,n,a,s,i,o,r,c=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.$route.query.debug&&new this.$Vconsole,t=document.documentElement.clientHeight,this.$refs.pageRef.style.height=t+"px",Object(C["a"])(this),this.toolbarHeight=this.$refs.menuBar.offsetHeight,this.menuBarListBackup=JSON.parse(JSON.stringify(this.menuBarList)),n=this.$route.query,0===Object.values(n).length?n=JSON.parse(sessionStorage.getItem("route-query-data"))||{}:sessionStorage.setItem("route-query-data",JSON.stringify(n)),a=n,s=a.p,i=a.h,o=a.weChatOrderList,o&&(r=JSON.parse(o),r.forEach((function(e){e.name=e.Code,e.subname=e.OrderName})),this.currentOrderCode=r[0].Code,this.showDiagramList=!0,this.weChatOrderList=Object(f["a"])(r)),this.newPanelId=s,this.newHouseId=i,e.next=15,w["a"].openDB("modelData");case 15:this.IndexedDB=e.sent,this.loadTextStyleJson().then((function(){c.$nextTick((function(){c.initScene(),c.getAllModelData(s,i)}))})),e.next=22;break;case 19:e.prev=19,e.t0=e["catch"](0),this.$toast.fail({message:e.t0.message});case 22:case"end":return e.stop()}}),e,this,[[0,19]])})));function t(){return e.apply(this,arguments)}return t}(),inputEnterEvent:function(){if(this.dataProcessing)return this.scanText="",void I["a"].playLocalAudio(_["a"][this.$t("info.42")]);this.dataProcessing=!0;var e=this.scanText;this.scanText="",e=e.replace(/\?+/g,"?");var t=e.split("?")[1];if(t){var n="/#/m?";if(!e.includes(n))return this.dataProcessing=!1,void I["a"].playLocalAudio(_["a"][this.$t("info.25")]);var a=t.split("="),s=Object(h["a"])(a,2),i=s[0],o=s[1],c=["p","h"];if(c.includes(i)){if(!o)return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),I["a"].playLocalAudio(_["a"][this.$t("info.25")]),void(this.dataProcessing=!1);this.newPanelId="",this.newHouseId="",this["p"===i?"newPanelId":"newHouseId"]=o,this.panelCodeList=[],this.meshList=[],r.children=[],this.resetOrbitControls(),this.restoreDefaultMaterials();var l="Swtich";this.getAllModelData(this.newPanelId,this.newHouseId,l),this.menuBarList=JSON.parse(JSON.stringify(this.menuBarListBackup))}else this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),I["a"].playLocalAudio(_["a"][this.$t("info.25")]),this.dataProcessing=!1}else this.reloadModelByPanelCode(e)},reloadModelByPanelCode:function(e){var t=this.currentModelPanelData.find((function(t){return t.Code===e}));if(t)this.renderTargetPanel(t);else{var n=this.panelCodeList.find((function(t){return t.code===e}));if(!n)return this.$toast.fail({message:"".concat(this.$t("info.43"),"！")}),I["a"].playLocalAudio(_["a"][this.$t("info.43")]),void(this.dataProcessing=!1);var a="Highlight",s=n.shortid,i=n.houseId;this.currentPanelId=s,this.panelCodeList=[],this.meshList=[],r.children=[],this.resetOrbitControls(!0),this.restoreDefaultMaterials(),this.getAllModelData(s,i,a)}},renderTargetPanel:function(e){var t=e.Code,n=e.Id,a=new g["J"]({color:15977863,side:g["m"]}),s=new g["J"]({color:15921906,side:g["m"]}),i=new g["J"]({color:16776960,side:g["m"],transparent:!0,opacity:.6,depthTest:!1}),o=new g["y"]({color:7829367,linewidth:1,transparent:!0,opacity:1,depthTest:!0}),c=new g["y"]({color:15610023,linewidth:1,transparent:!0,opacity:.4,depthTest:!1});this.meshList.forEach((function(e){var n=e.userData,r=n.panelBarcode,l=n.panel_type,d=n.isTargetPanel;d&&(e.material="panel"===l?a:s,e.userData.isTargetPanel=!1,e.children&&e.children.forEach((function(e){"LineSegments"===e.type&&(e.material=o)}))),r===t&&(e.material=i,e.userData.isTargetPanel=!0,e.children&&e.children.forEach((function(e){"LineSegments"===e.type&&(e.material=c)})))})),this.modelText===this.$t("info.46")&&(r.children.forEach((function(e){"panel"!==e.userData.meshType||e.userData.isTargetPanel||(e.material.opacity=1,e.material.transparent=!1,e.material.wireframe=!1)})),this.modelText=this.$t("info.31")),this.currentPanelId=n,this.dataProcessing=!1,this.updateCameraParameter(),this.renderModel(),I["a"].playLocalAudio(_["a"][this.$t("info.24")])},selectOrder:function(e){var t=e.Web3dviewUrl;if(t){var n=I["a"].getUrlParameter(t),a=n.h;a?(this.newHouseId=a,this.meshList=[],r.children=[],this.restoreDefaultMaterials(),this.resetOrbitControls(),this.getAllModelData("",a)):this.$toast("".concat(this.$t("info.45"),"！"))}this.showActionSheet=!1},loadTextStyleJson:function(){var e=this;return new Promise((function(t){var n=new T["a"];n.load("/font/typeface.json",(function(n){e.textStyleFont=n,t(!0)}))}))},initScene:function(){var e=this.$refs.modelRef.offsetWidth,t=this.$refs.modelRef.offsetHeight,n=this.$refs.modelRef;s=new g["W"],r=new g["u"],a=new g["M"](45,e/t,1,8e4),a.up.set(0,0,1),a.position.set(0,-5500,6100),s.add(a),s.background=new g["g"](15658734);var l=new g["w"](16777215,4473924);l.position.set(0,20,0);var d=new g["x"](l,0);c=new g["a"](3355443),s.add(d),s.add(c);var u=new g["t"](6e3,20,12434620,12434620);u.rotateOnAxis(new g["eb"](1,0,0),Math.PI/180*90),u.position.z=0,u.visible=this.showGrid,s.add(u),i=new g["fb"]({antialias:!0,alpha:!0}),i.setPixelRatio(window.devicePixelRatio),i.setSize(e,t),n.appendChild(i.domElement),o=new M["a"](a,i.domElement),o.addEventListener("change",this.renderModel),o.target.set(0,0,500),o.update(),window.addEventListener("resize",I["a"].debounce(this.onWindowResize,300),!1),n.addEventListener("click",this.onMouseDblclick,!0),n.addEventListener("touchstart",this.onMouseDblclick,!0)},updateCameraParameter:function(){var e=new g["c"];e.expandByObject(r);var t=new g["eb"];e.getCenter(t);var n=0,s=0,i=e.max.z-e.min.z,c=e.max.x-e.min.x;if(this.isMobile)n=c>i?2*i:1.4*i,s=-(c<1e3?3e3:c<=1500?3*c:2.2*c);else{n=1.3*i;var l=i>2e3?2*i:i>1e3?2.4*i:i>500?3.5*i:4.3*i;s=-l}a.position.set(0,s,n),o.update()},resetOrbitControls:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateCameraParameter(),e&&o.reset(),o.target.set(0,0,500),o.update()},getAllModelData:function(){var e=Object(p["a"])(regeneratorRuntime.mark((function e(t,n,a){var i,o,c,l,d,u,h,p,m,v,g,w,x,C,L,P,D,$,T,M,j,k,N,O,S,A,B=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.$toast.loading({message:this.$t("info.47"),duration:0}),i=I["a"].getOrderLocalUpdateTime(n),o={url:this.$Api1Proxy,params:{url:"".concat(this.$QLY_API,"/api/hgsoftapi.aspx?method=getorderupdatetime&h=").concat(n)}},e.next=6,this.$Api.get(o);case 6:return c=e.sent,l=new Date(c.Data).getTime()||0,d=!1,(!i||l>i)&&(d=!0),I["a"].setOrderLocalUpdateTime(n,l),u="",h="",p="".concat(this.$JsonProxy).concat(this.$AZT_API,"/data/House_").concat(n,"/house.json").concat(d?"?t=".concat((new Date).getTime()):""),e.next=16,b.a.get(p);case 16:if(m=e.sent,v=m.data,g=v.LockNum,w=v.ProjectNum,x=v.RoomList,C=v.CstList,L=v.PanelList,P="".concat(this.$AZT_API,"/data/House_").concat(n),C.forEach((function(e){e.ImageUrl="".concat(P,"/").concat(e.Image)})),this.panelCodeList=L.map((function(e){return{code:e.BarCode,shortid:e.Id,houseId:e.HouseId}})),this.projectInfo={houseId:n,locknum:g,projectcode:w,h:"".concat(location.origin,"/#/m?h=").concat(n,"&v=1")},t&&(D=L.find((function(e){return e.Id===t})),D&&($=D.RoomId,T=D.CstId,M=D.Id,u=$,h=T,this.defaultPanelId=M)),u||(u=x[0].Id),0!==C.length){e.next=30;break}return this.$toast("".concat(this.$t("info.48"),"！")),this.dataProcessing=!1,a&&I["a"].playLocalAudio(_["a"][this.$t("info.48")]),e.abrupt("return");case 30:return j=Object(f["a"])(C),this.modelList=Object(f["a"])(C),k=j.find((function(e){return e.Id===h})),k||(k=j[0],h=j[0].Id),this.defaultCstId=h,N=k,O=N.Name,S=N.PanelArray,A=N.ModelArray,this.cabinetGroupName=O,this.currentModelPanelList=Object(f["a"])(S),this.currentModelHardwareList=Object(f["a"])(A),S.forEach((function(e){B.loadPanelMesh(e)})),e.next=42,this.loadHardwareMesh(A);case 42:this.meshList.forEach((function(e){r.add(e)})),y.centerTheGroupModel(r),s.add(r),this.updateCameraParameter(),this.renderModel(),this.$toast.clear(),this.dataProcessing=!1,a&&("Swtich"===a?I["a"].playLocalAudio(_["a"][this.$t("info.49")]):I["a"].playLocalAudio(_["a"][this.$t("info.24")])),j.forEach((function(e){e.Id===h&&(e.hardwareList=Object(f["a"])(A))})),this.currentModelPanelData=Object(f["a"])(k.PanelArray),this.currentPanelId=t,e.next=58;break;case 55:e.prev=55,e.t0=e["catch"](0),e.t0&&(this.$toast.fail({message:"".concat(t?this.$t("info.50"):this.$t("info.51"))}),this.dataProcessing=!1);case 58:case"end":return e.stop()}}),e,this,[[0,55]])})));function t(t,n,a){return e.apply(this,arguments)}return t}(),loadPanelMesh:function(){var e=Object(p["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,i,o,r,c,l,d,u,h,f,p,m,v,b,w,x,C,I,_,L,P,D,$,T=this,M=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=M.length>1&&void 0!==M[1]&&M[1],e.prev=1,t.meshList){e.next=6;break}return this.$toast("".concat(this.$t("info.52"),"！")),this.dataProcessing=!1,e.abrupt("return");case 6:for(a=[],s=[],t.meshList.forEach((function(e){a=a.concat(e.verts),s=s.concat(e.normals)})),i=a.length/3,o=new g["f"],r=new Float32Array(3*i*3),c=new Float32Array(3*i*3),l=0;l<r.length;l+=9)d=l/3,a[d]&&(r[l]=a[d].x,r[l+1]=a[d].y,r[l+2]=a[d].z,r[l+3]=a[d+1].x,r[l+4]=a[d+1].y,r[l+5]=a[d+1].z,r[l+6]=a[d+2].x,r[l+7]=a[d+2].y,r[l+8]=a[d+2].z,c[l]=s[d].x,c[l+1]=s[d].y,c[l+2]=s[d].z,c[l+3]=s[d+1].x,c[l+4]=s[d+1].y,c[l+5]=s[d+1].z,c[l+6]=s[d+2].x,c[l+7]=s[d+2].y,c[l+8]=s[d+2].z);o.setAttribute("position",new g["e"](r,3)),o.setAttribute("normal",new g["e"](c,3)),o.computeBoundingSphere(),u=new g["J"]({color:15977863,side:g["m"]}),h=new g["J"]({color:15921906,side:g["m"]}),f=new g["J"]({color:16776960,side:g["m"],transparent:!0,opacity:.6,depthTest:!1}),p=void 0,p=this.defaultPanelId===t.Id?f:"panel"===t.panel_type?u:h,m=new g["I"](o,p),v=t.Code.substring(t.Code.length-3,t.Code.length),v=String(Number(v)),this.addPanelNumber(v,t,n,m),b=this.defaultPanelId===t.Id,w=new g["y"]({color:b?15610023:7829367,linewidth:1,transparent:!0,opacity:b?.4:1,depthTest:!b}),x=new g["n"](o,1),C=new g["z"](x,w),m.add(C),I=t.meshInstanceList[0],_=I.mesh_to_world,L=I.mesh_expose_to_world,P=n?L:_,D=y.convertToMatrix4(P),m.userData={parameters:t.Parameters||t.DisplayInfo,panel_center:t.panel_center,panel_expose_center:t.panel_expose_center,mesh_expose_to_world:t.meshInstanceList[0].mesh_expose_to_world,mesh_to_world:t.meshInstanceList[0].mesh_to_world,panel_type:t.panel_type,meshType:"panel",isTargetPanel:this.defaultPanelId===t.Id,panelNumber:v,panelId:t.Id,panelBarcode:t.Code},m.applyMatrix4(D),m.receiveShadow=!0,this.meshList.push(m),e.next=45;break;case 40:e.prev=40,e.t0=e["catch"](1),console.log(e.t0),$=setTimeout((function(){T.$toast({message:T.$t("info.339"),icon:"none",duration:2500})}),50),this.timeOutList.push($);case 45:case"end":return e.stop()}}),e,this,[[1,40]])})));function t(t){return e.apply(this,arguments)}return t}(),addPanelNumber:function(e,t,n,a){if(Number(e)){var s=new g["J"]({color:255,transparent:!0,opacity:1,side:g["m"]}),i=this.computedFontSize(a),o=this.textStyleFont.generateShapes(e,i),c=new g["Y"](o),l=new g["Y"](o);c.computeBoundingBox(),l.computeBoundingBox();var d=t.panel_center,u=t.panel_expose_center,f=n?u:d,p=Object(h["a"])(f,2),m=p[0],v=p[1],b=m.x,w=m.y,x=m.z,y=v.x,C=v.y,I=v.z,_=new g["eb"](b-y,-Math.abs(w-C),x-I),L=new g["eb"](y-b,C-w,I-x);_.normalize();var P=10;b+=_.x*P,w+=w-C>0?_.y*P*2:_.y*P,x+=_.z*P,L.normalize(),y-=7*_.x,C-=7*_.y,I-=7*_.z,c.lookAt(new g["eb"](b-y,w-C,x-I)),c.translate(b-(c.boundingBox.max.x-c.boundingBox.min.x)/2,w-(c.boundingBox.max.y-c.boundingBox.min.y)/2,x-(c.boundingBox.max.z-c.boundingBox.min.z)/2),l.lookAt(new g["eb"](y-b,C-w,I-x)),l.translate(y-1*(l.boundingBox.max.x-l.boundingBox.min.x)/2,C-1*(l.boundingBox.max.y-l.boundingBox.min.y)/2,I-1*(l.boundingBox.max.z-l.boundingBox.min.z)/2);var D=new g["I"](c,s);D.userData.meshType="numberText",D.userData.panelNumber=e,D.visible=!1;var $=new g["I"](l,s);$.userData.meshType="numberText",$.userData.panelNumber=e,$.visible=!1,r.add(D)}},computedFontSize:function(e){var t=new g["c"];t.setFromObject(e);var n=t.max,a=n.x,s=n.y,i=n.z,o=t.min,r=o.x,c=o.y,l=o.z,d=Array.from([a-r,s-c,i-l]).sort((function(e,t){return e-t})),u=120;return d[1]<u&&(u=d[1]-10),u},loadHardwareMesh:function(){var e=Object(p["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,i=this,o=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]&&o[1],a=[],t.forEach((function(e){var t=new g["J"]({color:13421772}),s=new g["J"]({color:9364974,transparent:!0,opacity:.5,depthWrite:!1}),o=e.model,r=e.meshInstanceList,c=e.DisplayInfo,l=e.CorrelateID,d=r[0],u=d.mesh_to_world,h=d.mesh_expose_to_world,f=n?h:u,p=y.convertToMatrix4(f),m=new Promise((function(e){(new $["a"]).load("".concat(i.$AZT_API,"/globalData/model/").concat(o),(function(n){n.traverse((function(e){if(e instanceof g["I"]){var n=new g["y"]({color:6710886,linewidth:1}),a=new g["n"](e.geometry),i=new g["z"](a,n);e.add(i),"Glass.obj"===o?(e.material=s,e.userData.isGlass=!0):e.material=t}})),n.userData.meshType="hardware","Glass.obj"===o&&(n.userData.isGlass=!0),n.userData.panelId=l,n.userData.parameters=c,n.children.forEach((function(e){e.userData.meshType="hardware",e.userData.panelId=l})),n.applyMatrix4(p),n.receiveShadow=!0,e(n)}))}));a.push(m)})),e.next=5,Promise.all(a);case 5:s=e.sent,s.forEach((function(e){r.add(e)}));case 7:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),restoreDefaultMaterials:function(){this.materialType="panelBasicMaterial",this.modelText=this.$t("info.31")},selectRoomModel:function(){var e=Object(p["a"])(regeneratorRuntime.mark((function e(t){var n,a,i,o,c,l=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.$toast.loading({message:this.$t("info.47"),duration:0}),this.restoreDefaultMaterials(),this.menuBarList=JSON.parse(JSON.stringify(this.menuBarListBackup)),n=this.modelList[t],a=n.Id,i=n.Name,o=n.PanelArray,c=n.ModelArray,this.currentModelPanelData=Object(f["a"])(o),this.defaultCstId=a,this.cabinetGroupName=i,this.currentModelPanelList=Object(f["a"])(o),this.meshList=[],r.children=[],o.forEach((function(e){l.loadPanelMesh(e)})),this.meshList.forEach((function(e){r.add(e)})),this.currentModelHardwareList=Object(f["a"])(c),e.next=15,this.loadHardwareMesh(c);case 15:s.add(r),this.resetOrbitControls(),y.centerTheGroupModel(r),this.renderModel(),this.showModelList=!1,this.selectedIndex=void 0,this.$toast.clear();case 22:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),renderModel:function(){i.render(s,a)},onMouseDblclick:function(e){if("model1"===this.currentRouterName){this.selectedIndex=void 0;var t=y.getIntersects(e,r,a,this.$refs.modelRef);if(this.selectedPanel){var n=this.selectedPanel.userData.meshType;if("hardware"===n){var s=this.selectedPanel.userData.isGlass;this.selectedPanel.children.forEach((function(e){s?e.material.color.set(9364974):e.material.color.set(13421772)}))}else this.selectedPanel.children.forEach((function(e){"LineSegments"===e.type&&(e.renderOrder=0,e.material.depthTest=!0,e.material.color.set(6710886))}));this.selectedPanel=void 0}if(t.length>0){var i,o,c=t.find((function(e){var t=e.object.userData.meshType;return("panel"===t||"hardware"===t)&&e.object.visible}));if(c)if("hardware"===c.object.userData.meshType)c.object.parent.children.forEach((function(e){e.material.color.set(255)})),this.panelParameters=(null===(i=c.object.parent.userData)||void 0===i?void 0:i.parameters)||[],this.selectedPanel=c.object.parent;else c.object.children.forEach((function(e){"LineSegments"===e.type&&(e.renderOrder=1,e.material.depthTest=!1,e.material.color.set(255))})),this.panelParameters=(null===(o=c.object.userData)||void 0===o?void 0:o.parameters)||[],this.selectedPanel=c.object}else this.panelParameters=[];this.renderModel()}},onWindowResize:function(){var e=this;this.$nextTick((function(){var t=e.$refs.menuBar,n=e.$refs.panelData;if(t){var s=document.documentElement.clientHeight;e.$refs.pageRef.style.height=s+"px";var o=t.offsetHeight,r=window.innerWidth-(n?n.offsetWidth:0),c=window.innerHeight-o;a.aspect=r/c,a.updateProjectionMatrix(),i.setSize(r,c)}}))},menuBarEvents:function(e){switch(this.selectedIndex=e,e){case 0:this.showModelList=!0;break;case 1:this.$router.push({name:"scanPage2",params:{panelCodeList:this.panelCodeList}});break;case 2:var t=this.changeMenuBarText(e);this.restoreDefaultMaterials(),this.explodeModel(t);break;case 3:var n=this.changeMenuBarText(e);this.hideDoorPanels(n);break;case 4:var a=this.changeMenuBarText(e);this.showPanelNumbers(a===this.$t("info.39"));break;case 5:0,this.$router.push({name:"orderDetail2",params:{projectInfo:this.projectInfo}});break}},changeMenuBarText:function(e){var t=Object(f["a"])(this.menuBarList),n=t[e],a=n.activeName,s=n.name1,i=n.name2;return a=a===s?i:s,this.menuBarList[e].activeName=a,a},explodeModel:function(){var e=Object(p["a"])(regeneratorRuntime.mark((function e(t){var n,a,i=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t===this.$t("info.35"),n||(this.selectedIndex=void 0),this.$toast.loading({message:this.$t("info.47"),duration:0}),this.menuBarList.forEach((function(e){"iconqiehuan1"===e.icon&&(e.activeName=i.$t("info.36")),"iconshuzi"===e.icon&&(e.activeName=i.$t("info.38"))})),r.children=[],this.meshList=[],this.currentModelPanelList.forEach((function(e){i.loadPanelMesh(e,n)})),this.meshList.forEach((function(e){r.add(e)})),e.next=10,this.loadHardwareMesh(this.currentModelHardwareList,n);case 10:this.resetOrbitControls(),y.centerTheGroupModel(r),s.add(r),this.showModelList=!1,this.renderModel(),a=setTimeout((function(){i.$toast.clear()})),this.timeOutList.push(a);case 17:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),hideDoorPanels:function(e){var t=e===this.$t("info.36"),n=[],a=[];r.children.forEach((function(e){"door"===e.userData.panel_type&&(e.visible=t,n.push(e.userData.panelNumber),a.push(e.userData.panelId))}));var s=this.menuBarList[4].activeName,i=!(!t||s===this.$t("info.38"));r.children.forEach((function(e){"numberText"===e.userData.meshType&&n.includes(e.userData.panelNumber)&&(e.visible=i),"hardware"===e.userData.meshType&&a.includes(e.userData.panelId)&&e.children.forEach((function(e){return e.visible=t}))})),t&&(this.selectedIndex=void 0),this.renderModel()},showPanelNumbers:function(e){var t=[];r.children.forEach((function(e){"panel"!==e.userData.meshType||e.visible||t.push(e.userData.panelNumber)})),r.children.forEach((function(n){"numberText"===n.userData.meshType&&(e?t.includes(n.userData.panelNumber)||(n.visible=!0):n.visible=!1)})),e||(this.selectedIndex=void 0),this.renderModel()},showAllPanel:function(){var e=this,t=this.menuBarList[4].activeName;r.children.forEach((function(n){"panel"===n.userData.meshType?n.visible=!0:"numberText"===n.userData.meshType?n.visible=t!==e.$t("info.38"):"hardware"===n.userData.meshType&&n.children.forEach((function(e){e.visible=!0}))})),this.menuBarList.forEach((function(t){"iconqiehuan1"===t.icon&&(t.activeName=e.$t("info.36"))})),this.renderModel()},showGridEvent:function(){var e=this;this.showGrid=!this.showGrid,s.children.forEach((function(t){"GridHelper"===t.type&&(t.visible=e.showGrid),"AxesHelper"===t.type&&(t.visible=!1)})),localStorage.setItem("gridType",this.showGrid?"showGrid":"hideGrid"),this.renderModel()},switchModelShape:function(){var e=this;r.children.forEach((function(t){"panel"!==t.userData.meshType||t.userData.isTargetPanel||(e.modelText===e.$t("info.31")?(t.material.wireframe=!0,t.material.opacity=0,t.material.transparent=!0):e.modelText===e.$t("info.46")&&(t.material.opacity=1,t.material.transparent=!1,t.material.wireframe=!1))})),this.modelText===this.$t("info.31")?(this.materialType="panelWireMaterial",this.modelText=this.$t("info.46")):(this.materialType="panelBasicMaterial",this.modelText=this.$t("info.31")),this.renderModel()},hideSelectedPanel:function(){if(this.selectedPanel){var e=this.selectedPanel.userData,t=e.meshType,n=e.panelNumber,a=e.panelId;"panel"===t?(r.children.forEach((function(e){e.userData.panelNumber===n&&(e.visible=!1),"hardware"===e.userData.meshType&&a===e.userData.panelId&&e.children.forEach((function(e){return e.visible=!1}))})),this.selectedPanel.visible=!1):"hardware"===t&&this.selectedPanel.children.forEach((function(e){return e.visible=!1})),this.renderModel()}else this.$toast("".concat(this.$t("info.55"),"！")),this.selectedIndex=void 0},viewComponentList:function(){var e=this,t=this.modelList.find((function(t){return t.Id===e.defaultCstId}));t?this.currentCstData=Object(u["a"])({},t):this.$toast(this.$t("info.44")),this.showPartListLayer=!0}}},k=j,N=(n("6766"),n("2877")),O=Object(N["a"])(k,l,d,!1,null,"6dc559b0",null);t["default"]=O.exports},"8a22":function(e,t,n){},"97ee":function(e,t,n){e.exports=n.p+"static/media/安装图切换成功.ef7d6325.mp3"},a6ab:function(e,t,n){e.exports=n.p+"static/media/There is no cabinet data in the current scene.e7168aa5.mp3"},affd:function(e,t,n){"use strict";n("d81d"),n("d3b7"),n("ac1f"),n("5319"),n("1276"),n("ddb0");var a=n("69ff"),s=[];a.keys().map((function(e){e=e.replace("/","");var t=e.split(".")[1];s.push(t)}));for(var i={},o=0;o<s.length;o++)i[s[o]]=n("1aa9")("./".concat(s[o],".mp3"));t["a"]=i},b13b:function(e,t,n){},c271:function(e,t,n){e.exports=n.p+"static/media/Scan successful.466b68e3.mp3"},cee5:function(e,t,n){},cf1c:function(e,t,n){"use strict";n("4160"),n("b0c0"),n("d3b7"),n("159b"),n("96cf");var a=n("1da1");t["a"]={indexedDB:window.indexedDB||window.webkitindexedDB||window.msIndexedDB||window.mozIndexedDB,version:3,storeList:[{name:"model",keyPath:"panelId"},{name:"model1",keyPath:"houseId"}],openDB:function(e){var t=this;return new Promise((function(n){try{var a=t.version,s=t.indexedDB.open(e,a);s.onerror=function(){console.log("IndexedDB数据库打开失败")},s.onsuccess=function(e){var t=e.target.result;n(t)},s.onupgradeneeded=function(e){var n=e.target.result;t.storeList.forEach((function(e){if(!n.objectStoreNames.contains(e.name)){var t=n.createObjectStore(e.name,{keyPath:e.keyPath});console.log(t)}}))}}catch(i){console.log(i)}}))},deleteDB:function(e){var t=this,n=localStorage.getItem("isDeletedDB");if(!n)return new Promise((function(n){var a=t.indexedDB.deleteDatabase(e);a.onerror=function(){console.log("删除数据库出错"),n(!1)},a.onsuccess=function(){console.log("删除数据库成功"),localStorage.setItem("isDeletedDB","true"),n(!0)}}))},closeDB:function(e){e.close(),console.log("数据库已关闭")},addData:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t,n,a,s){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t){e.next=4;break}return e.next=3,this.openDB("modelData",1,{name:n,keyPath:a});case 3:t=e.sent;case 4:i=t.transaction(n,"readwrite").objectStore(n).add(s),i.onerror=function(){},i.onsuccess=function(){};case 7:case"end":return e.stop()}}),e,this)})));function t(t,n,a,s){return e.apply(this,arguments)}return t}(),updateData:function(e,t,n,a){var s=e.transaction(t,"readwrite"),i=s.objectStore(t),o=i.get(n);return new Promise((function(e,t){o.onsuccess=function(n){var s=n.target.result;s?(s.modeldata=a,e(i.put(s))):t(!1)}}))},deleteData:function(e,t,n){var a=e.transaction(t,"readwrite").objectStore(t),s=a.delete(n);return new Promise((function(e){s.onerror=function(){console.log("删除失败"),e(!1)},s.onsuccess=function(){console.log("删除成功"),e(!0)}}))},clearStoreData:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t,n,a){var s,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t){e.next=4;break}return e.next=3,this.openDB("modelData",1,{name:n,keyPath:a});case 3:t=e.sent;case 4:return s=t.transaction(n,"readwrite").objectStore(n),i=s.clear(),e.abrupt("return",new Promise((function(e){i.onerror=function(){e(!1)},i.onsuccess=function(){e(!0)}})));case 7:case"end":return e.stop()}}),e,this)})));function t(t,n,a){return e.apply(this,arguments)}return t}(),read:function(e,t,n){try{var a=e.transaction(t,"readwrite").objectStore(t),s=a.get(n);return new Promise((function(e){s.onerror=function(){console.log("单条数据读取失败"),e(!1)},s.onsuccess=function(t){e(t.target.result)}}))}catch(i){return void console.log(i)}},readAll:function(e,t){var n=e.transaction(t).objectStore(t),a=n.openCursor(),s=[];return new Promise((function(e){a.onerror=function(){console.log("单条数据读取失败"),e(!1)},a.onsuccess=function(t){var n=t.target.result;n?(s.push(n.value),n.continue()):e(s)}}))},readDataByIndexes:function(e,t,n){var a=e.transaction(t,"readonly").objectStore(t),s=a.index(n),i=s.get("张三");return new Promise((function(e){i.onerror=function(){console.log("根据索引读取数据失败"),e(!1)},i.onsuccess=function(t){e(t.target.result)}}))}}},cfc3:function(e,t,n){var a=n("74e8");a("Float32",(function(e){return function(t,n,a){return e(this,t,n,a)}}))},d1a4:function(e,t,n){e.exports=n.p+"static/media/Invalid barcode.dae95486.mp3"},d66e:function(e,t,n){e.exports=n.p+"static/media/Data processing, please do not scan.d6d46eed.mp3"},da99:function(e,t,n){e.exports=n.p+"static/media/当前场景不存在柜体数据.35b03679.mp3"},e3ac:function(e,t,n){e.exports=n.p+"static/media/Installation diagram Switching successful.015a016c.mp3"},e642:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var a=n("5a89");const s=/^[og]\s*(.+)?/,i=/^mtllib /,o=/^usemtl /,r=/^usemap /,c=/\s+/,l=new a["eb"],d=new a["eb"],u=new a["eb"],h=new a["eb"],f=new a["eb"],p=new a["g"];function m(){const e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);const n=this.object&&"function"===typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){const n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);const a={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){const t={index:"number"===typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"===typeof n.clone){const e=n.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){const n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){const a=this.vertices,s=this.object.geometry.vertices;s.push(a[e+0],a[e+1],a[e+2]),s.push(a[t+0],a[t+1],a[t+2]),s.push(a[n+0],a[n+1],a[n+2])},addVertexPoint:function(e){const t=this.vertices,n=this.object.geometry.vertices;n.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices,n=this.object.geometry.vertices;n.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const a=this.normals,s=this.object.geometry.normals;s.push(a[e+0],a[e+1],a[e+2]),s.push(a[t+0],a[t+1],a[t+2]),s.push(a[n+0],a[n+1],a[n+2])},addFaceNormal:function(e,t,n){const a=this.vertices,s=this.object.geometry.normals;l.fromArray(a,e),d.fromArray(a,t),u.fromArray(a,n),f.subVectors(u,d),h.subVectors(l,d),f.cross(h),f.normalize(),s.push(f.x,f.y,f.z),s.push(f.x,f.y,f.z),s.push(f.x,f.y,f.z)},addColor:function(e,t,n){const a=this.colors,s=this.object.geometry.colors;void 0!==a[e]&&s.push(a[e+0],a[e+1],a[e+2]),void 0!==a[t]&&s.push(a[t+0],a[t+1],a[t+2]),void 0!==a[n]&&s.push(a[n+0],a[n+1],a[n+2])},addUV:function(e,t,n){const a=this.uvs,s=this.object.geometry.uvs;s.push(a[e+0],a[e+1]),s.push(a[t+0],a[t+1]),s.push(a[n+0],a[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs,n=this.object.geometry.uvs;n.push(t[e+0],t[e+1])},addFace:function(e,t,n,a,s,i,o,r,c){const l=this.vertices.length;let d=this.parseVertexIndex(e,l),u=this.parseVertexIndex(t,l),h=this.parseVertexIndex(n,l);if(this.addVertex(d,u,h),this.addColor(d,u,h),void 0!==o&&""!==o){const e=this.normals.length;d=this.parseNormalIndex(o,e),u=this.parseNormalIndex(r,e),h=this.parseNormalIndex(c,e),this.addNormal(d,u,h)}else this.addFaceNormal(d,u,h);if(void 0!==a&&""!==a){const e=this.uvs.length;d=this.parseUVIndex(a,e),u=this.parseUVIndex(s,e),h=this.parseUVIndex(i,e),this.addUV(d,u,h),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,a=e.length;n<a;n++){const a=this.parseVertexIndex(e[n],t);this.addVertexPoint(a),this.addColor(a)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";const n=this.vertices.length,a=this.uvs.length;for(let s=0,i=e.length;s<i;s++)this.addVertexLine(this.parseVertexIndex(e[s],n));for(let s=0,i=t.length;s<i;s++)this.addUVLine(this.parseUVIndex(t[s],a))}};return e.startObject("",!1),e}class v extends a["C"]{constructor(e){super(e),this.materials=null}load(e,t,n,s){const i=this,o=new a["p"](this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(i.parse(n))}catch(a){s?s(a):console.error(a),i.manager.itemError(e)}}),n,s)}setMaterials(e){return this.materials=e,this}parse(e){const t=new m;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));const n=e.split("\n");let l=[];for(let h=0,f=n.length;h<f;h++){const e=n[h].trimStart();if(0===e.length)continue;const d=e.charAt(0);if("#"!==d)if("v"===d){const n=e.split(c);switch(n[0]){case"v":t.vertices.push(parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3])),n.length>=7?(p.setRGB(parseFloat(n[4]),parseFloat(n[5]),parseFloat(n[6]),a["V"]),t.colors.push(p.r,p.g,p.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3]));break;case"vt":t.uvs.push(parseFloat(n[1]),parseFloat(n[2]));break}}else if("f"===d){const n=e.slice(1).trim(),a=n.split(c),s=[];for(let e=0,t=a.length;e<t;e++){const t=a[e];if(t.length>0){const e=t.split("/");s.push(e)}}const i=s[0];for(let e=1,o=s.length-1;e<o;e++){const n=s[e],a=s[e+1];t.addFace(i[0],n[0],a[0],i[1],n[1],a[1],i[2],n[2],a[2])}}else if("l"===d){const n=e.substring(1).trim().split(" ");let a=[];const s=[];if(-1===e.indexOf("/"))a=n;else for(let e=0,t=n.length;e<t;e++){const t=n[e].split("/");""!==t[0]&&a.push(t[0]),""!==t[1]&&s.push(t[1])}t.addLineGeometry(a,s)}else if("p"===d){const n=e.slice(1).trim(),a=n.split(" ");t.addPointGeometry(a)}else if(null!==(l=s.exec(e))){const e=(" "+l[0].slice(1).trim()).slice(1);t.startObject(e)}else if(o.test(e))t.object.startMaterial(e.substring(7).trim(),t.materialLibraries);else if(i.test(e))t.materialLibraries.push(e.substring(7).trim());else if(r.test(e))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===d){if(l=e.split(" "),l.length>1){const e=l[1].trim().toLowerCase();t.object.smooth="0"!==e&&"off"!==e}else t.object.smooth=!0;const n=t.object.currentMaterial();n&&(n.smooth=t.object.smooth)}else{if("\0"===e)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+e+'"')}}t.finalize();const d=new a["u"];d.materialLibraries=[].concat(t.materialLibraries);const u=!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length);if(!0===u)for(let s=0,i=t.objects.length;s<i;s++){const e=t.objects[s],n=e.geometry,i=e.materials,o="Line"===n.type,r="Points"===n.type;let c=!1;if(0===n.vertices.length)continue;const l=new a["f"];l.setAttribute("position",new a["q"](n.vertices,3)),n.normals.length>0&&l.setAttribute("normal",new a["q"](n.normals,3)),n.colors.length>0&&(c=!0,l.setAttribute("color",new a["q"](n.colors,3))),!0===n.hasUVIndices&&l.setAttribute("uv",new a["q"](n.uvs,2));const u=[];for(let s=0,d=i.length;s<d;s++){const e=i[s],n=e.name+"_"+e.smooth+"_"+c;let l=t.materials[n];if(null!==this.materials)if(l=this.materials.create(e.name),!o||!l||l instanceof a["y"]){if(r&&l&&!(l instanceof a["Q"])){const e=new a["Q"]({size:10,sizeAttenuation:!1});a["F"].prototype.copy.call(e,l),e.color.copy(l.color),e.map=l.map,l=e}}else{const e=new a["y"];a["F"].prototype.copy.call(e,l),e.color.copy(l.color),l=e}void 0===l&&(l=o?new a["y"]:r?new a["Q"]({size:1,sizeAttenuation:!1}):new a["K"],l.name=e.name,l.flatShading=!e.smooth,l.vertexColors=c,t.materials[n]=l),u.push(l)}let h;if(u.length>1){for(let e=0,t=i.length;e<t;e++){const t=i[e];l.addGroup(t.groupStart,t.groupCount,e)}h=o?new a["z"](l,u):r?new a["P"](l,u):new a["I"](l,u)}else h=o?new a["z"](l,u[0]):r?new a["P"](l,u[0]):new a["I"](l,u[0]);h.name=e.name,d.add(h)}else if(t.vertices.length>0){const e=new a["Q"]({size:1,sizeAttenuation:!1}),n=new a["f"];n.setAttribute("position",new a["q"](t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(n.setAttribute("color",new a["q"](t.colors,3)),e.vertexColors=!0);const s=new a["P"](n,e);d.add(s)}return d}}},e731:function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.showPartListLayer?n("div",{staticClass:"partList"},[n("header",[n("span",[e._v(" "+e._s(e.cstName)+"-"+e._s(e.$t("info.12")))]),n("i",{staticClass:"iconfont iconguanbi",on:{click:e.closePartListLayer}})]),n("main",[n("div",{staticClass:"tabWrapper"},[n("van-tabs",{attrs:{swipeable:""},model:{value:e.tabActive,callback:function(t){e.tabActive=t},expression:"tabActive"}},[n("van-tab",{attrs:{title:e.$t("info.13")}},[n("ul",{staticClass:"listTitle"},[n("li",{staticClass:"number"},[e._v(e._s(e.$t("info.72")))]),n("li",{staticClass:"name"},[e._v(e._s(e.$t("info.5")))]),n("li",{staticClass:"color"},[e._v(e._s(e.$t("info.6")))]),n("li",{staticClass:"width"},[e._v(e._s(e.$t("info.7")))]),n("li",{staticClass:"height"},[e._v(e._s(e.$t("info.8")))]),n("li",{staticClass:"depth"},[e._v(e._s(e.$t("info.9")))])]),n("div",{staticClass:"listContent"},[n("van-collapse",{model:{value:e.collapseActive,callback:function(t){e.collapseActive=t},expression:"collapseActive"}},e._l(e.panelData,(function(t){return n("van-collapse-item",{key:t.CstIndex,attrs:{title:t.CstName?t.CstName:e.$t("info.10")+t.CstIndex,name:t.CstIndex}},[n("ul",{staticClass:"panelList"},e._l(t.list,(function(t,a){return n("li",{key:a},[n("span",{staticClass:"number"},[e._v(e._s(t.panelNumber))]),n("span",{staticClass:"name"},[e._v(e._s(t.Name))]),n("span",{staticClass:"color"},[e._v(e._s(t.Material))]),n("span",{staticClass:"width"},[e._v(e._s(t.width))]),n("span",{staticClass:"height"},[e._v(e._s(t.height))]),n("span",{staticClass:"depth"},[e._v(e._s(t.depth))])])})),0)])})),1),0===e.panelData.length?n("div",{staticClass:"empty"},[e._v(" "+e._s(e.$t("info.11"))+" ")]):e._e()],1)]),n("van-tab",{attrs:{title:e.$t("info.67")}},[n("ul",{staticClass:"listTitle"},[n("li",{staticClass:"hardwareName"},[e._v(e._s(e.$t("info.5")))]),n("li",{staticClass:"model"},[e._v(e._s(e.$t("info.14")))]),n("li",{staticClass:"qty"},[e._v(e._s(e.$t("info.15")))])]),n("div",{staticClass:"listContent"},[n("van-collapse",{model:{value:e.collapseActive2,callback:function(t){e.collapseActive2=t},expression:"collapseActive2"}},e._l(e.cstData,(function(t){return n("van-collapse-item",{key:t.CstIndex,attrs:{title:t.CstName?t.CstName:e.$t("info.16")+t.CstIndex,name:t.CstIndex}},[n("ul",{staticClass:"panelList"},e._l(t.list,(function(t,a){return n("li",{key:a},[n("span",{staticClass:"hardwareName"},[e._v(e._s(t.Name))]),n("span",{staticClass:"model"},[e._v(e._s(t.Spec))]),n("span",{staticClass:"qty"},[e._v(e._s(t.Count))])])})),0)])})),1),0===e.cstData.length?n("div",{staticClass:"empty"},[e._v(e._s(e.$t("info.17")))]):e._e()],1)])],1)],1)]),n("footer")]):e._e()},s=[],i=(n("99af"),n("7db0"),n("4160"),n("a9e3"),n("ac1f"),n("1276"),n("159b"),n("2909")),o=n("3835"),r={data:function(){return{tabActive:0,collapseActive:[],collapseActive2:[],cstName:"",panelData:[],cstData:[]}},props:{showPartListLayer:{type:Boolean},currentCstData:{type:Object},panelCodeList:{type:Array,default:function(){return[]}}},watch:{currentCstData:function(e){var t=this;if(e){var n=e.Name,a=e.Panel,s=e.PanelArray,r=e.Ironware,c=e.AlumStrip,l=e.Glass,d=a||s;this.cstName=n;var u=[],h={};d.forEach((function(e){var n=t.panelCodeList.find((function(t){return t.shortid===e.Id}));if(n&&n.code){e.Code=n.code;var a=n.code.substring(n.code.length-3,n.code.length);e.panelNumber=String(Number(a))}var s=e.Size.split("*"),i=Object(o["a"])(s,3),r=i[0],c=i[1],l=i[2];if(e.width=r,e.height=c,e.depth=l,h[e.CstIndex])u.forEach((function(t){t.CstIndex===e.CstIndex&&t.list.push(e)}));else{t.collapseActive.push(e.CstIndex);var d={CstName:e.CstName,CstIndex:e.CstIndex,list:[e]};u.push(d),h[e.CstIndex]=e.CstIndex}})),u.forEach((function(e){e.list.sort((function(e,t){return e.panelNumber-t.panelNumber}))})),this.panelData=[].concat(u),!r&&(r=[]),!c&&(c=[]),!l&&(l=[]);var f=[].concat(Object(i["a"])(r),Object(i["a"])(c),Object(i["a"])(l)),p=[],m={};f.forEach((function(e){if(m[e.CstIndex])p.forEach((function(t){t.CstIndex===e.CstIndex&&t.list.push(e)}));else{t.collapseActive2.push(e.CstIndex);var n={CstName:e.CstName,CstIndex:e.CstIndex,list:[e]};p.push(n),m[e.CstIndex]=e.CstIndex}})),this.cstData=[].concat(p)}}},methods:{closePartListLayer:function(){this.$emit("update:showPartListLayer",!1)}}},c=r,l=(n("2a54"),n("2877")),d=Object(l["a"])(c,a,s,!1,null,"6fc27101",null);t["a"]=d.exports},f75e:function(e,t,n){e.exports=n.p+"static/media/扫描成功.21a64a72.mp3"}}]);