(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-630e3e24"],{"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 u=0;u<a.length;u++){const e=a[u];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,u,d,h,p,f,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":u=e[a++]*t+n,d=e[a++]*t+s,h=e[a++]*t+n,p=e[a++]*t+s,r.quadraticCurveTo(h,p,u,d);break;case"b":u=e[a++]*t+n,d=e[a++]*t+s,h=e[a++]*t+n,p=e[a++]*t+s,f=e[a++]*t+n,m=e[a++]*t+s,r.bezierCurveTo(h,p,f,m,u,d);break}}}return{offsetX:o.ha*t,path:r}}},"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,u=0,d=[];while(l>u)n=c[u++],a&&!o.call(r,n)||d.push(e?[n,r[n]]:r[n]);return d}};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],u=c[1],d=c[2];if(e.width=l,e.height=u,e.depth=d,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},"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},b0fb:function(e,t,n){"use strict";n("fb64")},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"},e130:function(e,t,n){e.exports=n.p+"static/img/crate.da499b85.gif"},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"],u=new a["eb"],d=new a["eb"],h=new a["eb"],p=new a["eb"],f=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),u.fromArray(a,t),d.fromArray(a,n),p.subVectors(d,u),h.subVectors(l,u),p.cross(h),p.normalize(),s.push(p.x,p.y,p.z),s.push(p.x,p.y,p.z),s.push(p.x,p.y,p.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 u=this.parseVertexIndex(e,l),d=this.parseVertexIndex(t,l),h=this.parseVertexIndex(n,l);if(this.addVertex(u,d,h),this.addColor(u,d,h),void 0!==o&&""!==o){const e=this.normals.length;u=this.parseNormalIndex(o,e),d=this.parseNormalIndex(r,e),h=this.parseNormalIndex(c,e),this.addNormal(u,d,h)}else this.addFaceNormal(u,d,h);if(void 0!==a&&""!==a){const e=this.uvs.length;u=this.parseUVIndex(a,e),d=this.parseUVIndex(s,e),h=this.parseUVIndex(i,e),this.addUV(u,d,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,p=n.length;h<p;h++){const e=n[h].trimStart();if(0===e.length)continue;const u=e.charAt(0);if("#"!==u)if("v"===u){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?(f.setRGB(parseFloat(n[4]),parseFloat(n[5]),parseFloat(n[6]),a["V"]),t.colors.push(f.r,f.g,f.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"===u){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"===u){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"===u){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"===u){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 u=new a["u"];u.materialLibraries=[].concat(t.materialLibraries);const d=!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length);if(!0===d)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 d=[];for(let s=0,u=i.length;s<u;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),d.push(l)}let h;if(d.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,d):r?new a["P"](l,d):new a["I"](l,d)}else h=o?new a["z"](l,d[0]):r?new a["P"](l,d[0]):new a["I"](l,d[0]);h.name=e.name,u.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);u.add(s)}return u}}},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,u=a||s;this.cstName=n;var d=[],h={};u.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])d.forEach((function(t){t.CstIndex===e.CstIndex&&t.list.push(e)}));else{t.collapseActive.push(e.CstIndex);var u={CstName:e.CstName,CstIndex:e.CstIndex,list:[e]};d.push(u),h[e.CstIndex]=e.CstIndex}})),d.forEach((function(e){e.list.sort((function(e,t){return e.panelNumber-t.panelNumber}))})),this.panelData=[].concat(d),!r&&(r=[]),!c&&(c=[]),!l&&(l=[]);var p=[].concat(Object(i["a"])(r),Object(i["a"])(c),Object(i["a"])(l)),f=[],m={};p.forEach((function(e){if(m[e.CstIndex])f.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]};f.push(n),m[e.CstIndex]=e.CstIndex}})),this.cstData=[].concat(f)}}},methods:{closePartListLayer:function(){this.$emit("update:showPartListLayer",!1)}}},c=r,l=(n("2a54"),n("2877")),u=Object(l["a"])(c,a,s,!1,null,"6fc27101",null);t["a"]=u.exports},f521:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"panelScan",attrs:{id:"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.clickGridIcon}},[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.changeModelState}},[n("i",{staticClass:"iconfont iconxiankuang"}),n("span",[e._v(e._s(e.modelText))])]),n("div",{staticClass:"iconWrapper",on:{click:e.hideSelectedPanels}},[n("i",{staticClass:"iconfont iconyincangbukejian"}),n("span",[e._v(e._s(e.$t("info.40")))])]),n("div",{staticClass:"iconWrapper",on:{click:e.clickPartList}},[n("i",{staticClass:"iconfont iconiconfront-"}),n("span",[e._v(e._s(e.$t("info.12")))])])]):e._e()]),n("div",{staticClass:"mainWrapper"},[n("div",{ref:"model",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:"toolbar",class:["toolbar",e.$i18n.locale]},[n("ul",[e._l(e.toolbarList,(function(t,a){return n("li",{key:a,on:{click:function(t){return t.stopPropagation(),e.clickToolbar(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.hideSelectedPanels}},[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.clickGridIcon}},[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.changeModelState}},[n("i",{staticClass:"iconfont iconxiankuang"}),n("span",[e._v(e._s(e.modelText))])]),e.isMobile?e._e():n("li",{on:{click:e.clickPartList}},[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.selectedModel(a)}}},[n("img",{class:{active:t.Id===e.defaultCstId},attrs:{src:t.cstPath+"/"+t.Image,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)},s=[];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("a4d3"),n("e01a"),n("d28b");function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o=n("2909"),r=(n("96cf"),n("1da1")),c=n("5530"),l=(n("e17f"),n("2241")),u=n("3835"),d=n("bc3a"),h=n.n(d),p=n("5a89"),f=n("cf1c"),m={setCookie:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),document.cookie=e+"="+escape(t)+";expires="+a.toGMTString()},getCookie:function(e){for(var t=document.cookie,n=t.split("; "),a=0;a<n.length;a++)if(n[a].split("=")[0]==e)return n[a].split("=")[1]},removeCookie:function(e){this.setCookie(e,"",-1)}},v=n("6c01"),b=n("466f"),g=n("affd"),w=n("cf55"),x=n("e731"),y=n("78e9"),C=n("e642");class P extends p["C"]{constructor(e){super(e)}load(e,t,n,a){const s=this,i=""===this.path?p["D"].extractUrlBase(e):this.path,o=new p["p"](this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(s.parse(n,i))}catch(o){a?a(o):console.error(o),s.manager.itemError(e)}}),n,a)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){const n=e.split("\n");let a={};const s=/\s+/,i={};for(let r=0;r<n.length;r++){let e=n[r];if(e=e.trim(),0===e.length||"#"===e.charAt(0))continue;const t=e.indexOf(" ");let o=t>=0?e.substring(0,t):e;o=o.toLowerCase();let c=t>=0?e.substring(t+1):"";if(c=c.trim(),"newmtl"===o)a={name:c},i[c]=a;else if("ka"===o||"kd"===o||"ks"===o||"ke"===o){const e=c.split(s,3);a[o]=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])]}else a[o]=c}const o=new I(this.resourcePath||t,this.materialOptions);return o.setCrossOrigin(this.crossOrigin),o.setManager(this.manager),o.setMaterials(i),o}}class I{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=void 0!==this.options.side?this.options.side:p["s"],this.wrap=void 0!==this.options.wrap?this.options.wrap:p["U"]}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const t={};for(const n in e){const a=e[n],s={};t[n]=s;for(const e in a){let t=!0,n=a[e];const i=e.toLowerCase();switch(i){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(n=[n[0]/255,n[1]/255,n[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===n[0]&&0===n[1]&&0===n[2]&&(t=!1);break;default:break}t&&(s[i]=n)}}return t}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const t=this,n=this.materialsInfo[e],a={name:e,side:this.side};function s(e,t){return"string"!==typeof t||""===t?"":/^https?:\/\//i.test(t)?t:e+t}function i(e,n){if(a[e])return;const i=t.getTextureParams(n,a),o=t.loadTexture(s(t.baseUrl,i.url));o.repeat.copy(i.scale),o.offset.copy(i.offset),o.wrapS=t.wrap,o.wrapT=t.wrap,"map"!==e&&"emissiveMap"!==e||(o.colorSpace=p["V"]),a[e]=o}for(const o in n){const e=n[o];let t;if(""!==e)switch(o.toLowerCase()){case"kd":a.color=p["h"].toWorkingColorSpace((new p["g"]).fromArray(e),p["V"]);break;case"ks":a.specular=p["h"].toWorkingColorSpace((new p["g"]).fromArray(e),p["V"]);break;case"ke":a.emissive=p["h"].toWorkingColorSpace((new p["g"]).fromArray(e),p["V"]);break;case"map_kd":i("map",e);break;case"map_ks":i("specularMap",e);break;case"map_ke":i("emissiveMap",e);break;case"norm":i("normalMap",e);break;case"map_bump":case"bump":i("bumpMap",e);break;case"map_d":i("alphaMap",e),a.transparent=!0;break;case"ns":a.shininess=parseFloat(e);break;case"d":t=parseFloat(e),t<1&&(a.opacity=t,a.transparent=!0);break;case"tr":t=parseFloat(e),this.options&&this.options.invertTrProperty&&(t=1-t),t>0&&(a.opacity=1-t,a.transparent=!0);break;default:break}}return this.materials[e]=new p["K"](a),this.materials[e]}getTextureParams(e,t){const n={scale:new p["db"](1,1),offset:new p["db"](0,0)},a=e.split(/\s+/);let s;return s=a.indexOf("-bm"),s>=0&&(t.bumpScale=parseFloat(a[s+1]),a.splice(s,2)),s=a.indexOf("-s"),s>=0&&(n.scale.set(parseFloat(a[s+1]),parseFloat(a[s+2])),a.splice(s,4)),s=a.indexOf("-o"),s>=0&&(n.offset.set(parseFloat(a[s+1]),parseFloat(a[s+2])),a.splice(s,4)),n.url=a.join(" ").trim(),n}loadTexture(e,t,n,a,s){const i=void 0!==this.manager?this.manager:p["l"];let o=i.getHandler(e);null===o&&(o=new p["cb"](i)),o.setCrossOrigin&&o.setCrossOrigin(this.crossOrigin);const r=o.load(e,n,a,s);return void 0!==t&&(r.mapping=t),r}}var _,L,k,D,$,j,T,M,O=n("4a8d"),S=n("4721"),N={name:"model",data:function(){return{meshList:[],modelText:this.$t("info.31"),materialType:"panelBasicMaterial",IndexedDB:void 0,projectInfo:{},defaultCstId:"",defaultPanelId:"",currentPanelId:"",currentModelPanelList:[],currentModelPanelData:[],currentModelHardwareList:[],currentRouterName:"model",toolbarHeight:0,newPanelId:"",newHouseId:"",selectedIndex:void 0,toolbarList:[{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")}],toolbarListBackup:[],showModelList:!1,cabinetParameters:[],panelParameters:[],panelCodeList:[],selectedPanel:void 0,isAllPanelLoaded:!1,dataLoadingException:!1,modelList:[],textStyleFont:{},showPartListLayer:!1,currentCstData:{},scanText:"",dataProcessing:!1,isMobile:!0,showGrid:!0,cabinetGroupName:"",showDiagramList:!1,showActionSheet:!1,weChatOrderList:[],currentOrderCode:"",timeOutList:[],isStopExecution:!1}},components:{"part-list":x["a"],"panel-list":y["a"]},beforeRouteUpdate:function(e,t,n){var a=this;if("model"===e.name){var s="".concat(this.cabinetGroupName?this.cabinetGroupName+"-":"").concat(this.$t("info.183"));b["a"].setWebPageTitle(s)}if(this.currentRouterName=e.name,"scanPage"===t.name||"appScan"===t.name){this.selectedIndex=void 0;var i=localStorage.getItem("ScanedUrl"),o=localStorage.getItem("panelId");if(localStorage.removeItem("ScanedUrl"),localStorage.removeItem("panelId"),i){var r=i.split("?")[1];if(!r){var c=i,d=this.panelCodeList.find((function(e){return e.code===c}));if(!d)return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),void n();var h=d.shortid;return this.panelCodeList=[],this.meshList=[],this.panelParameters=[],$.children=[],this.resetOrbitControls(!0),this.restoreDefaultMaterials(),this.getAllModelData(h),void n()}if(i.includes("v="))return void location.replace(i);var p=r.split("="),f=Object(u["a"])(p,2),m=f[0],v=f[1],g=["p","h"];if(!g.includes(m))return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),void n();if(!v)return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),void n();var w=setTimeout((function(){l["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["p"===m?"newPanelId":"newHouseId"]=v,a.panelCodeList=[],a.meshList=[],a.panelParameters=[],$.children=[],a.resetOrbitControls(!0),a.restoreDefaultMaterials(),a.getAllModelData(a.newPanelId,a.newHouseId),n()})).catch((function(){n()}))}));this.timeOutList.push(w)}o&&(this.panelCodeList=[],this.meshList=[],this.panelParameters=[],$.children=[],this.resetOrbitControls(!0),this.restoreDefaultMaterials(),this.getAllModelData(o),n())}n()},computed:{newPanelParameters:function(){var e=["房间","柜组ID","柜组名称"];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)),b["a"].setWebPageTitle(t)}},created:function(){"en"===this.$i18n.locale&&(this.toolbarList=this.toolbarList.filter((function(e){return"iconjinduchaxun"!==e.icon})));var e=this.$route.query.v;if(e){this.isStopExecution=!0;var t=Object(c["a"])({},this.$route.query);return delete t.v,void this.$router.replace({name:"model".concat(e),query:Object(c["a"])({},t)})}this.isMobile=b["a"].isMobile();var n=localStorage.getItem("gridType");if(n&&(this.showGrid="showGrid"===n),!this.$store.state.isInitializedWxConfig){var a={link:location.href};Object(w["b"])(a)}},mounted:function(){this.isStopExecution||(this.$route.query.debug&&new this.$Vconsole,this.initPage())},beforeDestroy:function(){this.timeOutList.forEach((function(e){e&&clearTimeout(e)}))},methods:{initPage:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(){var t,n,a,s,i,r,c,l,u=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=document.documentElement.clientHeight,document.getElementById("panelScan").style.height=t+"px",Object(v["a"])(this),this.toolbarHeight=this.$refs.toolbar.offsetHeight,this.toolbarListBackup=JSON.parse(JSON.stringify(this.toolbarList)),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,r=a.weChatOrderList,r&&(c=JSON.parse(r),c.forEach((function(e){e.name=e.Code,e.subname=e.OrderName})),this.currentOrderCode=c[0].Code,this.showDiagramList=!0,this.weChatOrderList=Object(o["a"])(c)),this.newPanelId=s,this.newHouseId=i,e.next=13,f["a"].openDB("modelData");case 13:this.IndexedDB=e.sent,this.loadTextStyleJson(),this.checkCookie(),l=setTimeout((function(){u.$nextTick((function(){u.initScene(),u.getAllModelData(s,i)}))}),180),this.timeOutList.push(l);case 18:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),inputEnterEvent:function(){if(this.dataProcessing)return this.scanText="",void b["a"].playLocalAudio(g["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 b["a"].playLocalAudio(g["a"][this.$t("info.25")]);var a=t.split("="),s=Object(u["a"])(a,2),i=s[0],o=s[1],r=["p","h"];if(r.includes(i)){if(!o)return this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),b["a"].playLocalAudio(g["a"][this.$t("info.25")]),void(this.dataProcessing=!1);this.newPanelId="",this.newHouseId="",this["p"===i?"newPanelId":"newHouseId"]=o,this.panelCodeList=[],this.meshList=[],$.children=[],this.resetOrbitControls(),this.restoreDefaultMaterials();var c="Swtich";this.getAllModelData(this.newPanelId,this.newHouseId,c),this.toolbarList=JSON.parse(JSON.stringify(this.toolbarListBackup))}else this.$toast.fail({message:"".concat(this.$t("info.25"),"！")}),b["a"].playLocalAudio(g["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"),"！")}),b["a"].playLocalAudio(g["a"][this.$t("info.43")]),void(this.dataProcessing=!1);var a=n.shortid;this.currentPanelId=a,this.panelCodeList=[],this.meshList=[],$.children=[],this.resetOrbitControls(!0),this.restoreDefaultMaterials();var s="Highlight";this.getAllModelData(a,"",s)}},renderTargetPanel:function(e){var t=e.Code,n=e.Id,a=new p["J"]({color:15977863,side:p["m"]}),s=new p["J"]({color:15921906,side:p["m"]}),i=new p["J"]({color:16776960,side:p["m"],transparent:!0,opacity:.6,depthTest:!1}),o=new p["y"]({color:7829367,linewidth:1,transparent:!0,opacity:1,depthTest:!0}),r=new p["y"]({color:15610023,linewidth:1,transparent:!0,opacity:.4,depthTest:!1});this.meshList.forEach((function(e){var n=e.userData,c=n.panelBarcode,l=n.panel_type,u=n.isTargetPanel;u&&(e.material="panel"===l?a:s,e.userData.isTargetPanel=!1,e.children&&e.children.forEach((function(e){"LineSegments"===e.type&&(e.material=o)}))),c===t&&(e.material=i,e.userData.isTargetPanel=!0,e.children&&e.children.forEach((function(e){"LineSegments"===e.type&&(e.material=r)})))})),this.modelText===this.$t("info.46")&&($.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(),b["a"].playLocalAudio(g["a"][this.$t("info.24")])},selectOrder:function(e){var t=e.Web3dviewUrl;if(t){var n=b["a"].getUrlParameter(t),a=n.h;a?(this.newHouseId=a,this.meshList=[],$.children=[],this.restoreDefaultMaterials(),this.resetOrbitControls(),this.getAllModelData("",a)):this.$toast("".concat(this.$t("info.45"),"！"))}this.showActionSheet=!1},loadNewHardwareMesh:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(){var t,n,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=new P,n=new C["a"],t.load("https://h.techtimesun.com/globalData/model/sxy1000.mtl",(function(e){e.preload(),console.log(n),console.log(e),n.setMaterials(e),n.load("https://h.techtimesun.com/globalData/model/sxy1000.obj",(function(e){var t=new p["c"];t.setFromObject(e),console.log("x=".concat(t.max.x-t.min.x),"y=".concat(t.max.y-t.min.y),"z=".concat(t.max.z-t.min.z)),e.position.y=0,e.position.z=0,e.traverse((function(e){p["I"]})),L.add(e),a.renderModel()}))}));case 3:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),loadTextStyleJson:function(){var e=this,t=new O["a"];t.load("/font/typeface.json",(function(t){e.textStyleFont=t}))},initScene:function(){var e=this.$refs.model.offsetWidth,t=this.$refs.model.offsetHeight,n=this.$refs.model;L=new p["W"],$=new p["u"],_=new p["M"](45,e/t,1,8e4),_.up.set(0,0,1),_.position.set(0,-5500,6100),L.add(_),L.background=new p["g"](15658734);var a=new p["a"](16777215);L.add(a);var s=new p["O"](16777215,50);_.add(s);var i=new p["t"](6e3,20,12434620,12434620);i.rotateOnAxis(new p["eb"](1,0,0),Math.PI/180*90),i.position.z=0,i.visible=this.showGrid,L.add(i),k=new p["fb"]({antialias:!0,alpha:!0}),k.setPixelRatio(window.devicePixelRatio),k.setSize(e,t),n.appendChild(k.domElement),D=new S["a"](_,k.domElement),D.addEventListener("change",this.renderModel),D.target.set(0,0,500),D.update(),window.addEventListener("resize",b["a"].debounce(this.onWindowResize,300),!1),n.addEventListener("click",this.onMouseDblclick,!0),n.addEventListener("touchstart",this.onMouseDblclick,!0)},updateCameraParameter:function(){var e=new p["c"];e.expandByObject($);var t=new p["eb"];e.getCenter(t);var n=0,a=0,s=e.max.z-e.min.z,i=e.max.x-e.min.x;if(this.isMobile)n=i>s?2*s:1.4*s,a=-(i<1e3?3e3:i<=1500?3*i:2.2*i);else{n=1.3*s;var o=s>2e3?2*s:s>1e3?2.4*s:s>500?3.5*s:4.3*s;a=-o}_.position.set(0,a,n),D.update()},resetOrbitControls:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateCameraParameter(),e&&D.reset(),D.target.set(0,0,500),D.update()},getAllModelData:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t,n,a){var s,c=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.delegateYield(regeneratorRuntime.mark((function e(){var s,i,l,u,d,p,m,v,w,x,y,C,P,I,_,k,D,j,T,M,O,S,N,A,E,B,z,R,H,F,G,V,J;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(c.$toast.loading({message:c.$t("info.47"),duration:0}),s="",i="",!t){e.next=12;break}return e.next=6,h.a.get("".concat(c.$JsonProxy).concat(c.$AZT_API,"/data/P/panel_").concat(t,".json"));case 6:l=e.sent,u=l.data.PanelIndex,d=u.HouseId,p=u.RoomId,m=u.CstId,v=u.Panel,w=u.Id,n=d,s=p,i=m,c.defaultPanelId=v||w;case 12:return e.next=14,h.a.get("".concat(c.$JsonProxy).concat(c.$AZT_API,"/data/House_").concat(n,"/house.json"));case 14:return x=e.sent,y=x.data,C=y.LockNum,P=y.ProjectNum,c.projectInfo={houseId:n,locknum:C,projectcode:P,h:"".concat(location.origin,"/#/m?h=").concat(n)},I=Object(o["a"])(y.Rooms),!s&&(s=y.Rooms[0].Id),_=[],I.forEach(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:a="".concat(c.$AZT_API,"/data/House_").concat(n,"/Room_").concat(t.Id),s=new Promise((function(e){h.a.get("".concat(c.$JsonProxy).concat(a,"/room.json")).then(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n.data.Csts&&n.data.Csts.forEach((function(e){e.cstPath=a+"/Cst_".concat(e.Id)})),e(n.data);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())})),_.push(s);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=24,Promise.all(_);case 24:if(k=e.sent,D=[],k.forEach((function(e){e.Csts&&e.Csts.forEach((function(e){D.push(e.cstPath)}))})),0!==D.length){e.next=32;break}return c.$toast("".concat(c.$t("info.48"),"！")),c.dataProcessing=!1,a&&b["a"].playLocalAudio(g["a"][c.$t("info.48")]),e.abrupt("return",{v:void 0});case 32:return j=[],D.forEach((function(e){var t=new Promise((function(t){h.a.get("".concat(c.$JsonProxy).concat(e,"/cst.json")).then((function(n){n.data.cstPath=e,t(n.data)}))}));j.push(t)})),e.next=36,Promise.all(j);case 36:T=e.sent,M=T.find((function(e){return e.Id===i})),M||(M=T[0],i=T[0].Id),c.defaultCstId=i,O=M,S=O.Name,N=O.Panel,A=O.Model,E=O.Parameters,B=O.cstPath,c.cabinetGroupName=S,c.cabinetParameters=Object(o["a"])(E),z=[],R=[],H=regeneratorRuntime.mark((function e(t){var n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,f["a"].read(c.IndexedDB,"model",N[t].Id);case 2:n=e.sent,n?R.push(n.modelData):(a=new Promise((function(e){h.a.get("".concat(c.$JsonProxy).concat(B,"/panel_").concat(N[t].Id,".json")).then((function(t){e(t.data)}))})),z.push(a));case 4:case"end":return e.stop()}}),e)})),F=0;case 47:if(!(F<N.length)){e.next=52;break}return e.delegateYield(H(F),"t0",49);case 49:F++,e.next=47;break;case 52:return G=[],A&&A.forEach((function(e){var t=new Promise((function(t){h.a.get("".concat(c.$JsonProxy).concat(B,"/model_").concat(e.Id,".json")).then((function(e){t(e.data)}))}));G.push(t)})),e.next=56,Promise.all(z);case 56:return V=e.sent,e.next=59,Promise.all(G);case 59:return J=e.sent,V=[].concat(Object(o["a"])(V),R),c.currentModelPanelList=Object(o["a"])(V),c.currentModelHardwareList=Object(o["a"])(J),V.forEach((function(e){c.addPanelDataToIndexedDB(e),c.panelCodeList.push({code:e.Code,shortid:e.unique_code}),c.loadPanelMesh(e)})),e.next=66,c.loadHardwareMesh(J);case 66:c.meshList.forEach((function(e){$.add(e)})),c.initCabinetModelLocation(),L.add($),c.updateCameraParameter(),c.renderModel(),c.$toast.clear(),c.dataProcessing=!1,a&&("Swtich"===a?b["a"].playLocalAudio(g["a"][c.$t("info.49")]):b["a"].playLocalAudio(g["a"][c.$t("info.24")])),T.forEach((function(e){e.Id===i&&(e.hardwareList=Object(o["a"])(J))})),c.currentModelPanelData=Object(o["a"])(M.Panel),c.currentPanelId=t,c.loadRemainingPanels(i,T);case 78:case"end":return e.stop()}}),e)}))(),"t0",2);case 2:if(s=e.t0,"object"!==i(s)){e.next=5;break}return e.abrupt("return",s.v);case 5:e.next=10;break;case 7:e.prev=7,e.t1=e["catch"](0),e.t1&&(this.$toast.fail({message:"".concat(t?this.$t("info.50"):this.$t("info.51"))}),this.dataLoadingException=!0,this.isAllPanelLoaded=!0,this.dataProcessing=!1);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(t,n,a){return e.apply(this,arguments)}return t}(),loadRemainingPanels:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t,n){var a,s,i,r,c,l,u=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=[],s=[],i=[],r=regeneratorRuntime.mark((function e(r){var c,l,d,p,m,v,b,g,w,x;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(c=n[r],l=c.Id,d=c.cstPath,p=c.Panel,m=c.Model,l===t){e.next=15;break}v=regeneratorRuntime.mark((function e(t){var n,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,f["a"].read(u.IndexedDB,"model",p[t].Id);case 2:n=e.sent,n?i.push(n.modelData):(s=new Promise((function(e){h.a.get("".concat(u.$JsonProxy).concat(d,"/panel_").concat(p[t].Id,".json")).then((function(t){e(t.data)}))})),a.push(s));case 4:case"end":return e.stop()}}),e)})),b=0;case 4:if(!(b<p.length)){e.next=9;break}return e.delegateYield(v(b),"t0",6);case 6:b++,e.next=4;break;case 9:if(m)for(g=function(e){var t=new Promise((function(t){h.a.get("".concat(u.$JsonProxy).concat(d,"/model_").concat(m[e].Id,".json")).then((function(e){t(e.data)}))}));s.push(t)},w=0;w<m.length;w++)g(w);return e.next=12,Promise.all(s);case 12:x=e.sent,n[r].hardwareList=Object(o["a"])(x),s=[];case 15:case"end":return e.stop()}}),e)})),c=0;case 5:if(!(c<n.length)){e.next=10;break}return e.delegateYield(r(c),"t0",7);case 7:c++,e.next=5;break;case 10:return this.modelList=Object(o["a"])(n),e.next=13,Promise.all(a);case 13:l=e.sent,l=[].concat(Object(o["a"])(l),i),this.isAllPanelLoaded=!0,l.forEach((function(e,t){t<l.length&&u.addPanelDataToIndexedDB(e),u.panelCodeList.push({code:e.Code,shortid:e.unique_code})}));case 17:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),addPanelDataToIndexedDB:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.unique_code,e.next=3,f["a"].read(this.IndexedDB,"model",n);case 3:a=e.sent,a||f["a"].addData(this.IndexedDB,"model","panelId",{panelId:n,addedTime:new Date,modelData:t});case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),loadPanelMesh:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,i,o,r,c,l,u,d,h,f,m,v,b,g,w,x,y,C,P,I,_,L,k,D,$=this,j=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=j.length>1&&void 0!==j[1]&&j[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 p["f"],r=new Float32Array(3*i*3),c=new Float32Array(3*i*3),l=0;l<r.length;l+=9)u=l/3,a[u]&&(r[l]=a[u].x,r[l+1]=a[u].y,r[l+2]=a[u].z,r[l+3]=a[u+1].x,r[l+4]=a[u+1].y,r[l+5]=a[u+1].z,r[l+6]=a[u+2].x,r[l+7]=a[u+2].y,r[l+8]=a[u+2].z,c[l]=s[u].x,c[l+1]=s[u].y,c[l+2]=s[u].z,c[l+3]=s[u+1].x,c[l+4]=s[u+1].y,c[l+5]=s[u+1].z,c[l+6]=s[u+2].x,c[l+7]=s[u+2].y,c[l+8]=s[u+2].z);o.setAttribute("position",new p["e"](r,3)),o.setAttribute("normal",new p["e"](c,3)),o.computeBoundingSphere(),d=new p["J"]({color:15977863,side:p["m"]}),h=new p["J"]({color:15921906,side:p["m"]}),f=new p["J"]({color:16776960,side:p["m"],transparent:!0,opacity:.6,depthTest:!1}),m=void 0,v=t.Id||t.unique_code,m=this.defaultPanelId===v?f:"panel"===t.panel_type?d:h,b=new p["I"](o,m),g=t.Code.substring(t.Code.length-3,t.Code.length),g=String(Number(g)),this.addPanelNumber(g,t,n,b),w=this.defaultPanelId===v,x=new p["y"]({color:w?15610023:7829367,linewidth:1,transparent:!0,opacity:w?.4:1,depthTest:!w}),y=new p["n"](o,1),C=new p["z"](y,x),b.add(C),P=t.meshInstanceList[0],I=P.mesh_to_world,_=P.mesh_expose_to_world,L=n?_:I,k=this.MakeMatrix4FromSoftware(L),b.userData={parameters:t.Parameters,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===v,panelNumber:g,panelId:t.unique_code,panelBarcode:t.Code},b.applyMatrix4(k),b.receiveShadow=!0,this.meshList.push(b),e.next=46;break;case 41:e.prev=41,e.t0=e["catch"](1),console.log(e.t0),D=setTimeout((function(){$.$toast({message:$.$t("info.339"),icon:"none",duration:2500})}),50),this.timeOutList.push(D);case 46:case"end":return e.stop()}}),e,this,[[1,41]])})));function t(t){return e.apply(this,arguments)}return t}(),addPanelNumber:function(e,t,n,a){if(Number(e)){var s=new p["J"]({color:255,transparent:!0,opacity:1,side:p["m"]}),i=this.computedFontSize(a),o=this.textStyleFont.generateShapes(e,i),r=new p["Y"](o),c=new p["Y"](o);r.computeBoundingBox(),c.computeBoundingBox();var l=t.panel_center,d=t.panel_expose_center,h=n?d:l,f=Object(u["a"])(h,2),m=f[0],v=f[1],b=m.x,g=m.y,w=m.z,x=v.x,y=v.y,C=v.z,P=new p["eb"](b-x,-Math.abs(g-y),w-C),I=new p["eb"](x-b,y-g,C-w);P.normalize();var _=10;b+=P.x*_,g+=g-y>0?P.y*_*2:P.y*_,w+=P.z*_,I.normalize(),x-=7*P.x,y-=7*P.y,C-=7*P.z,r.lookAt(new p["eb"](b-x,g-y,w-C)),r.translate(b-(r.boundingBox.max.x-r.boundingBox.min.x)/2,g-(r.boundingBox.max.y-r.boundingBox.min.y)/2,w-(r.boundingBox.max.z-r.boundingBox.min.z)/2),c.lookAt(new p["eb"](x-b,y-g,C-w)),c.translate(x-1*(c.boundingBox.max.x-c.boundingBox.min.x)/2,y-1*(c.boundingBox.max.y-c.boundingBox.min.y)/2,C-1*(c.boundingBox.max.z-c.boundingBox.min.z)/2);var L=new p["I"](r,s);L.userData.meshType="numberText",L.userData.panelNumber=e,L.visible=!1;var k=new p["I"](c,s);k.userData.meshType="numberText",k.userData.panelNumber=e,k.visible=!1,$.add(L)}},computedFontSize:function(e){var t=new p["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,u=Array.from([a-r,s-c,i-l]).sort((function(e,t){return e-t})),d=120;return u[1]<d&&(d=u[1]-10),d},loadHardwareMesh:function(){var e=Object(r["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 p["J"]({color:13421772}),s=new p["J"]({color:9364974,transparent:!0,opacity:.5,depthWrite:!1}),o=e.model,r=e.meshInstanceList,c=e.Parameters,l=e.CorrelateID,u=r[0],d=u.mesh_to_world,h=u.mesh_expose_to_world,f=n?h:d,m=i.MakeMatrix4FromSoftware(f),v=new Promise((function(e){(new C["a"]).load("".concat(i.$AZT_API,"/globalData/model/").concat(o),(function(n){n.traverse((function(e){if(e instanceof p["I"]){var n=new p["y"]({color:6710886,linewidth:1}),a=new p["n"](e.geometry),i=new p["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(m),n.receiveShadow=!0,e(n)}))}));a.push(v)})),e.next=5,Promise.all(a);case 5:s=e.sent,s.forEach((function(e){$.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")},explodeOrRestore:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var n,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t||(this.selectedIndex=void 0),this.$toast.loading({message:this.$t("info.47"),duration:0}),this.toolbarList.forEach((function(e){"iconqiehuan1"===e.icon&&(e.activeName=a.$t("info.36")),"iconshuzi"===e.icon&&(e.activeName=a.$t("info.38"))})),this.meshList=[],$.children=[],this.currentModelPanelList.forEach((function(e){a.loadPanelMesh(e,t)})),this.meshList.forEach((function(e){$.add(e)})),e.next=9,this.loadHardwareMesh(this.currentModelHardwareList,t);case 9:this.resetOrbitControls(),this.initCabinetModelLocation(),L.add($),this.showModelList=!1,this.renderModel(),n=setTimeout((function(){a.$toast.clear()})),this.timeOutList.push(n);case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),showOrHideAllDoorPanel:function(e){var t=this,n=[],a=[];$.children.forEach((function(t){"door"===t.userData.panel_type&&(t.visible=e,n.push(t.userData.panelNumber),a.push(t.userData.panelId))}));var s=this.toolbarList[4].activeName;$.children.forEach((function(i){"numberText"===i.userData.meshType&&n.includes(i.userData.panelNumber)&&(i.visible=!!e&&s!==t.$t("info.38")),"hardware"===i.userData.meshType&&a.includes(i.userData.panelId)&&i.children.forEach((function(t){return t.visible=e}))})),e&&(this.selectedIndex=void 0),this.renderModel()},showOrHideNumbers:function(e){var t=[];$.children.forEach((function(e){"panel"!==e.userData.meshType||e.visible||t.push(e.userData.panelNumber)})),$.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()},handleToolbarText:function(e){var t=Object(o["a"])(this.toolbarList),n=t[e],a=n.activeName,s=n.name1,i=n.name2;return a=a===s?i:s,this.toolbarList[e].activeName=a,a},selectedModel:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,i,r,c,l,u,d=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.toolbarList=JSON.parse(JSON.stringify(this.toolbarListBackup)),n=this.modelList[t],a=n.Id,s=n.Name,i=n.Panel,r=n.Parameters,c=n.hardwareList,this.currentModelPanelData=Object(o["a"])(i),this.defaultCstId=a,this.cabinetGroupName=s,this.cabinetParameters=Object(o["a"])(r),l=[],i.forEach((function(e){var t=new Promise((function(t){t(f["a"].read(d.IndexedDB,"model",e.Id))}));l.push(t)})),e.next=12,Promise.all(l);case 12:return u=e.sent,this.currentModelPanelList=u.map((function(e){return e.modelData})),this.meshList=[],$.children=[],u.forEach((function(e){d.loadPanelMesh(e.modelData)})),this.meshList.forEach((function(e){$.add(e)})),this.currentModelHardwareList=Object(o["a"])(c),e.next=21,this.loadHardwareMesh(c);case 21:L.add($),this.resetOrbitControls(),this.initCabinetModelLocation(),this.renderModel(),this.showModelList=!1,this.selectedIndex=void 0,this.$toast.clear();case 28:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),onMouseDblclick:function(e){if("model"===this.currentRouterName){this.selectedIndex=void 0;var t=this.getIntersects(e);if(this.selectedPanel){var n=this.selectedPanel.userData.meshType;if("hardware"===n){var a=this.selectedPanel.userData.isGlass;this.selectedPanel.children.forEach((function(e){a?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 s,i,o=t.find((function(e){return("panel"===e.object.userData.meshType||"hardware"===e.object.userData.meshType)&&e.object.visible}));if(o)if("hardware"===o.object.userData.meshType)o.object.parent.children.forEach((function(e){e.material.color.set(255)})),this.panelParameters=(null===(s=o.object.parent.userData)||void 0===s?void 0:s.parameters)||[],this.selectedPanel=o.object.parent;else o.object.children.forEach((function(e){"LineSegments"===e.type&&(e.renderOrder=1,e.material.depthTest=!1,e.material.color.set(255))})),this.panelParameters=(null===(i=o.object.userData)||void 0===i?void 0:i.parameters)||[],this.selectedPanel=o.object}else this.panelParameters=[];this.renderModel()}},getIntersects:function(e){var t,n;e.preventDefault();var a=new p["T"],s=new p["db"],i=(null===(t=this.$refs.model)||void 0===t?void 0:t.offsetWidth)||document.body.offsetWidth,o=(null===(n=this.$refs.model)||void 0===n?void 0:n.offsetHeight)||document.body.offsetHeight;e.touches?(s.x=(e.touches[0].pageX-document.body.getBoundingClientRect().left)/i*2-1,s.y=-(e.touches[0].pageY-document.body.getBoundingClientRect().top)/o*2+1):(s.x=(e.clientX-document.body.getBoundingClientRect().left)/i*2-1,s.y=-(e.clientY-document.body.getBoundingClientRect().top)/o*2+1),a.setFromCamera(s,_);var r=a.intersectObjects($.children,!0);return r},loadTexture:function(){var e=this,t=n("e130");return new Promise((function(n){(new p["cb"]).load(t,(function(t){t.wrapS=t.wrapT=p["U"],t.anisotropy=k.capabilities.getMaxAnisotropy();var a=new p["d"](500,500,500),s=new p["J"]({map:t}),i=new p["I"](a,s);i.position.y=-1e3,L.add(i),e.renderModel(),n(t)}))}))},initCabinetModelLocation:function(){var e=new p["c"],t=new p["eb"];$.children.forEach((function(t){"panel"===t.userData.meshType&&e.expandByObject(t)})),e.getCenter(t),$.position.x-=t.x,$.position.y-=t.y,$.position.z=0},setupGui:function(){M={shininess:40,ka:.17,kd:.51,ks:.2,metallic:!0,hue:.121,saturation:.73,lightness:.66,lhue:.04,lsaturation:.01,llightness:1,lx:.32,ly:.39,lz:.7,newTess:15,bottom:!0,lid:!0,body:!0,fitLid:!1,nonblinn:!1,newShading:"wireframe"}},renderModel:function(){M&&(j.color.setHSL(M.hue,M.saturation,M.lightness*M.ka),T.position.set(M.lx,M.ly,M.lz),T.color.setHSL(M.lhue,M.lsaturation,M.llightness)),k.render(L,_)},MakeMatrix4FromSoftware:function(e){var t=new p["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},onWindowResize:function(){var e=this;this.$nextTick((function(){var t=e.$refs.toolbar,n=e.$refs.panelData;if(t){var a=document.documentElement.clientHeight;document.getElementById("panelScan").style.height=a+"px";var s=t.offsetHeight,i=window.innerWidth-(n?n.offsetWidth:0),o=window.innerHeight-s;_.aspect=i/o,_.updateProjectionMatrix(),k.setSize(i,o)}}))},clearAllPanelCache:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,f["a"].clearStoreData(this.IndexedDB,"model","panelId");case 2:t=e.sent,t&&(console.log("清空缓存成功"),m.setCookie("loadedTime",new Date));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),checkCookie:function(){var e=m.getCookie("loadedTime");e||this.clearAllPanelCache()},clickToolbar:function(e){switch(this.selectedIndex=e,e){case 0:this.isAllPanelLoaded?this.showModelList=!0:this.dataLoadingException?this.$toast("".concat(this.$t("info.53"),"！")):this.$toast("".concat(this.$t("info.54"),"！"));break;case 1:this.isAllPanelLoaded?this.$router.push({name:"scanPage",params:{panelCodeList:this.panelCodeList}}):this.$toast("".concat(this.$t("info.54"),"！"));break;case 2:var t=this.handleToolbarText(e);this.restoreDefaultMaterials(),this.explodeOrRestore(t===this.$t("info.35"));break;case 3:var n=this.handleToolbarText(e);this.showOrHideAllDoorPanel(n===this.$t("info.36"));break;case 4:var a=this.handleToolbarText(e);this.showOrHideNumbers(a===this.$t("info.39"));break;case 5:0,this.$router.push({name:"orderDetail",params:{projectInfo:this.projectInfo}});break}},showAllPanel:function(){var e=this,t=this.toolbarList[4].activeName;$.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.toolbarList.forEach((function(t){"iconqiehuan1"===t.icon&&(t.activeName=e.$t("info.36"))})),this.renderModel()},clickGridIcon:function(){var e=this;this.showGrid=!this.showGrid,L.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()},changeModelState:function(){var e=this;$.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()},hideSelectedPanels:function(){if(this.selectedPanel){var e=this.selectedPanel.userData,t=e.meshType,n=e.panelNumber,a=e.panelId;"panel"===t?($.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},clickPartList:function(){var e=this,t=this.modelList.find((function(t){return t.Id===e.defaultCstId}));t?this.currentCstData=Object(c["a"])({},t):this.$toast(this.$t("info.44")),this.showPartListLayer=!0}}},A=N,E=(n("b0fb"),n("2877")),B=Object(E["a"])(A,a,s,!1,null,"2d7d40db",null);t["default"]=B.exports},f75e:function(e,t,n){e.exports=n.p+"static/media/扫描成功.21a64a72.mp3"},fb64:function(e,t,n){}}]);