p__Equipment.055b758b.async.js 58 KB

1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[942],{55042:function(se){se.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(se){se.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(se){se.exports={lampChild:"lampChild___2gsU6"}},21820:function(se){se.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(se){se.exports={lampChild:"lampChild___38w3t"}},39216:function(se){se.exports={lampChild:"lampChild___3Lw-l",imgPos:"imgPos___l_DRa",roomEqImg:"roomEqImg___JAEd2"}},97298:function(se){se.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(se){se.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(){},10239:function(se,Je,n){"use strict";n.r(Je),n.d(Je,{default:function(){return xn}});var Q=n(20228),le=n(11382),xe=n(32059),Xe=n(39428),Ot=n(3182),lt=n(34792),te=n(0),Yt=n(71194),dt=n(29759),u=n(2824),a=n(67294),re=n(42285),Zt=n(68967),Kt=n(92007),L=n(65691),tt=n(99393),ke=n(693),Ne=n(69578),ze=n(30887),B=n(38993),ae=n(81116),ee=n(57119),he=n(44545),Fe=n(97298),de=n.n(Fe),Ce=n(60607),we=n(11849),be=n(69874);function Ye(){var h=Ce.T.projectId;return h}function Y(){var h=be.Z.getInstance(),c=h.getUser(),s="sgadmin";return"openid=".concat(c.id,"&pubname=").concat(s,"&projectId=").concat(Ye(),"&userId=").concat(c.id,"&userName=").concat(c.name,"&userPhone=").concat(c.phone)}var ct=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/object/eqp/infocode/set?".concat(Y()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,errorSave:!0,data:JSON.stringify(c),headers:{"Content-Type":"application/json"}})},At=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/object/objectDataEqpGroup/query?".concat(Y()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,errorSave:!0,data:JSON.stringify(c),headers:{"Content-Type":"application/json"}})},ft=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/queryEquipmentStatusInfo?".concat(Y(),"&spaceId=").concat(c.spaceId,"&equipType=").concat(c.equipType),{skipErrorHandler:!0,method:"GET",from:"sagacare",headers:{"Content-Type":"application/json"}})},kt=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/set?".concat(Y()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,errorSave:!0,data:JSON.stringify(c),headers:{"Content-Type":"application/json"}})},xt=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/light/status/query?".concat(Y(),"&spaceId=").concat(c),{skipErrorHandler:!0,method:"GET",from:"sagacare",headers:{"Content-Type":"application/json"}})},Ee=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/set?".concat(Y()),{method:"POST",isNotShowErrorToast:!0,errorSave:!0,from:"sagacare",data:JSON.stringify(c),headers:{"Content-Type":"application/json"}})},at=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/light/onoff/set?".concat(Y()),{method:"POST",isNotShowErrorToast:!0,errorSave:!0,from:"sagacare",data:JSON.stringify(c),headers:{"Content-Type":"application/json"}})},$t=function(c){return request("/sgadmin/duoduo-service/duoduoenv-service/light/onoff/setSatus?".concat(Y()),{method:"POST",isNotShowErrorToast:!0,errorSave:!0,from:"sagacare",data:JSON.stringify(c),headers:{"Content-Type":"application/json"}})},De=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/custom/feedback/documents?".concat(Y()),{isNotShowErrorToast:!0,errorSave:!0,from:"sagacare",method:"POST",data:JSON.stringify(c),headers:{"Content-Type":"application/json"}})},vt=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/custom/feedbackCreate/v2?".concat(Y()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,errorSave:!0,data:JSON.stringify((0,we.Z)((0,we.Z)({},c),{},{projectId:Ye()})),headers:{"Content-Type":"application/json"}})},pt=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/space/property?".concat(Y()),{method:"POST",from:"sagacare",isNotShowErrorToast:!0,data:c,headers:{"Content-Type":"application/json"}})},Pe=function(c){return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/custom/feedbackCreate/v2Batch?".concat(Y()),{method:"POST",skipErrorHandler:!0,from:"sagacare",isNotShowErrorToast:!1,data:c,headers:{"Content-Type":"application/json"}})},Re=function(c){var s=be.Z.getInstance(),g=s.getUser(),N="sgadmin",x="openid=".concat(g.id,"&pubname=").concat(N,"&projectId=Pj1101080255&userId=").concat(g.id,"&userName=").concat(g.name,"&userPhone=").concat(g.phone);return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/querySpaceConditioners?".concat(Y(),"&spaceId=").concat(c.spaceId),{from:"sagacare",method:"GET",headers:{"Content-Type":"application/json"}})},ce=function(c){var s=be.Z.getInstance(),g=s.getUser(),N="sgadmin",x="openid=".concat(g.id,"&pubname=").concat(N,"&projectId=Pj1101080255&userId=").concat(g.id,"&userName=").concat(g.name,"&userPhone=").concat(g.phone);return(0,re.WY)("/sgadmin/duoduo-service/duoduoenv-service/ctrl/set?".concat(Y()),{method:"POST",from:"sagacare",data:c,headers:{"Content-Type":"application/json"}})},ot=function(c,s,g){var N=c;N.forEach(function(x){for(var S=0;S<s.length;S++)(x.id=s[S].id)&&(x.orderSeqNum=s[S].orderSeqNum)}),getStatusHttp(N).then(function(x){St(x,c,g)})},St=function(c,s,g){var N=!1,x=JSON.parse(JSON.stringify(c.content));x&&x.forEach(function(S){S.state===200&&S.exeResult==="processing:rcvd"||S.state===202&&!S.exeResult?N=!0:x.splice(S,1)}),g&&g()},oa=function(c,s,g){at(c).then(function(N){g&&(g.current=!1),St(N,c,s)})},Ft=function(c,s,g,N){var x=g==="\u6253\u5F00"?1:0,S=[];s.forEach(function(b){(b.equipList||[]).forEach(function(R){R.equipType=="socket"&&(N.code=="all"||R.infos.SocketType==N.code)&&S.push({id:R.id,code:"EquipSwitchSet",value:x})})}),c=="all"&&setTimeout(function(){te.default.success({content:"\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1\uFF0C\u8BBE\u5907\u4F1A\u9010\u6B65".concat(g==="\u6253\u5F00"?"\u5F00\u542F":"\u5173\u95ED","\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u52FF\u9891\u7E41\u64CD\u4F5C"),duration:4})},3e3),Ee(S).then(function(b){})},nt=function(c,s,g,N){var x=N==="\u6253\u5F00",S=[];s.forEach(function(b){(b.equipList||[]).forEach(function(R){R.equipType=="light"&&S.push({id:R.id,switch:x})})}),c=="all"&&setTimeout(function(){te.default.success({content:"\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1\uFF0C\u8BBE\u5907\u4F1A\u9010\u6B65".concat(N==="\u6253\u5F00"?"\u5F00\u542F":"\u5173\u95ED","\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u52FF\u9891\u7E41\u64CD\u4F5C"),duration:4})},3e3),oa(S)},We=function(c,s,g,N){var x=N==="\u6253\u5F00"?"EquipOnSet":"EquipOffSet",S=[];s.forEach(function(b){(b.equipList||[]).forEach(function(R){R.equipType=="curtain"&&S.push({equipmentCategory:"CFSSES",infoCode:x,value:1,objectId:R.id})})}),ct(S),te.default.success("\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1"),g&&g()},ia=function(c,s,g){var N=c.airConditioner===0?12:10,x={objectId:c.spaceId,valueType:1,itemId:N};vt(x).then(function(S){S.result=="success"?(te.default.success("\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1"),g&&g()):te.default.error("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}).catch(function(S){})},st=function(c,s,g,N){var x=[];c.forEach(function(S){var b=g==="\u6253\u5F00"?12:10;x.push({projectId:N,objectId:S.spaceId,valueType:1,itemId:b})}),setTimeout(function(){te.default.success({content:"\u6307\u4EE4\u5DF2\u7ECF\u4E0B\u53D1\uFF0C\u8BBE\u5907\u4F1A\u9010\u6B65".concat(g==="\u6253\u5F00"?"\u5F00\u542F":"\u5173\u95ED","\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u52FF\u9891\u7E41\u64CD\u4F5C"),duration:4})},3e3),Pe(x).then(function(S){S.result=="success"&&s&&s()}).catch(function(S){console.log("err",S)})},e=n(85893),Lt=function(c){var s=c.selNavObj,g=c.navigatorList,N=c.mapList,x=c.selSocketType,S=c.socketTypeArr,b=(0,a.useState)([]),R=(0,u.Z)(b,2),K=R[0],W=R[1];(0,a.useEffect)(function(){var _=[];g.forEach(function(I){I.id!=="all"&&I.id!=="curtain"&&_.push(I)}),W(_)},[g]);var fe=function(I){console.log("key",I),Te({title:"\u8BF7\u786E\u8BA4",icon:(0,e.jsx)(ee.Z,{}),content:s.id=="socket"&&x.code!=="all"?"\u786E\u5B9A\u8981\u5168\u90E8\u5F00\u542F".concat(x.name,"\u5417\uFF1F"):"\u786E\u5B9A\u8981\u5168\u90E8\u5F00\u542F".concat(s.name,"\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){if(s.id=="light"||s.id=="socket")var Z=N.filter(function(J){return(J[s.id]==0||J[s.id]==2)&&J.spaceId});else var Z=N.filter(function(ve){return ve.spaceId});var D=1;function q(){}Z.length!=0&&(s.id=="airConditioner"&&st(Z,q,"\u6253\u5F00",Ce.T.projectId),s.id=="light"&&nt("all",Z,q,"\u6253\u5F00"),s.id=="socket"&&Ft("all",Z,"\u6253\u5F00",x),s.id=="curtain"&&We("all",Z,q,"\u6253\u5F00"))},onCancel:function(){}})},Te=dt.Z.confirm,$=function(){console.log("showModal"),Te({title:"\u8BF7\u786E\u8BA4",icon:(0,e.jsx)(ee.Z,{}),content:s.id=="socket"&&x.code!=="all"?"\u786E\u5B9A\u8981\u5168\u90E8\u5173\u95ED".concat(x.name,"\u5417\uFF1F"):"\u786E\u5B9A\u8981\u5168\u90E8\u5173\u95ED".concat(s.name,"\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){if(s.id=="light"||s.id=="socket")var H=N.filter(function(q){return(q[s.id]==1||q[s.id]==2)&&q.spaceId});else var H=N.filter(function(J){return J.spaceId});var Z=1;function D(){}s.id=="airConditioner"&&st(H,D,"\u5173\u95ED",Ce.T.projectId),s.id=="light"&&nt("all",H,D,"\u5173\u95ED"),s.id=="socket"&&Ft("all",H,"\u5173\u95ED",x),s.id=="curtain"&&We("all",H,D,"\u5173\u95ED")},onCancel:function(){}})};return(0,e.jsxs)(e.Fragment,{children:[s.id==="all"&&(0,e.jsxs)("div",{className:de().right,children:[(0,e.jsx)("div",{className:de().title,children:"\u8FD0\u884C\u4E2D\u7684\u8BBE\u5907"}),(0,e.jsx)("div",{className:de().allList,children:K.map(function(_,I){return(0,e.jsxs)("div",{className:de().item,children:[(0,e.jsx)("img",{src:_.src,style:{height:20}}),(0,e.jsx)("div",{className:de().num,children:_.num})]},"run"+I)})})]}),s.id!=="all"&&(0,e.jsxs)("div",{className:de().right,children:[s.id!=="curtain"&&(0,e.jsx)("div",{className:de().title,children:"\u8FD0\u884C\u4E2D\u7684\u8BBE\u5907"}),s.id!=="curtain"&&(s.id=="socket"&&x.code!=="all"?(0,e.jsx)("div",{className:de().onlyNum,children:S.map(function(_,I){if(_.code==x.code)return(0,e.jsx)("span",{children:_.openNum},"snum"+I)})}):(0,e.jsx)("div",{className:de().onlyNum,children:K.map(function(_,I){if(_.id==s.id)return(0,e.jsx)("span",{children:_.num},"dnum"+I)})})),(0,e.jsxs)("div",{className:de().closeButton,onClick:$,style:{display:s.id=="curtain"?"none":""},children:[(0,e.jsx)(ae.Z,{className:"",type:"closeall",style:{fontSize:20}}),(0,e.jsx)("span",{className:de().text,children:"\u5168\u90E8\u5173\u95ED"})]}),(0,e.jsx)("div",{className:de().moreWrap,style:{display:s.id=="curtain"?"none":""},children:(0,e.jsx)(Ne.Z,{trigger:"click",placement:"bottomLeft",overlay:(0,e.jsx)(B.Z,{style:{width:160},onClick:function(I){var H=I.key;return fe(H)},children:(0,e.jsx)(B.Z.Item,{children:"\u5168\u90E8\u5F00\u542F"},"open")}),children:(0,e.jsx)("span",{className:de().trigger,children:(0,e.jsx)(he.Z,{style:{fontSize:20,marginTop:"4px"}})})})})]})]})},ua=Lt,la=n(13062),Vt=n(36725),da=n(89032),ht=n(1635),jt=n(86582),it=n(61193),rt=n.n(it),Nt=n(21820),ie=n.n(Nt),j=n(20634),Bt=n(55042),Se=n.n(Bt),Fa=n(67130),m=n.n(Fa),fa=n(7085),La=(0,e.jsx)(fa.Z,{style:{fontSize:14},spin:!0}),Ct=function(h){var c=h.isOpen,s=h.isAir,g=h.isLoading;return(0,e.jsxs)("div",{className:"box",children:[s&&g?(0,e.jsx)(le.Z,{indicator:La,className:"box-loading ".concat(c?"":"box-close-loading")}):null,(0,e.jsx)("div",{className:"content ".concat(c?"":"closeBg"),children:(0,e.jsx)("div",{className:"point ".concat(c?"":"closePt")})})]})},Ba=function(h){var c=h.spaceId,s=h.projectId,g=j.x.airOpen,N=j.x.airClose,x=j.x.temp_down,S=j.x.temp_up,b=j.x.temp_keep,R=j.x.arrow_down,K=j.x.arrow_up,W=j.x.wind_up,fe=j.x.wind_down,Te=!0,$=(0,a.useRef)(""),_=(0,a.useRef)(!0),I=(0,a.useState)(!1),H=(0,u.Z)(I,2),Z=H[0],D=H[1],q=(0,a.useState)(!1),J=(0,u.Z)(q,2),ve=J[0],ne=J[1],ue=(0,a.useState)(null),w=(0,u.Z)(ue,2),G=w[0],X=w[1],A=(0,a.useRef)(null),k=(0,a.useRef)(null),T=(0,a.useState)("null"),me=(0,u.Z)(T,2),z=me[0],Ie=me[1],je=(0,a.useState)({4:!1,2:!1,5:!1,6:!1}),Le=(0,u.Z)(je,2),oe=Le[0],He=Le[1],Ke=[{title:"\u6E29\u5EA6\u8C03\u8282",type:"temp",downType:4,upType:2,leftImg:R,rightImg:K},{title:"\u98CE\u91CF\u8C03\u8282",type:"wind",downType:5,upType:6,leftImg:fe,rightImg:W}],$e=function(F){switch(F){case 1:return X(b);case 2:return X(x);case 3:return X(S);default:break}};function Qe(p){clearTimeout(A.current),A.current=setTimeout(function(){O()},p)}function ye(p){if(!ve){ne(!0),P(p);var F=p?12:10;y(F)}}var P=function(F){var E=0;k.current=setInterval(function(){E>=30||$.current===F?(ne(!1),clearInterval(k.current)):E++},1e3)},O=(0,a.useCallback)(function(){var p={objectId:c,projectId:s};De(p).then(function(F){var E=F.icon!=7;_.current&&ne(!1),$.current=E,D(E),_.current=!1,Qe(3e3),Ie(F.spaceStatus),$e(F.icon)}).catch(function(){Qe(3e3),_.current=!1})},[]),y=(0,a.useCallback)(function(p){if(!oe[p]){var F={objectId:c,valueType:1,itemId:p};He((0,we.Z)((0,we.Z)({},oe),{},(0,xe.Z)({},p,!0))),vt(F).then(function(E){He((0,we.Z)((0,we.Z)({},oe),{},(0,xe.Z)({},p,!1))),E.result=="success"?te.default.success("\u6307\u4EE4\u4E0B\u53D1\u6210\u529F"):te.default.error("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}).catch(function(E){He((0,we.Z)((0,we.Z)({},oe),{},(0,xe.Z)({},p,!1)))})}},[oe]);return(0,a.useEffect)(function(){return O(),function(){clearTimeout(A.current)}},[]),(0,e.jsxs)("div",{className:Se().box,children:[(0,e.jsx)("div",{className:Se().content,children:(0,e.jsxs)("div",{className:Se().env,children:[(0,e.jsxs)("div",{className:Se().envLeft,children:[(0,e.jsx)("span",{className:m().eqTitle,children:"\u7A7A\u8C03"}),(0,e.jsxs)("div",{className:Se().airStatus,children:[(0,e.jsx)("span",{className:Se().airStatusText,children:Z?"\u7A7A\u8C03\u5DF2\u5F00\u542F":"\u7A7A\u8C03\u5DF2\u5173\u95ED"}),Z&&(0,e.jsxs)("div",{className:Se().airStatusbox,children:[(0,e.jsx)("img",{className:Se().airStatusImg,src:G}),(0,e.jsx)("span",{className:Se().statusText,children:z})]})]})]}),(0,e.jsx)("div",{className:Se().envRight,children:(0,e.jsx)("img",{className:Se().roomAirImg,src:Z?g:N})}),(0,e.jsx)("div",{onClick:function(){ye(!Z)},className:m().eqBtn,children:(0,e.jsx)(Ct,{isOpen:Z,isAir:!0,isLoading:ve})})]})}),Z&&(0,e.jsx)("div",{className:Se().expend,children:Ke.map(function(p,F){return(0,e.jsxs)("div",{className:Se().item,children:[(0,e.jsx)("div",{children:p.title}),(0,e.jsxs)("div",{className:Se().itemRight,children:[(0,e.jsx)("div",{className:Se().itemBg,onClick:function(Ve){y(p.downType)},children:oe[p.downType]?(0,e.jsx)(le.Z,{indicator:(0,e.jsx)(fa.Z,{style:{fontSize:20},spin:!0})}):(0,e.jsx)("img",{className:Se().itemImg,src:p.leftImg})}),(0,e.jsx)("div",{className:Se().itemBg,onClick:function(){return y(p.upType)},children:oe[p.upType]?(0,e.jsx)(le.Z,{indicator:(0,e.jsx)(fa.Z,{style:{fontSize:20},spin:!0})}):(0,e.jsx)("img",{className:Se().itemImg,src:p.rightImg})})]})]},F)})})]})},Za=n(28991),Ma={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"},ba=Ma,Da=n(30076),Aa=function(c,s){return a.createElement(Da.Z,(0,Za.Z)((0,Za.Z)({},c),{},{ref:s,icon:ba}))};Aa.displayName="UpOutlined";var Pa=a.forwardRef(Aa),Ra=n(57254),Wa=function(h){var c=h.spaceId,s=h.projectId,g=h.changeDrag,N=j.x.up_Arrow,x=j.x.down_Arrow,S=j.x.openair,b=j.x.air_close,R=j.x.wind_small,K=j.x.wind_big,W=j.x.airsunred,fe=j.x.airsunblack,Te=j.x.aircoldblue,$=j.x.aircoldblack,_=j.x.aircloudgreen,I=j.x.aircloudblack,H=(0,a.useState)(),Z=(0,u.Z)(H,2),D=Z[0],q=Z[1],J=(0,a.useState)(!1),ve=(0,u.Z)(J,2),ne=ve[0],ue=ve[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}]}],G=[0,1,2,3],X=(0,a.useState)([]),A=(0,u.Z)(X,2),k=A[0],T=A[1],me=(0,a.useState)("\u7A7A\u8C03"),z=(0,u.Z)(me,2),Ie=z[0],je=z[1],Le=(0,a.useState)(18),oe=(0,u.Z)(Le,2),He=oe[0],Ke=oe[1],$e=(0,a.useState)(2),Qe=(0,u.Z)($e,2),ye=Qe[0],P=Qe[1],O=(0,a.useState)(1),y=(0,u.Z)(O,2),p=y[0],F=y[1],E=(0,a.useState)(0),Ve=(0,u.Z)(E,2),Oe=Ve[0],ut=Ve[1],pa=(0,a.useState)({isOpen:!1}),Mt=(0,u.Z)(pa,2),pe=Mt[0],ta=Mt[1],ha=(0,a.useState)(!1),bt=(0,u.Z)(ha,2),Dt=bt[0],aa=bt[1],ma=(0,a.useState)(0),Pt=(0,u.Z)(ma,2),C=Pt[0],na=Pt[1],ga=(0,a.useState)(0),Rt=(0,u.Z)(ga,2),Ze=Rt[0],Wt=Rt[1],xa=(0,a.useState)(0),Ht=(0,u.Z)(xa,2),et=Ht[0],Sa=Ht[1],ja=(0,a.useState)(18),Ut=(0,u.Z)(ja,2),Tt=Ut[0],qt=Ut[1],Na=(0,a.useState)(26),Gt=(0,u.Z)(Na,2),yt=Gt[0],Ca=Gt[1],Jt=(0,a.useRef)(null);function Et(){clearInterval(Jt.current),Jt.current=setInterval(function(){zt()},2e4)}var Me=(0,a.useCallback)(function(l){var r=(yt-Tt)*2,t=et/r,i=Math.floor(l/t),d=i*.5+Tt;return Ke(d),d},[yt,Tt,et]),Ta=17,_t=(0,a.useRef)();function ya(l,r,t){if(!!l){var i=(_t.current||{}).clientWidth||0,d=(_t.current||{}).clientHeight||0;i=i&&i-Ta;var o=(r-t)*2,f=i/o,V=(l-t)*2,v=f*V;v<0&&(v=0),v>i&&(v=i),Wt(v),Sa(i)}}function Ea(){zt(),ue(!ne)}function sa(l){if(!!pe.isOpen){var r=l.pageX;na(r),aa(!0)}}function Xt(l){if(!!pe.isOpen){var r=Number(l.pageX),t=_t.current||{},i=t.getBoundingClientRect().left||0,d=r-i-8,o=d;o<0&&(o=0),o>et&&(o=et),Wt(o);var f=Me(o);Ue("temp",f)}}function ra(l){if(!(!pe.isOpen||!Dt)){var r=Number(l.pageX),t=r-C;na(r);var i=Ze+t;i<0&&(i=0),i>et&&(i=et),Wt(i),Me(i)}}function _a(l){!pe.isOpen||!Dt||(aa(!1),Ue("temp",He),console.log("touchend"))}function Ia(l){var r=(0,we.Z)({},k[l]);r.open=!r.open;var t=r.open?1:0,i=(0,jt.Z)(k);i[l]=r,T(i),mt(k[l].id,k[l].switchCode,t)}function wa(l,r,t){var i=JSON.parse(JSON.stringify(k)),d=i[l],o=i[l].allModel[r];if(!!d.open&&t!=0&&!(o.id=="gear"&&t==1)){if(t<0?o.sel=0:o.sel--,T(i),o.id=="mode"){var f=o.refer[o.sel].mid;console.log("nowModel.refer",o.refer,o.refer[o.sel].mid)}else if(o.id=="gear"){var V=o.selectArr[o.sel],f=V=="AUTO"?4:V;console.log("nowModel.refer2",V,f)}else{var f=o.selectArr[o.sel];console.log("nowModel.refer3",f)}wt(d.id,o.code,f)}}var It=(0,a.useRef)(null);function wt(l,r,t){clearTimeout(It.current),It.current=setTimeout(function(){mt(l,r,t)},500)}function ca(l,r,t){var i=JSON.parse(JSON.stringify(k)),d=i[l],o=i[l].allModel[r];if(!!d.open){var f=o.selectArr;if(t!=f.length-1){if(t>f.length-1?o.sel=f.length-1:o.sel++,T(i),o.id=="mode"){var V=o.refer[o.sel].mid;console.log("nowModel.refer",o.refer,o.refer[o.sel].mid)}else if(o.id=="gear")var v=o.selectArr[o.sel],V=v=="AUTO"?4:v;else var V=o.selectArr[o.sel];wt(d.id,o.code,V)}}}function zt(){var l={projectId:s,spaceId:c};Re(l).then(function(r){var t=r.data||{};console.log("getAirInfo",t),t.tempSet=t.tempSet,q(t.tempSet),Ke(t.tempSet),P(t.workMode),F(t.gear),ut(t.isAutoGear),ta({isOpen:!!t.runStatus});var i=t.maxTempSet;Ca(t.maxTempSet);var d=t.minTempSet;qt(t.minTempSet);for(var o=[],f=d;f<=i;f=f+.5)o.push(f);w[0].selectArr=o,ya(t.tempSet,i,d);var V=[];t.equipList.forEach(function(v){var M={};M.id=v.id,M.name=v.localName,M.open=v.runStatus==1,M.switchCode=v.switchCode;var ge=JSON.parse(JSON.stringify(w));ge.forEach(function(U){if(U.id=="temp"){U.code=v.tempSetCode;var Ae=U.selectArr.findIndex(function(gt){return gt==v.tempSet});U.sel=Ae==-1?0:Ae}if(U.id=="gear"){U.code=v.gearCode;var Ae=U.selectArr.findIndex(function(Ge){return v.isAutoGear==1?Ge=="AUTO":Ge==v.gear});U.sel=Ae==-1?0:Ae}if(U.id=="mode"){U.code=v.modeSetCode;var qe=U.refer.find(function(gt){return gt.mid==v.workMode});U.sel=(qe||{}).sindex||0}}),M.allModel=ge,V.push(M)}),T(V)}).catch(function(){})}function Ue(l,r){if(!(!pe.isOpen&&l!="sw")){var t=p,i=Oe;if(l=="gear"&&r=="windLow")if(t>1)t=t-1,F(t),i=0,ut(i);else return;if(l=="gear"&&r=="windUp")if(t<3)t=t+1,F(t),i=0,ut(i);else return;l=="gear"&&r=="auto"&&(i=Oe==1?0:1,ut(i)),l=="mode"&&P(r);var d=pe.isOpen;l=="sw"&&(d=!d,ta({isOpen:d}));var o=[];k.forEach(function(f){if(l=="sw"){var V={id:f.id,code:f.switchCode,value:d?1:0};o.push(V)}f.allModel.forEach(function(v){if(v.id=="temp")var M=r;else if(v.id=="gear")var M=i==1?4:t;else if(v.id=="mode")var M=r;if(v.id==l){var ge={id:f.id,code:v.code,value:M};o.push(ge)}})}),ce(o).then(function(f){l=="temp"&&q(r),Et()}).catch(function(){})}}function mt(l,r,t){console.log("id code value",l,r,t);var i=[{id:l,code:r,value:t}];ce(i).then(function(d){Et()}).catch(function(){})}return(0,a.useEffect)(function(){return Et(),zt(),function(){clearInterval(Jt.current)}},[c]),(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:[D||"--",(0,e.jsx)("span",{className:"unit",children:"\u2103"})]})]}),(0,e.jsx)("div",{className:"air-show-all",children:k.length>1&&(0,e.jsxs)("div",{className:"air-show-all-cont",onClick:function(){Ea()},children:[(0,e.jsx)("img",{className:"air-arrow",src:ne?N:x}),(0,e.jsx)("span",{className:"text",children:ne?"\u6536\u8D77\u5168\u90E8":"\u67E5\u770B\u5168\u90E8"})]})})]}),(0,e.jsx)("div",{className:"air-adjust-btn",children:(0,e.jsx)("img",{className:"airImg",src:pe.isOpen?S:b})}),!ne&&(0,e.jsx)("div",{className:"air-switch",onClick:function(){Ue("sw")},children:(0,e.jsx)(Ct,{isOpen:pe.isOpen,isAir:!0})})]}),(0,e.jsxs)("div",{style:{visibility:!ne&&pe.isOpen?"visible":"hidden",height:!ne&&pe.isOpen?"auto":0},children:[(0,e.jsxs)("div",{className:"air-control-item temp-item",onMouseDown:function(r){r.stopPropagation()},onMouseUp:function(r){_a(r)},onMouseMove:function(r){ra(r)},children:[(0,e.jsxs)("div",{className:"temp-wrap",children:[(0,e.jsxs)("div",{className:"minVal",children:[Tt,"\u2103"]}),(0,e.jsxs)("div",{className:"tempBar",ref:_t,onClick:function(r){r.stopPropagation(),Xt(r)},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"}),pe.isOpen&&(0,e.jsx)("div",{className:"circle",onMouseDown:function(r){r.stopPropagation(),sa(r)},style:{transform:"translateX("+Ze+"px)"},children:(0,e.jsxs)("span",{className:"tvalue",children:[He,"\u2103"]})})]}),(0,e.jsxs)("div",{className:"maxVal",children:[yt,"\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:G.map(function(l,r){return(0,e.jsx)("span",{className:"envnum-common-wind ".concat(l==p?"windBlack":""),children:l},r+"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(p<=1||!pe.isOpen?"disabled":""),onClick:function(){Ue("gear","windLow")},children:(0,e.jsx)("img",{className:"wimg",src:R})}),(0,e.jsx)("div",{className:"switch ".concat(p>=3||!pe.isOpen?"disabled":""),onClick:function(){Ue("gear","windUp")},children:(0,e.jsx)("img",{className:"wimg",src:K})}),(0,e.jsx)("div",{className:"switch ".concat(Oe==1?"yell":""," ").concat(pe.isOpen?"":"disabled"),onClick:function(){Ue("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(pe.isOpen?"":"disabled"),onClick:function(){Ue("mode",2)},children:(0,e.jsx)("img",{src:ye==2?W:fe})}),(0,e.jsx)("div",{className:"switch ".concat(ye==1?"yell":""," ").concat(pe.isOpen?"":"disabled"),onClick:function(){Ue("mode",1)},children:(0,e.jsx)("img",{src:ye==1?Te:$})}),(0,e.jsx)("div",{className:"switch ".concat(ye==3?"yell":""," ").concat(pe.isOpen?"":"disabled"),onClick:function(){Ue("mode",3)},children:(0,e.jsx)("img",{src:ye==3?_:I})})]})]})]}),ne&&(0,e.jsx)("div",{className:"allAir",children:k.map(function(l,r){return(0,e.jsxs)("div",{className:"eachAir ".concat(l.open?"":"closeAir"," ").concat(k.length==1?"oneAir":""),children:[(0,e.jsx)("div",{className:"airName",children:l.name}),(0,e.jsxs)("div",{className:"openButton ".concat(l.open?"open":""),onClick:function(){Ia(r)},children:[(0,e.jsx)("div",{className:"openBack"}),(0,e.jsx)("div",{className:"openCircle"})]}),(0,e.jsx)("div",{className:"airBox",children:l.allModel.map(function(t,i){return(0,e.jsxs)("div",{className:"adjustBox ".concat(l.open?"":"disable"),children:[(0,e.jsx)("div",{className:"arrow ".concat(t.sel==t.selectArr.length-1?"disable":""),onClick:function(){ca(r,i,t.sel)},children:(0,e.jsx)(Pa,{})}),(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(d,o){return(0,e.jsx)("div",{className:"value",children:d},o+"val")})})}),(0,e.jsx)("div",{className:"arrow ".concat(t.sel==0||t.sel==1&&t.id=="gear"?"disable":""),onClick:function(){wa(r,i,t.sel)},children:(0,e.jsx)(Ra.Z,{})}),(0,e.jsx)("div",{className:"adjustName",children:t.name})]},i+"model")})})]},r+"device")})})]})},Ha=n(28287),Ua=n.n(Ha),qa=j.x.lamp_open,Ga=j.x.lamp_close,Ja=j.x.expend_down,Xa=j.x.expend_up,za=function(h){var c,s=h.spaceId,g=(0,a.useState)(!1),N=(0,u.Z)(g,2),x=N[0],S=N[1],b=(0,a.useState)(!1),R=(0,u.Z)(b,2),K=R[0],W=R[1],fe=(0,a.useState)([]),Te=(0,u.Z)(fe,2),$=Te[0],_=Te[1],I=(0,a.useRef)(null),H=(0,a.useCallback)(function(){xt(s).then(function(w){var G=w.content||[];if(G.length>1){S(!0);var X=!1;G.forEach(function(A){A.runStatus&&(X=!0)}),W(X)}else G.forEach(function(A){A.runStatus?W(!0):W(!1)});_(G)},function(w){})},[]);function Z(){clearInterval(I.current),I.current=setInterval(function(){H()},3e3)}(0,a.useEffect)(function(){return H(),Z(),function(){clearInterval(I.current)}},[]);var D=(0,a.useState)(!1),q=(0,u.Z)(D,2),J=q[0],ve=q[1];function ne(){ve(!J)}var ue=function(G,X,A){clearInterval(I.current);var k=[];X=="total"?$.forEach(function(T){T.runStatus=G,k.push({id:T.id,switch:G})}):($.forEach(function(T){T.id==A&&(T.runStatus=G)}),k.push({id:A,switch:G})),$.forEach(function(T){W(T.runStatus)}),setTimeout(function(){_((0,jt.Z)($))},500),at(k).then(function(T){Z()})};return(0,e.jsxs)("div",{className:m().box,children:[(0,e.jsx)("div",{className:m().content,children:(0,e.jsxs)("div",{className:m().env,children:[(0,e.jsxs)("div",{className:m().envLeft,children:[(0,e.jsx)("span",{className:m().eqTitle,children:x?"\u5149\u7167":(c=$[0])===null||c===void 0?void 0:c.localName}),(0,e.jsx)("div",{className:"".concat(m().eqStatus," ").concat(m().pdt10),children:(0,e.jsx)("span",{children:K?"\u7167\u660E\u5DF2\u5F00\u542F":"\u7167\u660E\u5DF2\u5173\u95ED"})}),x&&(0,e.jsxs)("div",{className:m().showAll,onClick:ne,children:[(0,e.jsx)("img",{className:m().showImg,src:J?Xa:Ja}),(0,e.jsx)("div",{className:m().showAllText,children:"\u663E\u793A\u5168\u90E8"})]})]}),(0,e.jsx)("div",{className:m().envRight,children:(0,e.jsx)("img",{className:m().roomEqImg,src:K?qa:Ga})}),!J&&(0,e.jsx)("div",{className:m().eqBtn,onClick:function(){ue(!K,"total")},children:(0,e.jsx)(Ct,{isOpen:K})})]})}),$.map(function(w,G){if(J)return(0,e.jsxs)("div",{className:"".concat(Ua().lampChild," ").concat(m().flexBetween),children:[(0,e.jsx)("div",{className:m().eqTitle,children:w.localName}),(0,e.jsx)("div",{onClick:function(){ue(!w.runStatus,"child",w.id)},children:(0,e.jsx)(Ct,{isOpen:w.runStatus})})]},w.id)})]})},Ya=n(39216),va=n.n(Ya),Ka=j.x.socket_close,$a=j.x.socket_open,Va=j.x.expend_down,Qa=j.x.expend_up,en=function(h){var c,s=h.spaceId,g=h.projectId,N=(0,a.useState)(!1),x=(0,u.Z)(N,2),S=x[0],b=x[1],R=(0,a.useState)(!1),K=(0,u.Z)(R,2),W=K[0],fe=K[1],Te=(0,a.useState)([]),$=(0,u.Z)(Te,2),_=$[0],I=$[1],H=(0,a.useState)(!1),Z=(0,u.Z)(H,2),D=Z[0],q=Z[1],J=(0,a.useState)(!1),ve=(0,u.Z)(J,2),ne=ve[0],ue=ve[1],w=(0,a.useRef)(null);function G(){fe(!W)}function X(T,me,z){var Ie=[];me==="total"?(ue(!0),Ie=JSON.parse(JSON.stringify(_)),Ie.map(function(je){je.value=T?1:0,je.code=je.switchCode})):Ie=[{value:T?1:0,code:z.switchCode,id:z.id}],kt(Ie).then(function(je){ue(!1),k()})}function A(){var T={spaceId:s,equipType:"socket"};ue(!1),ft(T).then(function(me){for(var z=me.data.equipList||[],Ie=!1,je=0;je<z.length;je++){var Le=z[je];Le.runStatus&&(q(!0),Ie=!0)}z.length>1?b(!0):b(!1),Ie||q(!1),I(z)})}function k(T){A(),clearInterval(w.current),w.current=null,w.current=setInterval(function(){A()},1e3*8)}return(0,a.useEffect)(function(){return k(),function(){clearInterval(w.current),w.current=null}},[]),(0,e.jsxs)("div",{className:m().box,children:[(0,e.jsx)("div",{className:m().content,children:(0,e.jsxs)("div",{className:m().env,children:[(0,e.jsxs)("div",{className:m().envLeft,children:[(0,e.jsx)("span",{className:m().eqTitle,children:S?"\u667A\u80FD\u63D2\u5EA7":(c=_[0])===null||c===void 0?void 0:c.localName}),(0,e.jsx)("div",{className:"".concat(m().eqStatus," ").concat(m().pdt10),children:(0,e.jsx)("span",{children:D?"\u63D2\u5EA7\u5DF2\u5F00\u542F":"\u63D2\u5EA7\u5DF2\u5173\u95ED"})}),S&&(0,e.jsxs)("div",{className:m().showAll,onClick:G,children:[(0,e.jsx)("img",{className:m().showImg,src:W?Qa:Va}),(0,e.jsx)("div",{className:m().showAllText,children:"\u663E\u793A\u5168\u90E8"})]})]}),(0,e.jsx)("div",{className:va().imgPos,children:(0,e.jsx)("img",{className:va().roomEqImg,src:D?$a:Ka})}),!W&&(0,e.jsx)("div",{className:m().eqSocketBtn,onClick:function(){X(!D,"total")},children:(0,e.jsx)(Ct,{isAir:!0,isLoading:ne,isOpen:D})})]})}),_.map(function(T,me){if(W)return(0,e.jsxs)("div",{className:"".concat(va().lampChild," ").concat(m().flexBetween),children:[(0,e.jsx)("div",{className:m().eqTitle,children:T.localName}),(0,e.jsx)("div",{className:m().dsflex,onClick:function(){X(!T.runStatus,"child",T)},children:(0,e.jsx)(Ct,{isOpen:T.runStatus})})]},T.id)})]})},tn=n(95264),an=n.n(tn),nn=j.x.curtain_close_icon_row,sn=j.x.curtain_open_icon_row,ka=function(h){var c=h.id,s=h.isTotal,g=h.preTime,N=h.changePreTime,x=h.changeCurtainTex,S=h.curtainArr,b=h.projectId,R=(0,a.useState)(!1),K=(0,u.Z)(R,2),W=K[0],fe=K[1],Te=(0,a.useState)(!1),$=(0,u.Z)(Te,2),_=$[0],I=$[1],H=(0,a.useState)(),Z=(0,u.Z)(H,2),D=Z[0],q=Z[1],J=(0,a.useRef)(null),ve=function(w,G){var X=[];if(s)S.forEach(function(k){X.push({equipmentCategory:"CFSSES",infoCode:w,value:1,objectId:k.id})});else{var A={projectId:b,objectId:G,equipmentCategory:"CFSSES",infoCode:w,value:1};X.push(A)}return X},ne=function(w,G,X){var A=Date.now();if(!(A-g<=2e3)){N(Date.now());var k=ve(w,G);ct(k),w=="EquipOffSet"?(fe(!0),I(!1)):(I(!0),fe(!1)),q(2),J.current=setInterval(function(){q(function(T){return T-1})},1e3)}};return(0,a.useEffect)(function(){D==2&&x("\u6307\u4EE4\u4E0B\u53D1\u4E2D\u2026"),D==1&&x("\u518D\u6B21\u70B9\u51FB\u505C\u6B62\u7A97\u5E18"),D===0&&(x(""),fe(!1),I(!1),clearInterval(J.current))},[D]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{onClick:function(){ne("EquipOffSet",c,1)},className:"".concat(m().circulBtn," ").concat(m().mgr20," ").concat(W?m().yell:""),children:[W&&(0,e.jsx)("div",{children:D}),!W&&(0,e.jsx)("img",{className:m().btnIcon,src:nn})]}),(0,e.jsxs)("div",{onClick:function(){ne("EquipOnSet",c,2)},className:"".concat(m().circulBtn," ").concat(_?m().yell:""),children:[_&&(0,e.jsx)("div",{children:D}),!_&&(0,e.jsx)("img",{className:m().btnIcon,src:sn})]})]})},rn=j.x.curtain_open_row,cn=j.x.expend_down,on=j.x.expend_up,un=function(h){var c,s=h.spaceId,g=h.projectId,N=(0,a.useState)(!1),x=(0,u.Z)(N,2),S=x[0],b=x[1],R=(0,a.useState)(!1),K=(0,u.Z)(R,2),W=K[0],fe=K[1],Te=(0,a.useState)(!0),$=(0,u.Z)(Te,2),_=$[0],I=$[1],H=(0,a.useState)(!1),Z=(0,u.Z)(H,2),D=Z[0],q=Z[1],J=(0,a.useState)(2),ve=(0,u.Z)(J,2),ne=ve[0],ue=ve[1],w=(0,a.useState)(),G=(0,u.Z)(w,2),X=G[0],A=G[1],k=(0,a.useState)([]),T=(0,u.Z)(k,2),me=T[0],z=T[1],Ie=(0,a.useState)(Date.now()),je=(0,u.Z)(Ie,2),Le=je[0],oe=je[1],He=(0,a.useState)(""),Ke=(0,u.Z)(He,2),$e=Ke[0],Qe=Ke[1];function ye(){fe(!W)}var P=(0,a.useCallback)(function(y){oe(y)}),O=(0,a.useCallback)(function(y){Qe(y)});return(0,a.useEffect)(function(){var y={criteria:{projectId:g,spaceId:s,type:0},orders:[{column:"sortNum",asc:!0}]};At(y).then(function(p){var F=p.content||[];F.length>1?b(!0):b(!1),z(F)})},[]),(0,e.jsxs)("div",{className:m().box,children:[(0,e.jsx)("div",{className:m().content,children:(0,e.jsxs)("div",{className:m().env,children:[(0,e.jsxs)("div",{className:m().envLeft,children:[(0,e.jsx)("span",{className:m().eqTitle,children:S?"\u7A97\u5E18":(c=me[0])===null||c===void 0?void 0:c.name}),(0,e.jsx)("div",{className:"".concat(m().eqStatus," ").concat(m().pdt10),children:(0,e.jsx)("span",{children:$e})}),S&&(0,e.jsxs)("div",{className:m().showAll,onClick:ye,children:[(0,e.jsx)("img",{className:m().showImg,src:W?on:cn}),(0,e.jsx)("div",{className:m().showAllText,children:"\u663E\u793A\u5168\u90E8"})]})]}),(0,e.jsx)("div",{className:m().envRight,children:(0,e.jsx)("img",{className:m().roomEqImg,src:rn})}),!W&&(0,e.jsx)("div",{className:m().eqCirculBtn,children:(0,e.jsx)(ka,{id:"",isTotal:!0,preTime:Le,changePreTime:P,changeCurtainTex:O,curtainArr:me,projectId:g})})]})}),me.map(function(y,p){if(W)return(0,e.jsxs)("div",{className:"".concat(an().lampChild," ").concat(m().flexBetween),children:[(0,e.jsx)("div",{className:m().eqTitle,children:y.name}),(0,e.jsx)("div",{className:m().dsflex,children:(0,e.jsx)(ka,{id:y.id,isTotal:!1,preTime:Le,changePreTime:P,changeCurtainTex:O,curtainArr:me,projectId:g})})]},y.id)})]})},ln=function(h){var c=h.onClose,s=h.showSpace,g=[{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:"--"}],N=function(O,y){if(O||O==0){var p={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"]}},F=[O].concat((0,jt.Z)(p[y].range)).sort(function(Oe,ut){return Oe-ut}),E=F.findIndex(function(Oe){return Oe===O}),Ve=p[y].text[E];return{level:E,levelTxt:Ve}}else return{level:"--",levelTxt:"--"}},x=j.x.officeImg,S=(0,a.useState)("3s"),b=(0,u.Z)(S,2),R=b[0],K=b[1],W=(0,a.useState)(""),fe=(0,u.Z)(W,2),Te=fe[0],$=fe[1],_=(0,a.useState)([]),I=(0,u.Z)(_,2),H=I[0],Z=I[1],D=(0,a.useState)([]),q=(0,u.Z)(D,2),J=q[0],ve=q[1],ne=(0,a.useState)(0),ue=(0,u.Z)(ne,2),w=ue[0],G=ue[1],X=(0,a.useRef)(null);function A(P){var O=!1;return s.equipList&&s.equipList.forEach(function(y){if(y.equipType===P)return O=!0}),O}var k=function(){var O={criteria:{spaceId:s.spaceId,projectId:Ce.T.projectId}};pt(O).then(function(y){y.content&&y.content.forEach(function(p,F){g.forEach(function(E,Ve){if(E.describe=N(p[E.id],E.id).levelTxt,!p[E.id]&&p[E.id]!=0){E.num="--";return}E.id=="humidity"?E.num=p[E.id].toFixed(0):E.id=="hcho"?E.num=p[E.id].toFixed(2):E.id=="temperature"?E.num=p[E.id].toFixed(1):E.num=p[E.id]}),G(p.controlMode),Z(g)})}).catch(function(y){})},T=(0,a.useMemo)(function(){var P=[],O="";s.meetTime&&s.meetTime.length>0&&(O="meetingBook")&&s.meetTime.forEach(function(p){P.push("".concat(p.meetTimeStartTime,"-").concat(p.meetTimeEndTime))});var y="--";return s.workTimeStartTime&&(y="".concat(s.workTimeStartTime,"-").concat(s.workTimeEndTime)),s.overTime&&s.overTime.length>0&&(O="overtimeWork")&&s.overTime.forEach(function(p){P.push("".concat(p.overTimeStartTime,"-").concat(p.overTimeEndTime))}),{workTime:y,runTimeStatus:O,timeArr:P}},[s]);(0,a.useEffect)(function(){return k(),X=setInterval(function(){k()},1e3*60*5),function(){clearInterval(X)}},[]);var me=(0,a.useState)(!1),z=(0,u.Z)(me,2),Ie=z[0],je=z[1],Le=(0,a.useState)({left:0,top:0,bottom:0,right:0}),oe=(0,u.Z)(Le,2),He=oe[0],Ke=oe[1],$e=(0,a.useRef)(null),Qe=function(O){console.log("xxx"),je(O)},ye=function(O,y){var p,F=window.document.documentElement,E=F.clientWidth,Ve=F.clientHeight,Oe=(p=$e.current)===null||p===void 0?void 0:p.getBoundingClientRect();!Oe||Ke({left:-Oe.left+y.x,right:E-(Oe.right-y.x),top:-Oe.top+y.y,bottom:Ve-(Oe.bottom-y.y)})};return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(dt.Z,{width:810,visible:!0,style:{width:"100%",cursor:"move"},maskClosable:!1,closable:!1,modalRender:function(O){return(0,e.jsx)(rt(),{disabled:Ie,bounds:He,onStart:function(p,F){return ye(p,F)},children:(0,e.jsx)("div",{ref:$e,children:O})})},footer:null,children:(0,e.jsxs)("div",{className:ie().main,onMouseDown:function(O){O.preventDefault()},children:[(0,e.jsxs)("div",{className:ie().header,children:[(0,e.jsxs)("div",{className:ie().show,children:[(0,e.jsxs)("div",{className:ie().tileline,children:[(0,e.jsx)("img",{src:x,className:ie().titleIcon}),(0,e.jsx)("span",{children:s.localName}),s.isPassengerPass==!0&&(0,e.jsxs)("span",{className:ie().hasPerson,children:[(0,e.jsx)(ae.Z,{className:"",type:"youren",style:{color:"#CE9F27",marginRight:"2px",fontSize:"9px"}}),"\u6709\u4EBA"]}),s.isPassengerPass==!1&&(0,e.jsxs)("span",{className:ie().hasPerson,children:[(0,e.jsx)(ae.Z,{className:"",type:"wuren",style:{color:"#8B949E",marginRight:"2px",fontSize:"9px"}}),"\u65E0\u4EBA"]})]}),(0,e.jsxs)("div",{className:ie().timeLine,children:[(0,e.jsxs)("span",{className:ie().pdr10,children:["\u5DE5\u4F5C\u65F6\u95F4\uFF1A",T.workTime]}),T.runTimeStatus=="meetingBook"?"\u4F1A\u8BAE\u65F6\u95F4\uFF1A":T.runTimeStatus=="overtimeWork"?"\u52A0\u73ED\u65F6\u95F4\uFF1A":"",T.timeArr.map(function(P,O){return(0,e.jsx)("span",{className:ie().pdr10,children:P},O)})]})]}),(0,e.jsx)("div",{className:ie().close,onClick:c,children:(0,e.jsx)(ae.Z,{type:"close"})})]}),(0,e.jsxs)("div",{className:ie().content,children:[(0,e.jsx)("div",{className:ie().infoList,children:H.map(function(P,O){return(0,e.jsxs)("div",{className:ie().item,children:[(0,e.jsx)("div",{className:ie().title,children:P.name}),(0,e.jsxs)("div",{className:ie().num,children:[P.num,P.unit]}),(0,e.jsx)("div",{className:ie().describe,children:P.describe})]},"navc"+P.id)})}),(0,e.jsx)("div",{className:ie().devices,children:(0,e.jsxs)(Vt.Z,{gutter:[12,18],children:[A("airConditioner")&&w==0&&(0,e.jsx)(ht.Z,{span:12,children:(0,e.jsx)(Ba,{spaceId:s.spaceId,projectId:Ce.T.projectId})}),A("airConditioner")&&w==1&&(0,e.jsx)(ht.Z,{span:12,children:(0,e.jsx)(Wa,{spaceId:s.spaceId,projectId:Ce.T.projectId})}),A("light")&&(0,e.jsx)(ht.Z,{span:12,children:(0,e.jsx)(za,{spaceId:s.spaceId,projectId:Ce.T.projectId})}),A("curtain")&&(0,e.jsx)(ht.Z,{span:12,children:(0,e.jsx)(un,{spaceId:s.spaceId,projectId:Ce.T.projectId})}),A("socket")&&(0,e.jsx)(ht.Z,{span:12,children:(0,e.jsx)(en,{spaceId:s.spaceId,projectId:Ce.T.projectId})})]})})]})]})})})},dn=n(88583),_e=n.n(dn),fn=n(3527),Be=n.n(fn),vn=n(94184),Qt=n.n(vn),pn=n(30381),hn=n.n(pn),mn=n(78919),ea=n(51236),gn=function(){var c=(0,re.tT)("sagacare_spaceFunc"),s=c.hasPersonList,g=c.querySpaceAdjustList,N=(0,re.tT)("sagacare_buildFloor"),x=N.changeLastFloorId,S=(0,re.tT)("sagacare_searchInfo"),b=S.searchSpace,R=(0,re.tT)("sagacare_spaceFunc"),K=R.getSpaceFunc,W=j.x.envir_all,fe=j.x.equip_air,Te=j.x.equip_lamp,$=j.x.envir_curtain,_=j.x.envir_socket,I=(0,a.useState)(!1),H=(0,u.Z)(I,2),Z=H[0],D=H[1],q=(0,a.useState)({}),J=(0,u.Z)(q,2),ve=J[0],ne=J[1],ue=[{name:"\u5168\u90E8\u8BBE\u5907",id:"all",src:W,color:"#E89E32",colorStr:""},{name:"\u7A7A\u8C03",id:"airConditioner",src:fe,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:$,num:"--",color:"#E89E32",colorStr:"232, 158, 50,"},{name:"\u63D2\u5EA7",id:"socket",src:_,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"},G=(0,a.useState)([]),X=(0,u.Z)(G,2),A=X[0],k=X[1],T=(0,a.useState)(.8),me=(0,u.Z)(T,2),z=me[0],Ie=me[1],je=(0,a.useState)(1),Le=(0,u.Z)(je,2),oe=Le[0],He=Le[1],Ke=(0,a.useState)(0),$e=(0,u.Z)(Ke,2),Qe=$e[0],ye=$e[1],P=(0,a.useState)([]),O=(0,u.Z)(P,2),y=O[0],p=O[1],F=(0,a.useRef)([]),E=(0,a.useState)({}),Ve=(0,u.Z)(E,2),Oe=Ve[0],ut=Ve[1],pa=(0,a.useState)([]),Mt=(0,u.Z)(pa,2),pe=Mt[0],ta=Mt[1],ha=(0,a.useState)([]),bt=(0,u.Z)(ha,2),Dt=bt[0],aa=bt[1],ma=(0,a.useState)(ue[0]),Pt=(0,u.Z)(ma,2),C=Pt[0],na=Pt[1],ga=(0,a.useState)(),Rt=(0,u.Z)(ga,2),Ze=Rt[0],Wt=Rt[1],xa=(0,a.useState)([]),Ht=(0,u.Z)(xa,2),et=Ht[0],Sa=Ht[1],ja=(0,a.useState)(!1),Ut=(0,u.Z)(ja,2),Tt=Ut[0],qt=Ut[1],Na=(0,a.useState)([]),Gt=(0,u.Z)(Na,2),yt=Gt[0],Ca=Gt[1],Jt=(0,a.useState)({name:"\u5168\u90E8",scode:"all",code:"all",openNum:0}),Et=(0,u.Z)(Jt,2),Me=Et[0],Ta=Et[1],_t=function(t){Wt(t)},ya=function(t){na(t)},Ea=function(t){Ta(t)},sa=function(t){D(!0),ne(t)},Xt=function(t,i){var d="";if(C.id=="all"){var o=A.filter(function(f){return f.id==i});d=(o[0]||{}).colorStr}else d=C.colorStr;if(C.id=="curtain"||i=="curtain")return t=="noHave"||!t?"rgba(196, 196, 196, 0)":"rgba("+d+"1)";if(t===2)return"rgba("+d+"0.4)";if(t===1)return"rgba("+d+"1)";if(t===0||t=="nostatus")return"rgba(196, 196, 196, 0.6)"},ra=dt.Z.confirm,_a=function(t,i){if(!(C.id=="all"||!t.canClick)&&!(t[C.id]=="noHave"||C.id=="socket"&&t[Me.scode]=="noHave")){if(t[C.id]=="nostatus"){te.default.success("\u8BE5\u7A7A\u95F4\u8BBE\u5907\u79BB\u7EBF");return}if(t[C.id]===2){ra({title:"\u8BF7\u786E\u8BA4",icon:(0,e.jsx)(ee.Z,{}),content:"\u662F\u5426\u8FDB\u5165\u5355\u7A7A\u95F4\u8FDB\u884C\u8C03\u8282\uFF1F",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){sa(t)},onCancel:function(){}});return}var d=t[C.id]===1?"\u5173\u95ED":"\u6253\u5F00";ra({title:"\u8BF7\u786E\u8BA4",icon:(0,e.jsx)(ee.Z,{}),content:C.id=="socket"&&Me.code!=="all"?"\u786E\u8BA4".concat(d).concat(Me.name,"\u5417\uFF1F"):"\u786E\u8BA4".concat(d,"\u8BE5").concat(C.name,"\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){function f(){}C.id=="airConditioner"&&ia(t,i,f),C.id=="light"&&nt("one",[t],f,d),C.id=="curtain"&&We("one",[t],f,d),C.id=="socket"&&Ft("one",[t],d,Me)},onCancel:function(){}})}};(0,a.useEffect)(function(){Ze?(x(Ze),qt(!0),(0,ea.cn)({floorId:Ze}).then(function(r){qt(!1);var t=(r.data||{}).spaceList||[],i=document.body.offsetWidth,d=(r.data||{}).width||800;if(d<i){var o=1;ye((i-d)/2)}else{var o=Number((i/d).toFixed(4));ye(0)}var f={width:d*o,height:(r.data||{}).height*o};ut(f),t.forEach(function(v,M){v.width=v.width*o,v.height=v.height*o,v.left=v.left*o,v.top=v.top*o});var V=(0,mn.O)(t);He(V),p(t),F.current=t}).catch(function(){qt(!1)})):p([])},[Ze]);var Ia=(0,a.useCallback)(function(r,t,i){Ie(r);var d=JSON.parse(JSON.stringify(F.current)),o=d.map(function(f,V){return V==0,f.width=f.width*r,f.height=f.height*r,f.left=f.left*r-t,f.top=f.top*r-i,f});p(o)},[F]),wa=function(t){return(0,ea.Vk)({floorId:Ze,projectId:Ce.T.projectId}).then(function(i){var d=i.data.statistics||[];t.forEach(function(v){var M=d.filter(function(ge){return ge.equipType==v.id});v.num=(M[0]||{}).runCount}),k(t);var o=[],f=i.data.spaceList||[];f.forEach(function(v){(v.equipList||[]).forEach(function(M){if((M==null?void 0:M.equipType)=="socket"){var ge,U=M==null||(ge=M.infos)===null||ge===void 0?void 0:ge.SocketType;U=U&&"socket_"+U;var Ae=o.findIndex(function(gt){return gt.scode==U});if(U&&Ae==-1){var qe;o.push({name:w[U],scode:U,code:M==null||(qe=M.infos)===null||qe===void 0?void 0:qe.SocketType,openNum:0})}}})});var V=[];return f.forEach(function(v){o.forEach(function(M){var ge=M.code,U=M.scode,Ae=(v.equipList||[]).filter(function(Ge){var Oa;return(Ge==null||(Oa=Ge.infos)===null||Oa===void 0?void 0:Oa.SocketType)==ge});if(Ae.length>0){var qe=Ae.filter(function(Ge){return Ge.runStatus==1}),gt=Ae.filter(function(Ge){return V.includes(Ge.id)?!1:(V.push(Ge.id),Ge.runStatus==1)});qe.length==Ae.length?v[U]=1:qe.length>0?v[U]=2:v[U]=0,M.openNum=M.openNum+gt.length}else v[U]="noHave"})}),f.forEach(function(v){var M=["airConditioner","light","curtain","socket"];M.forEach(function(ge){var U=(v.equipList||[]).filter(function(qe){return qe.equipType==ge});if(U.length>0){v.equipStatusList=v.equipStatusList?v.equipStatusList:[];var Ae=(v.equipStatusList||[]).filter(function(qe){return qe.equipType==ge});Ae.length>0?v[ge]=Ae[0].status:(v[ge]="nostatus",v.equipStatusList.push({equipType:ge,status:"nostatus"}))}else v[ge]="noHave"})}),ta(f),o.splice(0,0,{name:"\u5168\u90E8",scode:"all",code:"all",openNum:0}),Ca(o),"next"}).catch(function(){})},It=(0,a.useRef)(),wt=(0,a.useRef)();function ca(r){wa(r).then(function(t){clearTimeout(It.current),It.current=setTimeout(function(){ca(r)},8e3)})}function zt(){return(0,ea.Jc)().then(function(r){var t=r.data||[],i=[];return ue.map(function(d,o){if(o===0){i.push(d);return}var f=!1;t.map(function(V){d.id===V&&(f=!0)}),f&&i.push(d)}),k(i),i})}function Ue(r){g(r).then(function(t){clearTimeout(wt.current),wt.current=setTimeout(function(){Ue(r)},8e3)})}(0,a.useEffect)(function(){return(0,Ot.Z)((0,Xe.Z)().mark(function r(){var t;return(0,Xe.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,zt();case 2:t=d.sent,Ze&&(ca(t),Ue(Ze));case 4:case"end":return d.stop()}},r)}))(),function(){console.log("clearTimeout-clear"),clearTimeout(It.current),clearTimeout(wt.current)}},[Ze]),(0,a.useEffect)(function(){Ze&&(0,ea.lQ)({floorId:Ze,date:hn()().format("YYYYMMDD")}).then(function(r){var t=r.content||[];aa(t)}).catch(function(){})},[Ze]),(0,a.useEffect)(function(){var r=[];y.map(function(t){var i=t.spaceId,d=pe.filter(function(v){return v.id==i}),o=Dt.filter(function(v){return v.id==i}),f=s.filter(function(v){return v.spaceId==i}),V=Object.assign({},f[0],d[0],o[0],t);r.push(V)}),Sa(r)},[pe,y,Dt,s]);var mt=0,l=0;return(0,e.jsxs)("div",{className:_e().sagawrap,children:[(0,e.jsx)(Kt.Z,{title:(0,e.jsx)(re._H,{id:"menu.equipment"}),action:(0,e.jsx)(Zt.Z,{})}),(0,e.jsx)(tt.Z,{navigatorList:A,type:"equipment",navigatorChange:ya,action:A.length>0&&(0,e.jsx)(ua,{selNavObj:C,navigatorList:A,selSocketType:Me,socketTypeArr:yt,mapList:et}),changeFloorId:_t,selParamObj:C}),(0,e.jsxs)("div",{className:_e().maptop,children:[C.id=="socket"&&(0,e.jsx)("div",{className:Qt()(_e().left,_e().stBox),children:yt.map(function(r,t){return(0,e.jsx)("div",{className:Qt()(_e().stItem,(0,xe.Z)({},_e().sel,Me.scode==r.scode)),onClick:function(d){d.stopPropagation(),Ea(r)},children:r.name},t+"socket")})}),C.id!=="all"&&C.id!=="curtain"&&C.id!=="socket"&&(0,e.jsxs)("div",{className:_e().left,children:[(0,e.jsxs)("span",{children:[(0,e.jsx)(ae.Z,{className:"",type:"youren",style:{color:"#CE9F27",fontWeight:"bold",fontSize:"9px"}}),"\u6709\u4EBA"]}),(0,e.jsxs)("span",{children:[(0,e.jsx)(ae.Z,{className:"",type:"wuren",style:{color:"#8B949E",fontWeight:"bold",fontSize:"9px"}}),"\u65E0\u4EBA"]})]}),C.id!=="all"&&C.id!=="curtain"&&(0,e.jsx)("div",{className:_e().right,children:(0,e.jsxs)("div",{className:_e().rightOpen,children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:_e().circle,style:{backgroundColor:"rgba("+C.colorStr+"1)"}}),(0,e.jsx)("span",{children:"\u5F00\u542F"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:_e().circle,style:{backgroundColor:"rgba("+C.colorStr+"0.4)"}}),(0,e.jsx)("span",{children:"\u90E8\u5206\u5F00\u542F"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:_e().circle,style:{backgroundColor:"rgba(196, 196, 196, 0.6)"}}),(0,e.jsx)("span",{children:"\u5173\u95ED"})]})]})}),C.id=="curtain"&&(0,e.jsxs)("div",{className:_e().right,children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:_e().circle,style:{backgroundColor:"rgba("+C.colorStr+"1)"}}),(0,e.jsx)("span",{children:"\u6709"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:Qt()(_e().circle,_e().noCurtain)}),(0,e.jsx)("span",{children:"\u65E0"})]})]})]}),(0,e.jsx)(le.Z,{spinning:Tt,wrapperClassName:Be().spinnclass,children:et.length>0&&(0,e.jsx)(L.Z,{changeMapList:Ia,mapList:et,mapSize:Oe,maxscale:oe,transXInit:Qe,type:"equipment",selFloorId:Ze,render:function(t,i){var d;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?C.id=="all"?"rgba(196, 196, 196, 0.4)":C.id=="socket"&&Me.scode!=="all"?Xt(t[Me.scode]):Xt(t[C.id]):""},className:Qt()(Be().house,(d={},(0,xe.Z)(d,Be().notclick,!t.canClick||t[C.id]=="noHave"||C.id=="socket"&&t[Me.scode]=="noHave"),(0,xe.Z)(d,Be().searchSel,t.spaceId&&t.spaceId===b.spaceId),d)),onClick:function(f){f.stopPropagation(),l-mt<200&&_a(t,i)},onMouseDown:function(f){mt=new Date().getTime()},onMouseUp:function(f){l=new Date().getTime()},children:[C.id=="all"&&(0,e.jsx)("div",{className:Be().allDevice,style:{transform:z==oe?"scale(1)":t.width<24*(t.equipStatusList||[]).length||t.height<24?"scale(0.3)":"scale(1)"},children:(t.equipStatusList||[]).map(function(o,f){return(0,e.jsx)("div",{className:Be().icon,style:{backgroundColor:Xt(o.status,o.equipType)},children:(0,e.jsx)(ae.Z,{className:"",type:o.equipType,style:{color:"#fff",fontWeight:"bold",fontSize:"8px"}})},f+"device")})}),(C.id=="airConditioner"||C.id=="light")&&t.runStatus===1&&t.canClick&&(0,e.jsx)("div",{className:Be().hasPerson,style:{transform:z==oe?"scale(1)":t.width<46||t.height<25?"scale(0.4)":"scale(1)"},children:(0,e.jsx)(ae.Z,{className:"",type:"youren",style:{color:"#CE9F27",fontWeight:"bold",fontSize:"9px"}})}),(C.id=="airConditioner"||C.id=="light")&&t.runStatus===0&&t.canClick&&(0,e.jsx)("div",{className:Be().hasPerson,style:{transform:z==oe?"scale(1)":t.width<46||t.height<25?"scale(0.4)":"scale(1)"},children:(0,e.jsx)(ae.Z,{className:"",type:"wuren",style:{color:"#8B949E",fontWeight:"bold",fontSize:"9px"}})}),!(!t.canClick||t[C.id]=="noHave"||C.id=="socket"&&t[Me.scode]=="noHave")&&(0,e.jsx)("div",{className:Be().showModal,onClick:function(f){f.stopPropagation(),l-mt<400&&sa(t)},onMouseDown:function(f){mt=new Date().getTime()},onMouseUp:function(f){l=new Date().getTime()},style:{transform:"scale(".concat(z-.1<1?z-.1:1,")")},children:(0,e.jsx)(ae.Z,{className:"",type:"hover",style:{fontSize:"10px"}})}),(0,e.jsxs)("div",{className:Be().content,children:[(0,e.jsx)(ae.Z,{className:"",type:K(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||z==oe?"block":"none"},children:t.localName}),(K(t.roomFuncType)||t.localName)&&!(K(t.roomFuncType)&&t.width>28&&t.height>50||t.localName&&(t.width>64&&t.height>80||t.height>140||t.width>120||z==oe))&&(0,e.jsx)("div",{className:Be().pointer,children:"."})]})]})},i+t.id)}})}),Z&&(0,e.jsx)(ln,{showSpace:ve,onClose:function(){D(!1)}})]})},xn=gn},1635:function(se,Je,n){"use strict";n.d(Je,{Z:function(){return Kt}});var Q=n(96156),le=n(22122),xe=n(90484),Xe=n(94184),Ot=n.n(Xe),lt=n(67294),te=n(53124),Yt=n(99134),dt=function(L,tt){var ke={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&tt.indexOf(Ne)<0&&(ke[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Ne=Object.getOwnPropertySymbols(L);ze<Ne.length;ze++)tt.indexOf(Ne[ze])<0&&Object.prototype.propertyIsEnumerable.call(L,Ne[ze])&&(ke[Ne[ze]]=L[Ne[ze]]);return ke};function u(L){return typeof L=="number"?"".concat(L," ").concat(L," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(L)?"0 0 ".concat(L):L}var a=["xs","sm","md","lg","xl","xxl"],re=lt.forwardRef(function(L,tt){var ke,Ne=lt.useContext(te.E_),ze=Ne.getPrefixCls,B=Ne.direction,ae=lt.useContext(Yt.Z),ee=ae.gutter,he=ae.wrap,Fe=ae.supportFlexGap,de=L.prefixCls,Ce=L.span,we=L.order,be=L.offset,Ye=L.push,Y=L.pull,ct=L.className,At=L.children,ft=L.flex,kt=L.style,xt=dt(L,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),Ee=ze("col",de),at={};a.forEach(function(Pe){var Re,ce={},ot=L[Pe];typeof ot=="number"?ce.span=ot:(0,xe.Z)(ot)==="object"&&(ce=ot||{}),delete xt[Pe],at=(0,le.Z)((0,le.Z)({},at),(Re={},(0,Q.Z)(Re,"".concat(Ee,"-").concat(Pe,"-").concat(ce.span),ce.span!==void 0),(0,Q.Z)(Re,"".concat(Ee,"-").concat(Pe,"-order-").concat(ce.order),ce.order||ce.order===0),(0,Q.Z)(Re,"".concat(Ee,"-").concat(Pe,"-offset-").concat(ce.offset),ce.offset||ce.offset===0),(0,Q.Z)(Re,"".concat(Ee,"-").concat(Pe,"-push-").concat(ce.push),ce.push||ce.push===0),(0,Q.Z)(Re,"".concat(Ee,"-").concat(Pe,"-pull-").concat(ce.pull),ce.pull||ce.pull===0),(0,Q.Z)(Re,"".concat(Ee,"-rtl"),B==="rtl"),Re))});var $t=Ot()(Ee,(ke={},(0,Q.Z)(ke,"".concat(Ee,"-").concat(Ce),Ce!==void 0),(0,Q.Z)(ke,"".concat(Ee,"-order-").concat(we),we),(0,Q.Z)(ke,"".concat(Ee,"-offset-").concat(be),be),(0,Q.Z)(ke,"".concat(Ee,"-push-").concat(Ye),Ye),(0,Q.Z)(ke,"".concat(Ee,"-pull-").concat(Y),Y),ke),ct,at),De={};if(ee&&ee[0]>0){var vt=ee[0]/2;De.paddingLeft=vt,De.paddingRight=vt}if(ee&&ee[1]>0&&!Fe){var pt=ee[1]/2;De.paddingTop=pt,De.paddingBottom=pt}return ft&&(De.flex=u(ft),he===!1&&!De.minWidth&&(De.minWidth=0)),lt.createElement("div",(0,le.Z)({},xt,{style:(0,le.Z)((0,le.Z)({},De),kt),className:$t,ref:tt}),At)}),Zt=re,Kt=Zt},89032:function(se,Je,n){"use strict";var Q=n(38663),le=n.n(Q),xe=n(6999)},99134:function(se,Je,n){"use strict";var Q=n(67294),le=(0,Q.createContext)({});Je.Z=le},6999:function(se,Je,n){"use strict";var Q=n(38663),le=n.n(Q),xe=n(80638),Xe=n.n(xe)},36725:function(se,Je,n){"use strict";n.d(Je,{Z:function(){return ze}});var Q=n(22122),le=n(96156),xe=n(90484),Xe=n(28481),Ot=n(94184),lt=n.n(Ot),te=n(67294),Yt=n(53124),dt=n(98082),u=n(24308),a=n(93355),re=n(99134),Zt=function(B,ae){var ee={};for(var he in B)Object.prototype.hasOwnProperty.call(B,he)&&ae.indexOf(he)<0&&(ee[he]=B[he]);if(B!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,he=Object.getOwnPropertySymbols(B);Fe<he.length;Fe++)ae.indexOf(he[Fe])<0&&Object.prototype.propertyIsEnumerable.call(B,he[Fe])&&(ee[he[Fe]]=B[he[Fe]]);return ee},Kt=(0,a.b)("top","middle","bottom","stretch"),L=(0,a.b)("start","end","center","space-around","space-between","space-evenly");function tt(B,ae){var ee=te.useState(typeof B=="string"?B:""),he=(0,Xe.Z)(ee,2),Fe=he[0],de=he[1],Ce=function(){if(typeof B=="string"&&de(B),(0,xe.Z)(B)==="object")for(var be=0;be<u.c4.length;be++){var Ye=u.c4[be];if(!!ae[Ye]){var Y=B[Ye];if(Y!==void 0){de(Y);return}}}};return te.useEffect(function(){Ce()},[JSON.stringify(B),ae]),Fe}var ke=te.forwardRef(function(B,ae){var ee,he=B.prefixCls,Fe=B.justify,de=B.align,Ce=B.className,we=B.style,be=B.children,Ye=B.gutter,Y=Ye===void 0?0:Ye,ct=B.wrap,At=Zt(B,["prefixCls","justify","align","className","style","children","gutter","wrap"]),ft=te.useContext(Yt.E_),kt=ft.getPrefixCls,xt=ft.direction,Ee=te.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),at=(0,Xe.Z)(Ee,2),$t=at[0],De=at[1],vt=te.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),pt=(0,Xe.Z)(vt,2),Pe=pt[0],Re=pt[1],ce=tt(de,Pe),ot=tt(Fe,Pe),St=(0,dt.Z)(),oa=te.useRef(Y);te.useEffect(function(){var jt=u.ZP.subscribe(function(it){Re(it);var rt=oa.current||0;(!Array.isArray(rt)&&(0,xe.Z)(rt)==="object"||Array.isArray(rt)&&((0,xe.Z)(rt[0])==="object"||(0,xe.Z)(rt[1])==="object"))&&De(it)});return function(){return u.ZP.unsubscribe(jt)}},[]);var Ft=function(){var it=[void 0,void 0],rt=Array.isArray(Y)?Y:[Y,void 0];return rt.forEach(function(Nt,ie){if((0,xe.Z)(Nt)==="object")for(var j=0;j<u.c4.length;j++){var Bt=u.c4[j];if($t[Bt]&&Nt[Bt]!==void 0){it[ie]=Nt[Bt];break}}else it[ie]=Nt}),it},nt=kt("row",he),We=Ft(),ia=lt()(nt,(ee={},(0,le.Z)(ee,"".concat(nt,"-no-wrap"),ct===!1),(0,le.Z)(ee,"".concat(nt,"-").concat(ot),ot),(0,le.Z)(ee,"".concat(nt,"-").concat(ce),ce),(0,le.Z)(ee,"".concat(nt,"-rtl"),xt==="rtl"),ee),Ce),st={},e=We[0]!=null&&We[0]>0?We[0]/-2:void 0,Lt=We[1]!=null&&We[1]>0?We[1]/-2:void 0;if(e&&(st.marginLeft=e,st.marginRight=e),St){var ua=(0,Xe.Z)(We,2);st.rowGap=ua[1]}else Lt&&(st.marginTop=Lt,st.marginBottom=Lt);var la=(0,Xe.Z)(We,2),Vt=la[0],da=la[1],ht=te.useMemo(function(){return{gutter:[Vt,da],wrap:ct,supportFlexGap:St}},[Vt,da,ct,St]);return te.createElement(re.Z.Provider,{value:ht},te.createElement("div",(0,Q.Z)({},At,{className:ia,style:(0,Q.Z)((0,Q.Z)({},st),we),ref:ae}),be))}),Ne=ke,ze=Ne},13062:function(se,Je,n){"use strict";var Q=n(38663),le=n.n(Q),xe=n(6999)}}]);