p__Equipment.8cff2371.async.js 59 KB

1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[942],{55042:function(ae){ae.exports={box:"box___3FhHg",content:"content___1DuA0",env:"env___29TNR",envLeft:"envLeft___2L4On",envRight:"envRight___1RNdG",roomAirImg:"roomAirImg___20XYV",airStatus:"airStatus___2kNZA",airStatusText:"airStatusText___3yjJC",airStatusbox:"airStatusbox___3VZKO",airStatusImg:"airStatusImg___2wKv5",statusText:"statusText___24jjF",airBtn:"airBtn___2lquL",expend:"expend___1W3ys",item:"item___2PD_6",itemRight:"itemRight___i00Ff",itemBg:"itemBg___2_Zn7",itemImg:"itemImg___2vlAG"}},67130:function(ae){ae.exports={box:"box___36Yrk",content:"content___2h0I7",env:"env___IkGK7",envLeft:"envLeft___2XpO9",envRight:"envRight___3dJrp",roomEqImg:"roomEqImg___yPvHy",showAll:"showAll___IEzu2",eqTitle:"eqTitle___1Yo_s",eqStatus:"eqStatus___pO_Xy",eqBtn:"eqBtn___364O_",flexBetween:"flexBetween___1t13Q",showAllText:"showAllText___2Q2DT",showImg:"showImg___2g31k",pdt10:"pdt10___1XvBz",dsflex:"dsflex___JHmyx",eqCirculBtn:"eqCirculBtn___2D5Sz",eqSocketBtn:"eqSocketBtn___aUNtq",mgr20:"mgr20___j-m4U",circulBtn:"circulBtn___3cwtD",yell:"yell___2HF8s",btnIcon:"btnIcon___iJkSj"}},95264:function(ae){ae.exports={lampChild:"lampChild___2gsU6"}},21820:function(ae){ae.exports={main:"main___1Jz4w",header:"header___2o6G1",show:"show___1LhhN",tileline:"tileline____MfJi",hasPerson:"hasPerson___1_8EN",titleIcon:"titleIcon___1TK1P",edit:"edit___3lSez",timeLine:"timeLine___tYbPA",pdr10:"pdr10___v5RCO",editShow:"editShow___3hcTG",close:"close___3-0A4",content:"content___7Us17",infoList:"infoList___18OWh",item:"item___V-fcR",title:"title___21Sua",num:"num___3NmTX",describe:"describe___nGEdO",devices:"devices___1K6KU",foot:"foot___1UXBO",l:"l___Cu5RP",r:"r___7g1uy"}},28287:function(ae){ae.exports={lampChild:"lampChild___38w3t"}},39216:function(ae){ae.exports={lampChild:"lampChild___3Lw-l",imgPos:"imgPos___l_DRa",roomEqImg:"roomEqImg___JAEd2"}},97298:function(ae){ae.exports={right:"right___1nMui",title:"title___1Re66",allList:"allList___Ri_Gn",item:"item___3Y_p5",num:"num___3WqqA",onlyNum:"onlyNum___1Uyjy",moreWrap:"moreWrap___Dtbph",closeButton:"closeButton___f2-Io",text:"text___3e0YR"}},88583:function(ae){ae.exports={label:"label___2W_Ow",sagawrap:"sagawrap___2WLnE",maptop:"maptop___1ZxUi",left:"left___2v6XC",stItem:"stItem___1H0sY",sel:"sel___3Dudt",stBox:"stBox___3I6bO",right:"right___2ICIx",rightOpen:"rightOpen___2zAfv",circle:"circle___23sCl",noCurtain:"noCurtain___2teFG"}},80638:function(){},2231:function(ae,Ne,a){"use strict";a.r(Ne),a.d(Ne,{default:function(){return tn}});var B=a(20228),Z=a(11382),me=a(32059),we=a(39428),ot=a(3182),de=a(34792),ne=a(55026),xt=a(71194),at=a(29759),i=a(2824),n=a(67294),Je=a(42285),k=a(68967),ut=a(92007),Oe=a(65691),ge=a(99393),Be=a(693),b=a(69578),De=a(30887),oe=a(38993),R=a(81116),I=a(57119),_=a(44545),Fe=a(97298),U=a.n(Fe),fe=a(60607),G=a(58654),Xe=function(h,r,S){var C=h;C.forEach(function(g){for(var x=0;x<r.length;x++)(g.id=r[x].id)&&(g.orderSeqNum=r[x].orderSeqNum)}),getStatusHttp(C).then(function(g){lt(g,h,S)})},lt=function(h,r,S){var C=!1,g=JSON.parse(JSON.stringify(h.content));g&&g.forEach(function(x){x.state===200&&x.exeResult==="processing:rcvd"||x.state===202&&!x.exeResult?C=!0:g.splice(x,1)}),S&&S()},At=function(h,r,S){(0,G.SK)(h).then(function(C){S&&(S.current=!1),lt(C,h,r)})},nt=function(h,r,S,C){var g=S==="\u6253\u5F00"?1:0,x=[];r.forEach(function(H){(H.equipList||[]).forEach(function(J){J.equipType=="socket"&&(C.code=="all"||J.infos.SocketType==C.code)&&x.push({id:J.id,code:"EquipSwitchSet",value:g})})}),h=="all"&&setTimeout(function(){ne.default.success({content:"\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1\uFF0C\u8BBE\u5907\u4F1A\u9010\u6B65".concat(S==="\u6253\u5F00"?"\u5F00\u542F":"\u5173\u95ED","\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u52FF\u9891\u7E41\u64CD\u4F5C"),duration:4})},3e3),(0,G.LS)(x).then(function(H){})},ht=function(h,r,S,C){var g=C==="\u6253\u5F00",x=[];r.forEach(function(H){(H.equipList||[]).forEach(function(J){J.equipType=="light"&&x.push({id:J.id,switch:g})})}),h=="all"&&setTimeout(function(){ne.default.success({content:"\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1\uFF0C\u8BBE\u5907\u4F1A\u9010\u6B65".concat(C==="\u6253\u5F00"?"\u5F00\u542F":"\u5173\u95ED","\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u52FF\u9891\u7E41\u64CD\u4F5C"),duration:4})},3e3),At(x)},dt=function(h,r,S,C){var g=C==="\u6253\u5F00"?"EquipOnSet":"EquipOffSet",x=[];r.forEach(function(H){(H.equipList||[]).forEach(function(J){J.equipType=="curtain"&&x.push({equipmentCategory:"CFSSES",infoCode:g,value:1,objectId:J.id})})}),(0,G.WN)(x),ne.default.success("\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1"),S&&S()},Ie=function(h,r,S){var C=h.airConditioner===0?12:10,g={objectId:h.spaceId,valueType:1,itemId:C};(0,G.U9)(g).then(function(x){x.result=="success"?(ne.default.success("\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1"),S&&S()):ne.default.error("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}).catch(function(x){})},st=function(h,r,S,C){var g=[];h.forEach(function(x){var H=S==="\u6253\u5F00"?12:10;g.push({projectId:C,objectId:x.spaceId,valueType:1,itemId:H})}),setTimeout(function(){ne.default.success({content:"\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1\uFF0C\u8BBE\u5907\u4F1A\u9010\u6B65".concat(S==="\u6253\u5F00"?"\u5F00\u542F":"\u5173\u95ED","\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u52FF\u9891\u7E41\u64CD\u4F5C"),duration:4})},3e3),(0,G.fh)(g).then(function(x){x.result=="success"&&r&&r()}).catch(function(x){console.log("err",x)})},e=a(85893),We=function(h){var r=h.selNavObj,S=h.navigatorList,C=h.mapList,g=h.selSocketType,x=h.socketTypeArr,H=(0,n.useState)([]),J=(0,i.Z)(H,2),re=J[0],X=J[1];(0,n.useEffect)(function(){var T=[];S.forEach(function(A){A.id!=="all"&&A.id!=="curtain"&&T.push(A)}),X(T)},[S]);var xe=function(A){console.log("key",A),Te({title:"\u8BF7\u786E\u8BA4",icon:(0,e.jsx)(I.Z,{}),content:r.id=="socket"&&g.code!=="all"?"\u786E\u5B9A\u8981\u5168\u90E8\u5F00\u542F".concat(g.name,"\u5417\uFF1F"):"\u786E\u5B9A\u8981\u5168\u90E8\u5F00\u542F".concat(r.name,"\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){if(r.id=="light"||r.id=="socket")var L=C.filter(function(Q){return(Q[r.id]==0||Q[r.id]==2)&&Q.spaceId});else var L=C.filter(function(_e){return _e.spaceId});var K=1;function $(){}L.length!=0&&(r.id=="airConditioner"&&st(L,$,"\u6253\u5F00",fe.T.projectId),r.id=="light"&&ht("all",L,$,"\u6253\u5F00"),r.id=="socket"&&nt("all",L,"\u6253\u5F00",g),r.id=="curtain"&&dt("all",L,$,"\u6253\u5F00"))},onCancel:function(){}})},Te=at.Z.confirm,ce=function(){console.log("showModal"),Te({title:"\u8BF7\u786E\u8BA4",icon:(0,e.jsx)(I.Z,{}),content:r.id=="socket"&&g.code!=="all"?"\u786E\u5B9A\u8981\u5168\u90E8\u5173\u95ED".concat(g.name,"\u5417\uFF1F"):"\u786E\u5B9A\u8981\u5168\u90E8\u5173\u95ED".concat(r.name,"\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){if(r.id=="light"||r.id=="socket")var Y=C.filter(function($){return($[r.id]==1||$[r.id]==2)&&$.spaceId});else var Y=C.filter(function(Q){return Q.spaceId});var L=1;function K(){}r.id=="airConditioner"&&st(Y,K,"\u5173\u95ED",fe.T.projectId),r.id=="light"&&ht("all",Y,K,"\u5173\u95ED"),r.id=="socket"&&nt("all",Y,"\u5173\u95ED",g),r.id=="curtain"&&dt("all",Y,K,"\u5173\u95ED")},onCancel:function(){}})};return(0,e.jsxs)(e.Fragment,{children:[r.id==="all"&&(0,e.jsxs)("div",{className:U().right,children:[(0,e.jsx)("div",{className:U().title,children:"\u8FD0\u884C\u4E2D\u7684\u8BBE\u5907"}),(0,e.jsx)("div",{className:U().allList,children:re.map(function(T,A){return(0,e.jsxs)("div",{className:U().item,children:[(0,e.jsx)("img",{src:T.src,style:{height:20}}),(0,e.jsx)("div",{className:U().num,children:T.num})]},"run"+A)})})]}),r.id!=="all"&&(0,e.jsxs)("div",{className:U().right,children:[r.id!=="curtain"&&(0,e.jsx)("div",{className:U().title,children:"\u8FD0\u884C\u4E2D\u7684\u8BBE\u5907"}),r.id!=="curtain"&&(r.id=="socket"&&g.code!=="all"?(0,e.jsx)("div",{className:U().onlyNum,children:x.map(function(T,A){if(T.code==g.code)return(0,e.jsx)("span",{children:T.openNum},"snum"+A)})}):(0,e.jsx)("div",{className:U().onlyNum,children:re.map(function(T,A){if(T.id==r.id)return(0,e.jsx)("span",{children:T.num},"dnum"+A)})})),(0,e.jsxs)("div",{className:U().closeButton,onClick:ce,style:{display:r.id=="curtain"?"none":""},children:[(0,e.jsx)(R.Z,{className:"",type:"closeall",style:{fontSize:20}}),(0,e.jsx)("span",{className:U().text,children:"\u5168\u90E8\u5173\u95ED"})]}),(0,e.jsx)("div",{className:U().moreWrap,style:{display:r.id=="curtain"?"none":""},children:(0,e.jsx)(b.Z,{trigger:"click",placement:"bottomLeft",menu:(0,e.jsx)(oe.Z,{style:{width:160},onClick:function(A){var Y=A.key;return xe(Y)},children:(0,e.jsx)(oe.Z.Item,{children:"\u5168\u90E8\u5F00\u542F"},"open")}),children:(0,e.jsx)("span",{className:U().trigger,children:(0,e.jsx)(_.Z,{style:{fontSize:20,marginTop:"4px"}})})})})]})]})},_t=We,St=a(13062),Ue=a(71230),Ye=a(89032),se=a(15746),ze=a(86582),Zt=a(61193),sa=a.n(Zt),ra=a(21820),ue=a.n(ra),m=a(20634),rt=a(11849),ft=a(55042),ve=a.n(ft),wt=a(67130),p=a.n(wt),jt=a(7085),Yt=(0,e.jsx)(jt.Z,{style:{fontSize:14},spin:!0}),ct=function(E){var h=E.isOpen,r=E.isAir,S=E.isLoading;return(0,e.jsxs)("div",{className:"box",children:[r&&S?(0,e.jsx)(Z.Z,{indicator:Yt,className:"box-loading ".concat(h?"":"box-close-loading")}):null,(0,e.jsx)("div",{className:"content ".concat(h?"":"closeBg"),children:(0,e.jsx)("div",{className:"point ".concat(h?"":"closePt")})})]})},ca=function(E){var h=E.spaceId,r=E.projectId,S=m.x.airOpen,C=m.x.airClose,g=m.x.temp_down,x=m.x.temp_up,H=m.x.temp_keep,J=m.x.arrow_down,re=m.x.arrow_up,X=m.x.wind_up,xe=m.x.wind_down,Te=!0,ce=(0,n.useRef)(""),T=(0,n.useRef)(!0),A=(0,n.useState)(!1),Y=(0,i.Z)(A,2),L=Y[0],K=Y[1],$=(0,n.useState)(!1),Q=(0,i.Z)($,2),_e=Q[0],le=Q[1],he=(0,n.useState)(null),w=(0,i.Z)(he,2),V=w[0],ee=w[1],D=(0,n.useRef)(null),F=(0,n.useRef)(null),N=(0,n.useState)("null"),je=(0,i.Z)(N,2),te=je[0],Ze=je[1],Ce=(0,n.useState)({4:!1,2:!1,5:!1,6:!1}),Pe=(0,i.Z)(Ce,2),pe=Pe[0],He=Pe[1],$e=[{title:"\u6E29\u5EA6\u8C03\u8282",type:"temp",downType:4,upType:2,leftImg:J,rightImg:re},{title:"\u98CE\u91CF\u8C03\u8282",type:"wind",downType:5,upType:6,leftImg:xe,rightImg:X}],Ve=function(P){switch(P){case 1:return ee(H);case 2:return ee(g);case 3:return ee(x);default:break}};function et(v){clearTimeout(D.current),D.current=setTimeout(function(){M()},v)}function ye(v){if(!_e){le(!0),q(v);var P=v?12:10;y(P)}}var q=function(P){var O=0;F.current=setInterval(function(){O>=30||ce.current===P?(le(!1),clearInterval(F.current)):O++},1e3)},M=(0,n.useCallback)(function(){var v={objectId:h,projectId:r};(0,G.mr)(v).then(function(P){var O=P.icon!=7;T.current&&le(!1),ce.current=O,K(O),T.current=!1,et(3e3),Ze(P.spaceStatus),Ve(P.icon)}).catch(function(){et(3e3),T.current=!1})},[]),y=(0,n.useCallback)(function(v){if(!pe[v]){var P={objectId:h,valueType:1,itemId:v};He((0,rt.Z)((0,rt.Z)({},pe),{},(0,me.Z)({},v,!0))),(0,G.U9)(P).then(function(O){He((0,rt.Z)((0,rt.Z)({},pe),{},(0,me.Z)({},v,!1))),O.result=="success"?ne.default.success("\u6307\u4EE4\u4E0B\u53D1\u6210\u529F"):ne.default.error("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}).catch(function(O){He((0,rt.Z)((0,rt.Z)({},pe),{},(0,me.Z)({},v,!1)))})}},[pe]);return(0,n.useEffect)(function(){return M(),function(){clearTimeout(D.current)}},[]),(0,e.jsxs)("div",{className:ve().box,children:[(0,e.jsx)("div",{className:ve().content,children:(0,e.jsxs)("div",{className:ve().env,children:[(0,e.jsxs)("div",{className:ve().envLeft,children:[(0,e.jsx)("span",{className:p().eqTitle,children:"\u7A7A\u8C03"}),(0,e.jsxs)("div",{className:ve().airStatus,children:[(0,e.jsx)("span",{className:ve().airStatusText,children:L?"\u7A7A\u8C03\u5DF2\u5F00\u542F":"\u7A7A\u8C03\u5DF2\u5173\u95ED"}),L&&(0,e.jsxs)("div",{className:ve().airStatusbox,children:[(0,e.jsx)("img",{className:ve().airStatusImg,src:V}),(0,e.jsx)("span",{className:ve().statusText,children:te})]})]})]}),(0,e.jsx)("div",{className:ve().envRight,children:(0,e.jsx)("img",{className:ve().roomAirImg,src:L?S:C})}),(0,e.jsx)("div",{onClick:function(){ye(!L)},className:p().eqBtn,children:(0,e.jsx)(ct,{isOpen:L,isAir:!0,isLoading:_e})})]})}),L&&(0,e.jsx)("div",{className:ve().expend,children:$e.map(function(v,P){return(0,e.jsxs)("div",{className:ve().item,children:[(0,e.jsx)("div",{children:v.title}),(0,e.jsxs)("div",{className:ve().itemRight,children:[(0,e.jsx)("div",{className:ve().itemBg,onClick:function(Qe){y(v.downType)},children:pe[v.downType]?(0,e.jsx)(Z.Z,{indicator:(0,e.jsx)(jt.Z,{style:{fontSize:20},spin:!0})}):(0,e.jsx)("img",{className:ve().itemImg,src:v.leftImg})}),(0,e.jsx)("div",{className:ve().itemBg,onClick:function(){return y(v.upType)},children:pe[v.upType]?(0,e.jsx)(Z.Z,{indicator:(0,e.jsx)(jt.Z,{style:{fontSize:20},spin:!0})}):(0,e.jsx)("img",{className:ve().itemImg,src:v.rightImg})})]})]},P)})})]})},Mt=a(28991),vt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},it=vt,Et=a(30076),kt=function(h,r){return n.createElement(Et.Z,(0,Mt.Z)((0,Mt.Z)({},h),{},{ref:r,icon:it}))};kt.displayName="UpOutlined";var Lt=n.forwardRef(kt),Dt=a(57254),Ta=function(E){var h=E.spaceId,r=E.projectId,S=E.changeDrag,C=m.x.up_Arrow,g=m.x.down_Arrow,x=m.x.openair,H=m.x.air_close,J=m.x.wind_small,re=m.x.wind_big,X=m.x.airsunred,xe=m.x.airsunblack,Te=m.x.aircoldblue,ce=m.x.aircoldblack,T=m.x.aircloudgreen,A=m.x.aircloudblack,Y=(0,n.useState)(),L=(0,i.Z)(Y,2),K=L[0],$=L[1],Q=(0,n.useState)(!1),_e=(0,i.Z)(Q,2),le=_e[0],he=_e[1],w=[{name:"\u6E29\u5EA6",id:"temp",selectArr:[]},{name:"\u6863\u4F4D",id:"gear",selectArr:[0,1,2,3,"AUTO"]},{name:"\u6A21\u5F0F",id:"mode",selectArr:["\u5236\u51B7","\u5236\u70ED","\u901A\u98CE"],refer:[{mid:1,value:"\u5236\u51B7",sindex:0},{mid:2,value:"\u5236\u70ED",sindex:1},{mid:3,value:"\u901A\u98CE",sindex:2}]}],V=[0,1,2,3],ee=(0,n.useState)([]),D=(0,i.Z)(ee,2),F=D[0],N=D[1],je=(0,n.useState)("\u7A7A\u8C03"),te=(0,i.Z)(je,2),Ze=te[0],Ce=te[1],Pe=(0,n.useState)(18),pe=(0,i.Z)(Pe,2),He=pe[0],$e=pe[1],Ve=(0,n.useState)(2),et=(0,i.Z)(Ve,2),ye=et[0],q=et[1],M=(0,n.useState)(1),y=(0,i.Z)(M,2),v=y[0],P=y[1],O=(0,n.useState)(0),Qe=(0,i.Z)(O,2),Me=Qe[0],pt=Qe[1],oa=(0,n.useState)({isOpen:!1}),Ft=(0,i.Z)(oa,2),Se=Ft[0],Vt=Ft[1],ua=(0,n.useState)(!1),Pt=(0,i.Z)(ua,2),Bt=Pt[0],Qt=Pt[1],la=(0,n.useState)(0),bt=(0,i.Z)(la,2),j=bt[0],ea=bt[1],da=(0,n.useState)(0),Rt=(0,i.Z)(da,2),ke=Rt[0],Wt=Rt[1],fa=(0,n.useState)(0),Ut=(0,i.Z)(fa,2),tt=Ut[0],va=Ut[1],pa=(0,n.useState)(18),Ht=(0,i.Z)(pa,2),Ct=Ht[0],Kt=Ht[1],ha=(0,n.useState)(26),qt=(0,i.Z)(ha,2),Nt=qt[0],ma=qt[1],Gt=(0,n.useRef)(null);function Tt(){clearInterval(Gt.current),Gt.current=setInterval(function(){Xt()},2e4)}var Re=(0,n.useCallback)(function(u){var s=(Nt-Ct)*2,t=tt/s,o=Math.floor(u/t),l=o*.5+Ct;return $e(l),l},[Nt,Ct,tt]),ga=17,yt=(0,n.useRef)();function xa(u,s,t){if(!!u){var o=(yt.current||{}).clientWidth||0,l=(yt.current||{}).clientHeight||0;o=o&&o-ga;var c=(s-t)*2,d=o/c,ie=(u-t)*2,f=d*ie;f<0&&(f=0),f>o&&(f=o),Wt(f),va(o)}}function _a(){Xt(),he(!le)}function ta(u){if(!!Se.isOpen){var s=u.pageX;ea(s),Qt(!0)}}function Jt(u){if(!!Se.isOpen){var s=Number(u.pageX),t=yt.current||{},o=t.getBoundingClientRect().left||0,l=s-o-8,c=l;c<0&&(c=0),c>tt&&(c=tt),Wt(c);var d=Re(c);Ke("temp",d)}}function aa(u){if(!(!Se.isOpen||!Bt)){var s=Number(u.pageX),t=s-j;ea(s);var o=ke+t;o<0&&(o=0),o>tt&&(o=tt),Wt(o),Re(o)}}function Sa(u){!Se.isOpen||!Bt||(Qt(!1),Ke("temp",He),console.log("touchend"))}function ja(u){var s=(0,rt.Z)({},F[u]);s.open=!s.open;var t=s.open?1:0,o=(0,ze.Z)(F);o[u]=s,N(o),mt(F[u].id,F[u].switchCode,t)}function Ea(u,s,t){var o=JSON.parse(JSON.stringify(F)),l=o[u],c=o[u].allModel[s];if(!!l.open&&t!=0&&!(c.id=="gear"&&t==1)){if(t<0?c.sel=0:c.sel--,N(o),c.id=="mode"){var d=c.refer[c.sel].mid;console.log("nowModel.refer",c.refer,c.refer[c.sel].mid)}else if(c.id=="gear"){var ie=c.selectArr[c.sel],d=ie=="AUTO"?4:ie;console.log("nowModel.refer2",ie,d)}else{var d=c.selectArr[c.sel];console.log("nowModel.refer3",d)}It(l.id,c.code,d)}}var Ot=(0,n.useRef)(null);function It(u,s,t){clearTimeout(Ot.current),Ot.current=setTimeout(function(){mt(u,s,t)},500)}function na(u,s,t){var o=JSON.parse(JSON.stringify(F)),l=o[u],c=o[u].allModel[s];if(!!l.open){var d=c.selectArr;if(t!=d.length-1){if(t>d.length-1?c.sel=d.length-1:c.sel++,N(o),c.id=="mode"){var ie=c.refer[c.sel].mid;console.log("nowModel.refer",c.refer,c.refer[c.sel].mid)}else if(c.id=="gear")var f=c.selectArr[c.sel],ie=f=="AUTO"?4:f;else var ie=c.selectArr[c.sel];It(l.id,c.code,ie)}}}function Xt(){var u={projectId:r,spaceId:h};(0,G.mq)(u).then(function(s){var t=s.data||{};console.log("getAirInfo",t),t.tempSet=t.tempSet,$(t.tempSet),$e(t.tempSet),q(t.workMode),P(t.gear),pt(t.isAutoGear),Vt({isOpen:!!t.runStatus});var o=t.maxTempSet;ma(t.maxTempSet);var l=t.minTempSet;Kt(t.minTempSet);for(var c=[],d=l;d<=o;d=d+.5)c.push(d);w[0].selectArr=c,xa(t.tempSet,o,l);var ie=[];t.equipList.forEach(function(f){var W={};W.id=f.id,W.name=f.localName,W.open=f.runStatus==1,W.switchCode=f.switchCode;var Ee=JSON.parse(JSON.stringify(w));Ee.forEach(function(z){if(z.id=="temp"){z.code=f.tempSetCode;var Le=z.selectArr.findIndex(function(gt){return gt==f.tempSet});z.sel=Le==-1?0:Le}if(z.id=="gear"){z.code=f.gearCode;var Le=z.selectArr.findIndex(function(Ge){return f.isAutoGear==1?Ge=="AUTO":Ge==f.gear});z.sel=Le==-1?0:Le}if(z.id=="mode"){z.code=f.modeSetCode;var qe=z.refer.find(function(gt){return gt.mid==f.workMode});z.sel=(qe||{}).sindex||0}}),W.allModel=Ee,ie.push(W)}),N(ie)}).catch(function(){})}function Ke(u,s){if(!(!Se.isOpen&&u!="sw")){var t=v,o=Me;if(u=="gear"&&s=="windLow")if(t>1)t=t-1,P(t),o=0,pt(o);else return;if(u=="gear"&&s=="windUp")if(t<3)t=t+1,P(t),o=0,pt(o);else return;u=="gear"&&s=="auto"&&(o=Me==1?0:1,pt(o)),u=="mode"&&q(s);var l=Se.isOpen;u=="sw"&&(l=!l,Vt({isOpen:l}));var c=[];F.forEach(function(d){if(u=="sw"){var ie={id:d.id,code:d.switchCode,value:l?1:0};c.push(ie)}d.allModel.forEach(function(f){if(f.id=="temp")var W=s;else if(f.id=="gear")var W=o==1?4:t;else if(f.id=="mode")var W=s;if(f.id==u){var Ee={id:d.id,code:f.code,value:W};c.push(Ee)}})}),(0,G.RX)(c).then(function(d){u=="temp"&&$(s),Tt()}).catch(function(){})}}function mt(u,s,t){console.log("id code value",u,s,t);var o=[{id:u,code:s,value:t}];(0,G.RX)(o).then(function(l){Tt()}).catch(function(){})}return(0,n.useEffect)(function(){return Tt(),Xt(),function(){clearInterval(Gt.current)}},[h]),(0,e.jsxs)("div",{className:"air-adjust office-card g-fl",children:[(0,e.jsxs)("div",{className:"air-content",children:[(0,e.jsxs)("div",{className:"air-adjust-env",children:[(0,e.jsxs)("div",{className:"air-text",children:[(0,e.jsx)("span",{className:"envname",children:"\u7A7A\u8C03"}),(0,e.jsxs)("div",{className:"envnum",children:[K||"--",(0,e.jsx)("span",{className:"unit",children:"\u2103"})]})]}),(0,e.jsx)("div",{className:"air-show-all",children:F.length>1&&(0,e.jsxs)("div",{className:"air-show-all-cont",onClick:function(){_a()},children:[(0,e.jsx)("img",{className:"air-arrow",src:le?C:g}),(0,e.jsx)("span",{className:"text",children:le?"\u6536\u8D77\u5168\u90E8":"\u67E5\u770B\u5168\u90E8"})]})})]}),(0,e.jsx)("div",{className:"air-adjust-btn",children:(0,e.jsx)("img",{className:"airImg",src:Se.isOpen?x:H})}),!le&&(0,e.jsx)("div",{className:"air-switch",onClick:function(){Ke("sw")},children:(0,e.jsx)(ct,{isOpen:Se.isOpen,isAir:!0})})]}),(0,e.jsxs)("div",{style:{visibility:!le&&Se.isOpen?"visible":"hidden",height:!le&&Se.isOpen?"auto":0},children:[(0,e.jsxs)("div",{className:"air-control-item temp-item",onMouseDown:function(s){s.stopPropagation()},onMouseUp:function(s){Sa(s)},onMouseMove:function(s){aa(s)},children:[(0,e.jsxs)("div",{className:"temp-wrap",children:[(0,e.jsxs)("div",{className:"minVal",children:[Ct,"\u2103"]}),(0,e.jsxs)("div",{className:"tempBar",ref:yt,onClick:function(s){s.stopPropagation(),Jt(s)},children:[(0,e.jsx)("div",{className:"eachBlock"}),(0,e.jsx)("div",{className:"eachBlock"}),(0,e.jsx)("div",{className:"eachBlock"}),(0,e.jsx)("div",{className:"eachBlock"}),(0,e.jsx)("div",{className:"eachBlock"}),Se.isOpen&&(0,e.jsx)("div",{className:"circle",onMouseDown:function(s){s.stopPropagation(),ta(s)},style:{transform:"translateX("+ke+"px)"},children:(0,e.jsxs)("span",{className:"tvalue",children:[He,"\u2103"]})})]}),(0,e.jsxs)("div",{className:"maxVal",children:[Nt,"\u2103"]})]}),(0,e.jsx)("div",{className:"air-common-text change-text",children:"\u6E29\u5EA6\u8BBE\u5B9A"})]}),(0,e.jsxs)("div",{className:"air-control-item item-flex ",children:[(0,e.jsxs)("div",{className:"air-control-item-box",children:[(0,e.jsx)("div",{className:"envnum-common air-envnum-comon",children:V.map(function(u,s){return(0,e.jsx)("span",{className:"envnum-common-wind ".concat(u==v?"windBlack":""),children:u},s+"wind")})}),(0,e.jsx)("div",{className:"air-common-text change-text",children:"\u98CE\u91CF\u8C03\u8282"})]}),(0,e.jsxs)("div",{className:"air-common-switch",children:[(0,e.jsx)("div",{className:"switch ".concat(v<=1||!Se.isOpen?"disabled":""),onClick:function(){Ke("gear","windLow")},children:(0,e.jsx)("img",{className:"wimg",src:J})}),(0,e.jsx)("div",{className:"switch ".concat(v>=3||!Se.isOpen?"disabled":""),onClick:function(){Ke("gear","windUp")},children:(0,e.jsx)("img",{className:"wimg",src:re})}),(0,e.jsx)("div",{className:"switch ".concat(Me==1?"yell":""," ").concat(Se.isOpen?"":"disabled"),onClick:function(){Ke("gear","auto")},children:"AUTO"})]})]}),(0,e.jsxs)("div",{className:"air-control-item item-flex",children:[(0,e.jsxs)("div",{className:"air-control-item-box",children:[(0,e.jsx)("div",{className:"envnum-common air-envnum-comon",children:ye==2?"\u5236\u70ED":ye==1?"\u5236\u51B7":"\u901A\u98CE"}),(0,e.jsx)("div",{className:"air-common-text change-text",children:"\u6A21\u5F0F\u8BBE\u5B9A"})]}),(0,e.jsxs)("div",{className:"air-common-switch",children:[(0,e.jsx)("div",{className:"switch ".concat(ye==2?"yell":""," ").concat(Se.isOpen?"":"disabled"),onClick:function(){Ke("mode",2)},children:(0,e.jsx)("img",{src:ye==2?X:xe})}),(0,e.jsx)("div",{className:"switch ".concat(ye==1?"yell":""," ").concat(Se.isOpen?"":"disabled"),onClick:function(){Ke("mode",1)},children:(0,e.jsx)("img",{src:ye==1?Te:ce})}),(0,e.jsx)("div",{className:"switch ".concat(ye==3?"yell":""," ").concat(Se.isOpen?"":"disabled"),onClick:function(){Ke("mode",3)},children:(0,e.jsx)("img",{src:ye==3?T:A})})]})]})]}),le&&(0,e.jsx)("div",{className:"allAir",children:F.map(function(u,s){return(0,e.jsxs)("div",{className:"eachAir ".concat(u.open?"":"closeAir"," ").concat(F.length==1?"oneAir":""),children:[(0,e.jsx)("div",{className:"airName",children:u.name}),(0,e.jsxs)("div",{className:"openButton ".concat(u.open?"open":""),onClick:function(){ja(s)},children:[(0,e.jsx)("div",{className:"openBack"}),(0,e.jsx)("div",{className:"openCircle"})]}),(0,e.jsx)("div",{className:"airBox",children:u.allModel.map(function(t,o){return(0,e.jsxs)("div",{className:"adjustBox ".concat(u.open?"":"disable"),children:[(0,e.jsx)("div",{className:"arrow ".concat(t.sel==t.selectArr.length-1?"disable":""),onClick:function(){na(s,o,t.sel)},children:(0,e.jsx)(Lt,{})}),(0,e.jsx)("div",{className:"valueBox",children:(0,e.jsx)("div",{className:"valueWrap",style:{transform:"translateY("+t.sel*-50+"px)"},children:t.selectArr.map(function(l,c){return(0,e.jsx)("div",{className:"value",children:l},c+"val")})})}),(0,e.jsx)("div",{className:"arrow ".concat(t.sel==0||t.sel==1&&t.id=="gear"?"disable":""),onClick:function(){Ea(s,o,t.sel)},children:(0,e.jsx)(Dt.Z,{})}),(0,e.jsx)("div",{className:"adjustName",children:t.name})]},o+"model")})})]},s+"device")})})]})},ya=a(28287),Oa=a.n(ya),Ia=m.x.lamp_open,Aa=m.x.lamp_close,Za=m.x.expend_down,wa=m.x.expend_up,Ma=function(E){var h,r=E.spaceId,S=(0,n.useState)(!1),C=(0,i.Z)(S,2),g=C[0],x=C[1],H=(0,n.useState)(!1),J=(0,i.Z)(H,2),re=J[0],X=J[1],xe=(0,n.useState)([]),Te=(0,i.Z)(xe,2),ce=Te[0],T=Te[1],A=(0,n.useRef)(null),Y=(0,n.useCallback)(function(){(0,G.NR)(r).then(function(w){var V=w.content||[];if(V.length>1){x(!0);var ee=!1;V.forEach(function(D){D.runStatus&&(ee=!0)}),X(ee)}else V.forEach(function(D){D.runStatus?X(!0):X(!1)});T(V)},function(w){})},[]);function L(){clearInterval(A.current),A.current=setInterval(function(){Y()},3e3)}(0,n.useEffect)(function(){return T([]),Y(),L(),function(){T([]),clearInterval(A.current)}},[r]);var K=(0,n.useState)(!1),$=(0,i.Z)(K,2),Q=$[0],_e=$[1];function le(){_e(!Q)}var he=function(V,ee,D){clearInterval(A.current);var F=[];ee=="total"?ce.forEach(function(N){N.runStatus=V,F.push({id:N.id,switch:V})}):(ce.forEach(function(N){N.id==D&&(N.runStatus=V)}),F.push({id:D,switch:V})),ce.forEach(function(N){X(N.runStatus)}),setTimeout(function(){T((0,ze.Z)(ce))},500),(0,G.SK)(F).then(function(N){L()})};return(0,e.jsxs)("div",{className:p().box,children:[(0,e.jsx)("div",{className:p().content,children:(0,e.jsxs)("div",{className:p().env,children:[(0,e.jsxs)("div",{className:p().envLeft,children:[(0,e.jsx)("span",{className:p().eqTitle,children:g?"\u5149\u7167":(h=ce[0])===null||h===void 0?void 0:h.localName}),(0,e.jsx)("div",{className:"".concat(p().eqStatus," ").concat(p().pdt10),children:(0,e.jsx)("span",{children:re?"\u7167\u660E\u5DF2\u5F00\u542F":"\u7167\u660E\u5DF2\u5173\u95ED"})}),g&&(0,e.jsxs)("div",{className:p().showAll,onClick:le,children:[(0,e.jsx)("img",{className:p().showImg,src:Q?wa:Za}),(0,e.jsx)("div",{className:p().showAllText,children:"\u663E\u793A\u5168\u90E8"})]})]}),(0,e.jsx)("div",{className:p().envRight,children:(0,e.jsx)("img",{className:p().roomEqImg,src:re?Ia:Aa})}),!Q&&(0,e.jsx)("div",{className:p().eqBtn,onClick:function(){he(!re,"total")},children:(0,e.jsx)(ct,{isOpen:re})})]})}),ce.map(function(w,V){if(Q)return(0,e.jsxs)("div",{className:"".concat(Oa().lampChild," ").concat(p().flexBetween),children:[(0,e.jsx)("div",{className:p().eqTitle,children:w.localName}),(0,e.jsx)("div",{onClick:function(){he(!w.runStatus,"child",w.id)},children:(0,e.jsx)(ct,{isOpen:w.runStatus})})]},w.id)})]})},ka=a(39216),ia=a.n(ka),La=m.x.socket_close,Da=m.x.socket_open,Fa=m.x.expend_down,Pa=m.x.expend_up,Ba=function(E){var h,r=E.spaceId,S=E.projectId,C=(0,n.useState)(!1),g=(0,i.Z)(C,2),x=g[0],H=g[1],J=(0,n.useState)(!1),re=(0,i.Z)(J,2),X=re[0],xe=re[1],Te=(0,n.useState)([]),ce=(0,i.Z)(Te,2),T=ce[0],A=ce[1],Y=(0,n.useState)(!1),L=(0,i.Z)(Y,2),K=L[0],$=L[1],Q=(0,n.useState)(!1),_e=(0,i.Z)(Q,2),le=_e[0],he=_e[1],w=(0,n.useRef)(null);function V(){xe(!X)}function ee(N,je,te){var Ze=[];je==="total"?(he(!0),Ze=JSON.parse(JSON.stringify(T)),Ze.map(function(Ce){Ce.value=N?1:0,Ce.code=Ce.switchCode})):Ze=[{value:N?1:0,code:te.switchCode,id:te.id}],(0,G.K0)(Ze).then(function(Ce){he(!1),F()})}function D(){var N={spaceId:r,equipType:"socket"};he(!1),(0,G.F6)(N).then(function(je){for(var te=je.data.equipList||[],Ze=!1,Ce=0;Ce<te.length;Ce++){var Pe=te[Ce];Pe.runStatus&&($(!0),Ze=!0)}te.length>1?H(!0):H(!1),Ze||$(!1),A(te)})}function F(N){D(),clearInterval(w.current),w.current=null,w.current=setInterval(function(){D()},1e3*8)}return(0,n.useEffect)(function(){return F(),function(){clearInterval(w.current),w.current=null}},[]),(0,e.jsxs)("div",{className:p().box,children:[(0,e.jsx)("div",{className:p().content,children:(0,e.jsxs)("div",{className:p().env,children:[(0,e.jsxs)("div",{className:p().envLeft,children:[(0,e.jsx)("span",{className:p().eqTitle,children:x?"\u667A\u80FD\u63D2\u5EA7":(h=T[0])===null||h===void 0?void 0:h.localName}),(0,e.jsx)("div",{className:"".concat(p().eqStatus," ").concat(p().pdt10),children:(0,e.jsx)("span",{children:K?"\u63D2\u5EA7\u5DF2\u5F00\u542F":"\u63D2\u5EA7\u5DF2\u5173\u95ED"})}),x&&(0,e.jsxs)("div",{className:p().showAll,onClick:V,children:[(0,e.jsx)("img",{className:p().showImg,src:X?Pa:Fa}),(0,e.jsx)("div",{className:p().showAllText,children:"\u663E\u793A\u5168\u90E8"})]})]}),(0,e.jsx)("div",{className:ia().imgPos,children:(0,e.jsx)("img",{className:ia().roomEqImg,src:K?Da:La})}),!X&&(0,e.jsx)("div",{className:p().eqSocketBtn,onClick:function(){ee(!K,"total")},children:(0,e.jsx)(ct,{isAir:!0,isLoading:le,isOpen:K})})]})}),T.map(function(N,je){if(X)return(0,e.jsxs)("div",{className:"".concat(ia().lampChild," ").concat(p().flexBetween),children:[(0,e.jsx)("div",{className:p().eqTitle,children:N.localName}),(0,e.jsx)("div",{className:p().dsflex,onClick:function(){ee(!N.runStatus,"child",N)},children:(0,e.jsx)(ct,{isOpen:N.runStatus})})]},N.id)})]})},ba=a(95264),Ra=a.n(ba),Wa=m.x.curtain_close_icon_row,Ua=m.x.curtain_open_icon_row,Na=function(E){var h=E.id,r=E.isTotal,S=E.preTime,C=E.changePreTime,g=E.changeCurtainTex,x=E.curtainArr,H=E.projectId,J=(0,n.useState)(!1),re=(0,i.Z)(J,2),X=re[0],xe=re[1],Te=(0,n.useState)(!1),ce=(0,i.Z)(Te,2),T=ce[0],A=ce[1],Y=(0,n.useState)(),L=(0,i.Z)(Y,2),K=L[0],$=L[1],Q=(0,n.useRef)(null),_e=function(w,V){var ee=[];if(r)x.forEach(function(F){ee.push({equipmentCategory:"CFSSES",infoCode:w,value:1,objectId:F.id})});else{var D={projectId:H,objectId:V,equipmentCategory:"CFSSES",infoCode:w,value:1};ee.push(D)}return ee},le=function(w,V,ee){var D=Date.now();if(!(D-S<=2e3)){C(Date.now());var F=_e(w,V);(0,G.WN)(F),w=="EquipOffSet"?(xe(!0),A(!1)):(A(!0),xe(!1)),$(2),Q.current=setInterval(function(){$(function(N){return N-1})},1e3)}};return(0,n.useEffect)(function(){K==2&&g("\u6307\u4EE4\u4E0B\u53D1\u4E2D\u2026"),K==1&&g("\u518D\u6B21\u70B9\u51FB\u505C\u6B62\u7A97\u5E18"),K===0&&(g(""),xe(!1),A(!1),clearInterval(Q.current))},[K]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{onClick:function(){le("EquipOffSet",h,1)},className:"".concat(p().circulBtn," ").concat(p().mgr20," ").concat(X?p().yell:""),children:[X&&(0,e.jsx)("div",{children:K}),!X&&(0,e.jsx)("img",{className:p().btnIcon,src:Wa})]}),(0,e.jsxs)("div",{onClick:function(){le("EquipOnSet",h,2)},className:"".concat(p().circulBtn," ").concat(T?p().yell:""),children:[T&&(0,e.jsx)("div",{children:K}),!T&&(0,e.jsx)("img",{className:p().btnIcon,src:Ua})]})]})},Ha=m.x.curtain_open_row,Ka=m.x.expend_down,qa=m.x.expend_up,Ga=function(E){var h,r=E.spaceId,S=E.projectId,C=(0,n.useState)(!1),g=(0,i.Z)(C,2),x=g[0],H=g[1],J=(0,n.useState)(!1),re=(0,i.Z)(J,2),X=re[0],xe=re[1],Te=(0,n.useState)(!0),ce=(0,i.Z)(Te,2),T=ce[0],A=ce[1],Y=(0,n.useState)(!1),L=(0,i.Z)(Y,2),K=L[0],$=L[1],Q=(0,n.useState)(2),_e=(0,i.Z)(Q,2),le=_e[0],he=_e[1],w=(0,n.useState)(),V=(0,i.Z)(w,2),ee=V[0],D=V[1],F=(0,n.useState)([]),N=(0,i.Z)(F,2),je=N[0],te=N[1],Ze=(0,n.useState)(Date.now()),Ce=(0,i.Z)(Ze,2),Pe=Ce[0],pe=Ce[1],He=(0,n.useState)(""),$e=(0,i.Z)(He,2),Ve=$e[0],et=$e[1];function ye(){xe(!X)}var q=(0,n.useCallback)(function(y){pe(y)}),M=(0,n.useCallback)(function(y){et(y)});return(0,n.useEffect)(function(){var y={criteria:{projectId:S,spaceId:r,type:0},orders:[{column:"sortNum",asc:!0}]};(0,G.nZ)(y).then(function(v){var P=v.content||[];P.length>1?H(!0):H(!1),te(P)})},[]),(0,e.jsxs)("div",{className:p().box,children:[(0,e.jsx)("div",{className:p().content,children:(0,e.jsxs)("div",{className:p().env,children:[(0,e.jsxs)("div",{className:p().envLeft,children:[(0,e.jsx)("span",{className:p().eqTitle,children:x?"\u7A97\u5E18":(h=je[0])===null||h===void 0?void 0:h.name}),(0,e.jsx)("div",{className:"".concat(p().eqStatus," ").concat(p().pdt10),children:(0,e.jsx)("span",{children:Ve})}),x&&(0,e.jsxs)("div",{className:p().showAll,onClick:ye,children:[(0,e.jsx)("img",{className:p().showImg,src:X?qa:Ka}),(0,e.jsx)("div",{className:p().showAllText,children:"\u663E\u793A\u5168\u90E8"})]})]}),(0,e.jsx)("div",{className:p().envRight,children:(0,e.jsx)("img",{className:p().roomEqImg,src:Ha})}),!X&&(0,e.jsx)("div",{className:p().eqCirculBtn,children:(0,e.jsx)(Na,{id:"",isTotal:!0,preTime:Pe,changePreTime:q,changeCurtainTex:M,curtainArr:je,projectId:S})})]})}),je.map(function(y,v){if(X)return(0,e.jsxs)("div",{className:"".concat(Ra().lampChild," ").concat(p().flexBetween),children:[(0,e.jsx)("div",{className:p().eqTitle,children:y.name}),(0,e.jsx)("div",{className:p().dsflex,children:(0,e.jsx)(Na,{id:y.id,isTotal:!1,preTime:Pe,changePreTime:q,changeCurtainTex:M,curtainArr:je,projectId:S})})]},y.id)})]})},Ja=function(E){var h=E.onClose,r=E.showSpace,S=[{name:"\u6E29\u5EA6",id:"temperature",num:"0",describe:"--"},{name:"CO\u2082",id:"co2",num:"0",describe:"--"},{name:"PM2.5",id:"pm25",num:"0",describe:"--"},{name:"\u7532\u919B",id:"hcho",num:"0",describe:"--"},{name:"\u6E7F\u5EA6",id:"humidity",num:"0",unit:"%",describe:"--"}],C=function(M,y){if(M||M==0){var v={temperature:{range:[20,24],text:["\u504F\u51B7","\u8212\u9002","\u504F\u70ED"]},humidity:{range:[30,70],text:["\u5E72\u71E5","\u5065\u5EB7","\u6F6E\u6E7F"]},co2:{range:[800,1e3,1500],text:["\u5065\u5EB7","\u8FBE\u6807","\u7565\u9AD8","\u8D85\u6807"]},pm25:{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"]}},P=[M].concat((0,ze.Z)(v[y].range)).sort(function(Me,pt){return Me-pt}),O=P.findIndex(function(Me){return Me===M}),Qe=v[y].text[O];return{level:O,levelTxt:Qe}}else return{level:"--",levelTxt:"--"}},g=m.x.officeImg,x=(0,n.useState)("3s"),H=(0,i.Z)(x,2),J=H[0],re=H[1],X=(0,n.useState)(""),xe=(0,i.Z)(X,2),Te=xe[0],ce=xe[1],T=(0,n.useState)([]),A=(0,i.Z)(T,2),Y=A[0],L=A[1],K=(0,n.useState)([]),$=(0,i.Z)(K,2),Q=$[0],_e=$[1],le=(0,n.useState)(0),he=(0,i.Z)(le,2),w=he[0],V=he[1],ee=(0,n.useRef)(null);function D(q){var M=!1;return r.equipList&&r.equipList.forEach(function(y){if(y.equipType===q)return M=!0}),M}var F=function(){var M={criteria:{spaceId:r.spaceId,projectId:fe.T.projectId}};(0,G.YC)(M).then(function(y){y.content&&y.content.forEach(function(v,P){S.forEach(function(O,Qe){if(O.describe=C(v[O.id],O.id).levelTxt,!v[O.id]&&v[O.id]!=0){O.num="--";return}O.id=="humidity"?O.num=v[O.id].toFixed(0):O.id=="hcho"?O.num=v[O.id].toFixed(2):O.id=="temperature"?O.num=v[O.id].toFixed(1):O.num=v[O.id]}),V(v.controlMode),L(S)})}).catch(function(y){})},N=(0,n.useMemo)(function(){var q=[],M="";r.meetTime&&r.meetTime.length>0&&(M="meetingBook")&&r.meetTime.forEach(function(v){q.push("".concat(v.meetTimeStartTime,"-").concat(v.meetTimeEndTime))});var y="--";return r.workTimeStartTime&&(y="".concat(r.workTimeStartTime,"-").concat(r.workTimeEndTime)),r.overTime&&r.overTime.length>0&&(M="overtimeWork")&&r.overTime.forEach(function(v){q.push("".concat(v.overTimeStartTime,"-").concat(v.overTimeEndTime))}),{workTime:y,runTimeStatus:M,timeArr:q}},[r]);(0,n.useEffect)(function(){return F(),ee=setInterval(function(){F()},1e3*60*5),function(){clearInterval(ee)}},[]);var je=(0,n.useState)(!1),te=(0,i.Z)(je,2),Ze=te[0],Ce=te[1],Pe=(0,n.useState)({left:0,top:0,bottom:0,right:0}),pe=(0,i.Z)(Pe,2),He=pe[0],$e=pe[1],Ve=(0,n.useRef)(null),et=function(M){console.log("xxx"),Ce(M)},ye=function(M,y){var v,P=window.document.documentElement,O=P.clientWidth,Qe=P.clientHeight,Me=(v=Ve.current)===null||v===void 0?void 0:v.getBoundingClientRect();!Me||$e({left:-Me.left+y.x,right:O-(Me.right-y.x),top:-Me.top+y.y,bottom:Qe-(Me.bottom-y.y)})};return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(at.Z,{width:810,visible:!0,style:{width:"100%",cursor:"move"},maskClosable:!1,closable:!1,modalRender:function(M){return(0,e.jsx)(sa(),{disabled:Ze,bounds:He,onStart:function(v,P){return ye(v,P)},children:(0,e.jsx)("div",{ref:Ve,children:M})})},footer:null,children:(0,e.jsxs)("div",{className:ue().main,onMouseDown:function(M){M.preventDefault()},children:[(0,e.jsxs)("div",{className:ue().header,children:[(0,e.jsxs)("div",{className:ue().show,children:[(0,e.jsxs)("div",{className:ue().tileline,children:[(0,e.jsx)("img",{src:g,className:ue().titleIcon}),(0,e.jsx)("span",{children:r.localName}),r.isPassengerPass==!0&&(0,e.jsxs)("span",{className:ue().hasPerson,children:[(0,e.jsx)(R.Z,{className:"",type:"youren",style:{color:"#CE9F27",marginRight:"2px",fontSize:"9px"}}),"\u6709\u4EBA"]}),r.isPassengerPass==!1&&(0,e.jsxs)("span",{className:ue().hasPerson,children:[(0,e.jsx)(R.Z,{className:"",type:"wuren",style:{color:"#8B949E",marginRight:"2px",fontSize:"9px"}}),"\u65E0\u4EBA"]})]}),(0,e.jsxs)("div",{className:ue().timeLine,children:[(0,e.jsxs)("span",{className:ue().pdr10,children:["\u5DE5\u4F5C\u65F6\u95F4\uFF1A",N.workTime]}),N.runTimeStatus=="meetingBook"?"\u4F1A\u8BAE\u65F6\u95F4\uFF1A":N.runTimeStatus=="overtimeWork"?"\u52A0\u73ED\u65F6\u95F4\uFF1A":"",N.timeArr.map(function(q,M){return(0,e.jsx)("span",{className:ue().pdr10,children:q},M)})]})]}),(0,e.jsx)("div",{className:ue().close,onClick:h,children:(0,e.jsx)(R.Z,{type:"close"})})]}),(0,e.jsxs)("div",{className:ue().content,children:[(0,e.jsx)("div",{className:ue().infoList,children:Y.map(function(q,M){return(0,e.jsxs)("div",{className:ue().item,children:[(0,e.jsx)("div",{className:ue().title,children:q.name}),(0,e.jsxs)("div",{className:ue().num,children:[q.num,q.unit]}),(0,e.jsx)("div",{className:ue().describe,children:q.describe})]},"navc"+q.id)})}),(0,e.jsx)("div",{className:ue().devices,children:(0,e.jsxs)(Ue.Z,{gutter:[12,18],children:[D("airConditioner")&&w==0&&(0,e.jsx)(se.Z,{span:12,children:(0,e.jsx)(ca,{spaceId:r.spaceId,projectId:fe.T.projectId})}),D("airConditioner")&&w==1&&(0,e.jsx)(se.Z,{span:12,children:(0,e.jsx)(Ta,{spaceId:r.spaceId,projectId:fe.T.projectId})}),D("light")&&(0,e.jsx)(se.Z,{span:12,children:(0,e.jsx)(Ma,{spaceId:r.spaceId,projectId:fe.T.projectId})}),D("curtain")&&(0,e.jsx)(se.Z,{span:12,children:(0,e.jsx)(Ga,{spaceId:r.spaceId,projectId:fe.T.projectId})}),D("socket")&&(0,e.jsx)(se.Z,{span:12,children:(0,e.jsx)(Ba,{spaceId:r.spaceId,projectId:fe.T.projectId})})]})})]})]})})})},Xa=a(88583),Ae=a.n(Xa),Ya=a(3527),be=a.n(Ya),za=a(94184),zt=a.n(za),$a=a(30381),Va=a.n($a),Qa=a(78919),$t=a(51236),en=function(){var h=(0,Je.tT)("sagacare_spaceFunc"),r=h.hasPersonList,S=h.querySpaceAdjustList,C=(0,Je.tT)("sagacare_buildFloor"),g=C.changeLastFloorId,x=(0,Je.tT)("sagacare_searchInfo"),H=x.searchSpace,J=(0,Je.tT)("sagacare_spaceFunc"),re=J.getSpaceFunc,X=m.x.envir_all,xe=m.x.equip_air,Te=m.x.equip_lamp,ce=m.x.envir_curtain,T=m.x.envir_socket,A=(0,n.useState)(!1),Y=(0,i.Z)(A,2),L=Y[0],K=Y[1],$=(0,n.useState)({}),Q=(0,i.Z)($,2),_e=Q[0],le=Q[1],he=[{name:"\u5168\u90E8\u8BBE\u5907",id:"all",src:X,color:"#E89E32",colorStr:""},{name:"\u7A7A\u8C03",id:"airConditioner",src:xe,num:"--",color:"#5E8BCF",colorStr:"94,139,207,"},{name:"\u7167\u660E",id:"light",src:Te,num:"--",color:"#FFE823",colorStr:"255,232,35,"},{name:"\u7A97\u5E18",id:"curtain",src:ce,num:"--",color:"#E89E32",colorStr:"232, 158, 50,"},{name:"\u63D2\u5EA7",id:"socket",src:T,num:"--",color:"#9FB7CD",colorStr:"159, 183, 205,"}],w={socket_1:"\u6C11\u7528\u63D2\u5EA7",socket_2:"\u5DE5\u4E1A\u7528\u63D2\u5EA7",socket_3:"\u9632\u6C34\u63D2\u5EA7",socket_4:"\u666E\u901A\u63D2\u5EA7",socket_5:"\u7535\u6E90\u63D2\u5EA7",socket_6:"\u7535\u8111\u63D2\u5EA7",socket_7:"\u7535\u8BDD\u63D2\u5EA7",socket_8:"\u89C6\u9891\u3001\u97F3\u9891\u63D2\u5EA7",socket_9:"\u79FB\u52A8\u63D2\u5EA7",socket_10:"USB\u63D2\u5EA7",socket_11:"\u996E\u6C34\u8BBE\u5907\u63D2\u5EA7",socket_99:"\u5176\u4ED6"},V=(0,n.useState)([]),ee=(0,i.Z)(V,2),D=ee[0],F=ee[1],N=(0,n.useState)(.8),je=(0,i.Z)(N,2),te=je[0],Ze=je[1],Ce=(0,n.useState)(1),Pe=(0,i.Z)(Ce,2),pe=Pe[0],He=Pe[1],$e=(0,n.useState)(0),Ve=(0,i.Z)($e,2),et=Ve[0],ye=Ve[1],q=(0,n.useState)([]),M=(0,i.Z)(q,2),y=M[0],v=M[1],P=(0,n.useRef)([]),O=(0,n.useState)({}),Qe=(0,i.Z)(O,2),Me=Qe[0],pt=Qe[1],oa=(0,n.useState)([]),Ft=(0,i.Z)(oa,2),Se=Ft[0],Vt=Ft[1],ua=(0,n.useState)([]),Pt=(0,i.Z)(ua,2),Bt=Pt[0],Qt=Pt[1],la=(0,n.useState)(he[0]),bt=(0,i.Z)(la,2),j=bt[0],ea=bt[1],da=(0,n.useState)(),Rt=(0,i.Z)(da,2),ke=Rt[0],Wt=Rt[1],fa=(0,n.useState)([]),Ut=(0,i.Z)(fa,2),tt=Ut[0],va=Ut[1],pa=(0,n.useState)(!1),Ht=(0,i.Z)(pa,2),Ct=Ht[0],Kt=Ht[1],ha=(0,n.useState)([]),qt=(0,i.Z)(ha,2),Nt=qt[0],ma=qt[1],Gt=(0,n.useState)({name:"\u5168\u90E8",scode:"all",code:"all",openNum:0}),Tt=(0,i.Z)(Gt,2),Re=Tt[0],ga=Tt[1],yt=function(t){Wt(t)},xa=function(t){ea(t)},_a=function(t){ga(t)},ta=function(t){K(!0),le(t)},Jt=function(t,o){var l="";if(j.id=="all"){var c=D.filter(function(d){return d.id==o});l=(c[0]||{}).colorStr}else l=j.colorStr;if(j.id=="curtain"||o=="curtain")return t=="noHave"||!t?"rgba(196, 196, 196, 0)":"rgba("+l+"1)";if(t===2)return"rgba("+l+"0.4)";if(t===1)return"rgba("+l+"1)";if(t===0||t=="nostatus")return"rgba(196, 196, 196, 0.6)"},aa=at.Z.confirm,Sa=function(t,o){if(!(j.id=="all"||!t.canClick)&&!(t[j.id]=="noHave"||j.id=="socket"&&t[Re.scode]=="noHave")){if(t[j.id]=="nostatus"){ne.default.success("\u8BE5\u7A7A\u95F4\u8BBE\u5907\u79BB\u7EBF");return}if(t[j.id]===2){aa({title:"\u8BF7\u786E\u8BA4",icon:(0,e.jsx)(I.Z,{}),content:"\u662F\u5426\u8FDB\u5165\u5355\u7A7A\u95F4\u8FDB\u884C\u8C03\u8282\uFF1F",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){ta(t)},onCancel:function(){}});return}var l=t[j.id]===1?"\u5173\u95ED":"\u6253\u5F00";aa({title:"\u8BF7\u786E\u8BA4",icon:(0,e.jsx)(I.Z,{}),content:j.id=="socket"&&Re.code!=="all"?"\u786E\u8BA4".concat(l).concat(Re.name,"\u5417\uFF1F"):"\u786E\u8BA4".concat(l,"\u8BE5").concat(j.name,"\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){function d(){}j.id=="airConditioner"&&Ie(t,o,d),j.id=="light"&&ht("one",[t],d,l),j.id=="curtain"&&dt("one",[t],d,l),j.id=="socket"&&nt("one",[t],l,Re)},onCancel:function(){}})}};(0,n.useEffect)(function(){ke?(g(ke),Kt(!0),(0,$t.cn)({floorId:ke}).then(function(s){Kt(!1);var t=(s.data||{}).spaceList||[],o=document.body.offsetWidth,l=(s.data||{}).width||800;if(l<o){var c=1;ye((o-l)/2)}else{var c=Number((o/l).toFixed(4));ye(0)}var d={width:l*c,height:(s.data||{}).height*c};pt(d),t.forEach(function(f,W){f.width=f.width*c,f.height=f.height*c,f.left=f.left*c,f.top=f.top*c});var ie=(0,Qa.O)(t);He(ie),v(t),P.current=t}).catch(function(){Kt(!1)})):v([])},[ke]);var ja=(0,n.useCallback)(function(s,t,o){Ze(s);var l=JSON.parse(JSON.stringify(P.current)),c=l.map(function(d,ie){return ie==0,d.width=d.width*s,d.height=d.height*s,d.left=d.left*s-t,d.top=d.top*s-o,d});v(c)},[P]),Ea=function(t){return(0,$t.Vk)({floorId:ke,projectId:fe.T.projectId}).then(function(o){var l=o.data.statistics||[];t.forEach(function(f){var W=l.filter(function(Ee){return Ee.equipType==f.id});f.num=(W[0]||{}).runCount}),F(t);var c=[],d=o.data.spaceList||[];d.forEach(function(f){(f.equipList||[]).forEach(function(W){if((W==null?void 0:W.equipType)=="socket"){var Ee,z=W==null||(Ee=W.infos)===null||Ee===void 0?void 0:Ee.SocketType;z=z&&"socket_"+z;var Le=c.findIndex(function(gt){return gt.scode==z});if(z&&Le==-1){var qe;c.push({name:w[z],scode:z,code:W==null||(qe=W.infos)===null||qe===void 0?void 0:qe.SocketType,openNum:0})}}})});var ie=[];return d.forEach(function(f){c.forEach(function(W){var Ee=W.code,z=W.scode,Le=(f.equipList||[]).filter(function(Ge){var Ca;return(Ge==null||(Ca=Ge.infos)===null||Ca===void 0?void 0:Ca.SocketType)==Ee});if(Le.length>0){var qe=Le.filter(function(Ge){return Ge.runStatus==1}),gt=Le.filter(function(Ge){return ie.includes(Ge.id)?!1:(ie.push(Ge.id),Ge.runStatus==1)});qe.length==Le.length?f[z]=1:qe.length>0?f[z]=2:f[z]=0,W.openNum=W.openNum+gt.length}else f[z]="noHave"})}),d.forEach(function(f){var W=["airConditioner","light","curtain","socket"];W.forEach(function(Ee){var z=(f.equipList||[]).filter(function(qe){return qe.equipType==Ee});if(z.length>0){f.equipStatusList=f.equipStatusList?f.equipStatusList:[];var Le=(f.equipStatusList||[]).filter(function(qe){return qe.equipType==Ee});Le.length>0?f[Ee]=Le[0].status:(f[Ee]="nostatus",f.equipStatusList.push({equipType:Ee,status:"nostatus"}))}else f[Ee]="noHave"})}),Vt(d),c.splice(0,0,{name:"\u5168\u90E8",scode:"all",code:"all",openNum:0}),ma(c),"next"}).catch(function(){})},Ot=(0,n.useRef)(),It=(0,n.useRef)();function na(s){Ea(s).then(function(t){clearTimeout(Ot.current),Ot.current=setTimeout(function(){na(s)},8e3)})}function Xt(){return(0,$t.Jc)().then(function(s){var t=s.data||[],o=[];return he.map(function(l,c){if(c===0){o.push(l);return}var d=!1;t.map(function(ie){l.id===ie&&(d=!0)}),d&&o.push(l)}),F(o),o})}function Ke(s){S(s).then(function(t){clearTimeout(It.current),It.current=setTimeout(function(){Ke(s)},8e3)})}(0,n.useEffect)(function(){return(0,ot.Z)((0,we.Z)().mark(function s(){var t;return(0,we.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Xt();case 2:t=l.sent,ke&&(na(t),Ke(ke));case 4:case"end":return l.stop()}},s)}))(),function(){console.log("clearTimeout-clear"),clearTimeout(Ot.current),clearTimeout(It.current)}},[ke]),(0,n.useEffect)(function(){ke&&(0,$t.lQ)({floorId:ke,date:Va()().format("YYYYMMDD")}).then(function(s){var t=s.content||[];Qt(t)}).catch(function(){})},[ke]),(0,n.useEffect)(function(){var s=[];y.map(function(t){var o=t.spaceId,l=Se.filter(function(f){return f.id==o}),c=Bt.filter(function(f){return f.id==o}),d=r.filter(function(f){return f.spaceId==o}),ie=Object.assign({},d[0],l[0],c[0],t);s.push(ie)}),va(s)},[Se,y,Bt,r]);var mt=0,u=0;return(0,e.jsxs)("div",{className:Ae().sagawrap,children:[(0,e.jsx)(ut.Z,{title:(0,e.jsx)(Je._H,{id:"menu.equipment"}),action:(0,e.jsx)(k.Z,{})}),(0,e.jsx)(ge.Z,{navigatorList:D,type:"equipment",navigatorChange:xa,action:D.length>0&&(0,e.jsx)(_t,{selNavObj:j,navigatorList:D,selSocketType:Re,socketTypeArr:Nt,mapList:tt}),changeFloorId:yt,selParamObj:j}),(0,e.jsxs)("div",{className:Ae().maptop,children:[j.id=="socket"&&(0,e.jsx)("div",{className:zt()(Ae().left,Ae().stBox),children:Nt.map(function(s,t){return(0,e.jsx)("div",{className:zt()(Ae().stItem,(0,me.Z)({},Ae().sel,Re.scode==s.scode)),onClick:function(l){l.stopPropagation(),_a(s)},children:s.name},t+"socket")})}),j.id!=="all"&&j.id!=="curtain"&&j.id!=="socket"&&(0,e.jsxs)("div",{className:Ae().left,children:[(0,e.jsxs)("span",{children:[(0,e.jsx)(R.Z,{className:"",type:"youren",style:{color:"#CE9F27",fontWeight:"bold",fontSize:"9px"}}),"\u6709\u4EBA"]}),(0,e.jsxs)("span",{children:[(0,e.jsx)(R.Z,{className:"",type:"wuren",style:{color:"#8B949E",fontWeight:"bold",fontSize:"9px"}}),"\u65E0\u4EBA"]})]}),j.id!=="all"&&j.id!=="curtain"&&(0,e.jsx)("div",{className:Ae().right,children:(0,e.jsxs)("div",{className:Ae().rightOpen,children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:Ae().circle,style:{backgroundColor:"rgba("+j.colorStr+"1)"}}),(0,e.jsx)("span",{children:"\u5F00\u542F"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:Ae().circle,style:{backgroundColor:"rgba("+j.colorStr+"0.4)"}}),(0,e.jsx)("span",{children:"\u90E8\u5206\u5F00\u542F"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:Ae().circle,style:{backgroundColor:"rgba(196, 196, 196, 0.6)"}}),(0,e.jsx)("span",{children:"\u5173\u95ED"})]})]})}),j.id=="curtain"&&(0,e.jsxs)("div",{className:Ae().right,children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:Ae().circle,style:{backgroundColor:"rgba("+j.colorStr+"1)"}}),(0,e.jsx)("span",{children:"\u6709"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:zt()(Ae().circle,Ae().noCurtain)}),(0,e.jsx)("span",{children:"\u65E0"})]})]})]}),(0,e.jsx)(Z.Z,{spinning:Ct,wrapperClassName:be().spinnclass,children:tt.length>0&&(0,e.jsx)(Oe.Z,{changeMapList:ja,mapList:tt,mapSize:Me,maxscale:pe,transXInit:et,type:"equipment",selFloorId:ke,render:function(t,o){var l;return(0,e.jsx)("div",{className:be().houseWrap,style:{left:t.left,top:t.top,width:t.width,height:t.height},children:(0,e.jsxs)("div",{style:{backgroundColor:t.canClick?j.id=="all"?"rgba(196, 196, 196, 0.4)":j.id=="socket"&&Re.scode!=="all"?Jt(t[Re.scode]):Jt(t[j.id]):""},className:zt()(be().house,(l={},(0,me.Z)(l,be().notclick,!t.canClick||t[j.id]=="noHave"||j.id=="socket"&&t[Re.scode]=="noHave"),(0,me.Z)(l,be().searchSel,t.spaceId&&t.spaceId===H.spaceId),l)),onClick:function(d){d.stopPropagation(),u-mt<200&&Sa(t,o)},onMouseDown:function(d){mt=new Date().getTime()},onMouseUp:function(d){u=new Date().getTime()},children:[j.id=="all"&&(0,e.jsx)("div",{className:be().allDevice,style:{transform:te==pe?"scale(1)":t.width<24*(t.equipStatusList||[]).length||t.height<24?"scale(0.3)":"scale(1)"},children:(t.equipStatusList||[]).map(function(c,d){return(0,e.jsx)("div",{className:be().icon,style:{backgroundColor:Jt(c.status,c.equipType)},children:(0,e.jsx)(R.Z,{className:"",type:c.equipType,style:{color:"#fff",fontWeight:"bold",fontSize:"8px"}})},d+"device")})}),(j.id=="airConditioner"||j.id=="light")&&t.runStatus===1&&t.canClick&&(0,e.jsx)("div",{className:be().hasPerson,style:{transform:te==pe?"scale(1)":t.width<46||t.height<25?"scale(0.4)":"scale(1)"},children:(0,e.jsx)(R.Z,{className:"",type:"youren",style:{color:"#CE9F27",fontWeight:"bold",fontSize:"9px"}})}),(j.id=="airConditioner"||j.id=="light")&&t.runStatus===0&&t.canClick&&(0,e.jsx)("div",{className:be().hasPerson,style:{transform:te==pe?"scale(1)":t.width<46||t.height<25?"scale(0.4)":"scale(1)"},children:(0,e.jsx)(R.Z,{className:"",type:"wuren",style:{color:"#8B949E",fontWeight:"bold",fontSize:"9px"}})}),!(!t.canClick||t[j.id]=="noHave"||j.id=="socket"&&t[Re.scode]=="noHave")&&(0,e.jsx)("div",{className:be().showModal,onClick:function(d){d.stopPropagation(),u-mt<400&&ta(t)},onMouseDown:function(d){mt=new Date().getTime()},onMouseUp:function(d){u=new Date().getTime()},style:{transform:"scale(".concat(te-.1<1?te-.1:1,")")},children:(0,e.jsx)(R.Z,{className:"",type:"hover",style:{fontSize:"10px"}})}),(0,e.jsxs)("div",{className:be().content,children:[(0,e.jsx)(R.Z,{className:"",type:re(t.roomFuncType),style:{fontSize:18,display:t.width>28&&t.height>50?"block":"none"}}),(0,e.jsx)("div",{className:be().name,style:{display:t.width>64&&t.height>80||t.height>140||t.width>120||te==pe?"block":"none"},children:t.localName}),(re(t.roomFuncType)||t.localName)&&!(re(t.roomFuncType)&&t.width>28&&t.height>50||t.localName&&(t.width>64&&t.height>80||t.height>140||t.width>120||te==pe))&&(0,e.jsx)("div",{className:be().pointer,children:"."})]})]})},o+t.id)}})}),L&&(0,e.jsx)(Ja,{showSpace:_e,onClose:function(){K(!1)}})]})},tn=en},58654:function(ae,Ne,a){"use strict";a.d(Ne,{WN:function(){return ne},nZ:function(){return xt},F6:function(){return at},K0:function(){return i},NR:function(){return n},LS:function(){return Je},SK:function(){return k},mr:function(){return Oe},U9:function(){return ge},YC:function(){return Be},fh:function(){return b},mq:function(){return De},RX:function(){return oe},x4:function(){return R}});var B=a(11849),Z=a(42285),me=a(60607),we=a(69874);function ot(){var I=me.T.projectId;return I}function de(){var I=we.Z.getInstance(),_=I.getUser(),Fe="sgadmin";return"openid=".concat(_.id,"&pubname=").concat(Fe,"&projectId=").concat(ot(),"&userId=").concat(_.id,"&userName=").concat(_.name,"&userPhone=").concat(_.phone)}var ne=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/object/eqp/infocode/set?".concat(de()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,errorSave:!0,data:JSON.stringify(_),headers:{"Content-Type":"application/json"}})},xt=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/object/objectDataEqpGroup/query?".concat(de()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,errorSave:!0,data:JSON.stringify(_),headers:{"Content-Type":"application/json"}})},at=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/queryEquipmentStatusInfo?".concat(de(),"&spaceId=").concat(_.spaceId,"&equipType=").concat(_.equipType),{skipErrorHandler:!0,method:"GET",from:"sagacare",headers:{"Content-Type":"application/json"}})},i=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/set?".concat(de()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,errorSave:!0,data:JSON.stringify(_),headers:{"Content-Type":"application/json"}})},n=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/light/status/query?".concat(de(),"&spaceId=").concat(_),{skipErrorHandler:!0,method:"GET",from:"sagacare",headers:{"Content-Type":"application/json"}})},Je=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/set?".concat(de()),{method:"POST",isNotShowErrorToast:!0,errorSave:!0,from:"sagacare",data:JSON.stringify(_),headers:{"Content-Type":"application/json"}})},k=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/light/onoff/set?".concat(de()),{method:"POST",isNotShowErrorToast:!0,errorSave:!0,from:"sagacare",data:JSON.stringify(_),headers:{"Content-Type":"application/json"}})},ut=function(_){return request("/sgadmin/duoduo-service/duoduoenv-service/light/onoff/setSatus?".concat(de()),{method:"POST",isNotShowErrorToast:!0,errorSave:!0,from:"sagacare",data:JSON.stringify(_),headers:{"Content-Type":"application/json"}})},Oe=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/custom/feedback/documents?".concat(de()),{isNotShowErrorToast:!0,errorSave:!0,from:"sagacare",method:"POST",data:JSON.stringify(_),headers:{"Content-Type":"application/json"}})},ge=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/custom/feedbackCreate/v2?".concat(de()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,errorSave:!0,data:JSON.stringify((0,B.Z)((0,B.Z)({},_),{},{projectId:ot()})),headers:{"Content-Type":"application/json"}})},Be=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/space/property?".concat(de()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,data:_,headers:{"Content-Type":"application/json"}})},b=function(_){return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/custom/feedbackCreate/v2Batch?".concat(de()),{method:"POST",skipErrorHandler:!0,from:"sagacare",isNotShowErrorToast:!1,data:_,headers:{"Content-Type":"application/json"}})},De=function(_){var Fe=we.Z.getInstance(),U=Fe.getUser(),fe="sgadmin",G="openid=".concat(U.id,"&pubname=").concat(fe,"&projectId=Pj1101080255&userId=").concat(U.id,"&userName=").concat(U.name,"&userPhone=").concat(U.phone);return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/querySpaceConditioners?".concat(de(),"&spaceId=").concat(_.spaceId),{from:"sagacare",method:"GET",headers:{"Content-Type":"application/json"}})},oe=function(_){var Fe=we.Z.getInstance(),U=Fe.getUser(),fe="sgadmin",G="openid=".concat(U.id,"&pubname=").concat(fe,"&projectId=Pj1101080255&userId=").concat(U.id,"&userName=").concat(U.name,"&userPhone=").concat(U.phone);return(0,Z.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/set?".concat(de()),{method:"POST",from:"sagacare",data:_,headers:{"Content-Type":"application/json"}})},R=function(_){return(0,Z.WY)("/sgadmin/server/login",{method:"POST",data:_,headers:{"Content-Type":"application/json"}})}},15746:function(ae,Ne,a){"use strict";var B=a(21584);Ne.Z=B.Z},89032:function(ae,Ne,a){"use strict";var B=a(38663),Z=a.n(B),me=a(6999)},99134:function(ae,Ne,a){"use strict";var B=a(67294),Z=(0,B.createContext)({});Ne.Z=Z},21584:function(ae,Ne,a){"use strict";var B=a(96156),Z=a(22122),me=a(90484),we=a(94184),ot=a.n(we),de=a(67294),ne=a(53124),xt=a(99134),at=function(k,ut){var Oe={};for(var ge in k)Object.prototype.hasOwnProperty.call(k,ge)&&ut.indexOf(ge)<0&&(Oe[ge]=k[ge]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,ge=Object.getOwnPropertySymbols(k);Be<ge.length;Be++)ut.indexOf(ge[Be])<0&&Object.prototype.propertyIsEnumerable.call(k,ge[Be])&&(Oe[ge[Be]]=k[ge[Be]]);return Oe};function i(k){return typeof k=="number"?"".concat(k," ").concat(k," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(k)?"0 0 ".concat(k):k}var n=["xs","sm","md","lg","xl","xxl"],Je=de.forwardRef(function(k,ut){var Oe,ge=de.useContext(ne.E_),Be=ge.getPrefixCls,b=ge.direction,De=de.useContext(xt.Z),oe=De.gutter,R=De.wrap,I=De.supportFlexGap,_=k.prefixCls,Fe=k.span,U=k.order,fe=k.offset,G=k.push,Xe=k.pull,lt=k.className,At=k.children,nt=k.flex,ht=k.style,dt=at(k,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),Ie=Be("col",_),st={};n.forEach(function(Ue){var Ye,se={},ze=k[Ue];typeof ze=="number"?se.span=ze:(0,me.Z)(ze)==="object"&&(se=ze||{}),delete dt[Ue],st=(0,Z.Z)((0,Z.Z)({},st),(Ye={},(0,B.Z)(Ye,"".concat(Ie,"-").concat(Ue,"-").concat(se.span),se.span!==void 0),(0,B.Z)(Ye,"".concat(Ie,"-").concat(Ue,"-order-").concat(se.order),se.order||se.order===0),(0,B.Z)(Ye,"".concat(Ie,"-").concat(Ue,"-offset-").concat(se.offset),se.offset||se.offset===0),(0,B.Z)(Ye,"".concat(Ie,"-").concat(Ue,"-push-").concat(se.push),se.push||se.push===0),(0,B.Z)(Ye,"".concat(Ie,"-").concat(Ue,"-pull-").concat(se.pull),se.pull||se.pull===0),(0,B.Z)(Ye,"".concat(Ie,"-rtl"),b==="rtl"),Ye))});var e=ot()(Ie,(Oe={},(0,B.Z)(Oe,"".concat(Ie,"-").concat(Fe),Fe!==void 0),(0,B.Z)(Oe,"".concat(Ie,"-order-").concat(U),U),(0,B.Z)(Oe,"".concat(Ie,"-offset-").concat(fe),fe),(0,B.Z)(Oe,"".concat(Ie,"-push-").concat(G),G),(0,B.Z)(Oe,"".concat(Ie,"-pull-").concat(Xe),Xe),Oe),lt,st),We={};if(oe&&oe[0]>0){var _t=oe[0]/2;We.paddingLeft=_t,We.paddingRight=_t}if(oe&&oe[1]>0&&!I){var St=oe[1]/2;We.paddingTop=St,We.paddingBottom=St}return nt&&(We.flex=i(nt),R===!1&&!We.minWidth&&(We.minWidth=0)),de.createElement("div",(0,Z.Z)({},dt,{style:(0,Z.Z)((0,Z.Z)({},We),ht),className:e,ref:ut}),At)});Ne.Z=Je},92820:function(ae,Ne,a){"use strict";var B=a(22122),Z=a(96156),me=a(90484),we=a(28481),ot=a(94184),de=a.n(ot),ne=a(67294),xt=a(53124),at=a(98082),i=a(24308),n=a(93355),Je=a(99134),k=function(b,De){var oe={};for(var R in b)Object.prototype.hasOwnProperty.call(b,R)&&De.indexOf(R)<0&&(oe[R]=b[R]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,R=Object.getOwnPropertySymbols(b);I<R.length;I++)De.indexOf(R[I])<0&&Object.prototype.propertyIsEnumerable.call(b,R[I])&&(oe[R[I]]=b[R[I]]);return oe},ut=(0,n.b)("top","middle","bottom","stretch"),Oe=(0,n.b)("start","end","center","space-around","space-between","space-evenly");function ge(b,De){var oe=ne.useState(typeof b=="string"?b:""),R=(0,we.Z)(oe,2),I=R[0],_=R[1],Fe=function(){if(typeof b=="string"&&_(b),(0,me.Z)(b)==="object")for(var fe=0;fe<i.c4.length;fe++){var G=i.c4[fe];if(!!De[G]){var Xe=b[G];if(Xe!==void 0){_(Xe);return}}}};return ne.useEffect(function(){Fe()},[JSON.stringify(b),De]),I}var Be=ne.forwardRef(function(b,De){var oe,R=b.prefixCls,I=b.justify,_=b.align,Fe=b.className,U=b.style,fe=b.children,G=b.gutter,Xe=G===void 0?0:G,lt=b.wrap,At=k(b,["prefixCls","justify","align","className","style","children","gutter","wrap"]),nt=ne.useContext(xt.E_),ht=nt.getPrefixCls,dt=nt.direction,Ie=ne.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),st=(0,we.Z)(Ie,2),e=st[0],We=st[1],_t=ne.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),St=(0,we.Z)(_t,2),Ue=St[0],Ye=St[1],se=ge(_,Ue),ze=ge(I,Ue),Zt=(0,at.Z)(),sa=ne.useRef(Xe);ne.useEffect(function(){var Mt=i.ZP.subscribe(function(vt){Ye(vt);var it=sa.current||0;(!Array.isArray(it)&&(0,me.Z)(it)==="object"||Array.isArray(it)&&((0,me.Z)(it[0])==="object"||(0,me.Z)(it[1])==="object"))&&We(vt)});return function(){return i.ZP.unsubscribe(Mt)}},[]);var ra=function(){var vt=[void 0,void 0],it=Array.isArray(Xe)?Xe:[Xe,void 0];return it.forEach(function(Et,kt){if((0,me.Z)(Et)==="object")for(var Lt=0;Lt<i.c4.length;Lt++){var Dt=i.c4[Lt];if(e[Dt]&&Et[Dt]!==void 0){vt[kt]=Et[Dt];break}}else vt[kt]=Et}),vt},ue=ht("row",R),m=ra(),rt=de()(ue,(oe={},(0,Z.Z)(oe,"".concat(ue,"-no-wrap"),lt===!1),(0,Z.Z)(oe,"".concat(ue,"-").concat(ze),ze),(0,Z.Z)(oe,"".concat(ue,"-").concat(se),se),(0,Z.Z)(oe,"".concat(ue,"-rtl"),dt==="rtl"),oe),Fe),ft={},ve=m[0]!=null&&m[0]>0?m[0]/-2:void 0,wt=m[1]!=null&&m[1]>0?m[1]/-2:void 0;if(ve&&(ft.marginLeft=ve,ft.marginRight=ve),Zt){var p=(0,we.Z)(m,2);ft.rowGap=p[1]}else wt&&(ft.marginTop=wt,ft.marginBottom=wt);var jt=(0,we.Z)(m,2),Yt=jt[0],ct=jt[1],ca=ne.useMemo(function(){return{gutter:[Yt,ct],wrap:lt,supportFlexGap:Zt}},[Yt,ct,lt,Zt]);return ne.createElement(Je.Z.Provider,{value:ca},ne.createElement("div",(0,B.Z)({},At,{className:rt,style:(0,B.Z)((0,B.Z)({},ft),U),ref:De}),fe))});Ne.Z=Be},6999:function(ae,Ne,a){"use strict";var B=a(38663),Z=a.n(B),me=a(80638),we=a.n(me)},71230:function(ae,Ne,a){"use strict";var B=a(92820);Ne.Z=B.Z},13062:function(ae,Ne,a){"use strict";var B=a(38663),Z=a.n(B),me=a(6999)}}]);