1 |
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[679],{51289:function(j){j.exports={right:"right___3Eyek",title:"title___2hFkD",allList:"allList___3Qp-U",item:"item___2Bv2v",circle:"circle___3hzU0",normalRun:"normalRun___2aEDS",overtimeWork:"overtimeWork___3SBK6",overtimeBook:"overtimeBook___1aXPB",num:"num___2iqu7",date:"date___3YCw_"}},17911:function(j){j.exports={headerRight:"headerRight___dvn2y",check:"check___1fkCx",sagawrap:"sagawrap___1CT3X",maptop:"maptop___iBWT1",right:"right___iJ1Zj",popTitle:"popTitle___3saHY"}},12485:function(j,k,t){"use strict";t.r(k),t.d(k,{default:function(){return me}});var Ke=t(20228),$=t(11382),Ve=t(20136),b=t(19181),y=t(32059),h=t(2824),l=t(67294),q=t(92007),_=t(65691),ee=t(99393),Ge=t(53400),ae=t(41505),te=t(94184),g=t.n(te),se=t(51289),o=t.n(se),ne=t(30381),w=t.n(ne),re=t(60607),a=t(85893),ie=function(L){var N=L.runtimeNav,F=L.changeTime,I="YYYY/MM/DD";return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:o().right,children:[(0,a.jsxs)("div",{className:o().allList,children:[(0,a.jsxs)("div",{className:o().item,children:[(0,a.jsx)("div",{className:g()(o().normalRun,o().circle)}),(0,a.jsx)("div",{className:o().title,children:"\u6B63\u5E38\u8FD0\u884C"}),(0,a.jsx)("div",{className:o().num,children:N.normalRun})]}),(0,a.jsxs)("div",{className:o().item,style:{display:re.T.projectId=="Pj3301100002"?"none":""},children:[(0,a.jsx)("div",{className:g()(o().overtimeWork,o().circle)}),(0,a.jsx)("div",{className:o().title,children:"\u52A0\u73ED"}),(0,a.jsx)("div",{className:o().num,children:N.overtimeWork})]}),(0,a.jsxs)("div",{className:o().item,children:[(0,a.jsx)("div",{className:g()(o().overtimeBook,o().circle)}),(0,a.jsx)("div",{className:o().title,children:"\u4F1A\u8BAE\u9884\u7EA6"}),(0,a.jsx)("div",{className:o().num,children:N.meetingBook})]})]}),(0,a.jsx)("div",{className:o().date,children:(0,a.jsx)(ae.Z,{bordered:!1,defaultValue:w()(),format:I,allowClear:!1,inputReadOnly:!0,autoFocus:!0,onChange:F})})]})})},oe=ie,S=t(42285),le=t(17911),x=t.n(le),ce=t(3527),v=t.n(ce),ue=t(81116),de=t(68967),he=t(78919),D=t(51236),ve=function(){var L=(0,S.tT)("sagacare_buildFloor"),N=L.changeLastFloorId,F=(0,S.tT)("sagacare_searchInfo"),I=F.searchSpace,Te=(0,S.tT)("sagacare_spaceFunc"),R=Te.getSpaceFunc,fe=(0,l.useState)(!1),B=(0,h.Z)(fe,2),ge=B[0],T=B[1],Se=(0,l.useState)({}),C=(0,h.Z)(Se,2),xe=C[0],Ne=C[1],je=(0,l.useState)([]),Y=(0,h.Z)(je,2),A=Y[0],Z=Y[1],E=(0,l.useRef)(),ye=(0,l.useState)({}),O=(0,h.Z)(ye,2),Le=O[0],Fe=O[1],Ie=(0,l.useState)(.8),P=(0,h.Z)(Ie,2),z=P[0],Re=P[1],Ze=(0,l.useState)(1),X=(0,h.Z)(Ze,2),W=X[0],Ee=X[1],We=(0,l.useState)(0),H=(0,h.Z)(We,2),Me=H[0],J=H[1],ke=(0,l.useState)([]),Q=(0,h.Z)(ke,2),we=Q[0],De=Q[1],Be=(0,l.useState)(),U=(0,h.Z)(Be,2),m=U[0],Ce=U[1],Ye=(0,l.useState)(w()().format("YYYYMMDD")),K=(0,h.Z)(Ye,2),M=K[0],Ae=K[1],Oe=(0,l.useState)([]),V=(0,h.Z)(Oe,2),G=V[0],Pe=V[1],ze=function(e){Ce(e)},$e=function(){S.m8.push("/runtime/recordList"),console.log("showR")},Xe=function(e){var c=e.format("YYYYMMDD");Ae(c)};(0,l.useEffect)(function(){m?(N(m),T(!0),(0,D.cn)({floorId:m}).then(function(i){T(!1);var e=(i.data||{}).spaceList||[],c=document.body.offsetWidth,u=(i.data||{}).width||800;if(u<c){var s=1;J((c-u)/2)}else{var s=Number((c/u).toFixed(4));J(0)}var n={width:u*s,height:(i.data||{}).height*s};Fe(n),e.forEach(function(r,f){r.width=r.width*s,r.height=r.height*s,r.left=r.left*s,r.top=r.top*s});var d=(0,he.O)(e);Ee(d),Z(e),E.current=e}).catch(function(){T(!1)})):Z([])},[m]);var He=(0,l.useCallback)(function(i,e,c){Re(i);var u=JSON.parse(JSON.stringify(E.current)),s=u.map(function(n,d){return d==0&&console.log("mapListTemp",i,n.width,n.width*i),n.width=n.width*i,n.height=n.height*i,n.left=n.left*i-e,n.top=n.top*i-c,n});Z(s)},[E]),Je=function(){T(!0),(0,D.lQ)({floorId:m,date:M}).then(function(e){if(T(!1),!!p.current){var c=e||{};Ne({normalRun:c.workTimeNum,overtimeWork:c.overTimeNum,meetingBook:c.meetTimeNum});var u=e.content||[];u.forEach(function(s){s.runTimeStatus="",s.hasWorkTime=!1;var n=[],d=[];s.hasOwnProperty("workTimeStartTime")&&(s.hasWorkTime=!0,d.push(s.workTimeStartTime,s.workTimeEndTime)),s.hasOwnProperty("meetTime")&&(s.runTimeStatus="meetingBook",s.meetTime.forEach(function(r){var f=[r.meetTimeStartTime,r.meetTimeEndTime];n.push(f),d.push(r.meetTimeStartTime,r.meetTimeEndTime)})),s.hasOwnProperty("overTime")&&(s.runTimeStatus="overtimeWork",s.overTime.forEach(function(r){var f=[r.overTimeStartTime,r.overTimeEndTime];n.push(f),d.push(r.overTimeStartTime,r.overTimeEndTime)})),s.showTimeList=n,d.sort(function(r,f){var Qe=Date.parse("2008-08-08 "+r),Ue=Date.parse("2008-08-08 "+f);return Qe-Ue}),s.showTimeStr=d.length>1?d[0]+"-"+d[d.length-1]:""}),Pe(u)}}).catch(function(){T(!1)})},p=(0,l.useRef)(null);return(0,l.useEffect)(function(){if(m&&M)return Je(),p.current&&(clearInterval(p.current),p.current=null),p.current=setInterval(function(){},1e4),function(){clearInterval(p.current),p.current=null}},[m,M]),(0,l.useEffect)(function(){var i=[];A.map(function(e){var c=e.spaceId,u=G.filter(function(n){return n.id==c}),s=Object.assign({},u[0],e);i.push(s)}),De(i)},[A,G]),(0,a.jsxs)("div",{className:x().sagawrap,children:[(0,a.jsx)(q.Z,{title:(0,a.jsx)(S._H,{id:"menu.runtime"}),action:(0,a.jsx)(de.Z,{})}),(0,a.jsx)(ee.Z,{type:"runtime",action:(0,a.jsx)(oe,{runtimeNav:xe,changeTime:Xe}),changeFloorId:ze}),(0,a.jsx)("div",{className:x().maptop,children:(0,a.jsx)("div",{className:x().right})}),(0,a.jsx)($.Z,{spinning:ge,wrapperClassName:v().spinnclass,children:(0,a.jsx)(_.Z,{mapList:we,maxscale:W,transXInit:Me,changeMapList:He,mapSize:Le,selFloorId:m,type:"runtime",render:function(e,c){var u,s;return(0,a.jsx)("div",{className:v().houseWrap,style:{left:e.left,top:e.top,width:e.width,height:e.height},children:(0,a.jsxs)("div",{className:g()(v().house,(u={},(0,y.Z)(u,v().notclick,!e.roomFuncType),(0,y.Z)(u,v().searchSel,e.spaceId&&e.spaceId===I.spaceId),u)),style:{background:e.roomFuncType?e.runTimeStatus=="meetingBook"?"rgba(0, 220, 35, 0.2)":e.runTimeStatus=="overtimeWork"?"rgba(94, 139, 207, 0.2)":"rgba(196, 196, 196, 0.2)":""},children:[(0,a.jsxs)("div",{className:v().allTime,children:[e.showTimeList&&e.showTimeList.length>0&&(0,a.jsx)(b.Z,{content:(0,a.jsxs)("div",{children:[e.hasWorkTime&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:x().popTitle,children:"\u5DE5\u4F5C\u65F6\u95F4:"}),(0,a.jsxs)("div",{children:[e.workTimeStartTime,"-",e.workTimeEndTime]})]}),(0,a.jsxs)("div",{className:x().popTitle,children:[e.runTimeStatus=="overtimeWork"?"\u52A0\u73ED\u65F6\u95F4":"\u4F1A\u8BAE\u65F6\u95F4",":"]}),(e.showTimeList||[]).map(function(n,d){return(0,a.jsxs)("div",{children:[n[0],"-",n[1]]},"time"+d)})]}),trigger:"hover",style:{color:"none"},children:(0,a.jsx)("span",{className:g()((s={},(0,y.Z)(s,v().overworkTime,e.runTimeStatus=="overtimeWork"),(0,y.Z)(s,v().meetTime,e.runTimeStatus=="meetingBook"),s)),children:e.showTimeStr})}),e.showTimeList&&e.showTimeList.length==0&&(0,a.jsx)("span",{title:e.showTimeStr,children:e.showTimeStr})]}),(0,a.jsxs)("div",{className:v().content,children:[(0,a.jsx)(ue.Z,{className:"",type:R(e.roomFuncType),style:{fontSize:18,display:e.width>28&&e.height>50?"block":"none"}}),(0,a.jsx)("div",{className:v().name,style:{display:e.width>64&&e.height>80||e.height>140||e.width>120||z==W?"block":"none"},children:e.localName}),(R(e.roomFuncType)||e.localName)&&!(R(e.roomFuncType)&&e.width>28&&e.height>50||e.localName&&(e.width>64&&e.height>80||e.height>140||e.width>120||z==W))&&(0,a.jsx)("div",{className:v().pointer,children:"."})]})]},c+"house")},c+"house")}})})]})},me=ve}}]);
|