(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[485],{91305:function(O){O.exports={navHeader:"navHeader___1OkTs",menuDiv:"menuDiv___1DLXF",ntitle:"ntitle___23y0n",selTitle:"selTitle___23rMb"}},76738:function(O){O.exports={headerSearch:"headerSearch___3wkQ_"}},3527:function(O){O.exports={mapwrap:"mapwrap___Qv3-O",controlBar:"controlBar___2aUOD",mapControl:"mapControl___YmPTr",iconfont:"iconfont___1YbQC",zoom:"zoom___3kEcA",disable:"disable___3Ctmb",map:"map___1isnd",hasPerson:"hasPerson___385o4",houseWrap:"houseWrap___2yQHo",house:"house___2uywb",allDevice:"allDevice___2CMpx",icon:"icon___vKjt_",allTime:"allTime___21oiD",overworkTime:"overworkTime___1GZP3",meetTime:"meetTime___1RUWa",content:"content___3uw_f",name:"name___3k4JR",contentDiv:"contentDiv___2wVRu",pointer:"pointer___2qVBZ",notclick:"notclick___17mu1",searchSel:"searchSel___3-S7F",equipmentMap:"equipmentMap___31Hrw",showModal:"showModal___eCAob"}},63834:function(O){O.exports={label:"label___35KyC",topnavigator:"topnavigator___1qxEF",floor:"floor___1MlVT",navigator:"navigator___3oVVZ",navItem:"navItem___38KyP",text:"text___xFKmK",right:"right___1CYul",firstLine:"firstLine___1xo38",line:"line___2m7tG",level:"level___2UVFP",value:"value___3YhM1"}},78919:function(O,I,e){"use strict";e.d(I,{O:function(){return d}});function p(a,l){for(var _=l.length,M=28,m=0;m<_;m++)a>=M+12*m}function d(a){var l=1.1;if(a.length>0)for(var _=1;_<12;_++){var M=0;if(a.forEach(function(m,v){var Y=m.width*l;Y>75&&(M=M+1)}),console.log("width",M,a.length,_),M/a.length>.9)break;l=l+.1}return l}},50460:function(O,I,e){"use strict";e.d(I,{Z:function(){return a}});var p=e(2824),d=e(67294);function a(){var l=(0,d.useState)(),_=(0,p.Z)(l,2),M=_[0],m=_[1];return(0,d.useEffect)(function(){m([{name:"\u73AF\u5883\u4FE1\u606F",id:"environment"},{name:"\u8BBE\u5907\u7BA1\u7406",id:"equipment"},{name:"\u8FD0\u884C\u65F6\u95F4",id:"runtime"}])},[]),{menuList:M}}},92007:function(O,I,e){"use strict";var p=e(32059),d=e(2824),a=e(67294),l=e(91305),_=e.n(l),M=e(5977),m=e(42285),v=e(50460),Y=e(94184),s=e.n(Y),R=e(85893),ue=function(G){var k=G.title,z=G.action,o=(0,v.Z)(),re=o.menuList,K=(0,a.useState)(""),i=(0,d.Z)(K,2),y=i[0],x=i[1],f=(0,M.TH)();(0,a.useEffect)(function(){var P=m.m8.listen(function(te,g){}),u=f.pathname;return u=u.replace(/\//g,""),u=u.toLowerCase(),console.log("location,action",u,f.pathname),x(u),function(){P()}},[f]);var V=function(u){u.id!=y&&m.m8.push("/".concat(u.id))};return(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)("div",{className:_().navHeader,children:[(0,R.jsx)("div",{className:_().menuDiv,children:(re||[]).map(function(P,u){return(0,R.jsx)("div",{className:s()(_().ntitle,(0,p.Z)({},_().selTitle,P.id==y)),onClick:function(){V(P)},children:P.name},u+"nav")})}),z]})})};I.Z=ue},68967:function(O,I,e){"use strict";var p=e(2824),d=e(43358),a=e(76647),l=e(67294),_=e(76738),M=e.n(_),m=e(42285),v=e(51236),Y=e(60607),s=e(85893),R=a.Z.Option,ue=function(){var G=(0,l.useState)([]),k=(0,p.Z)(G,2),z=k[0],o=k[1],re=(0,l.useState)(),K=(0,p.Z)(re,2),i=K[0],y=K[1],x=(0,m.tT)("sagacare_searchInfo"),f=x.changeSearchBuildId,V=x.changeSearchFloorId,P=x.changeSearchText,u=(0,l.useState)(!1),te=(0,p.Z)(u,2),g=te[0],ne=te[1],J=(0,l.useRef)(0),X=function(S){J.current&&clearTimeout(J.current);function Z(){ne(!0);var T={criteria:{projectId:Y.T.projectId,localName:{$like:"%".concat(S,"%")}}};(0,v.mS)(T).then(function(U){var de=U.content||[];console.log("setMatch","data"),o(de),ne(!1)})}S?J.current=setTimeout(Z,600):o([])},Q=function(S){X(S)},w=function(S){y(null),o([]);var Z=z.filter(function(U){return U.id==S}),T=Z[0]||{};P({text:T.localName}),f(T.buildingId),V(T.floorId)},ce=function(S){if(S.code=="Enter"){var Z=z[0]||{};P({text:Z.localName}),f(Z.buildingId),V(Z.floorId)}};return(0,s.jsx)("div",{className:M().headerSearch,children:(0,s.jsx)(a.Z,{showSearch:!0,value:i,placeholder:"\u641C\u7D22\u7A7A\u95F4",defaultActiveFirstOption:!1,filterOption:!1,onSearch:Q,onChange:w,onInputKeyDown:ce,notFoundContent:null,bordered:!1,loading:g,style:{width:150,borderColor:"#c4c4c4"},children:z.length>0&&z.map(function(b,S){return(0,s.jsx)(R,{children:b.localName},b.id)})})})};I.Z=ue},65691:function(O,I,e){"use strict";var p=e(32059),d=e(2824),a=e(67294),l=e(3527),_=e.n(l),M=e(42285),m=e(94184),v=e.n(m),Y=e(81116),s=e(85893),R=function(C){var G=C.type,k=C.selFloorId,z=C.render,o=C.mapList,re=C.changeMapList,K=C.mapSize,i=C.maxscale,y=C.transXInit,x=(0,M.tT)("sagacare_searchInfo"),f=x.searchText,V=x.changeSearchSpace,P=x.changeSearchText,u=x.changeSearchFloorId,te=x.changeSearchBuildId,g=(0,a.useState)(0),ne=(0,d.Z)(g,2),J=ne[0],X=ne[1],Q=(0,a.useState)(0),w=(0,d.Z)(Q,2),ce=w[0],b=w[1],S=(0,a.useState)(0),Z=(0,d.Z)(S,2),T=Z[0],U=Z[1],de=(0,a.useState)(120),Me=(0,d.Z)(de,2),se=Me[0],_e=Me[1],n=(0,a.useRef)(1),ve=(0,a.useState)(.6),pe=(0,d.Z)(ve,2),q=pe[0],Te=pe[1],Oe=(0,a.useState)(!1),De=(0,d.Z)(Oe,2),he=De[0],fe=De[1],ge=(0,a.useState)(0),Pe=(0,d.Z)(ge,2),ee=Pe[0],Ee=Pe[1],Ie=(0,a.useState)(0),c=(0,d.Z)(Ie,2),E=c[0],$=c[1],F=(0,a.useState)(500),L=(0,d.Z)(F,2),N=L[0],ae=L[1],H=(0,a.useState)(1340),Ce=(0,d.Z)(H,2),oe=Ce[0],me=Ce[1],Be=(0,a.useState)(0),Le=(0,d.Z)(Be,2),We=Le[0],Ue=Le[1],xe=(0,a.useRef)(null),j=(0,a.useRef)(),Ae=function(r){X(r.pageX),b(r.pageY),fe(!0)},Re=function(r){fe(!1)},Ke=(0,a.useCallback)(function(t){if(he){var r=t.pageX,h=t.pageY,B=K.width*n.current,W=K.height*n.current,D=(j.current||{}).clientWidth||0,A=(j.current||{}).clientHeight||0;-T+E>B-220,-se+ee>W-220,T-E>D-220,se-ee>A-220;var le=T+r-J,ie=se+h-ce;le=le<-B+250+E?-B+250+E:le,le=le>D-250+E?D-250+E:le,ie=ie<-W+250+ee?-W+250+ee:ie,ie=ie>A-220+ee?A-220+ee:ie,U(le),_e(ie),X(t.pageX),b(t.pageY)}},[K,T,se,E,ee,he,J,ce]),ye=function(r){r.stopPropagation();var h=Number((n.current+.1).toFixed(4));n.current=Math.min(h,i),console.log("mscale.current",n.current,i,q);var B=(j.current||{}).clientWidth||0,W=(j.current||{}).clientHeight||0,D=B*(n.current-1)/2,A=W*(n.current-1)/2;Ee(A),$(D),Se(n.current,D,A)},be=function(r){r.stopPropagation();var h=Number((n.current-.1).toFixed(4));n.current=Math.max(h,q);var B=(j.current||{}).clientWidth||0,W=(j.current||{}).clientHeight||0,D=B*(n.current-1)/2,A=W*(n.current-1)/2;Ee(A),$(D),Se(n.current,D,A)};function Se(t,r,h){re(t,r,h)}var Fe=1300;(0,a.useEffect)(function(){if(f&&f.text&&o.length>0){var t,r,h=o.filter(function(D){return D.localName==(f&&f.text)});if(h.length==0)return;V(h[0]),t=-((h[0]||{}).left||0),r=-((h[0]||{}).top||0);var B=(j.current||{}).clientWidth||0,W=(j.current||{}).clientHeight||0;U(t+B/2),_e(r+W/2),n.current=1,te(""),u(""),P({})}else xe.current&&xe.current!=k&&(U(y),_e(120),n.current=1);xe.current=k},[o]),(0,a.useEffect)(function(){if(f&&f.text&&o.length>0){var t,r,h=o.filter(function(D){return D.localName==(f&&f.text)});if(h.length==0)return;V(h[0]),t=-((h[0]||{}).left||0),r=-((h[0]||{}).top||0);var B=(j.current||{}).clientWidth||0,W=(j.current||{}).clientHeight||0;U(t+B/2),_e(r+W/2),te(""),u(""),P({})}},[f]);var je=(0,a.useCallback)(function(t){if(t.preventDefault(),Math.abs(t.deltaX)!==0&&Math.abs(t.deltaY)!==0)return console.log("\u6CA1\u6709\u56FA\u5B9A\u65B9\u5411");if(t.deltaX<0)return console.log("\u5411\u53F3");if(t.deltaX>0)return console.log("\u5411\u5DE6");if(t.ctrlKey){t.deltaY>0&&console.log("\u5411\u5185"),t.deltaY<0&&console.log("\u5411\u5916");var r=-.009;(t.deltaY>100||t.deltaY<-100)&&(r=-6e-4);var h=n.current+t.deltaY*r;console.log("mscaleTemp",n.current,h,q,i),n.current=Math.min(Math.max(q,h),i)}else{t.deltaY>0&&console.log("\u5411\u4E0A"),t.deltaY<0&&console.log("\u5411\u4E0B");var r=-.009;(t.deltaY>100||t.deltaY<-100)&&(r=-6e-4);var h=n.current+t.deltaY*r;n.current=Math.min(Math.max(q,h),i)}var B=(j.current||{}).clientWidth||0,W=(j.current||{}).clientHeight||0,D=B*(n.current-1)/2,A=W*(n.current-1)/2;Ee(A),$(D),Se(n.current,D,A)},[i]);(0,a.useEffect)(function(){document.querySelector("#root").addEventListener("mouseup",function(){fe(!1)},!0)},[]),(0,a.useEffect)(function(){U(y)},[y]),(0,a.useEffect)(function(){var t=document.querySelector("#map");return console.log("maxscalemaxscalemaxscale",i),t.addEventListener("wheel",je),function(){t.removeEventListener("wheel",je)}},[i]);var Ze=(0,a.useMemo)(function(){return(n.current*100).toFixed(0)},[n.current]);return(0,a.useEffect)(function(){var t=document.body.offsetHeight;ae(t-190);var r=document.body.offsetWidth;me(r),Ue(-(r-1340)/2)},[]),(0,s.jsxs)("div",{className:_().mapwrap,ref:j,onMouseDown:function(r){Ae(r)},onMouseUp:function(r){Re(r)},onMouseMove:Ke,style:{height:N+"px",width:oe+"px",marginLeft:We+"px"},children:[(0,s.jsx)("div",{id:"map",className:v()(_().map,(0,p.Z)({},_().equipmentMap,G=="equipment")),style:{transform:"translate(".concat(T,"px,").concat(se,"px)"),width:K.width,height:K.height},children:o.map(function(t,r){return z(t,r)})}),(0,s.jsxs)("div",{className:_().mapControl,children:[(0,s.jsxs)("div",{className:v()(_().controlBar),children:[(0,s.jsx)("div",{children:"\u7F29\u653E\u6BD4\u4F8B\uFF1A"}),(0,s.jsxs)("div",{children:[Ze,"/100"]})]}),(0,s.jsx)("div",{className:v()(_().zoom,(0,p.Z)({},_().disable,n.current>=i)),onClick:function(r){ye(r)},children:(0,s.jsx)(Y.Z,{className:"",type:"zoom",style:{fontSize:22}})}),(0,s.jsx)("div",{className:v()(_().zoom,(0,p.Z)({},_().disable,n.current<=q)),onClick:be,children:(0,s.jsx)(Y.Z,{className:"",type:"reduce",style:{fontSize:22}})})]})]})};I.Z=R},99393:function(O,I,e){"use strict";var p=e(32059),d=e(43358),a=e(76647),l=e(39428),_=e(3182),M=e(86582),m=e(2824),v=e(67294),Y=e(63834),s=e.n(Y),R=e(94184),ue=e.n(R),C=e(51236),G=e(60607),k=e(42285),z=e(69874),o=e(85893),re=function(i){var y=i.navigatorList,x=y===void 0?[]:y,f=i.type,V=i.navigatorChange,P=i.action,u=i.changeFloorId,te=i.changeBuildId,g=i.selParamObj,ne=i.seasonType,J=(0,k.tT)("sagacare_searchInfo"),X=J.searchBuildId,Q=J.searchFloorId,w=(0,k.tT)("sagacare_buildFloor"),ce=w.lastBuildId,b=w.lastFloorId,S=w.changeLastBuildId,Z=w.changeLastFloorId,T=(0,v.useState)([]),U=(0,m.Z)(T,2),de=U[0],Me=U[1],se=(0,v.useState)(),_e=(0,m.Z)(se,2),n=_e[0],ve=_e[1],pe=(0,v.useState)([]),q=(0,m.Z)(pe,2),Te=q[0],Oe=q[1],De=(0,v.useState)(),he=(0,m.Z)(De,2),fe=he[0],ge=he[1];(0,v.useEffect)(function(){X&&Q&&(X!==n?ve(X):(ge(Q),u&&u(Q)))},[X,Q]);var Pe=(0,v.useMemo)(function(){var c=0,E="";if(f==="enviroment"){if(g.avgValues==null)return{level:-1,levelTxt:""};var $={Cooling:{range:[22,26],text:["\u504F\u51B7","\u8212\u9002","\u504F\u70ED"]},Warm:{range:[18,24],text:["\u504F\u51B7","\u8212\u9002","\u504F\u70ED"]},Transition:{range:[18,26],text:["\u504F\u51B7","\u8212\u9002","\u504F\u70ED"]}},F={Tdb:$[ne],RH:{range:[30,70],text:["\u5E72\u71E5","\u5065\u5EB7","\u6F6E\u6E7F"]},CO2:{range:[800,1e3,1500],text:["\u5065\u5EB7","\u8FBE\u6807","\u7565\u9AD8","\u8D85\u6807"]},PM2d5:{range:[35,75,115,150,250],text:["\u5065\u5EB7","\u826F","\u8F7B\u5EA6\u6C61\u67D3","\u4E2D\u5EA6\u6C61\u67D3","\u91CD\u5EA6\u6C61\u67D3","\u4E25\u91CD\u6C61\u67D3"]},HCHO:{range:[.1],text:["\u5065\u5EB7","\u8D85\u6807"]}},L=[g.avgValues].concat((0,M.Z)(F[g.id].range)).sort(function(N,ae){return N-ae});c=L.findIndex(function(N){return N===g.avgValues}),E=F[g.id].text[c]}return{level:c,levelTxt:E}},[g,ne]);(0,v.useEffect)(function(){var c=z.Z.getInstance(),E=c.getUser();console.log("TopNavigator----getBuildingList",E,G.T.projectId),de.length==0&&(0,C.QT)({criteria:{projectId:G.T.projectId},orders:[{column:"localId",asc:!0}]}).then(function($){var F=$.content||[];Me((F||[]).map(function(H){return{label:H.localName,value:H.id}}));var L=ce||sessionStorage.getItem("lastBuildId")||"",N=F.filter(function(H){return H.id==L}),ae="";N.length>0&&(ae=L),ve(X||ae||(F[0]||{}).id)})},[]),(0,v.useEffect)(function(){function c(){return E.apply(this,arguments)}function E(){return E=(0,_.Z)((0,l.Z)().mark(function $(){var F,L,N,ae,H;return(0,l.Z)().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,(0,C.m)({criteria:{buildingId:n},orders:[{column:"localId",asc:!0}]});case 2:F=oe.sent,L=F.content||[],Oe((L||[]).map(function(me){return{label:me.localName,value:me.id}})),N=b||sessionStorage.getItem("lastFloorId")||"",ae=L.filter(function(me){return me.id==N}),H="",ae.length>0&&(H=N),ge(Q||H||(L[0]||{}).id),u&&u(Q||H||(L[0]||{}).id);case 11:case"end":return oe.stop()}},$)})),E.apply(this,arguments)}return n&&(S(n),c()),function(){}},[n]);var ee=(0,v.useCallback)(function(c){ve(c)},[]),Ee=(0,v.useCallback)(function(c){ge(c),u&&u(c)},[]),Ie=function(E){V&&V(E)};return(0,o.jsxs)("div",{className:s().topnavigator,children:[(0,o.jsx)("div",{className:s().floor,children:(0,o.jsx)(a.Z,{options:de,placeholder:"\u697C\u680B",value:n,onChange:ee,size:"large",dropdownMatchSelectWidth:!0,style:{width:"100%"},bordered:!1})}),(0,o.jsx)("div",{className:s().floor,children:(0,o.jsx)(a.Z,{options:Te,placeholder:"\u697C\u5C42",value:fe,onChange:Ee,size:"large",dropdownMatchSelectWidth:!0,style:{width:"100%"},bordered:!1})}),(0,o.jsx)("div",{className:s().navigator,children:x.map(function(c,E){return(0,o.jsxs)("div",{className:ue()(s().navItem,(0,p.Z)({},s().sel,c.id===g.id)),style:{borderBottom:c.id===g.id?"3px solid ".concat(c.color):"3px solid #fff"},onClick:function(){Ie(c)},children:[(0,o.jsx)("img",{src:c.src,style:{height:20}}),(0,o.jsx)("div",{className:s().text,children:c.name})]},"nav"+E)})}),f==="enviroment"&&(0,o.jsxs)("div",{className:s().right,children:[(0,o.jsxs)("div",{className:s().firstLine,style:{color:g.color},children:[(0,o.jsx)("span",{className:s().value,children:g.avgValues}),(0,o.jsx)("sup",{className:s().unit,children:g.unit}),(0,o.jsx)("span",{className:s().line}),(0,o.jsx)("span",{className:s().level,children:Pe.levelTxt})]}),(0,o.jsxs)("div",{className:s().text,children:["\u5F53\u524D\u697C\u5C42\u5E73\u5747",g.name,g.id=="CO2"||g.id=="PM2d5"||g.id=="HCHO"?"\u6D53\u5EA6":""]})]}),f==="equipment"&&P,f==="runtime"&&P]})};I.Z=re},81116:function(O,I,e){"use strict";var p=e(94184),d=e.n(p),a=e(85893);I.Z=function(l){var _=l.type,M=l.className,m=l.style,v=m===void 0?{}:m;return(0,a.jsx)("span",{className:d()("icon","iconfont","icon-manage"+_),style:v})}}}]);