chunk-3250642b.4a7f75f2.js 183 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3250642b"],{"0638":function(e,t,n){},"0653":function(e,t,n){"use strict";n("68ef"),n("5c56")},"0970":function(e,t,n){"use strict";n("60f5")},"0be9":function(e,t,n){},"0cb6":function(e,t,n){},"0d32":function(e,t,n){"use strict";n("3a02")},1196:function(e,t,n){"use strict";n("eaf7")},"13d5":function(e,t,n){"use strict";var a=n("23e7"),r=n("d58f").left,o=n("a640"),c=n("ae40"),i=n("2d00"),l=n("605d"),s=o("reduce"),m=c("reduce",{1:0}),u=!l&&i>79&&i<83;a({target:"Array",proto:!0,forced:!s||!m||u},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"1d7e":function(e,t,n){},"20d9":function(e,t,n){"use strict";n("a1fd")},"24ce":function(e,t,n){"use strict";n("b273")},"268d":function(e,t,n){"use strict";n("0cb6")},2949:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"2a3c":function(e,t,n){},"2b12":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},3228:function(e,t,n){},"32c7":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"34e9":function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n("c199"),r=n("7a23"),o=n("fe7e"),c=n("f691"),i=n("b1d2");const[l,s]=Object(o["a"])("cell-group"),m={title:String,inset:Boolean,border:c["g"]};var u=Object(r["defineComponent"])({name:l,inheritAttrs:!1,props:m,setup(e,{slots:t,attrs:n}){const a=()=>{var a;return Object(r["createVNode"])("div",Object(r["mergeProps"])({class:[s({inset:e.inset}),{[i["d"]]:e.border&&!e.inset}]},n),[null==(a=t.default)?void 0:a.call(t)])},o=()=>Object(r["createVNode"])("div",{class:s("title",{inset:e.inset})},[t.title?t.title():e.title]);return()=>e.title||t.title?Object(r["createVNode"])(r["Fragment"],null,[o(),a()]):a()}});const d=Object(a["a"])(u);var p=d},"38d5":function(e,t,n){"use strict";n("68ef")},"3a02":function(e,t,n){},"40d3":function(e,t,n){"use strict";n("b2738")},"48a1":function(e,t,n){"use strict";function a(e,t){var n=!1,a=0,r=0,o=0,c=0,i=0,l=0,s=function(){},m={swipeLeft:s,swipeRight:s,swipeDown:s,swipeUp:s,drag:s};Object.assign(m,t),e.addEventListener("touchstart",(function(e){a=e.touches[0].pageX,r=e.touches[0].pageY,i=0,l=0}),{passive:!0}),e.addEventListener("touchmove",(function(t){if(n=!0,o=t.touches[0].pageX,c=t.touches[0].pageY,t.mation={startX:a,startY:r,moveX:o,moveY:c,disX:i,disY:l},m.drag.call(e,t),n){var s=Math.abs(o-a),u=Math.abs(c-r);s>u?o-a>0?m.swipeRight.call(e,t):m.swipeLeft.call(e,t):c-a>0?m.swipeDown.call(e,t):m.swipeUp.call(e,t)}}),{passive:!0}),e.addEventListener("touchend",(function(e){n=!1}))}n.d(t,"a",(function(){return a}))},"4eee":function(e,t,n){"use strict";n("0be9")},"5a3d":function(e,t,n){},"5c56":function(e,t,n){},"5c73":function(e,t,n){"use strict";n("8267")},"5d42":function(e,t,n){"use strict";n("94d5")},"60f5":function(e,t,n){},"66b9":function(e,t,n){"use strict";n("68ef"),n("cb51"),n("3743"),n("e3b3"),n("bc1b")},"772a":function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var a=n("c199"),r=n("7a23"),o=n("fe7e"),c=n("f691"),i=n("b1d2"),l=n("4a89"),s=n("f465"),m=n("4eda");const[u,d]=Object(o["a"])("form"),p={colon:Boolean,disabled:Boolean,readonly:Boolean,showError:Boolean,labelWidth:c["f"],labelAlign:String,inputAlign:String,scrollToError:Boolean,validateFirst:Boolean,submitOnEnter:c["g"],validateTrigger:Object(c["e"])("onBlur"),showErrorMessage:c["g"],errorMessageAlign:String};var f=Object(r["defineComponent"])({name:u,props:p,emits:["submit","failed"],setup(e,{emit:t,slots:n}){const{children:a,linkChildren:o}=Object(s["f"])(i["f"]),c=e=>e?a.filter(t=>e.includes(t.name)):a,u=e=>new Promise((t,n)=>{const a=[],r=c(e);r.reduce((e,t)=>e.then(()=>{if(!a.length)return t.validate().then(e=>{e&&a.push(e)})}),Promise.resolve()).then(()=>{a.length?n(a):t()})}),p=e=>new Promise((t,n)=>{const a=c(e);Promise.all(a.map(e=>e.validate())).then(e=>{e=e.filter(Boolean),e.length?n(e):t()})}),f=e=>{const t=a.find(t=>t.name===e);return t?new Promise((e,n)=>{t.validate().then(t=>{t?n(t):e()})}):Promise.reject()},b=t=>"string"===typeof t?f(t):e.validateFirst?u(t):p(t),g=e=>{"string"===typeof e&&(e=[e]);const t=c(e);t.forEach(e=>{e.resetValidation()})},v=(e,t)=>{a.some(n=>n.name===e&&(n.$el.scrollIntoView(t),!0))},O=()=>a.reduce((e,t)=>(e[t.name]=t.formValue.value,e),{}),j=()=>{const n=O();b().then(()=>t("submit",n)).catch(a=>{t("failed",{values:n,errors:a}),e.scrollToError&&a[0].name&&v(a[0].name)})},h=e=>{Object(l["e"])(e),j()};return o({props:e}),Object(m["a"])({submit:j,validate:b,scrollToField:v,resetValidation:g}),()=>{var e;return Object(r["createVNode"])("form",{class:d(),onSubmit:h},[null==(e=n.default)?void 0:e.call(n)])}}});const b=Object(a["a"])(f);var g=b},"7c22":function(e,t,n){"use strict";n("3228")},"7f3f":function(e,t,n){"use strict";n.r(t);n("b0c0");var a=n("7a23"),r=function(e){return Object(a["pushScopeId"])("data-v-33d90844"),e=e(),Object(a["popScopeId"])(),e},o={class:"main-left"},c={class:"logo-box"},i=["src"],l=["src"],s={class:"left-time"},m={class:"weather"},u=["src"],d=["src"],p=r((function(){return Object(a["createElementVNode"])("span",null," 联系客服",-1)})),f={class:"left-space"},b={class:"text"},g={class:"space-info"},v={class:"space-temp"},O=["src"],j=r((function(){return Object(a["createElementVNode"])("span",{class:"temp-text"},"温度",-1)})),h={class:"temp-num"},T=r((function(){return Object(a["createElementVNode"])("sup",null,"℃",-1)})),k={class:"space-env"},I=["onClick"],S=["src"],y={class:"env-text"},x={key:0,class:"fotter"},w=["onClick"],C=["src"],E=["src"],D=["src"],N=r((function(){return Object(a["createElementVNode"])("span",null,"…",-1)})),V={class:"main-right"},B={key:0,class:"work-btn"};function A(e,t,n,r,A,L){var W=Object(a["resolveComponent"])("work-config"),q=Object(a["resolveComponent"])("manual-config"),M=Object(a["resolveComponent"])("scenario-config"),F=Object(a["resolveComponent"])("manual-index"),U=Object(a["resolveComponent"])("Air"),_=Object(a["resolveComponent"])("Light"),P=Object(a["resolveComponent"])("Curtain"),R=Object(a["resolveComponent"])("work-overtime"),H=Object(a["resolveComponent"])("manual-overtime"),z=Object(a["resolveComponent"])("van-popup"),Y=Object(a["resolveComponent"])("scenario-dailog"),G=Object(a["resolveComponent"])("detail"),J=Object(a["resolveComponent"])("com-map"),X=Object(a["resolveComponent"])("contact");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"main",style:Object(a["normalizeStyle"])({backgroundImage:"linear-gradient(0deg, rgba(69, 33, 0, 0.2), rgba(69, 33, 0, 0.2)), url("+e.padBgImg+")","background-repeat":"no-repeat"})},[Object(a["createElementVNode"])("div",o,[Object(a["createElementVNode"])("div",{class:"left-top",onTouchstart:t[1]||(t[1]=function(t){return e.gtouchstart(t)}),onTouchmove:t[2]||(t[2]=function(t){return e.gtouchmove()}),onTouchend:t[3]||(t[3]=function(){return e.showDeleteButton&&e.showDeleteButton.apply(e,arguments)})},[Object(a["createElementVNode"])("div",c,[e.logImg?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,class:"logo-icon",src:e.logImg,alt:""},null,8,i)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,class:"logo-icon",src:e.parseImgUrl("ipdImages","shangeyun_logo.svg"),alt:""},null,8,l))]),Object(a["createElementVNode"])("div",s,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.nowDate),1),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.nowWeek),1)]),Object(a["createElementVNode"])("div",m,[Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{src:e.outWeather.imgname,class:"weather-icon",alt:""},null,8,u),[[a["vShow"],e.outWeather.imgname]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.outWeather.temperature?e.outWeather.temperature:"--")+"℃",1)]),e.contantDetail?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"weixiin",onClick:t[0]||(t[0]=function(){return e.showContact&&e.showContact.apply(e,arguments)})},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","weixin.svg")},null,8,d),p])):Object(a["createCommentVNode"])("",!0)],32),Object(a["createElementVNode"])("div",f,[Object(a["createElementVNode"])("div",b,[Object(a["createElementVNode"])("div",null,Object(a["toDisplayString"])(e.officeData.localName),1)]),Object(a["createElementVNode"])("div",g,[Object(a["createElementVNode"])("div",v,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","template-icon.svg"),alt:""},null,8,O),j,Object(a["createElementVNode"])("span",h,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.officeData.temperature?e.officeData.temperature:"--"),1),T])])]),Object(a["createElementVNode"])("div",k,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.envlist,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["env-item",[1==n?"env-color":"",t.bgColor?"env-item-radius":""]]),style:Object(a["normalizeStyle"])([{background:t.bgColor?t.bgColor:""},{opacity:t.bgColor?.8:""},{paddingLeft:0==n&&t.bgColor?"15px":""}]),key:"env"+n,onClick:function(n){return e.handleDetail(t)}},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages",t.img),alt:""},null,8,S),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.name),1)]),Object(a["createElementVNode"])("div",y,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.num)+" ",1),Object(a["createElementVNode"])("sup",null,Object(a["toDisplayString"])(t.unit),1)])],14,I)})),128))])]),e.spaceData&&e.spaceData.length>1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",x,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.spaceData,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[n<3?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["fotter-item",t.active?"fotter-item-active":""]),key:n+"nav",onClick:function(n){return e.changeSpace(t)}},[t.active?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:e.parseImgUrl("ipdImages","rectangle-active.svg")},null,8,C)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:e.parseImgUrl("ipdImages","rectangle1.svg")},null,8,E)),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.spaceName),1)],10,w)):Object(a["createCommentVNode"])("",!0)],64)})),256)),e.spaceData&&e.spaceData.length>3?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"fotter-item-end",onClick:t[4]||(t[4]=function(){return e.moreSpace&&e.moreSpace.apply(e,arguments)})},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","rectangle-fotter.svg")},null,8,D),N])):Object(a["createCommentVNode"])("",!0)])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",V,["开放"===e.roomType&&e.isWork||"会议室"===e.roomType&&e.scenarioArr&&e.scenarioArr.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",B,["开放"===e.roomType&&e.isWork&&1!==e.controlMode?(Object(a["openBlock"])(),Object(a["createBlock"])(W,{key:0,scenarioArr:e.scenarioArr,workkArr:e.workkArr,onCloseWork:e.closeWork,onTriggerWork:e.triggerWork,onSetForceOverTimeFlag:e.setForceOverTimeFlag},null,8,["scenarioArr","workkArr","onCloseWork","onTriggerWork","onSetForceOverTimeFlag"])):Object(a["createCommentVNode"])("",!0),"开放"===e.roomType&&e.isWork&&1===e.controlMode?(Object(a["openBlock"])(),Object(a["createBlock"])(q,{key:1,scenarioArr:e.scenarioArr,workkArr:e.workkArr,onCloseWork:e.closeWork,onTriggerWork:e.triggerWork,onSetForceOverTimeFlag:e.setForceOverTimeFlag},null,8,["scenarioArr","workkArr","onCloseWork","onTriggerWork","onSetForceOverTimeFlag"])):Object(a["createCommentVNode"])("",!0),"会议室"===e.roomType&&e.scenarioArr&&e.scenarioArr.length?(Object(a["openBlock"])(),Object(a["createBlock"])(M,{key:2,activeType:e.activeType,scenarioArr:e.scenarioArr,spaceId:e.spaceInfo.spaceId,projectId:e.projectId,onSetHeadScene:e.setHeadScene},null,8,["activeType","scenarioArr","spaceId","projectId","onSetHeadScene"])):Object(a["createCommentVNode"])("",!0)])):Object(a["createCommentVNode"])("",!0),1===e.controlMode?(Object(a["openBlock"])(),Object(a["createBlock"])(F,{key:1,onTriggerWork:e.triggerWork,seviceEquipmentList:e.seviceEquipmentList,forceOverTimeFlag:e.forceOverTimeFlag,onUpdateAirTemp:e.updateAirTemp,hasAir:e.spaceExistenceDevice.airConditioner,airVolumes:e.officeData.airVolumes,temperature:e.officeData.temperature,spaceId:e.spaceInfo.spaceId,projectId:e.projectId,userIsControl:e.userIsControl},null,8,["onTriggerWork","seviceEquipmentList","forceOverTimeFlag","onUpdateAirTemp","hasAir","airVolumes","temperature","spaceId","projectId","userIsControl"])):Object(a["createCommentVNode"])("",!0),1!=e.controlMode&&(e.officeData.temperature||e.spaceExistenceDevice.airConditioner)?(Object(a["openBlock"])(),Object(a["createBlock"])(U,{id:"airId",key:"airId",onTriggerWork:e.triggerWork,forceOverTimeFlag:e.forceOverTimeFlag,onUpdateAirTemp:e.updateAirTemp,hasAir:e.spaceExistenceDevice.airConditioner,airVolumes:e.officeData.airVolumes,temperature:e.officeData.temperature,spaceId:e.spaceInfo.spaceId,projectId:e.projectId,isACATVA:e.isACATVA,userIsControl:e.userIsControl},null,8,["onTriggerWork","forceOverTimeFlag","onUpdateAirTemp","hasAir","airVolumes","temperature","spaceId","projectId","isACATVA","userIsControl"])):Object(a["createCommentVNode"])("",!0),e.spaceExistenceDevice.light&&e.spaceInfo.spaceId?(Object(a["openBlock"])(),Object(a["createBlock"])(_,{forceOverTimeFlag:e.forceOverTimeFlag,controlMode:e.controlMode,seviceEquipmentList:e.seviceEquipmentList,onTriggerWork:e.triggerWork,id:"lightId",key:"lightId",userIsControl:e.userIsControl,spaceId:e.spaceInfo.spaceId,projectId:e.projectId},null,8,["forceOverTimeFlag","controlMode","seviceEquipmentList","onTriggerWork","userIsControl","spaceId","projectId"])):Object(a["createCommentVNode"])("",!0),e.spaceExistenceDevice.curtain?(Object(a["openBlock"])(),Object(a["createBlock"])(P,{spaceId:e.spaceInfo.spaceId,id:"curtainId",key:"curtainId",userIsControl:e.userIsControl,projectId:e.projectId},null,8,["spaceId","userIsControl","projectId"])):Object(a["createCommentVNode"])("",!0)]),Object(a["createVNode"])(z,{show:e.isShowWork,"onUpdate:show":t[5]||(t[5]=function(t){return e.isShowWork=t}),position:"right",class:"popup-content",teleport:"#app"},{default:Object(a["withCtx"])((function(){return[e.isShowWork&&1!==e.controlMode?(Object(a["openBlock"])(),Object(a["createBlock"])(R,{key:0,spaceInfo:e.spaceInfo,onCloseWork:e.closeWork,projectId:e.projectId,workkArr:e.workkArr},null,8,["spaceInfo","onCloseWork","projectId","workkArr"])):Object(a["createCommentVNode"])("",!0),e.isShowWork&&1===e.controlMode?(Object(a["openBlock"])(),Object(a["createBlock"])(H,{key:1,seviceEquipmentList:e.seviceEquipmentList,enterType:e.enterType,deviceItem:e.deviceItem,spaceInfo:e.spaceInfo,onCloseWork:e.closeWork,projectId:e.projectId,workkArr:e.workkArr},null,8,["seviceEquipmentList","enterType","deviceItem","spaceInfo","onCloseWork","projectId","workkArr"])):Object(a["createCommentVNode"])("",!0)]})),_:1},8,["show"]),Object(a["createVNode"])(z,{show:e.isShowMetting,"onUpdate:show":t[6]||(t[6]=function(t){return e.isShowMetting=t}),position:"right","close-on-click-overlay":!1,class:"popup-content",teleport:"#app"},{default:Object(a["withCtx"])((function(){return[Object(a["createVNode"])(Y,{secenaroStatus:e.secenaroStatus,onCloseDailog:e.closeDailog},null,8,["secenaroStatus","onCloseDailog"])]})),_:1},8,["show"]),Object(a["createVNode"])(z,{show:e.isShowDetail,"onUpdate:show":t[7]||(t[7]=function(t){return e.isShowDetail=t}),position:"right","close-on-click-overlay":!0,class:"popup-content",teleport:"#app"},{default:Object(a["withCtx"])((function(){return[e.isShowDetail?(Object(a["openBlock"])(),Object(a["createBlock"])(G,{key:0,query:e.detailQuery},null,8,["query"])):Object(a["createCommentVNode"])("",!0)]})),_:1},8,["show"]),Object(a["createVNode"])(z,{show:e.isShowMap,"onUpdate:show":t[8]||(t[8]=function(t){return e.isShowMap=t}),class:"map-popup",position:"bottom",style:{width:"100%",height:"70%"},"close-on-click-overlay":!0,teleport:"#app"},{default:Object(a["withCtx"])((function(){return[e.defaultSpace.spaceId&&e.isShowMap?(Object(a["openBlock"])(),Object(a["createBlock"])(J,{key:0,spaceData:e.copySpaceData,spaceInfo:e.defaultSpace,projectId:e.projectId,floorId:e.defaultSpace.floorId,buildingId:e.defaultSpace.buildingId,onChangeSpace:e.changeSpace},null,8,["spaceData","spaceInfo","projectId","floorId","buildingId","onChangeSpace"])):Object(a["createCommentVNode"])("",!0)]})),_:1},8,["show"]),e.isShowContact?(Object(a["openBlock"])(),Object(a["createBlock"])(X,{key:0,isShowContact:e.isShowContact,contantDetail:e.contantDetail,onCloseDailog:e.closeContactDailog},null,8,["isShowContact","contantDetail","onCloseDailog"])):Object(a["createCommentVNode"])("",!0)],4)}n("99af"),n("c740"),n("c975"),n("d81d"),n("fb6a"),n("b680"),n("d3b7"),n("ac1f"),n("25f0"),n("5319"),n("1276");var L=n("5530"),W=n("2909"),q=(n("96cf"),n("1da1")),M=n("ade3"),F=function(e){return Object(a["pushScopeId"])("data-v-7d28da75"),e=e(),Object(a["popScopeId"])(),e},U={class:"work-content"},_={class:"work-space"},P={class:"space-title"},R=F((function(){return Object(a["createElementVNode"])("div",{class:"device-tip"},"延时期间,空间相关设备会开启",-1)})),H={class:"add-time",id:"addTimeId"},z={key:0,class:"date_box"},Y=["onClick"],G={class:"sliders-list",id:"sliderListId"},J={class:"sliders"},X=["onClick","data-index"],K=F((function(){return Object(a["createElementVNode"])("div",{class:"start",id:"startId"},null,-1)})),$=F((function(){return Object(a["createElementVNode"])("div",{class:"end-box",id:"endBoxId"},[Object(a["createElementVNode"])("div",{class:"end",id:"endId"}),Object(a["createElementVNode"])("div",{class:"end-radio",id:"endRadioId"})],-1)})),Z=[K,$],Q={class:"add-time-btn"};function ee(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-loading");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",U,[Object(a["createElementVNode"])("div",_,[Object(a["createElementVNode"])("div",P,Object(a["toDisplayString"])(e.spaceInfo.spaceName)+" 申请延时",1),R]),Object(a["createElementVNode"])("div",H,[e.dateArr&&e.dateArr.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",z,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.dateArr,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["date-item",t.isActive?"date-item-active":""]),onClick:Object(a["withModifiers"])((function(a){return e.checkDate(t,n)}),["stop"]),key:"date"+n},[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.week),1),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.day),1)],10,Y)})),128))])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",G,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.nowTimerArr,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:"slider"+n,class:"sliders-wrapper",id:"slidersWrapperId"},[Object(a["createElementVNode"])("div",J,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",{class:"label"},Object(a["toDisplayString"])(t.timer),513),[[a["vShow"],0===n||n%2===0]]),Object(a["createElementVNode"])("div",{class:"slider-box",onClick:function(a){return e.checkSlider(t,n)},"data-index":n},null,8,X)])])})),128)),Object(a["createElementVNode"])("div",{class:"slider-btn",id:"sliderBtnId",onClick:t[0]||(t[0]=function(){return e.triggerDelTime&&e.triggerDelTime.apply(e,arguments)})},Z)])]),Object(a["createElementVNode"])("div",Q,[Object(a["createElementVNode"])("div",{class:"cancel-btn",onClick:t[1]||(t[1]=function(){return e.closeWorkTimer&&e.closeWorkTimer.apply(e,arguments)})},"取消"),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["comfirm-btn",e.formBtn?"comfirm-btn-diabled":""]),onClick:t[2]||(t[2]=function(){return e.addWorkTimer&&e.addWorkTimer.apply(e,arguments)})}," 提交申请 ",2)]),e.showLoading?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:0,class:"temp-loading"})):Object(a["createCommentVNode"])("",!0)])}var te=n("2241"),ne=(n("e17f"),n("c199")),ae=n("fe7e"),re=n("f691"),oe=n("8405"),ce=n("4a89"),ie=n("f465"),le=n("cdd8");const[se,me]=Object(ae["a"])("slider"),ue={min:Object(re["c"])(0),max:Object(re["c"])(100),step:Object(re["c"])(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:re["f"],buttonSize:re["f"],activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var de=Object(a["defineComponent"])({name:se,props:ue,emits:["change","drag-end","drag-start","update:modelValue"],setup(e,{emit:t,slots:n}){let r,o,c;const i=Object(a["ref"])(),l=Object(a["ref"])(),s=Object(le["a"])(),m=Object(a["computed"])(()=>Number(e.max)-Number(e.min)),u=Object(a["computed"])(()=>{const t=e.vertical?"width":"height";return{background:e.inactiveColor,[t]:Object(oe["b"])(e.barHeight)}}),d=t=>e.range&&Array.isArray(t),p=()=>{const{modelValue:t,min:n}=e;return d(t)?100*(t[1]-t[0])/m.value+"%":100*(t-Number(n))/m.value+"%"},f=()=>{const{modelValue:t,min:n}=e;return d(t)?100*(t[0]-Number(n))/m.value+"%":"0%"},b=Object(a["computed"])(()=>{const t=e.vertical?"height":"width",n={[t]:p(),background:e.activeColor};l.value&&(n.transition="none");const a=()=>e.vertical?e.reverse?"bottom":"top":e.reverse?"right":"left";return n[a()]=f(),n}),g=t=>{const n=+e.min,a=+e.max,r=+e.step;t=Object(oe["d"])(t,n,a);const o=Math.round((t-n)/r)*r;return Object(oe["a"])(n,o)},v=(e,t)=>JSON.stringify(e)===JSON.stringify(t),O=t=>{var n,a;const r=null!=(n=t[0])?n:Number(e.min),o=null!=(a=t[1])?a:Number(e.max);return r>o?[o,r]:[r,o]},j=(n,a)=>{n=d(n)?O(n).map(g):g(n),v(n,e.modelValue)||t("update:modelValue",n),a&&!v(n,c)&&t("change",n)},h=t=>{if(t.stopPropagation(),e.disabled||e.readonly)return;const{min:n,reverse:a,vertical:r,modelValue:o}=e,c=Object(ie["l"])(i),l=()=>r?a?c.bottom-t.clientY:t.clientY-c.top:a?c.right-t.clientX:t.clientX-c.left,s=r?c.height:c.width,u=Number(n)+l()/s*m.value;if(d(o)){const[e,t]=o,n=(e+t)/2;j(u<=n?[u,t]:[e,u],!0)}else j(u,!0)},T=t=>{e.disabled||e.readonly||(s.start(t),o=e.modelValue,c=d(o)?o.map(g):g(o),l.value="start")},k=n=>{if(e.disabled||e.readonly)return;"start"===l.value&&t("drag-start",n),Object(ce["e"])(n,!0),s.move(n),l.value="dragging";const a=Object(ie["l"])(i),u=e.vertical?s.deltaY.value:s.deltaX.value,p=e.vertical?a.height:a.width;let f=u/p*m.value;if(e.reverse&&(f=-f),d(c)){const t=e.reverse?1-r:r;o[t]=c[t]+f}else o=c+f;j(o)},I=n=>{e.disabled||e.readonly||("dragging"===l.value&&(j(o,!0),t("drag-end",n)),l.value="")},S=t=>{if("number"===typeof t){const e=["left","right"];return me("button-wrapper",e[t])}return me("button-wrapper",e.reverse?"left":"right")},y=(t,r)=>{if("number"===typeof r){const e=n[0===r?"left-button":"right-button"];if(e)return e({value:t})}return n.button?n.button({value:t}):Object(a["createVNode"])("div",{class:me("button"),style:Object(oe["f"])(e.buttonSize)},null)},x=t=>{const n="number"===typeof t?e.modelValue[t]:e.modelValue;return Object(a["createVNode"])("div",{role:"slider",class:S(t),tabindex:e.disabled?void 0:0,"aria-valuemin":e.min,"aria-valuenow":n,"aria-valuemax":e.max,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readonly||void 0,"aria-orientation":e.vertical?"vertical":"horizontal",onTouchstart:e=>{"number"===typeof t&&(r=t),T(e)},onTouchmove:k,onTouchend:I,onTouchcancel:I,onClick:ce["i"]},[y(n,t)])};return j(e.modelValue),Object(ie["h"])(()=>e.modelValue),()=>Object(a["createVNode"])("div",{ref:i,style:u.value,class:me({vertical:e.vertical,disabled:e.disabled}),onClick:h},[Object(a["createVNode"])("div",{class:me("bar"),style:b.value},[e.range?[x(0),x(1)]:x()])])}});const pe=Object(ne["a"])(de);var fe=pe,be=(n("68ef"),n("9617"),n("ac1e"),n("48a1")),ge=n("d257"),ve=n("459d"),Oe=Object(a["defineComponent"])({components:{VanSlider:fe},props:{workkArr:{type:Array,default:function(){return[]}},projectId:{type:String,default:function(){return""}},spaceInfo:{type:Object,default:function(){}}},setup:function(e,t){var n=Object(a["getCurrentInstance"])(),r={screenWidth:0,screenHeight:0},o=[],c=[],i=Object(ge["q"])(),l=[],s={},m="".concat(Object(ge["x"])("ipdImages","time-check.svg")),u="linear-gradient(0deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2)), url(".concat(m,")"),d=Object(ge["s"])(),p=Object(a["reactive"])({userInfo:d,isEvent:!1,screenInfo:r,projectId:e.projectId,workkArr:e.workkArr,bgRed:u,startIndex:0,endIndex:0,nowData:s,nowTimerArr:l,timerArr:i,startLen:0,formBtn:!1,showLoading:!1,setScreennWidth:function(){var e=document.querySelector("#addTimeId");p.screenInfo.screenWidth=e.offsetWidth},getNowIndex:function(){var e=Object(ge["k"])()[1];return e},getTomorrowIndex:function(){var e=0;return"今天"===p.nowData.week&&(e=Object(ge["k"])()[1]),e},getNowPerstion:function(e){var t=p.getNowIndex(),n={nowIndex:t,len:4},a=e[t].formatTimer,r=p.parseCusStartTime(p.nowData.cusStartTime),o=p.parseCusEndTime(p.nowData.cusEndTime);return a>=r&&a<=o?e.map((function(e,t){e.formatTimer===o&&(n.nowIndex=t)})):a<r&&e.map((function(e,a){e.formatTimer===r&&(n.len=a-t,n.len>4&&(n.len=4))})),n},setOptionnalTime:function(e){var t=document.querySelector("#sliderListId"),n=document.querySelector("#slidersWrapperId"),a=n.getBoundingClientRect().width;t.style.width=a*e.length+"px";var r=p.getNowPerstion(e).nowIndex,o=p.getNowPerstion(e).len,c=a*r;c>p.screenInfo.screenWidth+p.screenInfo.screenWidth/2&&(c-=a),t.style.left=-c+"px",p.setOptionnalPerstion(r,o)},sliderSwiper:function(){var e=document.querySelector("#sliderListId"),t=(document.querySelector("#slidersWrapperId"),0),n=e.offsetWidth-p.screenInfo.screenWidth;e.addEventListener("touchstart",(function(n){t=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left),t=Math.abs(t)})),Object(be["a"])(e,{swipeLeft:function(a){if(!p.checkMoveTarget(a)){var r=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);r=Math.abs(r),e.style.left=r>=n?-n+"px":-t-Math.abs(a.mation.moveX-a.mation.startX)+"px"}},swipeRight:function(n){if(!p.checkMoveTarget(n)){var a=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);e.style.left=a>=0?"0px":-t+Math.abs(n.mation.moveX-n.mation.startX)+"px"}}})},checkMoveTarget:function(e){var t=document.querySelector("#endBoxId"),n=document.querySelector("#endId"),a=document.querySelector("#endRadioId");return e.target===t||e.target===n||e.target===a},checkPersionService:function(){for(var e=!1,t=p.startIndex;t<p.endIndex;t++)if(p.nowTimerArr[t].isServiceTime){e=!0;break}p.formBtn=e},cancelRemoveListener:function(){var e=document.querySelector("#endBoxId");e.removeEventListener("touchstart",(function(e){}),!1),e.removeEventListener("touchend",(function(e){}),!1),e.removeEventListener("touchmove",(function(e){}),!1);var t=document.querySelector("#sliderListId");t.removeEventListener("touchstart",(function(e){}),!1),t.removeEventListener("touchend",(function(e){}),!1),t.removeEventListener("touchmove",(function(e){}),!1)},endBoxSwiper:function(){var e=document.querySelector("#sliderListId"),t=document.querySelector("#endBoxId"),n=document.querySelector("#sliderBtnId"),a=document.querySelector("#startId"),r=document.querySelectorAll(".slider-box")[0],o=0,c=0,i=0,l=0,s=!1;t.addEventListener("touchstart",(function(e){s=!1,isNaN(parseInt(a.style.left))?0:parseInt(a.style.left),o=isNaN(parseInt(n.style.left))?0:parseInt(n.style.left),i=n.offsetWidth,l=r.offsetWidth})),t.addEventListener("touchend",(function(e){if(s){i=n.offsetWidth;var t=Math.ceil(i/r.offsetWidth);p.startIndex+t>=p.timerArr.length-1&&(t=p.timerArr.length-1-p.startIndex),n.style.width=r.offsetWidth*t+"px",n.style.background="rgba(0,0,0,0.2)",p.setOptionnalPerstion(p.startIndex,t),s=!1,p.checkPersionService()}})),Object(be["a"])(t,{swipeLeft:function(t){if(p.checkMoveTarget(t)){0,s=!0;var a=Math.abs(t.mation.moveX-t.mation.startX),c=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);c=Math.abs(c);var m=r.offsetWidth;i-a<=m?n.style.width=m+"px":(n.style.width=i-a+"px",p.cancelSliderBoxColor());Object(ge["x"])("ipdImages","time-wait.svg");if(n.style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))",o+(i-a)-l<c){var u=c+l-(o+i-a)-c;e.style.left=u>0?"0px":u+"px"}}},swipeRight:function(t){if(p.checkMoveTarget(t)){s=!0,1;var a=Math.abs(t.mation.moveX-t.mation.startX);n.style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))";var l=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);l=Math.abs(l);var m=e.offsetWidth-p.screenInfo.screenWidth;if(c=l+p.screenInfo.screenWidth,o+i+a+2*r.offsetWidth>=c){var u=-l-(o+i+a+2*r.offsetWidth-c);e.style.left=u+"px",l>=m&&(e.style.left=-m+"px")}o+i+a+r.offsetWidth>=e.offsetWidth?n.style.width=e.offsetWidth-o-r.offsetWidth+"px":n.style.width=i+a+"px"}}})},cancelSliderBoxColor:function(){for(var e=document.querySelectorAll(".slider-box"),t=0;t<e.length;t++)p.nowTimerArr[t].isCheck||t>=p.startIndex&&t<p.startIndex+p.startLen&&(e[t].style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))")},setOptionnalPerstion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;document.querySelector("#sliderListId");p.startIndex=e,p.startLen=t,p.endIndex=p.startIndex+t;for(var n=document.querySelector("#slidersWrapperId"),a=n.getBoundingClientRect().width,r=document.querySelector("#sliderBtnId"),o=(document.querySelector("#endBoxId"),document.querySelectorAll(".slider-box")),c=p.getTomorrowIndex(),i=0;i<o.length;i++)i>=c&&(o[i].style.background="transparent");for(var l=Object(ge["x"])("ipdImages","time-wait.svg"),s=0;s<t;s++)o[e+s].style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2)), url(".concat(l,")");r.style.width=a*t+"px",r.style.background="rgba(0,0,0,0.2)";var m=a*e;r.style.left=m+"px",p.setCheckTimeStyle(),p.setServiceTimerStyle()},setPastTime:function(e){if("今天"===p.nowData.week)for(var t=document.querySelectorAll(".slider-box"),n=0;n<t.length;n++)n<e&&(t[n].style.background="rgba(196, 196, 196, 0.2)")},setCheckTimeStyle:function(){for(var e=p.nowTimerArr,t=document.querySelectorAll(".slider-box"),n=0;n<e.length;n++)e[n].isCheck&&(t[n].style.background=p.bgRed)},setServiceTimerStyle:function(){for(var e=p.nowTimerArr,t=document.querySelectorAll(".slider-box"),n=0;n<e.length;n++)e[n].isServiceTime&&(t[n].style.background="rgba(196, 196, 196, 0.2)")},parseCusStartTime:function(e){var t=e;if(e){var n=e/100%100;if(n){var a=e/1e4;a=parseInt(a),n<30?t=a<10?"0"+a+"3000":a+"3000":n>30&&(a+=1,t=a<10?"0"+a+"0000":a+"0000")}}return t},parseCusEndTime:function(e){var t=e;if(e){var n=e/100%100;if(n){var a=e/1e4;a=parseInt(a),n<30?t=a<10?"0"+a+"0000":a+"0000":n>30&&(t=a<10?"0"+a+"3000":a+"3000")}}return t},checkSlider:function(e,t){if(t!==p.nowTimerArr.length-1){p.formBtn=!1;var n=p.getNowIndex();if(!("今天"===p.nowData.week&&t<n)){if(p.nowData.cusStartTime&&p.nowData.cusEndTime){var a=p.nowTimerArr[t].formatTimer,r=p.parseCusStartTime(p.nowData.cusStartTime),o=p.parseCusEndTime(p.nowData.cusEndTime);if(a>=r&&a<o)return}p.setOptionnalPerstion(t)}}},dateArr:o,myTimeArr:c,setWorkTimeList:function(){p.isUpdate=!1,n.proxy.$loadinngEnd();var e=p.workkArr;p.dateArr=[];for(var t=Object(ge["a"])("YYYY-MM-DD"),a=function(n){var a,r,o=Object(ge["b"])(e[n].date),c=p.parseCusStartTime(e[n].cusStartTime),i=p.parseCusEndTime(e[n].cusEndTime),l=Object(ge["t"])(new Date(o).getDay());o===t&&(l="今天");for(var s=[],m=0;m<p.timerArr.length;m++){var u={timer:p.timerArr[m],isCheck:!1,formatTimer:p.timerArr[m].replace(/[:]/g,"")+"00"};s.push(u)}var d=null!==(a=null===(r=e[n])||void 0===r?void 0:r.customSceneList)&&void 0!==a?a:[];d.map((function(e){for(var t=0;t<s.length;t++)if(s[t].formatTimer<c){var n=p.parseCusStartTime(e.startTime),a=p.parseCusStartTime(e.endTime);s[t].formatTimer>=n&&s[t].formatTimer<a&&(s[t].isCheck=!0)}else{var r=p.parseCusEndTime(e.startTime),o=p.parseCusEndTime(e.endTime);s[t].formatTimer>=r&&s[t].formatTimer<o&&(s[t].isCheck=!0)}})),c&&i&&s.map((function(e){e.formatTimer>=c&&e.formatTimer<i?e.isServiceTime=!0:e.isServiceTime=!1})),p.dateArr.push({date:o,isActive:!1,oldDate:e[n].date,objectId:e[n].objectId,cusStartTime:e[n].cusStartTime,customSceneList:d,cusEndTime:e[n].cusEndTime,day:Object(ge["g"])(new Date(o)),week:l,timerArr:s})},r=0;r<e.length;r++)a(r);p.dateArr.map((function(e,t){t!==p.activeIndex||p.checkDate(e,t)}))},clearTimerBoxStyle:function(){p.dateArr.map((function(e){e.isActive=!1}));for(var e=p.nowTimerArr,t=document.querySelectorAll(".slider-box"),n=0;n<e.length;n++)t[n].style.background="transparent"},activeIndex:0,checkDate:function(e,t){p.clearTimerBoxStyle(),e.isActive=!0,p.activeIndex=t,p.nowTimerArr=p.dateArr[t].timerArr,p.nowData=p.dateArr[t],Object(a["nextTick"])((function(){p.setOptionnalTime(p.nowTimerArr);var e=p.getNowIndex();"今天"===p.nowData.week&&p.setPastTime(e),p.setCheckTimeStyle(),p.setServiceTimerStyle(),p.isEvent||(p.changeEl(),p.isEvent=!0)}))},flag:!1,changeEl:function(){p.setScreennWidth(),p.sliderSwiper(),p.endBoxSwiper()},formateAddTimer:function(){var e=p.nowData.customSceneList,t=p.nowData.timerArr,n=t[p.startIndex].formatTimer,a=t[p.endIndex].formatTimer,r=[];e.map((function(e,t){if(n<e.startTime){if(a<e.startTime);else if(a>=e.startTime){var o=p.formaTimeObj(e,"1",e.startTime,e.endTime);r.push(o),n=n,a=a}}else if(n>=e.startTime&&n<e.endTime){if(a<=e.endTime){var c=p.formaTimeObj(e,"1",e.startTime,e.endTime);r.push(c),n=n,a=a}else if(a>e.endTime){var i=p.formaTimeObj(e,"1",e.startTime,e.endTime);r.push(i),n=e.startTime,a=a}}else if(n>=e.endTime){if(n===e.endTime){var l=p.formaTimeObj(e,"1",e.startTime,e.endTime);r.push(l),n=e.startTime,a=a}}else n===e.startTime&&e.endTime}));var o=p.parseCusStartTime(p.nowData.cusStartTime),c=p.parseCusEndTime(p.nowData.cusEndTime);n<o&&a<=o?a===o&&(a=p.nowData.cusStartTime):n>=c&&n===c&&(n=p.nowData.cusEndTime);var i=Object(ge["n"])(),l="0";"今天"===p.nowData.week&&i>=n&&i<=a&&(l="2");var s=p.formaTimeObj(e[0],l,n,a);r.push(s);var m=r;return m},formaTimeObj:function(e,t,n,a){var r={projectId:p.projectId,objectId:p.nowData.objectId,sourceType:p.userInfo.pubname,startDate:p.nowData.oldDate,endDate:p.nowData.oldDate,startTime:n,endTime:a,type:t,userId:p.userInfo.userId,userPhone:p.userInfo.userPhone,customSceneEqType:"ALL",userName:p.userInfo.userName};return"1"===t&&(r.id=e.id),r},formateDelTimer:function(){var e=p.nowData.timerArr,t=p.endIndex>0?p.endIndex-1:0;if(e[p.startIndex].isCheck&&e[t].isCheck){for(var n=p.nowData.customSceneList||[],a=e[p.startIndex].formatTimer,r=e[p.endIndex].formatTimer,o=[],c=[],i=0;i<n.length;i++){var l=n[i];if(a==l.startTime&&r==l.endTime){var s=p.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(s);break}if(l.startTime<a){if(l.endTime<=r){var m=p.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(m);var u=p.formaTimeObj(n[0],"0",l.startTime,a);c.push(u)}else if(l.endTime>r){var d=p.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(d);var f=p.formaTimeObj(n[0],"0",l.startTime,a);c.push(f);var b=p.formaTimeObj(n[0],"0",r,l.endTime);c.push(b)}}else if(l.startTime===l.startTime){if(l.endTime<=r){var g=p.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(g)}else if(l.endTime>r){var v=p.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(v);var O=p.formaTimeObj(n[0],"0",r,l.endTime);c.push(O)}}else if(l.startTime>a)if(l.endTime<=r){var j=p.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(j)}else if(l.endTime>r){var h=p.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(h);var T=p.formaTimeObj(n[0],"0",r,l.endTime);c.push(T)}}var k=c.concat(o);return k}return[]},closeWorkTimer:function(){p.formBtn=!1,t.emit("closeWork")},addWorkTimer:function(){var e=p.formateAddTimer();p.saveBatchCustomScene(e)},saveBatchCustomScene:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;p.showLoading=!0,p.formBtn=!0,Object(ve["K"])(e).then((function(e){1===n?p.showLoading=!1:2===n&&(p.isUpdate=!0,p.showLoading=!1),t.emit("closeWork"),p.formBtn=!1})).catch((function(){p.showLoading=!1}))},isUpdate:!1,triggerDelTime:function(){var e=p.formateDelTimer();e&&e.length&&te["a"].confirm({title:"确认",message:"确定删除当前时间吗?"}).then((function(){p.saveBatchCustomScene(e,2)})).catch((function(){}))}});return Object(a["watch"])(e,(function(e){p.workkArr=e.workkArr,p.projectId=e.projectId,p.isUpdate&&p.setWorkTimeList()})),Object(a["onMounted"])((function(){p.setWorkTimeList()})),Object(L["a"])({},Object(a["toRefs"])(p))}}),je=(n("5d42"),n("6b0d")),he=n.n(je);const Te=he()(Oe,[["render",ee],["__scopeId","data-v-7d28da75"]]);var ke=Te,Ie=function(e){return Object(a["pushScopeId"])("data-v-545aa93e"),e=e(),Object(a["popScopeId"])(),e},Se={class:"work-content"},ye={class:"work-space"},xe={class:"space-title"},we={class:"add-time",id:"addTimeId"},Ce={key:0,class:"date_box"},Ee=["onClick"],De={class:"sliders-list",id:"sliderListId"},Ne={class:"sliders"},Ve=["onClick","data-index"],Be=["onClick"],Ae=Ie((function(){return Object(a["createElementVNode"])("div",{class:"start",id:"startId"},null,-1)})),Le=Ie((function(){return Object(a["createElementVNode"])("div",{class:"end-box",id:"endBoxId"},[Object(a["createElementVNode"])("div",{class:"end",id:"endId"}),Object(a["createElementVNode"])("div",{class:"end-radio",id:"endRadioId"})],-1)})),We=[Ae,Le],qe={class:"add-time-btn"},Me={key:0,class:"device-title"},Fe=Ie((function(){return Object(a["createElementVNode"])("span",{class:"line"},null,-1)})),Ue=Ie((function(){return Object(a["createElementVNode"])("span",{class:"text"},"预约开启设备",-1)})),_e=Ie((function(){return Object(a["createElementVNode"])("span",{class:"line"},null,-1)})),Pe=[Fe,Ue,_e],Re={class:"work-device"},He=Ie((function(){return Object(a["createElementVNode"])("div",{class:"row-title"},"空调",-1)})),ze={class:"device-box"},Ye=["onClick"],Ge={class:"row-item"},Je=["src"],Xe=Ie((function(){return Object(a["createElementVNode"])("div",{class:"row-title"},"照明",-1)})),Ke={class:"device-box"},$e=["onClick"],Ze={class:"row-item"},Qe=["src"],et={key:2,class:"device-tip"},tt=Ie((function(){return Object(a["createElementVNode"])("span",null,"计费方式:",-1)})),nt=Ie((function(){return Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",null," * "),Object(a["createTextVNode"])(" 空调延时采用后付费方式,系统将根据您申请的时间产生延时费用。预约时间下您可自由开启空间下的设备。 ")],-1)})),at=Ie((function(){return Object(a["createElementVNode"])("p",null," 收费标准按开机设备对应空间的面积计费,空调加时费用按0.4元/m²·h进行计费,照明设备延时使用不计费。 ",-1)})),rt=Ie((function(){return Object(a["createElementVNode"])("p",null," 如您提前结束工作,请点击“我要离开”按钮,系统会自动调整设备关闭时间,感谢与您一同共创可持续的办公环境。 ",-1)})),ot=[tt,nt,at,rt];function ct(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-loading");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Se,[Object(a["createElementVNode"])("div",ye,[Object(a["createElementVNode"])("div",xe,Object(a["toDisplayString"])(e.spaceInfo.spaceName)+" 申请延时",1)]),Object(a["createElementVNode"])("div",we,[e.dateArr&&e.dateArr.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ce,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.dateArr,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["date-item",t.isActive?"date-item-active":""]),onClick:Object(a["withModifiers"])((function(a){return e.checkDate(t,n)}),["stop"]),key:"date"+n},[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.week),1),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.day),1)],10,Ee)})),128))])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",De,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.nowTimerArr,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:"slider"+n,class:"sliders-wrapper",id:"slidersWrapperId"},[Object(a["createElementVNode"])("div",Ne,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",{class:"label"},Object(a["toDisplayString"])(t.timer),513),[[a["vShow"],0===n||n%2===0]]),Object(a["createElementVNode"])("div",{class:"slider-box",onClick:function(a){return e.checkSlider(t,n)},"data-index":n},null,8,Ve)])])})),128)),e.approvalData&&e.approvalData.length?(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],{key:0},Object(a["renderList"])(e.approvalData,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"approval-status",style:Object(a["normalizeStyle"])([{width:"60px"},{left:t.left+"px",background:t.bg}]),key:"approval"+n,onClick:function(n){return e.checkApprovalStatus(t,n)}},Object(a["toDisplayString"])(t.text),13,Be)})),128)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",{class:"slider-btn",id:"sliderBtnId",onClick:t[0]||(t[0]=function(){return e.triggerDelTime&&e.triggerDelTime.apply(e,arguments)})},We)])]),Object(a["createElementVNode"])("div",qe,[Object(a["createElementVNode"])("div",{class:"cancel-btn",onClick:t[1]||(t[1]=function(){return e.closeWorkTimer&&e.closeWorkTimer.apply(e,arguments)})},"取消"),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["comfirm-btn",e.formBtn?"comfirm-btn-diabled":""]),onClick:t[2]||(t[2]=function(){return e.addWorkTimer&&e.addWorkTimer.apply(e,arguments)})}," 提交申请 ",2)]),e.isLight||e.isAir?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Me,Pe)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Re,[e.isAir?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[He,Object(a["createElementVNode"])("div",ze,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.nowData.equipmentList,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:"eq"+n},["SELTLT"!==t.equipmentCategory?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"device-row",style:Object(a["normalizeStyle"])({width:1==e.airNum?"98%":"48%"}),onClick:function(n){return e.checkEquipment(t)}},[Object(a["createElementVNode"])("div",Ge,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.localName),1),Object(a["createElementVNode"])("img",{src:t.isCheck?e.parseImgUrl("ipdImages","check-open.svg"):e.parseImgUrl("ipdImages","check-close.svg"),alt:""},null,8,Je)])],12,Ye)):Object(a["createCommentVNode"])("",!0)],64)})),128))])],64)):Object(a["createCommentVNode"])("",!0),e.isLight?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:1},[Xe,Object(a["createElementVNode"])("div",Ke,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.nowData.equipmentList,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:"eq"+n},["SELTLT"===t.equipmentCategory?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"device-row",style:Object(a["normalizeStyle"])({width:1==e.lightNum?"98%":"48%"}),onClick:function(n){return e.checkEquipment(t)}},[Object(a["createElementVNode"])("div",Ze,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.localName),1),Object(a["createElementVNode"])("img",{src:t.isCheck?e.parseImgUrl("ipdImages","check-open.svg"):e.parseImgUrl("ipdImages","check-close.svg"),alt:""},null,8,Qe)])],12,$e)):Object(a["createCommentVNode"])("",!0)],64)})),128))])],64)):Object(a["createCommentVNode"])("",!0),e.isLight||e.isAir?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",et,ot)):Object(a["createCommentVNode"])("",!0)]),e.showLoading?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:1,class:"temp-loading"})):Object(a["createCommentVNode"])("",!0)])}n("13d5"),n("a434"),n("a9e3");var it=Object(a["defineComponent"])({components:{VanSlider:fe},props:{workkArr:{type:Array,default:function(){return[]}},projectId:{type:String,default:function(){return""}},spaceInfo:{type:Object,default:function(){}},enterType:{type:Number,default:function(){return 1}},deviceItem:{type:Object,default:function(){return null}},seviceEquipmentList:{type:Array,default:function(){return[]}}},setup:function(e,t){var n=Object(a["getCurrentInstance"])(),r={screenWidth:0,screenHeight:0},o=[],c=[],i=Object(ge["q"])(),l=[],s={},m=[],u="".concat(Object(ge["x"])("ipdImages","time-check.svg")),d="linear-gradient(0deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2)), url(".concat(u,")"),p=Object(ge["s"])(),f=Object(a["reactive"])({userInfo:p,seviceEquipmentList:e.seviceEquipmentList,parseImgUrl:ge["x"],isEvent:!1,screenInfo:r,projectId:e.projectId,workkArr:e.workkArr,bgRed:d,startIndex:0,endIndex:0,nowData:s,nowTimerArr:l,timerArr:i,startLen:0,formBtn:!1,showLoading:!1,deviceItem:e.deviceItem,enterType:e.enterType,setScreennWidth:function(){var e=document.querySelector("#addTimeId");f.screenInfo.screenWidth=e.offsetWidth},getNowIndex:function(){var e=Object(ge["k"])()[1];return e},getTomorrowIndex:function(){var e=0;return"今天"===f.nowData.week&&(e=Object(ge["k"])()[1]),e},getTimerIndex:function(e,t){var n=0;return e.map((function(e,a){e.formatTimer==t&&(n=a)})),n},getNowPerstion:function(e){var t=f.getNowIndex(),n={nowIndex:t,len:4},a=e[t].formatTimer,r=f.parseCusStartTime(f.nowData.cusStartTime),o=f.parseCusEndTime(f.nowData.cusEndTime),c=f.nowData.spaceCustomContentList||[];if(a>=r&&a<=o){e.map((function(e,t){e.formatTimer===o&&(n.nowIndex=t)}));var i=e[t+n.len].formatTimer;c.map((function(t){var a=f.parseCusStartTime(t.startTime);if(a>o&&i>a){var r=f.getTimerIndex(e,a);n.len=r-n.nowIndex>0?r-n.nowIndex:0}}))}else if(a<r)e.map((function(e,a){e.formatTimer===r&&(n.len=a-t,n.len>4&&(n.len=4))}));else if(a>=o){var l=e[t+n.len].formatTimer;c.map((function(t){var a=f.parseCusStartTime(t.startTime);if(a>o&&l>a){var r=f.getTimerIndex(e,a);n.len=r-n.nowIndex>0?r-n.nowIndex:0}}))}return n},setNowBarPerstion:function(e){var t=document.querySelector("#sliderListId"),n=f.getSliderWapperWidth();t.style.width=n*e.length+"px";var a=f.getNowPerstion(e).nowIndex,r=f.getNowPerstion(e).len,o=n*a;o>f.screenInfo.screenWidth+f.screenInfo.screenWidth/2&&(o-=n),t.style.left=-o+"px",f.setOptionnalPerstion(a,r)},sliderSwiper:function(){var e=document.querySelector("#sliderListId"),t=(document.querySelector("#slidersWrapperId"),0),n=e.offsetWidth-f.screenInfo.screenWidth;e.addEventListener("touchstart",(function(n){t=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left),t=Math.abs(t)})),Object(be["a"])(e,{swipeLeft:function(a){if(!f.checkMoveTarget(a)){var r=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);r=Math.abs(r),e.style.left=r>=n?-n+"px":-t-Math.abs(a.mation.moveX-a.mation.startX)+"px"}},swipeRight:function(n){if(!f.checkMoveTarget(n)){var a=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);e.style.left=a>=0?"0px":-t+Math.abs(n.mation.moveX-n.mation.startX)+"px"}}})},checkMoveTarget:function(e){var t=document.querySelector("#endBoxId"),n=document.querySelector("#endId"),a=document.querySelector("#endRadioId");return e.target===t||e.target===n||e.target===a},checkPersionService:function(){for(var e=!1,t=f.startIndex;t<f.endIndex;t++)if(f.nowTimerArr[t].isServiceTime){e=!0;break}f.formBtn=e},cancelRemoveListener:function(){var e=document.querySelector("#endBoxId");e.removeEventListener("touchstart",(function(e){}),!1),e.removeEventListener("touchend",(function(e){}),!1),e.removeEventListener("touchmove",(function(e){}),!1);var t=document.querySelector("#sliderListId");t.removeEventListener("touchstart",(function(e){}),!1),t.removeEventListener("touchend",(function(e){}),!1),t.removeEventListener("touchmove",(function(e){}),!1)},endBoxSwiper:function(){var e=document.querySelector("#sliderListId"),t=document.querySelector("#endBoxId"),n=document.querySelector("#sliderBtnId"),a=document.querySelector("#startId"),r=document.querySelectorAll(".slider-box")[0],o=0,c=0,i=0,l=0,s=!1;t.addEventListener("touchstart",(function(e){s=!1,isNaN(parseInt(a.style.left))?0:parseInt(a.style.left),o=isNaN(parseInt(n.style.left))?0:parseInt(n.style.left),i=n.offsetWidth,l=r.offsetWidth})),t.addEventListener("touchend",(function(e){if(s){i=n.offsetWidth;var t=Math.ceil(i/r.offsetWidth);f.startIndex+t>=f.timerArr.length-1&&(t=f.timerArr.length-1-f.startIndex),n.style.width=r.offsetWidth*t+"px",n.style.background="rgba(0,0,0,0.2)",f.setOptionnalPerstion(f.startIndex,t),s=!1,f.checkPersionService()}})),Object(be["a"])(t,{swipeLeft:function(t){if(f.checkMoveTarget(t)){0,s=!0;var a=Math.abs(t.mation.moveX-t.mation.startX),c=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);c=Math.abs(c);var m=r.offsetWidth;i-a<=m?n.style.width=m+"px":(n.style.width=i-a+"px",f.cancelSliderBoxColor());Object(ge["x"])("ipdImages","time-wait.svg");if(n.style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))",o+(i-a)-l<c){var u=c+l-(o+i-a)-c;e.style.left=u>0?"0px":u+"px"}}},swipeRight:function(t){if(f.checkMoveTarget(t)){s=!0,1;var a=Math.abs(t.mation.moveX-t.mation.startX);n.style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))";var l=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);l=Math.abs(l);var m=e.offsetWidth-f.screenInfo.screenWidth;if(c=l+f.screenInfo.screenWidth,o+i+a+2*r.offsetWidth>=c){var u=-l-(o+i+a+2*r.offsetWidth-c);e.style.left=u+"px",l>=m&&(e.style.left=-m+"px")}o+i+a+r.offsetWidth>=e.offsetWidth?n.style.width=e.offsetWidth-o-r.offsetWidth+"px":n.style.width=i+a+"px"}}})},cancelSliderBoxColor:function(){for(var e=document.querySelectorAll(".slider-box"),t=0;t<e.length;t++)f.nowTimerArr[t].isCheck||t>=f.startIndex&&t<f.startIndex+f.startLen&&(e[t].style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))")},setOptionnalPerstion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;document.querySelector("#sliderListId");f.startIndex=e,f.startLen=t,f.endIndex=f.startIndex+t;for(var n=document.querySelector("#slidersWrapperId"),a=n.getBoundingClientRect().width,r=document.querySelector("#sliderBtnId"),o=(document.querySelector("#endBoxId"),document.querySelectorAll(".slider-box")),c=f.getTomorrowIndex(),i=0;i<o.length;i++)i>=c&&(o[i].style.background="transparent");for(var l=Object(ge["x"])("ipdImages","time-wait.svg"),s=0;s<t;s++)o[e+s].style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2)), url(".concat(l,")");r.style.width=a*t+"px",r.style.background="rgba(0,0,0,0.2)";var m=a*e;r.style.left=m+"px",f.setCheckTimeStyle(),f.setServiceTimerStyle(),f.setPastTime()},setPastTime:function(){if("今天"===f.nowData.week)for(var e=f.getNowIndex(),t=document.querySelectorAll(".slider-box"),n=0;n<t.length;n++)n<e&&(t[n].style.background="rgba(196, 196, 196, 0.2)")},setCheckTimeStyle:function(){for(var e=f.nowTimerArr,t=document.querySelectorAll(".slider-box"),n=0;n<e.length;n++)e[n].isCheck&&(t[n].style.background=f.bgRed)},setServiceTimerStyle:function(){for(var e=f.nowTimerArr,t=document.querySelectorAll(".slider-box"),n=0;n<e.length;n++)e[n].isServiceTime&&(t[n].style.background="rgba(196, 196, 196, 0.2)")},parseCusStartTime:function(e){var t=e;if(e){var n=e/100%100;if(n){var a=e/1e4;a=parseInt(a),n<30?t=a<10?"0"+a+"3000":a+"3000":n>30&&(a+=1,t=a<10?"0"+a+"0000":a+"0000")}}return t},parseCusEndTime:function(e){var t=e;if(e){var n=e/100%100;if(n){var a=e/1e4;a=parseInt(a),n<30?t=a<10?"0"+a+"0000":a+"0000":n>30&&(t=a<10?"0"+a+"3000":a+"3000")}}return t},checkSlider:function(e,t){if(t!==f.nowTimerArr.length-1){f.formBtn=!1;var n=f.getNowIndex();if(!("今天"===f.nowData.week&&t<n)){var a=f.nowData.spaceCustomContentList||[],r=f.nowTimerArr[t].formatTimer,o=!1;a.map((function(e){var t=f.parseCusStartTime(e.startTime),n=f.parseCusEndTime(e.endTime);r>=t&&r<n&&(o=!0)})),o||f.setOptionnalPerstion(t)}}},dateArr:o,myTimeArr:c,isAir:!1,isLight:!1,lightNum:0,airNum:0,formateEquipment:function(){f.isLight=!1,f.isAir=!1,f.lightNum=0,f.airNum=0,f.nowData&&f.nowData.equipmentList&&f.nowData.equipmentList.length&&(1===f.enterType?f.nowData.equipmentList.map((function(e){e.isCheck=!0})):2===f.enterType?f.deviceItem&&f.deviceItem.id?f.nowData.equipmentList.map((function(e){"SELTLT"!==e.equipmentCategory&&f.deviceItem.id==e.id?e.isCheck=!0:e.isCheck=!1})):f.nowData.equipmentList.map((function(e){"SELTLT"!==e.equipmentCategory?e.isCheck=!0:e.isCheck=!1})):f.deviceItem&&f.deviceItem.id?f.nowData.equipmentList.map((function(e){"SELTLT"===e.equipmentCategory&&f.deviceItem.id==e.id?e.isCheck=!0:e.isCheck=!1})):f.nowData.equipmentList.map((function(e){"SELTLT"===e.equipmentCategory?e.isCheck=!0:e.isCheck=!1})),f.nowData.equipmentList.map((function(e){"SELTLT"==e.equipmentCategory&&(f.isLight=!0,f.lightNum++),"SELTLT"!==e.equipmentCategory&&(f.isAir=!0,f.airNum++)})))},isCusTimeBefore:function(e,t){var n=!1;return e.map((function(e){t<e.startTime&&(n=!0)})),n},setWorkTimeList:function(){f.isUpdate=!1,n.proxy.$loadinngEnd();var e=f.workkArr;f.dateArr=[];for(var t=Object(ge["a"])("YYYY-MM-DD"),a=function(n){var a,r,o=Object(ge["b"])(e[n].date),c=e[n].spaceCustomContentList||[],i=Object(ge["t"])(new Date(o).getDay());o===t&&(i="今天");for(var l=[],s=0;s<f.timerArr.length;s++){var m={timer:f.timerArr[s],isCheck:!1,isServiceTime:!1,formatTimer:f.timerArr[s].replace(/[:]/g,"")+"00"};l.push(m)}var u=null!==(a=null===(r=e[n])||void 0===r?void 0:r.customSceneList)&&void 0!==a?a:[];u.map((function(e){for(var t=0;t<l.length;t++)if(f.isCusTimeBefore(c,e.endTime)){var n=f.parseCusStartTime(e.startTime),a=f.parseCusStartTime(e.endTime);l[t].formatTimer>=n&&l[t].formatTimer<a&&(l[t].isCheck=!0)}else{var r=f.parseCusEndTime(e.startTime),o=f.parseCusEndTime(e.endTime);l[t].formatTimer>=r&&l[t].formatTimer<o&&(l[t].isCheck=!0)}})),c.map((function(e){var t=f.parseCusStartTime(e.startTime),n=f.parseCusEndTime(e.endTime);t&&n&&l.map((function(e){e.formatTimer>=t&&e.formatTimer<n&&(e.isServiceTime=!0)}))})),f.dateArr.push({date:o,isActive:!1,equipmentList:e[n].equipmentList||[],oldDate:e[n].date,objectId:e[n].objectId,cusStartTime:e[n].cusStartTime,customSceneList:u,cusEndTime:e[n].cusEndTime,spaceCustomContentList:e[n].spaceCustomContentList||[],day:Object(ge["g"])(new Date(o)),week:i,timerArr:l})},r=0;r<e.length;r++)a(r);f.dateArr.map((function(e,t){t!==f.activeIndex||f.checkDate(e,t)}))},clearTimerBoxStyle:function(){f.dateArr.map((function(e){e.isActive=!1}));for(var e=f.nowTimerArr,t=document.querySelectorAll(".slider-box"),n=0;n<e.length;n++)t[n].style.background="transparent"},activeIndex:0,checkApprovalStatus:function(e,t){if(t.target){var n=.7*t.target.offsetWidth,a=e.left-1.5*n+t.offsetX,r=document.querySelectorAll(".slider-box")[0],o=r.offsetWidth,c=Math.ceil(a/o);f.checkSlider({},c)}},approvalData:m,getSliderWapperWidth:function(){var e=document.querySelector("#slidersWrapperId"),t=e.getBoundingClientRect().width;return t},formateApproveStatusPerstion:function(){f.nowData&&function(){var e=f.nowData.customSceneList||[],t=f.getSliderWapperWidth();f.approvalData=[];for(var n=0;n<e.length;n++){var a=e[n],r={left:0,bg:"",index:0,approvalStatus:a.approvalStatus,text:""};0==a.approvalStatus?(r.text="待审批",r.bg="rgba(65, 107, 255, 0.6)"):1==a.approvalStatus?(r.text="已通过",r.bg="rgba(24, 196, 93, 0.6)"):2==a.approvalStatus&&(r.text="已拒绝",r.bg="rgba(255, 54, 54, 0.6)"),r.text&&function(){var e=f.parseCusStartTime(a.startTime),n=f.parseCusEndTime(a.endTime),o=Object(ge["n"])(),c=f.nowTimerArr,i=0,l=0;c.map((function(a,r){a.formatTimer==e&&t&&(i=t*r),a.formatTimer==n&&t&&(l=t*r)})),r.left=i+.5*(l-i)-18,o<n&&f.approvalData.push(r)}()}}()},checkDate:function(e,t){f.clearTimerBoxStyle(),e.isActive=!0,f.activeIndex=t,f.nowTimerArr=f.dateArr[t].timerArr,f.nowData=f.dateArr[t],f.formateEquipment(),Object(a["nextTick"])((function(){f.setNowBarPerstion(f.nowTimerArr);f.getNowIndex();f.setCheckTimeStyle(),f.setServiceTimerStyle(),"今天"===f.nowData.week&&f.setPastTime(),f.formateApproveStatusPerstion(),f.isEvent||(f.changeEl(),f.isEvent=!0)}))},flag:!1,changeEl:function(){f.setScreennWidth(),f.sliderSwiper(),f.endBoxSwiper()},formateAddTimer:function(){var e=f.nowData.customSceneList,t=f.nowData.timerArr,n=t[f.startIndex].formatTimer,a=t[f.endIndex].formatTimer,r=[];e.map((function(e,t){if(n<e.startTime){if(a<e.startTime);else if(a>=e.startTime){var o=f.formaTimeObj(e,"1",e.startTime,e.endTime);r.push(o),n=n,a=a}}else if(n>=e.startTime&&n<e.endTime){if(a<=e.endTime){var c=f.formaTimeObj(e,"1",e.startTime,e.endTime);r.push(c),n=n,a=a}else if(a>e.endTime){var i=f.formaTimeObj(e,"1",e.startTime,e.endTime);r.push(i),n=e.startTime,a=a}}else if(n>=e.endTime){if(n===e.endTime){var l=f.formaTimeObj(e,"1",e.startTime,e.endTime);r.push(l),n=e.startTime,a=a}}else n===e.startTime&&e.endTime}));var o=f.parseCusStartTime(f.nowData.cusStartTime),c=f.parseCusEndTime(f.nowData.cusEndTime);n<o&&a<=o?a===o&&(a=f.nowData.cusStartTime):n>=c&&n===c&&(n=f.nowData.cusEndTime);var i=Object(ge["n"])(),l="0";"今天"===f.nowData.week&&i>=n&&i<=a&&(l="2");var s=f.formaTimeObj(e[0],l,n,a);r.push(s);var m=r;return m},formaTimeObj:function(e,t,n,a){var r={projectId:f.projectId,sceneEquipList:e&&e.sceneEquipList?e.sceneEquipList:[],objectId:f.nowData.objectId,sourceType:f.userInfo.pubname,startDate:f.nowData.oldDate,endDate:f.nowData.oldDate,startTime:n,endTime:a,type:t,userId:f.userInfo.userId,userPhone:f.userInfo.userPhone,customSceneEqType:"ALL",userName:f.userInfo.userName};return"1"===t&&(r.id=e.id),r},formateDelTimer:function(){var e=f.nowData.timerArr,t=f.endIndex>0?f.endIndex-1:0;if(e[f.startIndex].isCheck&&e[t].isCheck){for(var n=f.nowData.customSceneList||[],a=e[f.startIndex].formatTimer,r=e[f.endIndex].formatTimer,o=[],c=[],i=0;i<n.length;i++){var l=n[i];if(l.startTime===a&&l.endTime===r){var s=f.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(s);break}if(l.startTime<a){if(l.endTime<=r){var m=f.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(m);var u=f.formaTimeObj(n[0],"0",l.startTime,a);c.push(u)}else if(l.endTime>r){var d=f.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(d);var p=f.formaTimeObj(n[0],"0",l.startTime,a);c.push(p);var b=f.formaTimeObj(n[0],"0",r,l.endTime);c.push(b)}}else if(l.startTime===l.startTime){if(l.endTime<=r){var g=f.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(g)}else if(l.endTime>r){var v=f.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(v);var O=f.formaTimeObj(n[0],"0",r,l.endTime);c.push(O)}}else if(l.startTime>a)if(l.endTime<=r){var j=f.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(j)}else if(l.endTime>r){var h=f.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(h);var T=f.formaTimeObj(n[0],"0",r,l.endTime);c.push(T)}}var k=0,I=c.concat(o),S=Object(ge["n"])();return I.map((function(e,t){"1"==e.type&&S>=e.startTime&&S<=e.endTime&&(e.type="3",k=e.startTime,e.endTimeReal=S)})),I.map((function(e,t){"0"==e.type&&k&&e.startTime==k&&I.splice(t,1)})),I}return[]},closeWorkTimer:function(){f.formBtn=!1,t.emit("closeWork")},removeDuplicateObj:function(e){var t={};return e=e.reduce((function(e,n){return!t[n.objectId]&&(t[n.objectId]=e.push(n)),e}),[]),e},checkEquipment:function(e){e.isCheck=!e.isCheck},delSpaceNoCtrDevice:function(e){e.map((function(e){var t=e.sceneEquipList||[],n=f.seviceEquipmentList;"2"==e.type&&t.length&&t.map((function(t,a){for(var r=!1,o=0;o<n.length;o++)if(t.objectId==n[o].id&&n[o].isExeSpaceTime&&(r=!0),r)break;r||e.sceneEquipList.splice(a,1)}))}))},addWorkTimer:function(){var e=f.formateAddTimer(),t=[];f.nowData.equipmentList.map((function(e){if(e.isCheck){var n={projectId:e.projectId,objectId:e.id,type:e.equipmentCategory};t.push(n)}})),e&&2==e.length&&(e[1].startTime>=e[0].startTime&&e[1].endTime<=e[0].endTime||e.map((function(e){"1"==e.type&&e.sceneEquipList&&e.sceneEquipList.length&&e.sceneEquipList.map((function(e){var n={projectId:e.projectId,objectId:e.objectId,type:e.type};t.push(n)}))}))),t=f.removeDuplicateObj(t),e.map((function(e){"0"!=e.type&&"2"!=e.type||(e.sceneEquipList=t)})),f.delSpaceNoCtrDevice(e),f.saveBatchCustomScene(e)},openDeviceAll:function(e){var t=[];e.map((function(e){"2"==e.type&&(t=t.concat(e.sceneEquipList))})),t=f.removeDuplicateObj(t);var n=[],a=[];t.map((function(e){if("SELTLT"==e.type){var t={id:e.objectId,switch:!0};a.push(t)}else{var r={id:e.objectId,code:"EquipSwitchSet",value:"1"};n.push(r)}})),f.setSpaceCondtioners(n),f.setallLampHttp(a)},setSpaceCondtioners:function(e){Object(ve["O"])(e).then((function(e){})).catch((function(){}))},setallLampHttp:function(e){Object(ve["P"])(e).then((function(e){})).catch((function(){}))},saveBatchCustomScene:function(e){f.showLoading=!0,f.formBtn=!0,Object(ve["K"])(e).then((function(e){t.emit("closeWork"),f.showLoading=!1,f.formBtn=!1})).catch((function(){f.showLoading=!1}))},isUpdate:!1,triggerDelTime:function(){var e=f.formateDelTimer();e&&e.length&&te["a"].confirm({title:"确认",message:"确定删除当前时间吗?"}).then((function(){var t=[];e.map((function(e){"1"==e.type&&e.sceneEquipList&&e.sceneEquipList.map((function(e){var n={projectId:e.projectId,objectId:e.objectId,type:e.type};t.push(n)}))})),t=f.removeDuplicateObj(t),e.map((function(e){"1"!==e.type&&(e.sceneEquipList=t)})),f.saveBatchCustomScene(e,2)})).catch((function(){}))}});return Object(a["watch"])(e,(function(e){f.workkArr=e.workkArr,f.projectId=e.projectId,f.enterType=e.enterType,f.deviceItem=e.deviceItem,f.seviceEquipmentList=e.seviceEquipmentList})),Object(a["onMounted"])((function(){f.setWorkTimeList()})),Object(L["a"])({},Object(a["toRefs"])(f))}});n("268d");const lt=he()(it,[["render",ct],["__scopeId","data-v-545aa93e"]]);var st=lt,mt={class:"contact-content"},ut=Object(a["createElementVNode"])("div",{class:"title"},"联系我们",-1),dt={class:"contact"},pt={class:"code-box"},ft=["src"],bt=Object(a["createElementVNode"])("div",{class:"title"},"客服微信二维码",-1),gt={class:"phone-box"},vt=["src"],Ot={class:"title"},jt=Object(a["createElementVNode"])("div",{class:"concat-text"},"联系方式",-1),ht=Object(a["createTextVNode"])("我知道了");function Tt(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("buttons"),l=Object(a["resolveComponent"])("van-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{show:e.isShowContact,"onUpdate:show":t[0]||(t[0]=function(t){return e.isShowContact=t}),"show-confirm-button":!1,class:"contact-dialog","show-cancel-button":!1},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",mt,[ut,Object(a["createElementVNode"])("div",dt,[Object(a["createElementVNode"])("div",pt,[Object(a["createElementVNode"])("img",{src:e.imgUrl+"&key="+e.contantDetail.wechatQrCode,alt:""},null,8,ft),bt]),Object(a["createElementVNode"])("div",gt,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","phone-icon.svg"),alt:""},null,8,vt),Object(a["createElementVNode"])("div",Ot,Object(a["toDisplayString"])(e.contantDetail.phone),1),jt])]),Object(a["createVNode"])(i,{class:"dailog-btn",onClick:e.closeDailog},{default:Object(a["withCtx"])((function(){return[ht]})),_:1},8,["onClick"])])]})),_:1},8,["show"])}var kt=n("543e"),It=(n("e7e5"),Object(ge["s"])()),St=Object(a["defineComponent"])({props:{isShowContact:{type:Boolean,default:function(){return!1}},contantDetail:{type:Object,default:function(){}}},components:Object(M["a"])({VanLoading:kt["b"]},te["a"].Component.name,te["a"].Component),setup:function(e,t){var n=Object(a["getCurrentInstance"])(),r=Object(a["reactive"])({parseImgUrl:ge["x"],contantDetail:e.contantDetail,userInfo:It,imgUrl:n.proxy.$imgUrl,isShowContact:e.isShowContact,closeDailog:function(){t.emit("closeDailog")},queryCustomerservice:function(){var e={criteria:{projectId:r.userInfo.projectId}};Object(ve["G"])(e).then((function(e){var t,n=e,a=null!==(t=null===n||void 0===n?void 0:n.content)&&void 0!==t?t:[];r.contantDetail=a[0]}))}});return Object(a["watch"])(e,(function(e){r.isShowContact=e.isShowContact,r.contantDetail=e.contantDetail}),{deep:!1,immediate:!0}),Object(a["onMounted"])((function(){})),Object(L["a"])({},Object(a["toRefs"])(r))}});n("904e");const yt=he()(St,[["render",Tt]]);var xt=yt,wt=function(e){return Object(a["pushScopeId"])("data-v-1d74e949"),e=e(),Object(a["popScopeId"])(),e},Ct={class:"scene-config"},Et=["src"],Dt={class:"time-text"},Nt=["src"],Vt=wt((function(){return Object(a["createElementVNode"])("div",{class:"del-text"},[Object(a["createElementVNode"])("span",null,"我要"),Object(a["createElementVNode"])("span",null,"离开")],-1)}));function Bt(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("leave-dailog");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("div",Ct,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["time-box",e.timerText.classColor])},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","work.svg"),alt:""},null,8,Et),Object(a["createElementVNode"])("div",Dt,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.timerText.text),1),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.timerText.timer),1)]),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["time-btn",e.timerText.showDel?"time-btn-small":""]),onClick:t[0]||(t[0]=function(){return e.triggerWork&&e.triggerWork.apply(e,arguments)})},[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.timerText.btnText),1)],2)],2),e.timerText.showDel?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"time-del",onClick:t[1]||(t[1]=function(){return e.myLeaving&&e.myLeaving.apply(e,arguments)})},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","goOffWork.svg"),alt:""},null,8,Nt),Vt])):Object(a["createCommentVNode"])("",!0)]),e.isShowLeaveDailog?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:0,isShowLeaveDailog:e.isShowLeaveDailog,onCloseDailog:e.closeLeavDailog},null,8,["isShowLeaveDailog","onCloseDailog"])):Object(a["createCommentVNode"])("",!0)],64)}var At=n("6c02"),Lt=n("0613"),Wt=function(e){return Object(a["pushScopeId"])("data-v-10ea159b"),e=e(),Object(a["popScopeId"])(),e},qt={class:"air-dialog-content"},Mt={class:"dialog-top"},Ft=["src"],Ut=Wt((function(){return Object(a["createElementVNode"])("div",{class:"leave-title"},"工作辛苦了!",-1)})),_t={class:"leave-popup-body"},Pt={key:1,class:"text-status"},Rt={key:2,class:"text-status grey"},Ht=Wt((function(){return Object(a["createElementVNode"])("span",null,"隐藏",-1)})),zt=[Ht];function Yt(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-icon"),l=Object(a["resolveComponent"])("van-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{show:e.isShowLeaveDailog,"onUpdate:show":t[1]||(t[1]=function(t){return e.isShowLeaveDailog=t}),class:"dialog-width","show-confirm-button":!1,"show-cancel-button":!1},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",qt,[Object(a["createElementVNode"])("div",Mt,[e.leaveDetail.img?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,class:"img-yellow",src:e.parseImgUrl("page-officehome",e.leaveDetail.img),alt:""},null,8,Ft)):Object(a["createCommentVNode"])("",!0)]),Ut,Object(a["createElementVNode"])("div",_t,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.leaveDetail.textObj,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"body-item",key:t},["ok"===e.status?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:0,name:"passed",style:{color:"#07c160","margin-right":"8px"}})):Object(a["createCommentVNode"])("",!0),"go"===e.status?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Pt)):Object(a["createCommentVNode"])("",!0),"grey"===e.status?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Rt)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.text),1)])})),128))]),Object(a["createElementVNode"])("div",{class:"dialog-btns",onClick:t[0]||(t[0]=function(){return e.closeDailog&&e.closeDailog.apply(e,arguments)})},zt)])]})),_:1},8,["show"])}var Gt=Object(a["defineComponent"])({props:{isShowLeaveDailog:{type:Boolean,default:function(){return!1}}},components:Object(M["a"])({VanLoading:kt["b"]},te["a"].Component.name,te["a"].Component),setup:function(e,t){var n=Object(a["reactive"])({parseImgUrl:ge["x"],isShowLeaveDailog:e.isShowLeaveDailog,leaveDetail:{textObj:[{text:"已为您取消当前的预约时间",status:"ok"},{text:"系统将自动调整设备状态",status:"ok"},{text:"感谢您的预约使用",status:"ok"}]},closeDailog:function(){t.emit("closeDailog")}});return Object(a["watch"])(e,(function(e){n.isShowLeaveDailog=e.isShowLeaveDailog}),{deep:!1,immediate:!0}),Object(a["onMounted"])((function(){})),Object(L["a"])({},Object(a["toRefs"])(n))}});n("1196");const Jt=he()(Gt,[["render",Yt],["__scopeId","data-v-10ea159b"]]);var Xt=Jt,Kt=Object(a["defineComponent"])({props:{scenarioArr:{type:Array,default:function(){return[]}},workkArr:{type:Array,default:function(){return[]}}},components:{LeaveDailog:Xt},setup:function(e,t){Object(a["getCurrentInstance"])();var n=Object(At["d"])(),r={text:"",timer:"",btnText:"",showDel:!1,classColor:"grey"},o="",c=(Object(Lt["b"])(),[]),i=[],l=Object(a["reactive"])({parseImgUrl:ge["x"],leaveBtnFlag:!1,scenarioArr:e.scenarioArr,workkArr:e.workkArr,forcedOverTimeFlag:!1,onSubmit:function(e){n.push({path:"/choice-project"})},triggerWork:function(){t.emit("triggerWork")},timerText:r,text:o,formateTimeContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=l.workkArr;return l.text="",Object(ge["e"])(e,t,n,a,r,l)},beforeWorkTime:function(e,t){for(var n=!0,a=0;a<e.length;a++)e[a].startTime<t&&(n=!1);return n},afterWorkTime:function(e,t){for(var n=!0,a=0;a<e.length;a++)e[a].endTime>t&&(n=!1);return n},checkWorkTime:function(e,t){var n={type:0,startTime:0,endTime:0};if(l.beforeWorkTime(e,t))n.type=1;else if(l.afterWorkTime(e,t))n.type=2;else{for(var a=!0,r=0;r<e.length;r++)if(t>=e[r].startTime&&t<=e[r].endTime){n.startTime=e[r].startTime,n.endTime=e[r].endTime,n.type=3,a=!1;break}a&&(n.type=4)}return n},delTimeArr:c,customSceneList:i,formateWorkTime:function(){for(var e=l.workkArr,n=Object(ge["a"])("YYYY-MM-DD"),a=0;a<e.length;a++){var r,o,c=Object(ge["b"])(e[a].date),i=e[a].cusStartTime,s=e[a].cusEndTime,m=null!==(r=null===(o=e[a])||void 0===o?void 0:o.customSceneList)&&void 0!==r?r:[],u=Object(ge["n"])();Object(ge["t"])(new Date(c).getDay());c===n&&"今天",c===n&&function(){l.customSceneList=m;var e="",n="";if(i&&s||m.length)if(i&&s&&!m.length)if(u>=i&&u<=s)l.timerText.text="工作时间",l.timerText.timer=Object(ge["d"])(i)+"~"+Object(ge["d"])(s),l.timerText.classColor="yellow",l.timerText.btnText="预约延时",l.timerText.showDel=!1,l.forcedOverTimeFlag=!1;else{var a=l.formateTimeContinuous(0,e,n,2);a&&a.text?(l.timerText.text="已预约(".concat(a.text,")"),l.timerText.timer=Object(ge["d"])(a.startTime)+"~"+Object(ge["d"])(a.endTime)):(l.timerText.text="请选择工作时间段",l.timerText.timer="将自动开启办公服务"),l.timerText.classColor="grey",l.timerText.btnText="预约时间",l.timerText.showDel=!1,l.forcedOverTimeFlag=!0}else if(i&&s&&u>=i&&u<=s){e=i,n=s,m.map((function(e){n===e.startTime&&(n=e.endTime)}));var r=l.formateTimeContinuous(1,e,n,1);l.timerText.text="工作时间",l.timerText.timer=Object(ge["d"])(e)+"~"+Object(ge["d"])(n),r&&r.text&&(l.timerText.text="工作时间(今日~".concat(r.text,")"),l.timerText.timer=Object(ge["d"])(r.startTime)+"~"+Object(ge["d"])(r.endTime)),l.timerText.classColor="yellow",l.timerText.btnText="预约延时",l.timerText.showDel=!1,l.forcedOverTimeFlag=!1}else{var o=l.checkWorkTime(m,u);if(3===o.type){e=o.startTime,n=o.endTime,m.map((function(t){var a=n;e===t.startTime&&t.endTime,a===t.startTime&&(n=t.endTime)})),i&&s&&u<i&&(n===i&&(n=s),m.map((function(e){n===e.startTime&&(n=e.endTime)})));var c=l.formateTimeContinuous(1,e,n,1);l.timerText.text="工作时间",l.timerText.timer=Object(ge["d"])(e)+"~"+Object(ge["d"])(n),c&&c.text&&(l.timerText.text="工作时间~".concat(c.text),l.timerText.timer=Object(ge["d"])(c.startTime)+"~"+Object(ge["d"])(c.endTime)),l.timerText.classColor="yellow",l.timerText.btnText="预约延时",l.timerText.showDel=!0,l.forcedOverTimeFlag=!1}else{var d=l.formateTimeContinuous(0,e,n,2);d&&d.text&&d.startTime&&d.endTime?(l.timerText.text="已预约(".concat(d.text,")"),l.timerText.timer=Object(ge["d"])(d.startTime)+"~"+Object(ge["d"])(d.endTime)):(l.timerText.text="请选择工作时间段",l.timerText.timer="将自动开启办公服务"),l.timerText.classColor="grey",l.timerText.btnText="预约时间",l.timerText.showDel=!1,l.forcedOverTimeFlag=!0}}else{var p=l.formateTimeContinuous(0,e,n,2);p&&p.text?(l.timerText.text="已预约(".concat(p.text,")"),l.timerText.timer=Object(ge["d"])(p.startTime)+"~"+Object(ge["d"])(p.endTime)):(l.timerText.text="请选择工作时间段",l.timerText.timer="将自动开启办公服务"),l.timerText.classColor="grey",l.timerText.btnText="预约时间",l.timerText.showDel=!1,l.forcedOverTimeFlag=!0}t.emit("setForceOverTimeFlag",l.forcedOverTimeFlag)}()}},timeJoin:function(e,t){var n=0,a=0,r=l.checkWorkTime(e,t);3===r.type?(n=r.startTime,a=r.endTime,e.map((function(e){var t=a;n===e.startTime&&e.endTime,t===e.startTime&&(a=e.endTime)})),l.timerText.text="工作时间",l.timerText.timer=Object(ge["d"])(n)+"~"+Object(ge["d"])(a),l.timerText.classColor="yellow",l.timerText.btnText="预约延时",l.timerText.showDel=!0,l.forcedOverTimeFlag=!1):(e.map((function(e){if(t<e.startTime){e.startTime<n?(n=e.startTime,a=e.endTime):a===e.startTime&&(a=e.endTime)}})),n&&a?(l.timerText.text="已预约(今日)",l.timerText.timer=Object(ge["d"])(n)+"~"+Object(ge["d"])(a),l.timerText.classColor="grey",l.timerText.btnText="预约时间",l.timerText.showDel=!1,l.forcedOverTimeFlag=!0):(l.timerText.text="请选择工作时间段",l.timerText.timer="将自动开启办公服务",l.timerText.classColor="grey",l.timerText.btnText="预约时间",l.timerText.showDel=!1,l.forcedOverTimeFlag=!0))},formatDataDel:function(){l.delTimeArr=[];var e=l.customSceneList,t=Object(ge["n"])(),n=0,a=0,r=l.checkWorkTime(e,t);3===r.type&&(n=r.startTime,a=r.endTime,e.map((function(e){var t=a;n===e.startTime&&a===e.endTime&&(e.type=1,l.delTimeArr.push(e)),t===e.startTime&&(a=e.endTime,e.type=1,l.delTimeArr.push(e))})))},myLeaving:function(){l.formatDataDel(),l.leaveBtnFlag=!0,l.saveBatchCustomScene()},saveBatchCustomScene:function(){l.openLeavDailog(),Object(ve["K"])(l.delTimeArr).then((function(e){l.leaveBtnFlag=!1,t.emit("closeWork")})).catch((function(){l.leaveBtnFlag=!1}))},isShowLeaveDailog:!1,openLeavDailog:function(){l.isShowLeaveDailog=!0},closeLeavDailog:function(){l.isShowLeaveDailog=!1}});return Object(a["watch"])(e,(function(e){l.scenarioArr=e.scenarioArr,l.workkArr=e.workkArr,l.workkArr&&l.workkArr.length&&l.formateWorkTime()}),{deep:!0,immediate:!0}),Object(a["onMounted"])((function(){})),Object(L["a"])({},Object(a["toRefs"])(l))}});n("4eee");const $t=he()(Kt,[["render",Bt],["__scopeId","data-v-1d74e949"]]);var Zt=$t,Qt=function(e){return Object(a["pushScopeId"])("data-v-34a0334d"),e=e(),Object(a["popScopeId"])(),e},en={class:"scene-config"},tn=["src"],nn={class:"time-text"},an=["src"],rn=Qt((function(){return Object(a["createElementVNode"])("div",{class:"del-text"},[Object(a["createElementVNode"])("span",null,"我要"),Object(a["createElementVNode"])("span",null,"离开")],-1)}));function on(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("leave-dailog");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("div",en,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["time-box",e.timerText.classColor])},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","work.svg"),alt:""},null,8,tn),Object(a["createElementVNode"])("div",nn,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.timerText.text),1),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.timerText.timer),1)]),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["time-btn",e.timerText.showDel?"time-btn-small":""]),onClick:t[0]||(t[0]=function(){return e.triggerWork&&e.triggerWork.apply(e,arguments)})},[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.timerText.btnText),1)],2)],2),e.timerText.showDel?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"time-del",onClick:t[1]||(t[1]=function(){return e.myLeaving&&e.myLeaving.apply(e,arguments)})},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","goOffWork.svg"),alt:""},null,8,an),rn])):Object(a["createCommentVNode"])("",!0)]),e.isShowLeaveDailog?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:0,isShowLeaveDailog:e.isShowLeaveDailog,onCloseDailog:e.closeLeavDailog},null,8,["isShowLeaveDailog","onCloseDailog"])):Object(a["createCommentVNode"])("",!0)],64)}var cn=function(e){return Object(a["pushScopeId"])("data-v-5934e340"),e=e(),Object(a["popScopeId"])(),e},ln={class:"air-dialog-content"},sn={class:"dialog-top"},mn=["src"],un=cn((function(){return Object(a["createElementVNode"])("div",{class:"leave-title"},"工作辛苦了!",-1)})),dn={class:"leave-popup-body"},pn={key:1,class:"text-status"},fn={key:2,class:"text-status grey"},bn=cn((function(){return Object(a["createElementVNode"])("span",null,"隐藏",-1)})),gn=[bn];function vn(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-icon"),l=Object(a["resolveComponent"])("van-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{show:e.isShowLeaveDailog,"onUpdate:show":t[1]||(t[1]=function(t){return e.isShowLeaveDailog=t}),class:"dialog-width","show-confirm-button":!1,"show-cancel-button":!1},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",ln,[Object(a["createElementVNode"])("div",sn,[e.leaveDetail.img?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,class:"img-yellow",src:e.parseImgUrl("page-officehome",e.leaveDetail.img),alt:""},null,8,mn)):Object(a["createCommentVNode"])("",!0)]),un,Object(a["createElementVNode"])("div",dn,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.leaveDetail.textObj,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"body-item",key:t},["ok"===e.status?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:0,name:"passed",style:{color:"#07c160","margin-right":"8px"}})):Object(a["createCommentVNode"])("",!0),"go"===e.status?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",pn)):Object(a["createCommentVNode"])("",!0),"grey"===e.status?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",fn)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.text),1)])})),128))]),Object(a["createElementVNode"])("div",{class:"dialog-btns",onClick:t[0]||(t[0]=function(){return e.closeDailog&&e.closeDailog.apply(e,arguments)})},gn)])]})),_:1},8,["show"])}var On=Object(a["defineComponent"])({props:{isShowLeaveDailog:{type:Boolean,default:function(){return!1}}},components:Object(M["a"])({VanLoading:kt["b"]},te["a"].Component.name,te["a"].Component),setup:function(e,t){var n=Object(a["reactive"])({parseImgUrl:ge["x"],isShowLeaveDailog:e.isShowLeaveDailog,leaveDetail:{textObj:[{text:"已为您取消当前的预约时间",status:"ok"},{text:"系统将自动调整设备状态",status:"ok"},{text:"感谢您的预约使用",status:"ok"}]},closeDailog:function(){t.emit("closeDailog")}});return Object(a["watch"])(e,(function(e){n.isShowLeaveDailog=e.isShowLeaveDailog}),{deep:!1,immediate:!0}),Object(a["onMounted"])((function(){})),Object(L["a"])({},Object(a["toRefs"])(n))}});n("aae5");const jn=he()(On,[["render",vn],["__scopeId","data-v-5934e340"]]);var hn=jn,Tn=Object(a["defineComponent"])({props:{workkArr:{type:Array,default:function(){return[]}}},components:{LeaveDailog:hn},setup:function(e,t){Object(a["getCurrentInstance"])();var n=Object(At["d"])(),r={text:"",timer:"",btnText:"",showDel:!1,classColor:"grey"},o="",c=(Object(Lt["b"])(),[]),i=[],l=[],s=Object(a["reactive"])({parseImgUrl:ge["x"],leaveBtnFlag:!1,workkArr:l,forcedOverTimeFlag:!1,onSubmit:function(e){n.push({path:"/choice-project"})},triggerWork:function(){t.emit("triggerWork",1)},timerText:r,text:o,formateApproveData:function(){for(var e=s.workkArr||[],t=0;t<e.length;t++){var n,a,r=null!==(n=null===(a=e[t])||void 0===a?void 0:a.customSceneList)&&void 0!==n?n:[];r&&r.length&&function(){var n=[];r.map((function(e,t){e.hasOwnProperty("approvalStatus")&&1==e.approvalStatus&&n.push(e)})),e[t].customSceneList=n}()}},formateTimeContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=s.workkArr;return s.text="",Object(ge["e"])(e,t,n,a,r,s)},beforeWorkTime:function(e,t){for(var n=!0,a=0;a<e.length;a++)e[a].startTime<t&&(n=!1);return n},afterWorkTime:function(e,t){for(var n=!0,a=0;a<e.length;a++)e[a].endTime>t&&(n=!1);return n},checkWorkTime:function(e,t){var n={type:0,startTime:0,endTime:0};if(s.beforeWorkTime(e,t))n.type=1;else if(s.afterWorkTime(e,t))n.type=2;else{for(var a=!0,r=0;r<e.length;r++)if(t>=e[r].startTime&&t<=e[r].endTime){n.startTime=e[r].startTime,n.endTime=e[r].endTime,n.type=3,a=!1;break}a&&(n.type=4)}return n},delTimeArr:c,customSceneList:i,formateWorkTime:function(){for(var e=s.workkArr,n=Object(ge["a"])("YYYY-MM-DD"),a=0;a<e.length;a++){var r,o,c=Object(ge["b"])(e[a].date),i=e[a].cusStartTime,l=e[a].cusEndTime,m=null!==(r=null===(o=e[a])||void 0===o?void 0:o.customSceneList)&&void 0!==r?r:[],u=Object(ge["n"])();Object(ge["t"])(new Date(c).getDay());c===n&&"今天",c===n&&function(){s.customSceneList=m;var e="",n="";if(i&&l||m.length)if(i&&l&&!m.length)if(u>=i&&u<=l)s.timerText.text="工作时间",s.timerText.timer=Object(ge["d"])(i)+"~"+Object(ge["d"])(l),s.timerText.classColor="yellow",s.timerText.btnText="预约延时",s.timerText.showDel=!1,s.forcedOverTimeFlag=!1;else{var a=s.formateTimeContinuous(0,e,n,2);a&&a.text?(s.timerText.text="已预约(".concat(a.text,")"),s.timerText.timer=Object(ge["d"])(a.startTime)+"~"+Object(ge["d"])(a.endTime)):(s.timerText.text="请选择工作时间段",s.timerText.timer="将自动开启办公服务"),s.timerText.classColor="grey",s.timerText.btnText="预约时间",s.timerText.showDel=!1,s.forcedOverTimeFlag=!0}else if(i&&l&&u>=i&&u<=l){e=i,n=l,m.map((function(e){n===e.startTime&&(n=e.endTime)}));var r=s.formateTimeContinuous(1,e,n,1);s.timerText.text="工作时间",s.timerText.timer=Object(ge["d"])(e)+"~"+Object(ge["d"])(n),r&&r.text&&(s.timerText.text="工作时间(今日~".concat(r.text,")"),s.timerText.timer=Object(ge["d"])(r.startTime)+"~"+Object(ge["d"])(r.endTime)),s.timerText.classColor="yellow",s.timerText.btnText="预约延时",s.timerText.showDel=!1,s.forcedOverTimeFlag=!1}else{var o=s.checkWorkTime(m,u);if(3===o.type){e=o.startTime,n=o.endTime,m.map((function(t){var a=n;e===t.startTime&&t.endTime,a===t.startTime&&(n=t.endTime)})),i&&l&&u<i&&(n===i&&(n=l),m.map((function(e){n===e.startTime&&(n=e.endTime)})));var c=s.formateTimeContinuous(1,e,n,1);s.timerText.text="工作时间",s.timerText.timer=Object(ge["d"])(e)+"~"+Object(ge["d"])(n),c&&c.text&&(s.timerText.text="工作时间~".concat(c.text),s.timerText.timer=Object(ge["d"])(c.startTime)+"~"+Object(ge["d"])(c.endTime)),s.timerText.classColor="yellow",s.timerText.btnText="预约延时",s.timerText.showDel=!0,s.forcedOverTimeFlag=!1}else{var d=s.formateTimeContinuous(0,e,n,2);d&&d.text&&d.startTime&&d.endTime?(s.timerText.text="已预约(".concat(d.text,")"),s.timerText.timer=Object(ge["d"])(d.startTime)+"~"+Object(ge["d"])(d.endTime)):(s.timerText.text="请选择工作时间段",s.timerText.timer="将自动开启办公服务"),s.timerText.classColor="grey",s.timerText.btnText="预约时间",s.timerText.showDel=!1,s.forcedOverTimeFlag=!0}}else{var p=s.formateTimeContinuous(0,e,n,2);p&&p.text?(s.timerText.text="已预约(".concat(p.text,")"),s.timerText.timer=Object(ge["d"])(p.startTime)+"~"+Object(ge["d"])(p.endTime)):(s.timerText.text="请选择工作时间段",s.timerText.timer="将自动开启办公服务"),s.timerText.classColor="grey",s.timerText.btnText="预约时间",s.timerText.showDel=!1,s.forcedOverTimeFlag=!0}t.emit("setForceOverTimeFlag",s.forcedOverTimeFlag)}()}},timeJoin:function(e,t){var n=0,a=0,r=s.checkWorkTime(e,t);3===r.type?(n=r.startTime,a=r.endTime,e.map((function(e){var t=a;n===e.startTime&&e.endTime,t===e.startTime&&(a=e.endTime)})),s.timerText.text="工作时间",s.timerText.timer=Object(ge["d"])(n)+"~"+Object(ge["d"])(a),s.timerText.classColor="yellow",s.timerText.btnText="预约延时",s.timerText.showDel=!0,s.forcedOverTimeFlag=!1):(e.map((function(e){if(t<e.startTime){e.startTime<n?(n=e.startTime,a=e.endTime):a===e.startTime&&(a=e.endTime)}})),n&&a?(s.timerText.text="已预约(今日)",s.timerText.timer=Object(ge["d"])(n)+"~"+Object(ge["d"])(a),s.timerText.classColor="grey",s.timerText.btnText="预约时间",s.timerText.showDel=!1,s.forcedOverTimeFlag=!0):(s.timerText.text="请选择工作时间段",s.timerText.timer="将自动开启办公服务",s.timerText.classColor="grey",s.timerText.btnText="预约时间",s.timerText.showDel=!1,s.forcedOverTimeFlag=!0))},formatDataDel:function(){s.delTimeArr=[];var e=s.customSceneList,t=Object(ge["n"])(),n=0,a=0,r=s.checkWorkTime(e,t);3===r.type&&(n=r.startTime,a=r.endTime,e.map((function(e){var t=a;n===e.startTime&&a===e.endTime&&(e.type=3,s.delTimeArr.push(e)),t===e.startTime&&(a=e.endTime,e.type=3,s.delTimeArr.push(e))})))},myLeaving:function(){s.formatDataDel(),s.setLeavingTime(),s.leaveBtnFlag=!0,s.saveBatchCustomScene()},setLeavingTime:function(){var e=Object(ge["n"])();s.delTimeArr.map((function(t){e>=t.startTime&&e<=t.endTime?t.endTimeReal=e:e<t.startTime?t.type=1:e>t.endTime&&(t.endTimeReal=t.endTime)}))},saveBatchCustomScene:function(){s.openLeavDailog(),Object(ve["K"])(s.delTimeArr).then((function(e){s.leaveBtnFlag=!1,t.emit("closeWork")})).catch((function(){s.leaveBtnFlag=!1}))},isShowLeaveDailog:!1,openLeavDailog:function(){s.isShowLeaveDailog=!0},closeLeavDailog:function(){s.isShowLeaveDailog=!1}});return Object(a["watch"])(e,(function(e){e.workkArr&&e.workkArr.length&&(s.workkArr=JSON.parse(JSON.stringify(e.workkArr)),s.formateApproveData(),s.formateWorkTime())}),{deep:!1,immediate:!0}),Object(a["onMounted"])((function(){})),Object(L["a"])({},Object(a["toRefs"])(s))}});n("fc40");const kn=he()(Tn,[["render",on],["__scopeId","data-v-34a0334d"]]);var In=kn,Sn={class:"scene-config"},yn=["onClick"],xn=["src"];function wn(e,t,n,r,o,c){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Sn,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.scenarioArr,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:"scene"+n,class:Object(a["normalizeClass"])(["scene-item",t.sceneType===e.activeType?"scene-active":""]),onClick:function(n){return e.handleScene(t)},style:Object(a["normalizeStyle"])({flex:e.scenarioArr.length&&2==e.scenarioArr.length&&t.sceneType===e.activeType?2:1})},[Object(a["createElementVNode"])("img",{src:t.img,alt:""},null,8,xn),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.sceneName),1)],14,yn)})),128))])}var Cn=Object(a["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},spaceId:{type:String,default:function(){return""}},scenarioArr:{type:Array,default:function(){return[]}},activeType:{type:String,default:function(){return""}}},setup:function(e,t){var n=Object(At["d"])(),r=(Object(Lt["b"])(),{DISCUSSING:Object(ge["x"])("ipdImages","taolun.svg"),PROJECTING:Object(ge["x"])("ipdImages","touying.svg"),ADJOURNMENT:Object(ge["x"])("ipdImages","sanhui.svg")}),o=[],c=Object(a["reactive"])({parseImgUrl:ge["x"],spaceId:e.spaceId,scenarioArr:o,scenarioImgArr:r,activeType:e.activeType,onSubmit:function(e){n.push({path:"/choice-project"})},formatScenarioImg:function(){c.scenarioArr.map((function(e){e.img=c.scenarioImgArr[e.sceneType],"DISCUSSING"===e.sceneType?e.order=1:"PROJECTING"===e.sceneType?e.order=2:"ADJOURNMENT"===e.sceneType?e.order=3:e.order=4})),c.scenarioArr=c.scenarioArr.sort((function(e,t){return e.order-t.order}))},handleScene:function(n){var a=Object(ge["s"])(),r={spaceId:c.spaceId,projectId:e.projectId,type:n.sceneType,pubname:a.pubname};n.loading=!0,n.lodingText="正在切换至",t.emit("setHeadScene",n,1),Object(ve["Q"])(r).then((function(e){var a=e;"success"===a.result&&(n.loading=!1,n.lodingText="切换至",t.emit("setHeadScene",n,2))})).catch((function(){n.loading=!1,n.lodingText="",t.emit("setHeadScene",n,2)}))}});return Object(a["watch"])(e,(function(e){c.activeType=e.activeType,c.scenarioArr=e.scenarioArr,c.spaceId=e.spaceId,c.formatScenarioImg()}),{deep:!1,immediate:!0}),Object(a["onMounted"])((function(){})),Object(L["a"])({},Object(a["toRefs"])(c))}});n("0d32");const En=he()(Cn,[["render",wn],["__scopeId","data-v-1fed2403"]]);var Dn=En,Nn=n("0500"),Vn=function(e){return Object(a["pushScopeId"])("data-v-54f78787"),e=e(),Object(a["popScopeId"])(),e},Bn={class:"header-content"},An={class:"weather"},Ln=["src"],Wn={class:"weather-text"},qn={class:"pr5"},Mn=Vn((function(){return Object(a["createElementVNode"])("span",null,"/",-1)})),Fn=Vn((function(){return Object(a["createElementVNode"])("span",{class:"pr5"},"PM2.5",-1)})),Un={class:"pr5"};function _n(e,t,n,r,o,c){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Bn,[Object(a["createElementVNode"])("div",An,[Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{src:e.outWeather.imgname,class:"weather-icon",alt:""},null,8,Ln),[[a["vShow"],e.outWeather.imgname]]),Object(a["createElementVNode"])("div",Wn,[Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",qn,Object(a["toDisplayString"])(e.outWeather.temperature?e.outWeather.temperature:"--")+"℃",1),Mn,Fn,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.outWeather.pm25?e.outWeather.pm25:"--"),1)]),Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",Un,Object(a["toDisplayString"])(e.outWeather.text?e.outWeather.text:"--"),1),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.outWeather.quality?e.outWeather.quality:"--"),1)])])]),Object(a["createElementVNode"])("div",{class:"set-space-btn",onClick:t[0]||(t[0]=function(){return e.setPermanentSpace&&e.setPermanentSpace.apply(e,arguments)})},"设置常驻空间")])}var Pn=n("ad06"),Rn=(n("c3a6"),Object(a["defineComponent"])({props:{outWeather:{type:Object,default:function(){return{}}}},components:{VanIcon:Pn["b"]},setup:function(){var e=Object(At["d"])(),t=Object(a["reactive"])({goBack:function(){window.history.go(-1)},setPermanentSpace:function(){e.push({path:"/mySpace"})}});return Object(L["a"])({},Object(a["toRefs"])(t))}}));n("9c88");const Hn=he()(Rn,[["render",_n],["__scopeId","data-v-54f78787"]]);var zn=Hn,Yn=n("3ba9"),Gn=function(e){return Object(a["pushScopeId"])("data-v-44ad189c"),e=e(),Object(a["popScopeId"])(),e},Jn={class:"air"},Xn={class:"air-top"},Kn={class:"air-desc"},$n=Gn((function(){return Object(a["createElementVNode"])("p",{class:"air-title"},"空调",-1)})),Zn={class:"air-temperature"},Qn={key:0},ea={key:0,class:"air-status"},ta={key:1,class:"air-loading"},na=["src"],aa={class:"air-right"},ra=["src"],oa={key:0,class:"air-control"},ca=Gn((function(){return Object(a["createElementVNode"])("div",{class:"control-title"},"温度调节",-1)})),ia={class:"btn-box"},la=["src"],sa=["src"],ma={key:1,class:"air-control"},ua=Gn((function(){return Object(a["createElementVNode"])("div",{class:"control-title"},"风量调节",-1)})),da={class:"btn-box"},pa=["src"],fa=["src"],ba={class:"air-dialog-content"},ga={class:"dialog-top"},va=["src"],Oa={class:"dialog-text"},ja={class:"air-body-item-num"},ha={key:0,class:"air-temp-num"},Ta={key:1,class:"air-temp-load"},ka={key:0,class:"air-notice"},Ia=Gn((function(){return Object(a["createElementVNode"])("span",null,"确定",-1)})),Sa=[Ia];function ya(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-loading"),l=Object(a["resolveComponent"])("Switch"),s=Object(a["resolveComponent"])("van-dialog");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Jn,[Object(a["createElementVNode"])("div",Xn,[Object(a["createElementVNode"])("div",Kn,[$n,Object(a["createElementVNode"])("p",Zn,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.airData.tempSet?e.airData.tempSet:"")+" ",1),e.airData.tempSet?(Object(a["openBlock"])(),Object(a["createElementBlock"])("sup",Qn,"℃")):Object(a["createCommentVNode"])("",!0)]),e.hasAir?(Object(a["openBlock"])(),Object(a["createElementBlock"])("p",ea,Object(a["toDisplayString"])(e.airData.isOpen?"空调已开启":"空调已关闭"),1)):Object(a["createCommentVNode"])("",!0),e.airData.isOpen?(Object(a["openBlock"])(),Object(a["createElementBlock"])("p",ta,[1==e.airData.icon||2==e.airData.icon||3==e.airData.icon?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:e.airRunImg,alt:""},null,8,na)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.airData.spaceStatus),1)])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",aa,[e.airData.airImg?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:e.airData.airImg,alt:""},null,8,ra)):(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:1,style:{"padding-top":"20px"}})),e.hasAir?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:2,class:"switch-btn",loading:e.loadingAir||e.firstLoadingAir,disabled:!e.userIsControl||e.loadingAir||e.firstLoadingAir,"inactive-color":"rgba(196, 196, 196, 0.4)",onClick:e.airChange,"model-value":e.airData.isOpen},null,8,["loading","disabled","onClick","model-value"])):Object(a["createCommentVNode"])("",!0)])]),e.userIsControl&&e.airData.isOpen?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",oa,[ca,Object(a["createElementVNode"])("div",ia,[Object(a["createElementVNode"])("div",{class:"control-btn mr20",onClick:t[0]||(t[0]=Object(a["withModifiers"])((function(t){return e.changeAir(4,"temp","toCold")}),["stop"]))},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("envmonitor","arrow-top.png"),alt:""},null,8,la)]),Object(a["createElementVNode"])("div",{class:"control-btn",onClick:t[1]||(t[1]=Object(a["withModifiers"])((function(t){return e.changeAir(2,"temp","toWarm")}),["stop"]))},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("envmonitor","arrow-down.png"),alt:""},null,8,sa)])])])):Object(a["createCommentVNode"])("",!0),e.userIsControl&&e.airData.isOpen&&e.showAirVolumeBtn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ma,[ua,Object(a["createElementVNode"])("div",da,[Object(a["createElementVNode"])("div",{class:"control-btn mr20",onClick:t[2]||(t[2]=Object(a["withModifiers"])((function(t){return e.changeAir(5,"wind","toWindLow")}),["stop"]))},[Object(a["createElementVNode"])("img",{class:"temp-img",src:e.parseImgUrl("envmonitor","fengshan.png"),alt:""},null,8,pa)]),Object(a["createElementVNode"])("div",{class:"control-btn",onClick:t[3]||(t[3]=Object(a["withModifiers"])((function(t){return e.changeAir(6,"wind","toWindUp")}),["stop"]))},[Object(a["createElementVNode"])("img",{class:"temp-img",src:e.parseImgUrl("envmonitor","wendu.png"),alt:""},null,8,fa)])])])):Object(a["createCommentVNode"])("",!0),Object(a["createVNode"])(s,{show:e.showDialog,"onUpdate:show":t[5]||(t[5]=function(t){return e.showDialog=t}),class:"dialog-width","show-confirm-button":!1,"show-cancel-button":!1},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",ba,[Object(a["createElementVNode"])("div",ga,[Object(a["createElementVNode"])("img",{class:Object(a["normalizeClass"])(["img-greey","toCold"==e.airSetText.toWhere?"img-blue":"toWarm"==e.airSetText.toWhere?"img-red":""]),src:e.parseImgUrl("page-officehome",e.airSetText.nowImg),alt:""},null,10,va)]),Object(a["createElementVNode"])("div",Oa,[Object(a["createElementVNode"])("div",ja,[e.airSetText.notice?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ha,Object(a["toDisplayString"])(e.airSetText.notice),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ta,[Object(a["createVNode"])(i,{type:"spinner"})]))]),e.airSetText.remark&&e.airSetText.remark.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("p",ka,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.airSetText.remark,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:"remark"+t},Object(a["toDisplayString"])(e),1)})),128))])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",{class:"dialog-btns",onClick:t[4]||(t[4]=Object(a["withModifiers"])((function(){return e.closeDialog&&e.closeDialog.apply(e,arguments)}),["stop"]))},Sa)])]})),_:1},8,["show"])])}const[xa,wa]=Object(ae["a"])("switch"),Ca={size:re["f"],loading:Boolean,disabled:Boolean,modelValue:re["h"],activeColor:String,inactiveColor:String,activeValue:{type:re["h"],default:!0},inactiveValue:{type:re["h"],default:!1}};var Ea=Object(a["defineComponent"])({name:xa,props:Ca,emits:["change","update:modelValue"],setup(e,{emit:t}){const n=()=>e.modelValue===e.activeValue,r=()=>{if(!e.disabled&&!e.loading){const a=n()?e.inactiveValue:e.activeValue;t("update:modelValue",a),t("change",a)}},o=()=>{if(e.loading){const t=n()?e.activeColor:e.inactiveColor;return Object(a["createVNode"])(kt["a"],{class:wa("loading"),color:t},null)}};return Object(ie["h"])(()=>e.modelValue),()=>{const{size:t,loading:c,disabled:i,activeColor:l,inactiveColor:s}=e,m=n(),u={fontSize:Object(oe["b"])(t),backgroundColor:m?l:s};return Object(a["createVNode"])("div",{role:"switch",class:wa({on:m,loading:c,disabled:i}),style:u,tabindex:i?void 0:0,"aria-checked":m,onClick:r},[Object(a["createVNode"])("div",{class:wa("node")},[o()])])}}});const Da=Object(ne["a"])(Ea);var Na,Va=Da,Ba=(n("e3b3"),n("d9d2"),n("d399")),Aa=Object(a["defineComponent"])({props:{temperature:{type:Number,default:function(){return 0}},hasAir:{type:Boolean,default:function(){return!1}},airVolumes:{type:Array,default:function(){return[]}},projectId:{type:String,default:function(){return""}},spaceId:{type:String,default:function(){return""}},userIsControl:{type:Boolean,default:function(){return!1}},forceOverTimeFlag:{type:Boolean,default:function(){return!1}}},components:(Na={Switch:Va},Object(M["a"])(Na,te["a"].Component.name,te["a"].Component),Object(M["a"])(Na,"Loading",kt["b"]),Na),setup:function(e,t){var n=e,r={avg:"",icon:1,spaceStatus:"",notice:"",mode:0,tempSet:0,isOpen:!1},o=null,c=null,i=!1,l=Object(a["reactive"])({loadingAir:!1,temperature:e.temperature,userIsControl:e.userIsControl,forceOverTimeFlag:e.forceOverTimeFlag,firstLoadingAir:!0,domAirOpeen:i,feedbackTimer:o,parseImgUrl:ge["x"],airData:r,modeName:"",showAirVolumeBtn:!1,showDialog:!1,airTimer:c,airSetText:{notice:"",remark:[],nowImg:"",toWhere:"",designTemperature:0},formateModel:function(e){l.modeName=e?1===e?"制冷":2===e?"制热":3===e?"通风":4===e?"除湿":"":""},getEquipmentListHttp:function(){var t={spaceId:e.spaceId};l.showAirVolumeBtn=!1;var n=!0;Object(ve["j"])(t).then((function(e){var t=e,a=t?t.data:[];if(a&&a.length){for(var r=0;r<a.length;r++){var o=a[r];if("ACATVI"===o.equipmentCategory){l.showAirVolumeBtn=!1,n=!1;break}}n&&(l.showAirVolumeBtn=!0)}}))},getAirInfoToTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;l.airTimer&&clearTimeout(l.airTimer),l.airTimer=setTimeout((function(){l.getAirInfo()}),e)},getFeedbackTimer:function(e,t){clearTimeout(l.airTimer),l.airTimer=null,l.feedbackTimer=setTimeout((function(){l.getAirInfo("feedback",e,t,!1)}),3e3)},closeLoading:function(){var e=0,t=setInterval((function(){(e>15||l.domAirOpeen===l.airData.isOpen)&&(l.loadingAir=!1,clearInterval(t)),e++}),1e3)},getAirInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o={projectId:n.projectId,objectId:n.spaceId};"feedback"===e&&(o.id=r),Object(ve["k"])(o).then((function(n){var o=n;"feedback"!==e&&o&&(l.airData=o,l.formateModel(l.airData.mode),t.emit("updateAirTemp",l.airData.tempSet),l.airData.icon&&7===l.airData.icon?(l.airData.isOpen=!1,l.airData.airImg=Object(ge["x"])("page-officehome","air_close.png")):l.airData.icon&&6!==l.airData.icon&&(l.airData.isOpen=!0,l.airData.airImg=Object(ge["x"])("page-officehome","openair.png"))),"feedback"===e?o.notice?(l.airSetText.notice=o.notice,o.remark&&o.remark.length&&(l.airSetText.remark=o.remark.split("*")),l.feedbackTimer&&(clearTimeout(l.feedbackTimer),l.getAirInfoToTimer())):l.getFeedbackTimer(a,r):l.getAirInfoToTimer(),l.firstLoadingAir=!1})).catch((function(){l.getAirInfoToTimer(),l.firstLoadingAir=!1,l.airData.airImg=Object(ge["x"])("page-officehome","air_close.png")}))},airChange:function(){l.userIsControl?l.loadingAir?Object(Ba["a"])("指令正在下发中,勿重复操作!"):l.airComfir():Object(Ba["a"])("您没有当前空间的控制权限!")},airComfir:function(){var e=l.airData.isOpen?"要关闭空调吗?":"要开启空调吗?",n=l.airData.isOpen?"关闭":"开启";te["a"].confirm({cancelButtonText:"取消",confirmButtonText:n,confirmButtonColor:"$elActiveColor",message:e}).then((function(){var e=!l.airData.isOpen;if(l.forceOverTimeFlag&&e)t.emit("triggerWork");else{var n=e?12:10;l.domAirOpeen=e;var a="";a=12==n?"openAir":"closeAir",l.loadingAir=!0,l.closeLoading(),l.changeAir(n,"sw",a)}})).catch((function(){}))},closeScenarioAir:function(){l.changeAir(10,"sw","closeAir")},updatAirStatus:function(e){"sw"===e&&l.getAirInfo("","","",!1)},updateAirText:function(e,t){"sw"!==e&&(l.airSetText.designTemperature=t.designTemperature,l.airSetText.toWhere=t.toWhere,"toCold"==l.airSetText.toWhere?l.airSetText.nowImg="dialog_cooling.svg":"toWarm"==l.airSetText.toWhere?l.airSetText.nowImg="dialog_warmUp.svg":l.airSetText.nowImg="icon_wind.svg")},showAirConditioning:function(e,t){if("sw"!==e){l.showDialog=!0;var n={toWhere:t,designTemperature:0};l.updateAirText(e,n)}},closeDialog:function(){l.feedbackTimer&&(clearInterval(l.feedbackTimer),l.feedbackTimer=null),l.getAirInfoToTimer(),l.showDialog=!1},changeAir:function(e,t,a){l.airSetText.notice="",l.airSetText.remark=[];var r={projectId:n.projectId,objectId:n.spaceId,valueType:1,itemId:e};l.showAirConditioning(t,a),Object(ve["b"])(r).then((function(e){var n=e,r={toWhere:a,designTemperature:n.designTemperature};l.updateAirText(t,r),"sw"!==t&&(n.notice?(l.airSetText.notice=n.notice,n.remark&&n.remark.length&&(l.airSetText.remark=n.remark.split("*"))):l.getFeedbackTimer(t,n.id))})).catch((function(){l.loadingAir=!1}))}});Object(a["watch"])(e,(function(t){t.spaceId&&l.getAirInfoToTimer(0),l.temperature=e.temperature,l.userIsControl=t.userIsControl,l.forceOverTimeFlag=t.forceOverTimeFlag})),Object(a["onBeforeUnmount"])((function(){l.airTimer&&(clearTimeout(l.airTimer),l.airTimer=null),l.feedbackTimer&&(clearTimeout(l.feedbackTimer),l.feedbackTimer=null)})),Object(a["onMounted"])((function(){l.firstLoadingAir=!0,l.getAirInfo(),l.getEquipmentListHttp()}));var s=Object(a["computed"])((function(){var e="";switch(l.airData.icon){case 1:e=Object(ge["x"])("page-officehome","temp-keep.png");break;case 2:e=Object(ge["x"])("page-officehome","temp_cold.svg");break;case 3:e=Object(ge["x"])("page-officehome","temp_sun.png");break;default:e="";break}return e}));return Object(L["a"])({airRunImg:s},Object(a["toRefs"])(l))}});n("24ce"),n("20d9");const La=he()(Aa,[["render",ya],["__scopeId","data-v-44ad189c"]]);var Wa=La,qa=function(e){return Object(a["pushScopeId"])("data-v-49332094"),e=e(),Object(a["popScopeId"])(),e},Ma={class:"air"},Fa={class:"air-top"},Ua={class:"air-desc"},_a=qa((function(){return Object(a["createElementVNode"])("p",{class:"air-title"},"空调",-1)})),Pa={class:"air-temperature"},Ra=qa((function(){return Object(a["createElementVNode"])("sup",null,"℃",-1)})),Ha={key:0},za={key:1},Ya={class:"air-right"},Ga=["src"],Ja={class:"air-control air-control-padding"},Xa={class:"control-box"},Ka={class:"temp-text"},$a={class:"temp-slider",id:"sliderId"},Za={class:"slider-bar",id:"barId"},Qa={class:"bar-temp"},er=qa((function(){return Object(a["createElementVNode"])("div",{class:"bar-circle",id:"handId"},null,-1)})),tr={class:"temp-text"},nr=qa((function(){return Object(a["createElementVNode"])("div",{class:"control-text"},"温度设定",-1)})),ar={class:"air-control"},rr={class:"control-box"},or={class:"volume-box"},cr={class:"number"},ir=qa((function(){return Object(a["createElementVNode"])("div",{class:"text"},"风量调节",-1)})),lr={class:"volume-icon"},sr=["src"],mr=["src"],ur=qa((function(){return Object(a["createElementVNode"])("span",null," AUTO",-1)})),dr=[ur],pr={class:"air-control"},fr={class:"control-box"},br={class:"volume-box"},gr={class:"model"},vr=qa((function(){return Object(a["createElementVNode"])("div",{class:"text"},"模式设定",-1)})),Or={class:"volume-icon"},jr=["src"],hr=["src"],Tr=["src"],kr={key:1,class:"air-child"},Ir={class:"open-title"},Sr={class:"adjust-item"},yr={class:"adjust-text"},xr=qa((function(){return Object(a["createElementVNode"])("span",{class:"adjust-title"},"温度",-1)})),wr={class:"adjust-item"},Cr={class:"adjust-text"},Er=qa((function(){return Object(a["createElementVNode"])("span",{class:"adjust-title"},"档位",-1)})),Dr={class:"adjust-item"},Nr={class:"adjust-text"},Vr=qa((function(){return Object(a["createElementVNode"])("span",{class:"adjust-title"},"模式",-1)}));function Br(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-icon"),l=Object(a["resolveComponent"])("van-loading"),s=Object(a["resolveComponent"])("Switch");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ma,[Object(a["createElementVNode"])("div",Fa,[Object(a["createElementVNode"])("div",Ua,[_a,Object(a["createElementVNode"])("p",Pa,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.airTemp?e.airTemp:"--")+" ",1),Ra]),e.equipList&&e.equipList.length>1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"show-all",onClick:t[0]||(t[0]=Object(a["withModifiers"])((function(){return e.showAll&&e.showAll.apply(e,arguments)}),["stop"]))},[Object(a["createVNode"])(i,{name:e.lightIcon,class:"light-icon"},null,8,["name"]),e.showChild?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",za,"收起全部")):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Ha,"查看全部"))])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",Ya,[e.airData.airImg?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:e.airData.airImg,alt:""},null,8,Ga)):(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:1,style:{"padding-top":"20px"}})),e.showChild?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:2,class:"switch-btn",loading:e.loadingAir||e.firstLoadingAir,disabled:e.loadingAir||e.firstLoadingAir,"inactive-color":"rgba(196, 196, 196, 0.4)",onClick:e.airChange,"model-value":e.airData.isOpen},null,8,["loading","disabled","onClick","model-value"]))])]),!e.showChild&&e.airData.runStatus?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,style:Object(a["normalizeStyle"])({opacity:e.loadingAir||!e.airData.runStatus?"0.4":"1"})},[Object(a["createElementVNode"])("div",Ja,[Object(a["createElementVNode"])("div",Xa,[Object(a["createElementVNode"])("div",Ka,Object(a["toDisplayString"])(e.airData.minTempSet)+"℃",1),Object(a["createElementVNode"])("div",$a,[(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(5,(function(e,t){return Object(a["createElementVNode"])("div",{class:"item",key:"bar"+t})})),64)),Object(a["createElementVNode"])("div",Za,[Object(a["createElementVNode"])("div",Qa,Object(a["toDisplayString"])(e.realTemp)+"℃",1),er])]),Object(a["createElementVNode"])("div",tr,Object(a["toDisplayString"])(e.airData.maxTempSet)+"℃",1)]),nr]),Object(a["createElementVNode"])("div",ar,[Object(a["createElementVNode"])("div",rr,[Object(a["createElementVNode"])("div",or,[Object(a["createElementVNode"])("div",cr,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.windGearArr,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{class:Object(a["normalizeClass"])(e.airData.gear===t?"number-active":""),key:"volume"+n},Object(a["toDisplayString"])(t),3)})),128))]),ir]),Object(a["createElementVNode"])("div",lr,[Object(a["createElementVNode"])("div",{class:"icon-item",style:Object(a["normalizeStyle"])({opacity:e.airData.gear<=1?"0.6":1}),onClick:t[1]||(t[1]=function(t){return e.changeZongAir("gear","windLow")})},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","wind_small.png")},null,8,sr)],4),Object(a["createElementVNode"])("div",{class:"icon-item",style:Object(a["normalizeStyle"])({opacity:e.airData.gear>=3?"0.6":1}),onClick:t[2]||(t[2]=function(t){return e.changeZongAir("gear","windUp")})},[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","wind_big.png")},null,8,mr)],4),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["icon-item",e.airData.isAutoGear?"active-color":""]),onClick:t[3]||(t[3]=function(t){return e.changeZongAir("gear","auto")})},dr,2)])])]),Object(a["createElementVNode"])("div",pr,[Object(a["createElementVNode"])("div",fr,[Object(a["createElementVNode"])("div",br,[Object(a["createElementVNode"])("div",gr,Object(a["toDisplayString"])(1==e.airData.workMode?"制冷":2==e.airData.workMode?"制热":"通风"),1),vr]),Object(a["createElementVNode"])("div",Or,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["icon-item",2===e.airData.workMode?"active-color":""]),onClick:t[4]||(t[4]=function(t){return e.changeZongAir("mode",2)})},[Object(a["createElementVNode"])("img",{src:2===e.airData.workMode?e.parseImgUrl("ipdImages","airsunred.svg"):e.parseImgUrl("ipdImages","airsunblack.svg")},null,8,jr)],2),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["icon-item",1===e.airData.workMode?"active-color":""]),onClick:t[5]||(t[5]=function(t){return e.changeZongAir("mode",1)})},[Object(a["createElementVNode"])("img",{src:1===e.airData.workMode?e.parseImgUrl("ipdImages","aircoldblue.svg"):e.parseImgUrl("ipdImages","aircoldblack.svg")},null,8,hr)],2),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["icon-item",3===e.airData.workMode?"active-color":""]),onClick:t[6]||(t[6]=function(t){return e.changeZongAir("mode",3)})},[Object(a["createElementVNode"])("img",{src:3===e.airData.workMode?e.parseImgUrl("ipdImages","aircloudgreen.svg"):e.parseImgUrl("ipdImages","aircloudblack.svg")},null,8,Tr)],2)])])])],4)):Object(a["createCommentVNode"])("",!0),e.showChild?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",kr,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.equipList,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"child-control-box",key:"child"+n},[Object(a["createElementVNode"])("div",Ir,[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.localName),1),Object(a["createVNode"])(s,{onClick:function(n){return e.changeChildItemAir("switch",t,"switch")},loading:t.loadingTimer>0&&t.loadingTimer<=15,disabled:t.loadingTimer>0&&t.loadingTimer<=15,"model-value":t.isOpen,class:"child-switch","inactive-color":"rgba(196, 196, 196, 0.4)",size:"14px"},null,8,["onClick","loading","disabled","model-value"])]),Object(a["createElementVNode"])("div",{class:"adjust-box",style:Object(a["normalizeStyle"])({opacity:t.runStatus&&t.isOpen?"":"0.3"})},[Object(a["createElementVNode"])("div",Sr,[Object(a["createVNode"])(i,{name:"arrow-up",class:Object(a["normalizeClass"])([t.tempSet>=e.airData.maxTempSet?"disable-color":"","adjust-icon"]),onClick:function(n){return e.changeChildItemAir("temp",t,"up")}},null,8,["class","onClick"]),Object(a["createElementVNode"])("div",yr,[Object(a["createElementVNode"])("div",{class:"value-wrap",style:Object(a["normalizeStyle"])({transform:e.valueHeight?"translateY("+-t.sel*e.valueHeight+"px)":"translateY(0px)"})},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.tempArr,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"value",key:t+"ct"},Object(a["toDisplayString"])(e),1)})),128))],4)]),Object(a["createVNode"])(i,{name:"arrow-down",class:Object(a["normalizeClass"])([t.tempSet<=e.airData.minTempSet?"disable-color":"","adjust-icon"]),onClick:function(n){return e.changeChildItemAir("temp",t,"down")}},null,8,["class","onClick"]),xr]),Object(a["createElementVNode"])("div",wr,[Object(a["createVNode"])(i,{name:"arrow-up",class:Object(a["normalizeClass"])([t.isAutoGear?"disable-color":"","adjust-icon"]),onClick:function(n){return e.changeChildItemAir("gear",t,"up")}},null,8,["class","onClick"]),Object(a["createElementVNode"])("div",Cr,[Object(a["createElementVNode"])("div",{class:"value-wrap",style:Object(a["normalizeStyle"])({transform:e.valueHeight?"translateY("+-t.gIndex*e.valueHeight+"px)":"translateY(0px)"})},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.gearArr,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"value",key:t+"g"},Object(a["toDisplayString"])(e),1)})),128))],4)]),Object(a["createVNode"])(i,{name:"arrow-down",class:Object(a["normalizeClass"])([!t.isAutoGear&&t.gear<=1?"disable-color":"","adjust-icon"]),onClick:function(n){return e.changeChildItemAir("gear",t,"down")}},null,8,["class","onClick"]),Er]),Object(a["createElementVNode"])("div",Dr,[Object(a["createVNode"])(i,{name:"arrow-up",class:Object(a["normalizeClass"])([t.workMode>=3?"disable-color":"","adjust-icon"]),onClick:function(n){return e.changeChildItemAir("model",t,"up")}},null,8,["class","onClick"]),Object(a["createElementVNode"])("div",Nr,[Object(a["createElementVNode"])("div",{class:"value-wrap",style:Object(a["normalizeStyle"])({transform:e.valueHeight?"translateY("+-t.mIndex*e.valueHeight+"px)":"translateY(0px)"})},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.modelArr,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"value",key:t+"m"},Object(a["toDisplayString"])(e),1)})),128))],4)]),Object(a["createVNode"])(i,{name:"arrow-down",class:Object(a["normalizeClass"])([t.workMode<=1?"disable-color":"","adjust-icon"]),onClick:function(n){return e.changeChildItemAir("model",t,"down")}},null,8,["class","onClick"]),Vr])],4)])})),128))])):Object(a["createCommentVNode"])("",!0)])}var Ar=Object(a["defineComponent"])({props:{temperature:{type:Number,default:function(){return 0}},hasAir:{type:Boolean,default:function(){return!1}},airVolumes:{type:Array,default:function(){return[]}},projectId:{type:String,default:function(){return""}},spaceId:{type:String,default:function(){return""}},userIsControl:{type:Boolean,default:function(){return!1}},forceOverTimeFlag:{type:Boolean,default:function(){return!1}},seviceEquipmentList:{type:Array,default:function(){return[]}}},components:Object(M["a"])({Switch:Va},te["a"].Component.name,te["a"].Component),setup:function(e,t){var n={avg:"",icon:1,spaceStatus:"",notice:"",mode:0,tempSet:0,maxTempSet:32,minTempSet:16,isAutoGear:0,workMode:0,gear:0,isOpen:!1,runStatus:0},r=null,o=!1,c=16,i=[0,1,2,3],l=[],s=null,m=null,u="",d=Object(a["reactive"])({seviceEquipmentList:e.seviceEquipmentList,valueDom:s,spaceId:u,valueHeight:m,equipList:l,cotrolLoading:!1,loadingTimer:0,airTemp:0,loadingAir:!1,windGearArr:i,lightIcon:"arrow-down",showChild:!1,realTemp:c,temperature:e.temperature,userIsControl:e.userIsControl,forceOverTimeFlag:e.forceOverTimeFlag,firstLoadingAir:!0,domAirOpeen:o,swiperIinit:!1,parseImgUrl:ge["x"],part:1,airData:n,modeName:"",showAirVolumeBtn:!1,showDialog:!1,airTimer:r,airSetText:{notice:"",remark:[],nowImg:"",toWhere:"",designTemperature:0},showAll:function(){return Object(q["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(d.showChild=!d.showChild,"arrow-up"===d.lightIcon?d.lightIcon="arrow-down":d.lightIcon="arrow-up",!d.showChild){e.next=7;break}return e.next=5,Object(a["nextTick"])((function(){d.setChildSelectList()}));case 5:e.next=9;break;case 7:return e.next=9,Object(a["nextTick"])((function(){d.barSwiperInit()}));case 9:case"end":return e.stop()}}),e)})))()},setBarNowPerstion:function(){d.realTemp=d.airTemp;var e=document.querySelector("#barId");if(e){var t=document.querySelector("#sliderId");if(d.airTemp>=d.airData.minTempSet&&d.airTemp<=d.airData.maxTempSet){var n=(d.airTemp-d.airData.minTempSet)/.5*d.part;n=Math.floor(n),e&&(e.style.left=n+"px")}else if(d.airTemp){if(d.airTemp<d.airData.minTempSet)e.style.left="0px";else if(d.airTemp>d.airData.maxTempSet){var a=t.offsetWidth,r=e.offsetWidth;e.style.left=a-r+"px"}}else e.style.left="0px"}},endBoxSwiper:function(){d.swiperIinit=!0;var e=document.querySelector("#handId"),t=document.querySelector("#barId"),n=document.querySelector("#sliderId"),a=!1,r=0,o=n?n.offsetWidth:1,c=t?t.offsetWidth:20,i=(d.airData.maxTempSet-d.airData.minTempSet)/20,l=.5/(i/(Math.floor(o)/22));d.part=l,e&&(e.addEventListener("touchstart",(function(e){r=isNaN(parseInt(t.style.left))?0:parseInt(t.style.left),a=!0})),e.addEventListener("touchend",(function(e){a=!1,d.changeZongAir("temp",d.realTemp),d.airTemp=d.realTemp})),Object(be["a"])(e,{swipeLeft:function(e){if(a){r=Math.abs(r);var n=Math.abs(e.mation.moveX-e.mation.startX),o=r-n;o=o<0?0:o,t.style.left=o+"px",d.realTemp=d.airData.minTempSet+.5*Math.ceil(o/l)}},swipeRight:function(e){if(a){r=Math.abs(r);var n=Math.abs(e.mation.moveX-e.mation.startX),i=r+n;i=i>o?o-c:i,t.style.left=i+"px",d.realTemp=d.airData.minTempSet+.5*Math.ceil(i/l),d.realTemp>d.airData.maxTempSet&&(d.realTemp=d.airData.maxTempSet)}}}))},getAirInfoToTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;d.airTimer&&(clearTimeout(d.airTimer),d.airTimer=null),d.airTimer=setTimeout((function(){d.getAirInfo()}),e)},setLoadingNumber:function(){var e=setInterval((function(){d.loadingTimer++,d.loadingTimer>=15&&(clearInterval(e),d.loadingAir=!1,d.getAirInfoToTimer(0))}),1e3)},formatAirData:function(e,t){var n={};if("temp"==e&&(n.codeKey="tempSetCode",n.value=t),"gear"==e&&"windLow"==t){if(!(d.airData.gear>1))return;d.airData.gear--,d.airData.isAutoGear=0,n.value=d.airData.gear,n.codeKey="gearCode"}if("gear"==e&&"windUp"==t){if(!(d.airData.gear<3))return;d.airData.gear++,d.airData.isAutoGear=0,n.value=d.airData.gear,n.codeKey="gearCode"}return"gear"==e&&"auto"==t&&(d.airData.isAutoGear=d.airData.isAutoGear?0:1,n.value=d.airData.isAutoGear?4:d.airData.gear,n.codeKey="gearCode"),"mode"==e&&(d.airData.workMode=t,n.codeKey="modeSetCode",n.value=t),n},loadingStart:function(){d.cotrolLoading=!0},loadinngEnd:function(){d.cotrolLoading=!1},setChildLoadingNumber:function(e){e.loadingTimer=1;var t=setInterval((function(){e.loadingTimer++,e.loadingTimer>=15&&(clearInterval(t),e.loadingTimer=0,d.getAirInfoToTimer(0))}),1e3)},childDisabled:function(e,t){clearTimeout(e.timeOuter),e.timeOuter=setInterval((function(){e.num--,0==e.num&&(d.setSpaceCondtioners(t),clearTimeout(e.timeOuter))}),1e3)},changeChildItemAir:function(e,n,a){var r=!n.isOpen,o=d.checkDeviceIsExeSpaceTime([n]);if(d.forceOverTimeFlag&&r&&o)t.emit("triggerWork",2,n);else if(n.isOpen||"switch"===e){var c=[];if("switch"===e){if(n.loadingTimer>=1&&n.loadingTimer<=15)return;n.isOpen=!n.isOpen,d.setChildLoadingNumber(n);var i={id:n.id,code:n.switchCode,value:n.isOpen?"1":"0"};c.push(i)}else if("temp"===e){if(n.num=2,"up"===a){if(n.tempSet>=d.airData.maxTempSet)return;n.tempSet=n.tempSet+.5}else if("down"===a){if(n.tempSet<=d.airData.minTempSet)return;n.tempSet=n.tempSet-.5}var l={id:n.id,code:n.tempSetCode,value:n.tempSet};c.push(l),d.childDisabled(n,c)}else if("gear"===e){if("up"===a){if(n.isAutoGear)return;n.gear>=3?n.isAutoGear=1:(n.gear++,n.isAutoGear=0)}else if("down"===a){if(!n.isAutoGear&&n.gear<=1)return;n.isAutoGear?(n.isAutoGear=0,n.gear=3):n.gear--}var s={id:n.id,code:n.gearCode,value:n.isAutoGear?4:n.gear};c.push(s)}else if("model"===e){if("up"===a){if(n.workMode>=3)return;n.workMode++}else if("down"===a){if(n.workMode<=1)return;n.workMode--}var m={id:n.id,code:n.modeSetCode,value:n.workMode};c.push(m)}"temp"!==e&&d.setSpaceCondtioners(c),d.updateChildPerstion()}},setSpaceCondtioners:function(e){Object(ve["O"])(e).then((function(e){d.loadinngEnd()})).catch((function(){d.loadinngEnd()}))},changeZongAir:function(e,t){if(n.runStatus){var a=d.formatAirData(e,t),r=[];d.equipList.map((function(e){var t={id:e.id,code:e[a.codeKey],value:a.value};r.push(t)})),d.cotrolLoading||(d.loadingStart(),d.setSpaceCondtioners(r))}},checkDeviceIsExeSpaceTime:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=d.seviceEquipmentList,n=!1,a=0;a<t.length;a++){for(var r=0;r<e.length;r++)if(t[a].id==e[r].id&&t[a].isExeSpaceTime){n=!0;break}if(n)break}return n},airChange:function(){var e=!d.airData.isOpen,n=d.checkDeviceIsExeSpaceTime(d.equipList);if(d.forceOverTimeFlag&&e&&n)t.emit("triggerWork",2);else{d.airData.isOpen=!d.airData.isOpen,d.loadingAir=!0,d.loadingTimer=0,clearTimeout(d.airTimer),d.setLoadingNumber();var a=[];d.equipList.map((function(e){var t={id:e.id,code:e.switchCode,value:d.airData.isOpen?"1":"0"};a.push(t)})),d.setSpaceCondtioners(a)}},formateSetChildStatus:function(){d.equipList.map((function(e){e.isOpen=1===e.runStatus}))},barSwiperInit:function(){return Object(q["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:d.airData.isOpen&&!d.showChild&&(d.endBoxSwiper(),d.setBarNowPerstion());case 1:case"end":return e.stop()}}),e)})))()},setChildSelectList:function(){d.equipList.map((function(e){for(var t=[],n=d.airData.minTempSet;n<=d.airData.maxTempSet;n+=.5)t.push(n);e.tempArr=t;var a=e.tempArr.findIndex((function(t){return t==e.tempSet}));e.sel=-1==a?0:a;var r=["制冷","制热","通风"];e.modelArr=r;var o=e.workMode?e.workMode-1:2;e.mIndex=o;var c=[0,1,2,3,"AUTO"];e.gearArr=c;var i=e.gearArr.findIndex((function(t){return 1==e.isAutoGear?"AUTO"==t:t==e.gear}));e.gIndex=-1==i?0:i})),d.setValueHeight()},setValueHeight:function(){d.valueHeight||(d.valueDom=d.valueDom?d.valueDom:document.querySelectorAll(".value")[0],d.valueHeight=d.valueDom?d.valueDom.offsetHeight:0)},updateChildPerstion:function(){d.equipList.map((function(e){var t=e.tempArr.findIndex((function(t){return t==e.tempSet}));e.sel=-1==t?0:t;var n=e.workMode?e.workMode-1:2;e.mIndex=n;var a=e.gearArr.findIndex((function(t){return 1==e.isAutoGear?"AUTO"==t:t==e.gear}));e.gIndex=-1==a?0:a}))},getAirInfo:function(){var e={spaceId:d.spaceId},t=Object(ge["A"])(e);Object(ve["H"])(t).then((function(e){var t=e.data||{};d.firstLoadingAir=!1,d.loadingAir=!1,d.airTemp=t.tempSet,d.airData.maxTempSet=t.maxTempSet,d.airData.minTempSet=t.minTempSet,d.airData.isOpen=!!t.runStatus,d.airData.runStatus=t.runStatus,d.airData.isAutoGear=t.isAutoGear,d.airData.gear=t.gear,d.airData.workMode=t.workMode,d.equipList=t.equipList,d.setChildSelectList(),d.formateSetChildStatus(),d.airData.isOpen?d.airData.airImg=Object(ge["x"])("page-officehome","openair.png"):d.airData.airImg=Object(ge["x"])("page-officehome","air_close.png"),Object(a["nextTick"])((function(){d.barSwiperInit()})),d.getAirInfoToTimer()})).catch((function(){}))}});return Object(a["watch"])(e,(function(t){t.spaceId&&(d.spaceId=t.spaceId,d.temperature=e.temperature,d.userIsControl=t.userIsControl,d.forceOverTimeFlag=t.forceOverTimeFlag,d.seviceEquipmentList=e.seviceEquipmentList)})),Object(a["onBeforeUnmount"])((function(){d.airTimer&&(clearTimeout(d.airTimer),d.airTimer=null)})),Object(a["onMounted"])((function(){d.spaceId=e.spaceId,d.getAirInfoToTimer(0)})),Object(L["a"])({},Object(a["toRefs"])(d))}});n("d587"),n("8385");const Lr=he()(Ar,[["render",Br],["__scopeId","data-v-49332094"]]);var Wr=Lr,qr=function(e){return Object(a["pushScopeId"])("data-v-6a545f18"),e=e(),Object(a["popScopeId"])(),e},Mr={key:0,class:"light"},Fr={class:"light-top"},Ur={class:"light-desc"},_r={class:"light-title"},Pr=qr((function(){return Object(a["createElementVNode"])("span",null,"显示全部",-1)})),Rr={class:"light-right"},Hr=["src"],zr={class:"control-title"};function Yr(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-icon"),l=Object(a["resolveComponent"])("Switch");return e.lampList&&e.lampList.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Mr,[Object(a["createElementVNode"])("div",Fr,[Object(a["createElementVNode"])("div",Ur,[Object(a["createElementVNode"])("p",_r,Object(a["toDisplayString"])(e.isShowChildLight?"光照":e.lampList[0].localName),1),Object(a["createElementVNode"])("p",{class:Object(a["normalizeClass"])((e.isShowChildLight,"light-status"))},Object(a["toDisplayString"])(e.lampSw?"照明已开启":"照明已关闭"),3),e.isShowChildLight?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"show-all",onClick:t[0]||(t[0]=Object(a["withModifiers"])((function(){return e.showAll&&e.showAll.apply(e,arguments)}),["stop"]))},[Object(a["createVNode"])(i,{name:e.lightIcon,class:"light-icon"},null,8,["name"]),Pr])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",Rr,[Object(a["createElementVNode"])("img",{src:e.lightImg,alt:""},null,8,Hr),e.showFlag?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,disabled:!e.userIsControl,modelValue:e.lampSw,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.lampSw=t}),onClick:t[2]||(t[2]=function(t){return e.eqChange("allLamp","",0)}),"inactive-color":"rgba(196, 196, 196, 0.4)",class:"switch-btn"},null,8,["disabled","modelValue"]))])]),e.showFlag&&e.isShowChildLight?(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],{key:0},Object(a["renderList"])(e.lampList,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"light-control",key:t.id},[Object(a["createElementVNode"])("div",zr,Object(a["toDisplayString"])(t.localName),1),Object(a["createVNode"])(l,{"active-color":"$elActiveColor",disabled:!e.userIsControl,modelValue:t.switch,"onUpdate:modelValue":function(e){return t.switch=e},onClick:function(a){return e.eqChange("main",t,n)},"inactive-color":"rgba(196, 196, 196, 0.2)",class:"switch-btn"},null,8,["disabled","modelValue","onUpdate:modelValue","onClick"])])})),128)):Object(a["createCommentVNode"])("",!0)])):Object(a["createCommentVNode"])("",!0)}n("4de4");var Gr=Object(a["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},controlMode:{type:Number,default:function(){return 0}},spaceId:{type:String,default:function(){return""}},userIsControl:{type:Boolean,default:function(){return!1}},forceOverTimeFlag:{type:Boolean,default:function(){return!1}},seviceEquipmentList:{type:Array,default:function(){return[]}}},components:{Switch:Va},setup:function(e,t){var n=[],r=null,o=null,c=[],i=[],l=Object(a["reactive"])({seviceEquipmentList:e.seviceEquipmentList,controlMode:e.controlMode,userIsControl:e.userIsControl,forceOverTimeFlag:e.forceOverTimeFlag,setStatus:!1,lightParams:i,allowSvg:"down_Arrow.svg",timeOut:o,lightIcon:"arrow-down",showFlag:!1,loadingLight:!1,initData:c,lampList:n,lightsStatusTimer:r,startCheckLightsTime:0,lightImg:Object(ge["x"])("page-officehome","lamp_close_v2.png"),lampSw:!1,showAll:function(){l.showFlag=!l.showFlag,l.lightIcon="arrow-down"},checkDeviceIsExeSpaceTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(1!==l.controlMode)return!0;for(var t=l.seviceEquipmentList,n=!1,a=0;a<t.length;a++){for(var r=0;r<e.length;r++)if(t[a].id==e[r].id&&t[a].isExeSpaceTime){n=!0;break}if(n)break}return n},getLampList:function(){Object(ve["m"])({spaceId:e.spaceId}).then((function(e){var t=e;if(!l.setStatus&&t&&"success"==t.result){for(var n,a=null!==(n=null===t||void 0===t?void 0:t.content)&&void 0!==n?n:[],r=!1,o=0;o<a.length;o++)a[o].type="lamp",a[o].imgOpen=Object(ge["x"])("page-officehome","lampch_open.png"),a[o].imgClose=Object(ge["x"])("page-officehome","lampch_close.png"),a[o].switch=!!a[o].runStatus,a[o].runStatus&&(r=!0),a[o].loading=!1;l.initData=JSON.parse(JSON.stringify(a)),l.lampSw=r,l.lampList=a,l.lightImg=l.lampSw?Object(ge["x"])("page-officehome","lamp_open_v2.png"):Object(ge["x"])("page-officehome","lamp_close_v2.png")}l.startLightsStatusTimer()})).catch((function(){l.startLightsStatusTimer()}))},eqChange:function(e,n,a){if(l.userIsControl)if("allLamp"===e){var r=l.checkDeviceIsExeSpaceTime(l.lampList);if(l.forceOverTimeFlag&&l.lampSw&&r)return void t.emit("triggerWork",3);l.loadingLight=!0;var o=l.lampSw;l.setStatus=!0,l.updateAllLampStatus(o),l.setLamp(e,"",o,0)}else{var c=l.checkDeviceIsExeSpaceTime([n]);if(l.forceOverTimeFlag&&n.switch&&c)return void t.emit("triggerWork",3,n);n.loading=!0;var i=n.switch,s=n.id;l.setStatus=!0,l.updateLampStatus(n,i),l.setLamp(e,s,i,a)}else Object(Ba["a"])("您没有当前空间的控制权限!")},setLamp:function(e,t,n,a){var r=[];if("allLamp"===e){for(var o=0;o<l.initData.length;o++)l.initData[o].switch=n;r=l.initData}else r=[{id:t,switch:n}];l.lightParams=r,Object(ve["P"])(r).then((function(e){var t=e;setTimeout((function(){l.setStatus=!1}),1e3),"success"===t.result||l.initLampLoading()})).catch((function(){setTimeout((function(){l.setStatus=!1}),1e3)}))},initLampLoading:function(){l.loadingLight=!1,l.lampList.map((function(e){e.loading=!1}))},updateAllLampStatus:function(e){l.lampSw=e;for(var t=0;t<l.lampList.length;t++)l.lampList[t].switch=e},updateLampStatus:function(e,t){e.switch=t},getTimeLampStatus:function(e,t,n,a,r){if(e["success"]&&e["success"].length&&("allLamp"===t?l.updateAllLampLoading(e["success"]):l.updateLampLoading(r),l.getLampList()),e["processing"]&&e["processing"].length){var o=l.lightParams,c=e["processing"],i=[];c.map((function(e){for(var t={id:e.id,orderSeqNum:e.orderSeqNum},n=0;n<o.length;n++)if(e.id===o[n].id){t.switch=o[n].switch;break}i.push(t)})),l.checkChangeLightStatusSuccess(i,t,n,a,r)}e["error"]&&e["error"].length&&("allLamp"===t?l.updateAllLampLoading(e["error"]):l.updateLampLoading(r))},judgeChangeResponeseSuccess:function(e){for(var t,n=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:[],a=[],r=[],o=[],c=0;c<n.length;c++){var i=n[c];(i.result="success")?200===i.state&&"success"===i.exeResult?r.push(i):200===i.state&&"processing:rcvd"===i.exeResult||202===i.state&&!i.exeResult?a.push(i):o.push(i):o.push(i)}var l={success:r,processing:a,error:o};return l},updateAllLampLoading:function(e){for(var t=function(t){"lamp"==l.lampList[t].type&&e.map((function(e){l.lampList[t].id===e.id&&(l.lampList[t].loading=!1)}))},n=0;n<l.lampList.length;n++)t(n);var a=l.lampList.filter((function(e){return e.loading}));0===a.length&&(l.loadingLight=!1)},updateLampLoading:function(e){l.lampList[e].loading=!1},checkChangeLightStatusSuccess:function(e,t,n,a,r){Object(ve["A"])(e).then((function(e){var o=e,c=l.judgeChangeResponeseSuccess(o);l.getTimeLampStatus(c,t,n,a,r)}))},clearLightStatusTimer:function(){clearTimeout(l.lightsStatusTimer),l.lightsStatusTimer=null},startLightsStatusTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;l.lightsStatusTimer=setTimeout((function(){l.getLampList(),l.clearLightStatusTimer()}),e)}}),s=Object(a["computed"])((function(){return l.lampList.length&&l.lampList.length>1}));return Object(a["watch"])(e,(function(e){l.userIsControl=e.userIsControl,l.controlMode=e.controlMode,l.forceOverTimeFlag=e.forceOverTimeFlag,l.seviceEquipmentList=e.seviceEquipmentList,e.spaceId&&(l.clearLightStatusTimer(),l.getLampList())}),{deep:!1,immediate:!0}),Object(a["onBeforeUnmount"])((function(){l.clearLightStatusTimer()})),Object(a["onMounted"])((function(){})),Object(L["a"])({isShowChildLight:s},Object(a["toRefs"])(l))}});n("40d3"),n("e2f4");const Jr=he()(Gr,[["render",Yr],["__scopeId","data-v-6a545f18"]]);var Xr=Jr,Kr=function(e){return Object(a["pushScopeId"])("data-v-e5733310"),e=e(),Object(a["popScopeId"])(),e},$r={key:0,class:"curtain"},Zr={class:"curtain-top"},Qr={class:"curtain-desc"},eo={class:"curtain-title"},to={class:"curtain-status"},no={class:"curtain-tip"},ao=Kr((function(){return Object(a["createElementVNode"])("span",null,"显示全部",-1)})),ro={class:"curtain-right"},oo=["src"],co={key:0,class:"curtain-control"},io={key:0,class:"timer-text"},lo=["src"],so={key:0,class:"timer-text"},mo=["src"],uo={class:"child-title"},po={class:"curtain-control"},fo=["onClick"],bo={key:0,class:"timer-text"},go=["src"],vo=["onClick"],Oo={key:0,class:"timer-text"},jo=["src"];function ho(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-icon");return e.curtainData&&e.curtainData.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",$r,[Object(a["createElementVNode"])("div",Zr,[Object(a["createElementVNode"])("div",Qr,[Object(a["createElementVNode"])("p",eo,Object(a["toDisplayString"])(e.curtainData.length&&1==e.curtainData.length?e.curtainData[0].name:"窗帘"),1),Object(a["createElementVNode"])("p",to,[Object(a["createElementVNode"])("span",no,Object(a["toDisplayString"])(e.countText),1)]),e.isShowChildLight?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"show-all",onClick:t[0]||(t[0]=function(){return e.showAll&&e.showAll.apply(e,arguments)})},[Object(a["createVNode"])(i,{name:e.lightIcon,class:"curtain-icon"},null,8,["name"]),ao])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",ro,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","curtain-img.svg"),alt:""},null,8,oo),e.showFlag?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",co,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["control-item mr10",{"box-active":e.curtainClose&&e.count,"control-item-disabled":!e.userIsControl}]),onClick:t[1]||(t[1]=function(t){return e.handleTotal("EquipOffSet")})},[e.curtainClose&&e.count?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",io,Object(a["toDisplayString"])(e.count),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:e.parseImgUrl("page-officehome","curtain-close.png"),alt:""},null,8,lo))],2),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["control-item",{"box-active":e.curtainOpen&&e.count,"control-item-disabled":!e.userIsControl}]),onClick:t[2]||(t[2]=function(t){return e.handleTotal("EquipOnSet")})},[e.curtainOpen&&e.count?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",so,Object(a["toDisplayString"])(e.count),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:e.parseImgUrl("page-officehome","curtain-open.png"),alt:""},null,8,mo))],2)]))])]),e.showFlag?(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],{key:0},Object(a["renderList"])(e.curtainData,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"child-curtain",key:t.id},[Object(a["createElementVNode"])("div",uo,Object(a["toDisplayString"])(t.name),1),Object(a["createElementVNode"])("div",po,[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["control-item mr10",{"box-active":t.curtainClose&&e.count,"control-item-disabled":!e.userIsControl}]),onClick:function(a){return e.handleChild("EquipOffSet",t.id,n)}},[t.curtainClose&&e.count?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",bo,Object(a["toDisplayString"])(e.count),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:e.parseImgUrl("page-officehome","curtain-close.png"),alt:""},null,8,go))],10,fo),Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["control-item",{"box-active":t.curtainOpen&&e.count,"control-item-disabled":!e.userIsControl}]),onClick:function(a){return e.handleChild("EquipOnSet",t.id,n)}},[t.curtainOpen&&e.count?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Oo,Object(a["toDisplayString"])(e.count),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:e.parseImgUrl("page-officehome","curtain-open.png"),alt:""},null,8,jo))],10,vo)])])})),128)):Object(a["createCommentVNode"])("",!0)])):Object(a["createCommentVNode"])("",!0)}var To=Object(a["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},spaceId:{type:String,default:function(){return""}},userIsControl:{type:Boolean,default:function(){return!1}}},setup:function(e){var t=[],n=null,r=e.projectId,o=Object(a["reactive"])({curtainData:t,userIsControl:e.userIsControl,lightIcon:"arrow-down",showFlag:!1,projectId:r,countText:"",count:0,curtainOpen:!1,curtainClose:!1,parseImgUrl:ge["x"],timer:n,getEqpGroup:function(){var t={criteria:{projectId:e.projectId,spaceId:e.spaceId,type:0},orders:[{column:"sortNum",asc:!0}]};Object(ve["p"])(t).then((function(e){var t=e;o.curtainData=t.count?t.content:[];for(var n=0;n<o.curtainData.length;n++){var a=o.curtainData[n];a.childDownFlag=!1,a.childUpFlag=!1,a.childCount=2,a.childCountText=""}}))},showAll:function(){o.showFlag=!o.showFlag,o.showFlag?o.lightIcon="arrow-up":o.lightIcon="arrow-down"},checkCount:function(){return o.count>0},handleTotal:function(e){if(o.userIsControl){var t=o.checkCount();if(!t){o.changeStatus(e);var n=JSON.parse(JSON.stringify(o.curtainData)),a=o.setParams(n,e);o.setSwitchStatus(e),Object(ve["N"])(a).then((function(e){}))}}else Object(Ba["a"])("您没有当前空间的控制权限!")},handleChild:function(e,t,n){if(o.userIsControl){var a=o.checkCount();if(!a){var r=o.curtainData[n],c={projectId:o.projectId,objectId:t,equipmentCategory:"CFSSES",infoCode:e,value:1},i=[];i.push(c),o.changeStatus(e,r),o.setSwitchStatus(e,r),Object(ve["N"])(i).then((function(e){}))}}else Object(Ba["a"])("您没有当前空间的控制权限!")},clearCurtain:function(){o.curtainData.map((function(e){e.curtainClose=!1,e.curtainOpen=!1,o.curtainClose=!1,o.curtainOpen=!1}))},changeStatus:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;o.clearCurtain(),"EquipOffSet"===e?t?t.curtainClose=!0:o.curtainClose=!0:t?t.curtainOpen=!0:o.curtainOpen=!0},setSwitchStatus:function(e){o.count=2,o.countText="指令下发中",o.timer=setInterval((function(){0===o.count&&(o.countText="",clearInterval(o.timer),o.clearCurtain()),1===o.count&&(o.countText="再次点击停止窗帘"),o.count>0?o.count--:o.count=0}),1e3)},setParams:function(e,t){for(var n=[],a=0;a<e.length;a++){var r={objectId:e[a].id,equipmentCategory:"CFSSES",infoCode:t,value:1};n.push(r)}return n}}),c=Object(a["computed"])((function(){return o.curtainData.length&&o.curtainData.length>1}));return Object(a["watch"])(e,(function(e){e.spaceId&&(o.getEqpGroup(),o.userIsControl=e.userIsControl)})),Object(a["onMounted"])((function(){o.getEqpGroup()})),Object(L["a"])({isShowChildLight:c},Object(a["toRefs"])(o))}});n("9588");const ko=he()(To,[["render",ho],["__scopeId","data-v-e5733310"]]);var Io=ko,So=function(e){return Object(a["pushScopeId"])("data-v-18f3164f"),e=e(),Object(a["popScopeId"])(),e},yo=So((function(){return Object(a["createElementVNode"])("div",{class:"top"},[Object(a["createElementVNode"])("span",null,"选择工作结束时间")],-1)})),xo={class:"btns"};function wo(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-picker");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[yo,(Object(a["openBlock"])(),Object(a["createBlock"])(i,{ref:"picker","show-toolbar":!1,"default-index":e.defaultIndex,onChange:e.onChange,loading:e.loading,key:e.account_type_value,columns:e.columns},null,8,["default-index","onChange","loading","columns"])),Object(a["createElementVNode"])("div",xo,[Object(a["createElementVNode"])("span",{onClick:t[0]||(t[0]=function(){return e.triggerComfirm&&e.triggerComfirm.apply(e,arguments)}),class:"btn btn_com"},"确定")])])}n("ddb0");var Co=n("f253"),Eo=(n("a526"),Object(a["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},show:{type:Boolean,default:function(){return!1}},nextCusStartTime:{type:Number,default:function(){return 0}},cusStartTime:{type:Number,default:function(){return 0}},cusEndTime:{type:Number,default:function(){return 0}},spaceId:{type:String,default:function(){return""}},currentValue:{type:Array,default:function(){return[0,0]}},workInfo:{type:Object,default:function(){}}},components:{VanPicker:Co["b"]},setup:function(e,t){var n=Object(a["ref"])(null),r=[{values:["今天","明天"]},{values:[]}],o=[],c=[],i=Object(a["reactive"])({columns:r,loading:!1,defaultIndex:0,account_type_value:"0+3",checkValues:c,timeList:o,tempVal:"",onChange:function(e){e[0]!==i.tempVal&&(i.loading=!0,i.tempVal=e[0]),"今天"===e[0]?i.formatColumns(0):i.formatColumns(1)},setDefaultTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;i.defaultIndex=e;var a=i.columns[1].values;a.map((function(e,n){t===e&&n})),n.value.setColumnValue(e,t);t||a[0]},formatColumns:function(t){var n=[];if(0===t){var a=Object(ge["h"])(),r=0,o=0;if(e.cusStartTime&&a+2<e.cusStartTime)r=a+1,o=e.cusStartTime;else if(e.cusStartTime&&a+2>=e.cusStartTime)a>e.cusEndTime?(r=a+1,o=24):(r=e.cusEndTime+1,o=24);else{if(e.cusStartTime)return;r=a+1,o=24}for(var c=r;c<o+1;c++){var l={label:"".concat(c,":00"),value:c};n.push(l)}}else for(var s=1;s<e.nextCusStartTime;s++){var m=s;m<10&&(m="0"+s);var u={label:"".concat(m,":00"),value:Number(m)};n.push(u)}i.timeList=n;for(var d=[],p=0;p<i.timeList.length;p++)d.push(i.timeList[p].label);i.columns[1].values=d,setTimeout((function(){i.loading=!1}),1e3)},triggerComfirm:function(){var e=n.value.getValues();i.checkValues=[e[0],e[1]],i.checkValues[0]&&i.checkValues[1]?i.setWorkOverTime():Object(Ba["a"])("请选择时间")},setWorkOverTime:function(){var n=Object(ge["a"])();"明天"===i.checkValues[0]&&(n=Object(ge["r"])());var a=i.checkValues[1];a=a.replace(":","");var r={projectId:e.projectId,objectId:e.spaceId,endDate:n,endTime:a+"00",type:2};Object(ve["a"])(r).then((function(e){var n=e;n.result,t.emit("setWorkTime")})).catch((function(){t.emit("setWorkTime")}))},init:function(){var t=e.workInfo.text,n=e.workInfo.textTime;"明天"===t?(i.formatColumns(1),i.setDefaultTime(1,n)):(i.formatColumns(0),i.setDefaultTime(0,n))}});return Object(a["onMounted"])((function(){i.init()})),Object(L["a"])({picker:n},Object(a["toRefs"])(i))}}));n("0970");const Do=he()(Eo,[["render",wo],["__scopeId","data-v-18f3164f"]]);var No=Do,Vo={class:"nav"},Bo={class:"nav-left"},Ao=["onClick"],Lo=["src"],Wo=["src"],qo={class:"nav-right"},Mo=["onClick"],Fo=["src"],Uo=["src"];function _o(e,t,n,r,o,c){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Vo,[Object(a["createElementVNode"])("div",Bo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.navData,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["nav-item",e.activeCode===t.code?"nav-active":""]),onClick:function(a){return e.checkNav(t,n)},key:"nav"+n},[e.activeCode===t.code?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:t.activeImg,alt:""},null,8,Lo)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:t.img,alt:""},null,8,Wo))],10,Ao)),[[a["vShow"],n<3&&t.noShow]])})),128))]),Object(a["createElementVNode"])("div",qo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.navData,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["nav-item",e.activeCode===t.code?"nav-active":""]),onClick:function(a){return e.checkNav(t,n)},key:"nav"+n},[e.activeCode===t.code?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:t.activeImg,alt:""},null,8,Fo)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:t.img,alt:""},null,8,Uo))],10,Mo)),[[a["vShow"],n>=3&&t.noShow]])})),128))])])}var Po=Object(a["defineComponent"])({props:{navList:{type:Array,default:function(){return[]}}},setup:function(e,t){Object(At["d"])();var n=[],r=Object(a["reactive"])({activeCode:"air",navData:n,setNavValue:function(e){r.navData=e},checkNav:function(e,n){r.activeCode=e.code,t.emit("changeNav",e)},setActiveCode:function(e){r.activeCode=e}});return Object(a["watch"])(e.navList,(function(e,t){r.setNavValue(e)})),Object(a["onMounted"])((function(){r.setNavValue(e.navList)})),Object(L["a"])({},Object(a["toRefs"])(r))}});n("7c22");const Ro=he()(Po,[["render",_o],["__scopeId","data-v-1f8e6930"]]);var Ho=Ro,zo={class:"scene-dailog"},Yo={class:"title"},Go={class:"dailog-content"},Jo=["src"],Xo={class:"status-text1"},Ko=Object(a["createTextVNode"])(" 切换至 "),$o=Object(a["createTextVNode"])(" 场景 "),Zo=Object(a["createTextVNode"])("切换中..."),Qo={key:1,class:"status-text2"},ec={key:0},tc=Object(a["createTextVNode"])("我知道了");function nc(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-loading"),l=Object(a["resolveComponent"])("buttons");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",zo,[Object(a["createElementVNode"])("div",Yo,Object(a["toDisplayString"])(e.secenaroStatus.localName),1),Object(a["createElementVNode"])("div",Go,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","taolun-big.svg")},null,8,Jo),Object(a["createElementVNode"])("span",Xo,[Ko,Object(a["createElementVNode"])("i",null,Object(a["toDisplayString"])(e.secenaroStatus.sceneName),1),$o]),e.secenaroStatus.loading?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:0,class:"status-text2"},{default:Object(a["withCtx"])((function(){return[Zo]})),_:1})):Object(a["createCommentVNode"])("",!0),e.secenaroStatus.loading?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Qo,[e.secenaroStatus.lodingText?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ec," 已为您切换至适宜"+Object(a["toDisplayString"])(e.secenaroStatus.sceneName)+"的环境",1)):Object(a["createCommentVNode"])("",!0)]))]),Object(a["createVNode"])(l,{class:"dailog-btn",onClick:e.closeDailog},{default:Object(a["withCtx"])((function(){return[tc]})),_:1},8,["onClick"])])}var ac=Object(a["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},scenarioArr:{type:Array,default:function(){return[]}},secenaroStatus:{type:Object,default:function(){}}},components:{VanLoading:kt["b"]},setup:function(e,t){var n=Object(a["reactive"])({parseImgUrl:ge["x"],secenaroStatus:e.secenaroStatus,closeDailog:function(){t.emit("closeDailog")}});return Object(a["watch"])(e,(function(e){n.secenaroStatus=e.secenaroStatus}),{deep:!1,immediate:!0}),Object(a["onMounted"])((function(){})),Object(L["a"])({},Object(a["toRefs"])(n))}});n("5c73");const rc=he()(ac,[["render",nc],["__scopeId","data-v-f8a217b2"]]);var oc=rc,cc=n("cda6"),ic={class:"map-home map-home-pading"},lc={class:"map-top"};function sc(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("map-box"),l=Object(a["resolveComponent"])("space-box");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ic,[Object(a["createElementVNode"])("div",lc,[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(1==e.type?"span-active":""),onClick:t[0]||(t[0]=function(t){return e.checkMapType(1)})},"列表",2),Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(2==e.type?"span-active":""),onClick:t[1]||(t[1]=function(t){return e.checkMapType(2)})},"地图",2)]),2===e.type?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:0,mapType:1,spaceData:e.spaceData,projectId:e.projectId,floorId:e.floorId,spaceInfo:e.spaceInfo,buildingId:e.buildingId,onChangeSpace:e.changeSpace},null,8,["spaceData","projectId","floorId","spaceInfo","buildingId","onChangeSpace"])):Object(a["createCommentVNode"])("",!0),1===e.type?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:1,spaceData:e.spaceData,spaceInfo:e.spaceInfo,onChangeSpace:e.changeSpace},null,8,["spaceData","spaceInfo","onChangeSpace"])):Object(a["createCommentVNode"])("",!0)])}var mc={class:"space-home"},uc={class:"com-search"},dc={class:"search-icon"},pc=["src"],fc={class:"space-box"},bc=["onClick"];function gc(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-search");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",mc,[Object(a["createElementVNode"])("div",uc,[Object(a["createVNode"])(i,{placeholder:"搜索办公区",modelValue:e.searchValue,"onUpdate:modelValue":[t[0]||(t[0]=function(t){return e.searchValue=t}),e.onSearch],onClear:e.onCancel},null,8,["modelValue","onUpdate:modelValue","onClear"]),Object(a["createElementVNode"])("div",dc,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("search-icon","search-icon.svg"),alt:""},null,8,pc)])]),Object(a["createElementVNode"])("div",fc,[e.spaceData&&e.spaceData.length?(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],{key:0},Object(a["renderList"])(e.spaceData,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["space-item",e.activeSpace.spaceId==t.spaceId?"space-active-item":""]),key:"spaceItem"+n,onClick:function(a){return e.changeSpace(t,n)}},[Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.spaceName),1)],10,bc)})),128)):Object(a["createCommentVNode"])("",!0)])])}var vc=n("d961"),Oc=(n("5852"),Object(a["defineComponent"])({props:{spaceData:{type:Array,default:function(){return[]}},spaceInfo:{type:Object,default:function(){}}},components:{vanSearch:vc["a"]},setup:function(e,t){Object(At["d"])();var n=Object(ge["s"])(),r=(Object(Lt["b"])(),[]),o=Object(a["reactive"])({parseImgUrl:ge["x"],userInfo:n,spaceData:r,searchValue:"",activeSpace:e.spaceInfo,changeSpace:function(e,n){o.activeSpace=e,t.emit("changeSpace",e)},queryWorkSpace:function(){var e={criteria:{projectId:o.userInfo.projectId,spaceName:o.searchValue,macAddress:o.userInfo.mac},orders:[{column:"isMajorSpace",asc:!1}]};Object(ve["J"])(e).then((function(e){var t,n=e;"success"===n.result?o.spaceData=null!==(t=null===n||void 0===n?void 0:n.content)&&void 0!==t?t:[]:o.spaceData=[]}))},onSearch:function(){o.queryWorkSpace()},onCancel:function(){}});return Object(a["onMounted"])((function(){})),Object(a["watch"])(e,(function(e){o.spaceData=e.spaceData,o.activeSpace=e.spaceInfo}),{deep:!1,immediate:!0}),Object(L["a"])({},Object(a["toRefs"])(o))}}));n("f1fd");const jc=he()(Oc,[["render",gc],["__scopeId","data-v-4b041186"]]);var hc=jc,Tc=n("772a"),kc=(n("38d5"),n("565f")),Ic=(n("be7f"),n("34e9")),Sc=(n("0653"),n("b650")),yc=(n("66b9"),Object(a["defineComponent"])({props:{spaceData:{type:Array,default:function(){return[]}},projectId:{type:String,default:function(){return""}},buildingId:{type:String,default:function(){return""}},floorId:{type:String,default:function(){return""}},spaceInfo:{type:Object,default:function(){}}},components:{vanForm:Tc["a"],vanField:kc["b"],CellGroup:Ic["a"],vanButton:Sc["b"],SpaceBox:hc,MapBox:Nn["a"]},setup:function(e,t){Object(At["d"])();var n=null,r=(Object(Lt["b"])(),Object(a["reactive"])({type:1,spaceData:e.spaceData,showMap:n,changeSpace:function(e){t.emit("changeSpace",e,1)},buildingId:e.buildingId,floorId:e.floorId,spaceInfo:e.spaceInfo,checkMapType:function(e){r.type=e},getMapInfo:function(){var t={projectId:e.projectId,floorId:r.floorId};Object(ve["n"])(t).then((function(e){var t=e;if("success"===t.result){var n,a=null!==(n=null===t||void 0===t?void 0:t.data)&&void 0!==n?n:null;a&&a.spaceList&&a.spaceList.length?r.showMap=!0:r.showMap=!1}else r.showMap=!1})).catch((function(){r.showMap=!1}))}}));return Object(a["onMounted"])((function(){r.getMapInfo()})),Object(a["watch"])(e,(function(e){r.spaceData=e.spaceData,r.buildingId=e.buildingId,r.floorId=e.floorId,r.spaceInfo=e.spaceInfo}),{deep:!1,immediate:!0}),Object(L["a"])({},Object(a["toRefs"])(r))}}));n("fe6d");const xc=he()(yc,[["render",sc],["__scopeId","data-v-55c81230"]]);var wc,Cc=xc,Ec=n("e41f"),Dc=(n("8a58"),n("66d6")),Nc=n("6a79"),Vc=Object(a["defineComponent"])({components:(wc={MapBox:Nn["a"],ComMap:Cc,ScenarioDailog:oc,Header:zn,Comheader:Yn["a"],NavBar:Ho,Air:Wa,ManualIndex:Wr,ManualOvertime:st,Light:Xr,Curtain:Io,TimeBox:No,WorkOvertime:ke,WorkConfig:Zt,ManualConfig:In,ScenarioConfig:Dn,Detail:cc["default"],Contact:xt},Object(M["a"])(wc,te["a"].Component.name,te["a"].Component),Object(M["a"])(wc,"VanPopup",Ec["b"]),Object(M["a"])(wc,"VanIcon",Pn["b"]),wc),setup:function(){var e=Object(a["getCurrentInstance"])(),t=Object(At["d"])(),n=Object(At["c"])(),r=window.document,o=r.body.clientHeight,c={},i=null,l={},s={},m={hasAir:!0,hasBlowing:!1,hasLamp:!1},u=[],d={},p={},f=Lt["a"].state.user.projectId,b={},g={},v={},O={},j=null,h={headImg:"",headScene:"",tipText:"选择工作结束时间",tipTextSwatch:!1},T={curtain:!1,light:!1,airConditioner:!1,bodySensor:!1},k={},I=null,S={},y=Object(ge["s"])(),x=null,w=[{id:0,code:"DISCUSSING",name:"会议模式",img:"scene_work.svg",checked:!0,textObj:[{text:"照明灯光已全部为您开启",status:"ok"},{text:"演示设备已为您准备",status:"ok"},{text:"空调已为您开启",type:"air",status:"ok"}]},{id:1,code:"PROJECTING",name:"投影模式",img:"scene_visitor.svg",checked:!1,textObj:[{text:"主灯已为您关闭,氛围灯为您开启",status:"ok"},{text:"演示设备已为您开启",status:"ok"},{text:"空调已为您开启",type:"air",status:"ok"},{text:"窗帘已为您关闭",status:"ok"}]},{id:2,code:"ADJOURNMENT",name:"全关模式",img:"scene_rest.svg",checked:!1,textObj:[{text:"照明灯光2min后将全部关闭",status:"ok"},{text:"演示设备已为您关闭",status:"ok"},{text:"空调全部关闭",type:"air",status:"ok"},{text:"窗帘已为您关闭",status:"ok"}]}],C=[],E=null,D=null,N=[{id:2,name:"甲醛",num:"",level:"",bgColor:"",img:"jiaquan.svg",funcid:"HCHO",code:"jiaquan",unit:"mg/m³"},{id:0,name:"CO₂",bgColor:"",num:"",level:"",img:"co2.svg",funcid:"CO2",code:"co2",unit:"ppm"},{id:1,name:"PM2.5",bgColor:"",num:"",level:"",funcid:"PM2d5",img:"pm2.5.svg",code:"pm25",unit:"ug/m³"},{id:3,name:"湿度",bgColor:"",img:"humidity.svg",num:"",level:"",funcid:"Tdb,RH",code:"shidu",unit:"%"}],V=[],B=[],A=[],M=[],F=[],U={},_=Object(ge["a"])("YYYY.MM.DD HH:mm"),P=Object(ge["l"])(),R=[],H=0,z=null,Y=[],G=[],J=null,X=Object(a["reactive"])({equipTimer:J,seviceEquipmentList:Y,spaceEquipList:G,enterType:1,deviceItem:z,parseImgUrl:ge["x"],fileUrl:e.proxy.$fileUrl,nowDate:_,nowWeek:P,isShowWork:!1,isShowMetting:!1,localName:"",airTemp:"",userIsControl:!0,spaceModelTimer:E,spaceTempTimer:D,userSpaceInfo:C,spaceTimer:x,workInfo:S,intervalTimer:I,roomType:"",showSpaceTip:!1,mapOpacity:0,opacityV:1,childRef:k,hideTopImg:!1,isBottom:!1,isScrool:!1,officeData:s,popList:u,popupType:"scenario",showSecenDetailDalig:!1,sceneDetail:b,showScenario:!1,projectId:f,spaceInfo:p,headerInfo:h,topbgimg:"",userInfo:y,deviceIcon:"arrow",visible:!1,outWeather:c,vanPopupIndex:"",spaceEqFlagObj:m,spaceExistenceDevice:T,listOffice:[{id:0,name:"工作",code:"work",img:"scene_work.svg",checked:!0,textObj:[{text:"办公区灯光已全部为您开启",status:"ok"},{text:"正在将温度调至 26℃",status:"ok"},{text:"窗帘已为您全部打开",status:"ok"},{text:"饮用水已为您准备",status:"ok"}]},{id:1,name:"会客",code:"guest",img:"scene_visitor.svg",checked:!1,textObj:[{text:"会客区照明已为您开启",status:"ok"},{text:"空调已为您切换至会客温度,目标温度24℃",status:"ok"},{text:"窗帘已为您全部开启",status:"ok"},{text:"演示设备已为您准备",status:"ok"},{text:"饮用水已为您准备",status:"ok"}]},{id:2,name:"休息",code:"rest",img:"scene_rest.svg",checked:!1,textObj:[{text:"主灯已关闭,氛围灯将为您开启",status:"ok"},{text:"空调将为您调节至适宜休息的温度,目标温度26℃",status:"ok"},{text:"窗帘已为您全部关闭",status:"ok"}]}],listSen:w,isACATVA:!1,showWorkOff:!1,envlist:N,realEevList:A,navList:[{top:0,id:"airId",code:"air",name:"温度/湿度",noShow:!0,img:Object(ge["x"])("page-officehome","temp.png"),activeImg:Object(ge["x"])("page-officehome","temp_active.svg")},{top:0,id:"lightId",code:"lamp",name:"光照",noShow:!1,img:Object(ge["x"])("page-officehome","lamp.png"),activeImg:Object(ge["x"])("page-officehome","lamp_active.svg")},{top:0,id:"curtainId",code:"curtain",name:"窗帘",noShow:!1,img:Object(ge["x"])("page-officehome","curtain-nav.svg"),activeImg:Object(ge["x"])("page-officehome","curtain-nav-active.svg")},{top:0,id:4,code:"mySpace",name:"常驻空间",noShow:!1,activeImg:Object(ge["x"])("page-officehome","mySpaceIcon.svg"),img:Object(ge["x"])("page-officehome","mySpaceIcon.svg")},{top:0,id:5,code:"switchSpace",name:"我的",noShow:!0,activeImg:Object(ge["x"])("page-officehome","mapIcon.png"),img:Object(ge["x"])("page-officehome","mapIcon.png")}],meetingRoomSence:[{code:"DISCUSSING",name:"讨论"},{code:"PROJECTING",name:"演示"},{code:"ADJOURNMENT",name:"散会"}],nextCusStartTime:0,cusEndTime:0,cusStartTime:0,isShowContact:!1,showContact:function(){X.isShowContact=!0},closeContactDailog:function(){X.isShowContact=!1},padBgImg:"",setPadBgImg:function(){0===X.padImgData.isBgDefault&&X.padImgData.bgImage&&X.padImgData.bgImage.fileId?X.padBgImg=X.fileUrl+"&key=".concat(X.padImgData.bgImage.fileId):"个人"==X.roomType?X.padBgImg=Object(ge["x"])("ipdImages","pad_img2.png"):"会议室"===X.roomType?X.padBgImg=Object(ge["x"])("ipdImages","pad_img3.png"):(X.roomType,X.padBgImg=Object(ge["x"])("ipdImages","pad_img1.png"))},logImg:"",setPadLogo:function(){0===X.padImgData.isLogoDefault&&X.padImgData.logoImage&&X.padImgData.logoImage.fileId?X.logImg=X.fileUrl+"&key=".concat(X.padImgData.logoImage.fileId):X.logImg=""},padImgData:R,padNumber:0,getPadImg:function(){var e={funcType:X.officeData.roomFuncType,spaceId:X.spaceInfo.spaceId},t=Object(ge["A"])(e);X.padNumber<1&&(X.padNumber=1,Object(ve["q"])(t).then((function(e){"success"===e.result&&(X.padImgData=e.data,X.setPadBgImg(),X.setPadLogo())})))},triggerWork:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;X.enterType=e,X.deviceItem=t||null,X.isShowWork=!0},checkDeviceShowWork:function(){X.spaceEquipList.map((function(e){e.id=e.equipmentId})),X.seviceEquipmentList=X.spaceEquipList},closeWork:function(){X.isShowWork=!1,X.queryCustomAndScenceTimer(0)},forceOverTimeFlag:!1,setForceOverTimeFlag:function(e){"开放"===X.roomType&&e?X.forceOverTimeFlag=!0:X.forceOverTimeFlag=!1},getCompanyInfo:function(){return Object(q["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(ve["h"])({companyId:Dc["a"].companyKey});case 2:t=e.sent,t.data;case 4:case"end":return e.stop()}}),e)})))()},weatherTimer:i,getWeatherTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36e5;X.weatherTimer=setTimeout((function(){clearTimeout(X.weatherTimer),X.getWeather()}),e)},getWeather:function(){var e={openid:X.userInfo.openid,pubname:X.userInfo.pubname,projectId:Lt["a"].state.user.projectId},t=Object(ge["A"])(e);Object(ve["C"])(t).then((function(e){var t,n=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:{};X.outWeather=n;var a=n.text;X.getWeatherIcon(a),X.getnowTime(a),X.getWeatherTimer()}))},getnowTime:function(e){var t=Object(ge["h"])();e.indexOf("霾")>-1?X.topbgimg=Object(ge["x"])("weather","office_smog.jpg"):X.topbgimg=t>=6&&t<19?Object(ge["x"])("weather","office_bright.jpg"):Object(ge["x"])("weather","office_night.jpg")},getWeatherIcon:function(e){e&&e.indexOf("晴")>-1?X.outWeather.imgname=Object(ge["x"])("weather","sun.png"):e&&e.indexOf("雨")>-1?X.outWeather.imgname=Object(ge["x"])("weather","rain.png"):e&&e.indexOf("阴")>-1||e.indexOf("云")>-1?X.outWeather.imgname=Object(ge["x"])("weather","cloudy.png"):e&&e.indexOf("霾")>-1?X.outWeather.imgname=Object(ge["x"])("weather","mai.png"):e&&e.indexOf("雾")>-1?X.outWeather.imgname=Object(ge["x"])("weather","fog.png"):e&&e.indexOf("风")>-1?X.outWeather.imgname=Object(ge["x"])("weather","wind.png"):e&&e.indexOf("雷")>-1?X.outWeather.imgname=Object(ge["x"])("weather","thunder.png"):X.outWeather.imgname=Object(ge["x"])("weather","sun.png")},checkSpaceType:function(e){var t=Object(Nc["b"])(e);"个人"===t?(X.roomType="个人",X.headerInfo.headImg=Object(ge["x"])("page-officehome","office_person_2.png"),X.headerInfo.headScene="工作",X.popList=X.listOffice):"会议室"===t?(X.roomType="会议室",X.popList=JSON.parse(JSON.stringify(X.listSen)),X.headerInfo.headImg=Object(ge["x"])("page-officehome","office_normal_2.png"),X.getPageMeetingSceneHttp()):"开放"===t?(X.roomType="开放",X.headerInfo.headImg=Object(ge["x"])("page-officehome","office_publi_2.png")):(X.roomType="其它",X.headerInfo.headImg=Object(ge["x"])("page-officehome","office_publi_2.png")),"会议室"!==t&&X.timerSpaceInfo()},checkUserSpace:function(){for(var e=!1,t=0;t<X.userSpaceInfo.length;t++)if(X.spaceInfo.spaceId===X.userSpaceInfo[t].sp_id){e=!0;break}X.userIsControl=e},getUserControlAuth:function(){Object(ve["B"])().then((function(e){var t=e;"success"===t.result?X.userSpaceInfo=t.data:X.userSpaceInfo=[],X.checkUserSpace()})).catch((function(){X.userSpaceInfo=[],X.checkUserSpace()}))},controlMode:H,getSpaceInfo:function(){var e={criteria:{spaceId:X.spaceInfo.spaceId,projectId:X.userInfo.projectId},pubname:X.userInfo.pubname,openid:X.userInfo.openid};Object(ve["w"])(e).then((function(e){var t,n=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:[];n[0]&&(X.officeData=n[0]),X.officeData=X.officeData?X.officeData:{},X.officeData.localName&&(X.localName=X.officeData.localName),X.officeData.temperature&&(X.officeData.temperature=1*X.officeData.temperature.toFixed(1)),X.controlMode=X.officeData.controlMode,X.checkSpaceType(X.officeData.roomFuncType),X.formatSpaceInfo(n),X.getPadImg(),X.loadinngEnd()})).catch((function(){X.loadinngEnd(),X.timerSpaceInfo()}))},getSpaceModeTimer:function(){X.spaceModelTimer=setTimeout((function(){X.getSpaceMode(),clearTimeout(X.spaceModelTimer),X.spaceModelTimer=null}),1e3)},getSpaceMode:function(){Object(ve["y"])().then((function(e){X.getSpaceModeTimer()})).catch((function(){X.getSpaceModeTimer()}))},getSpaceTempTimer:function(){X.spaceTempTimer=setTimeout((function(){clearTimeout(X.spaceTempTimer),X.spaceTempTimer=null,X.getSpaceTemp()}))},getSpaceTemp:function(){Object(ve["z"])().then((function(e){X.getSpaceTempTimer()})).catch((function(){X.getSpaceTempTimer()}))},setEnvBg:function(e,t){var n="";return"humidity"===e?n="干燥"===t||"潮湿"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0) 0%, #CD0B00 100%)":"":"hcho"===e?n="超标"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0) 0%, #CD0B00 100%)":"":"co2"===e?n="略高"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.5) 0%, #CD0B00 100%)":"超标"===t?"linear-gradient(180deg, rgba(205, 11, 0, 1) 0%, #CD0B00 100%)":"":"pm25"===e&&(n="良"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.2) 0%, #CD0B00 100%)":"轻度污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.4) 0%, #CD0B00 100%)":"中度污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.6) 0%, #CD0B00 100%)":"重度污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.8) 0%, #CD0B00 100%)":"严重污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 1) 0%, #CD0B00 100%)":""),n},checkLevel:function(e,t){var n={humidity:{range:[30,70],text:["干燥","健康","潮湿"]},co2:{range:[800,1e3,1500],text:["健康","达标","略高","超标"]},pm25:{range:[35,75,115,150,250],text:["健康","良","轻度污染","中度污染","重度污染","严重污染"]},hcho:{range:[.1],text:["健康","超标"]}},a=[e].concat(Object(W["a"])(n[t].range)).sort((function(e,t){return e-t})),r=a.findIndex((function(t){return t===e})),o=n[t].text[r],c=X.setEnvBg(t,o);return{level:r,levelTxt:o,bgColor:c}},setPageheight:function(){Object(a["nextTick"])((function(){r.getElementById("envBox").style.height=r.getElementById("envBox").offsetHeight+"px"}))},formatSpaceInfo:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0;t<e.length;t++){var n=e[t];if(n.co2||0==n.co2){var a=X.checkLevel(n.co2,"co2");X.envlist[1].level=a.levelTxt,X.envlist[1].bgColor=a.bgColor,X.envlist[1].num=n.co2}else X.envlist[1].level="--",X.envlist[1].num="--",X.envlist[1].bgColor="";if(n.pm25||0===n.pm25){var r=X.checkLevel(n.pm25,"pm25");X.envlist[2].level=r.levelTxt,X.envlist[2].bgColor=r.bgColor,X.envlist[2].num=n.pm25}else X.envlist[2].level="--",X.envlist[2].num="--",X.envlist[2].bgColor="";if(n.hcho||0==n.hcho){var o=X.checkLevel(n.hcho,"hcho");X.envlist[0].level=o.levelTxt,X.envlist[0].bgColor=o.bgColor,X.envlist[0].num=n.hcho.toFixed(2)}else X.envlist[0].level="--",X.envlist[0].num="--",X.envlist[0].bgColor="";if(n.humidity||0==n.humidity){var c=X.checkLevel(n.humidity,"humidity");X.envlist[3].level=c.levelTxt,X.envlist[3].bgColor=c.bgColor,X.envlist[3].num=n.humidity.toFixed(0)}else X.envlist[3].level="--",X.envlist[3].num="--",X.envlist[3].bgColor=""}},activeType:"",getPageMeetingSceneHttp:function(){var e={spaceId:X.spaceInfo.spaceId};Object(ve["o"])(e).then((function(e){var t,n=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:"";"OFFWORK"===n&&(n="ADJOURNMENT"),X.activeType=n,X.timerSpaceInfo()})).catch((function(){X.timerSpaceInfo()}))},secenaroStatus:l,setHeadScene:function(e,t){X.activeType=e.sceneType,1==t&&(X.isShowMetting=!0),X.secenaroStatus={localName:X.officeData.localName,loading:e.loading,lodingText:e.lodingText,sceneName:e.sceneName}},closeDailog:function(){X.isShowMetting=!1},isShowDetail:!1,detailQuery:d,handleDetail:function(e){X.isShowDetail=!0,X.detailQuery.funcid=e.funcid,X.detailQuery.spaceId=X.spaceInfo.spaceId},updateAirTemp:function(e){X.airTemp=e,X.setHeadSceneAirTemp()},setHeadSceneAirTemp:function(){if(X.sceneDetail&&X.sceneDetail.textObj&&X.sceneDetail.textObj.length&&X.airTemp&&("DISCUSSING"==X.sceneDetail.code||"PROJECTING"==X.sceneDetail.code))for(var e=0;e<X.sceneDetail.textObj.length;e++){var t=X.sceneDetail.textObj;"air"===t.type&&(t.text=t.text+",目标温度"+X.airTemp)}},handlePreClose:function(){var e=Object(ge["a"])(),t=Object(ge["h"])();t<10&&(t="0".concat(t));var n={projectId:X.projectId,objectId:X.spaceInfo.spaceId,endDate:e,endTime:t+"0000",type:3};Object(ve["a"])(n).then((function(e){var t=e;"success"==t.result&&X.changeLampStatus()}))},changeLampStatus:function(){X.showWorkOff=!1,X.headerInfo.tipText="选择工作结束时间",X.headerInfo.tipTextSwatch=!0},getEquipments:function(){var e={spaceId:X.spaceInfo.spaceId},t=Object(ge["A"])(e);Object(ve["v"])(t).then((function(e){var t=e;if("success"===t.result){var n,a=null!==(n=null===t||void 0===t?void 0:t.data)&&void 0!==n?n:[];for(var r in X.spaceExistenceDevice){for(var o=!1,c=0;c<a.length;c++)r==a[c]&&(o=!0);X.spaceExistenceDevice[r]=o}X.spaceExistenceDevice.light?X.navList[1].noShow=!0:X.navList[1].noShow=!1,X.spaceExistenceDevice.curtain?X.navList[2].noShow=!0:X.navList[2].noShow=!1}}))},hourMiChange:function(e){var t=e.toString(),n="",a=t.length>2?t.split(".")[1].length:t;return 1===a?(t=t.replace(".","")+"0",n=t.slice(0,2)+":"+t.slice(2)):2===a?(t=t.replace(".",""),n=t.slice(0,2)+":"+t.slice(2)):n=t+":00",n},handlePopup:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scenario";X.userIsControl?(X.showScenario=!X.showScenario,X.showScenario?X.deviceIcon="arrow-down":X.deviceIcon="arrow",X.popupType=e):Object(Ba["a"])("您没有当前空间的控制权限!")},triggerCheckSpace:function(){var e=r.getElementById("envContent"),t=r.getElementById("houseDes"),n=t.offsetHeight;X.opacityV=0,X.mapOpacity=1,e.scrollTop=0;var a=0,c=setInterval((function(){a+=15,a<o-n?e.style.top=a+"px":(e.style.top=o-n+"px",clearInterval(c))}),10);X.hideTopImg=!0,X.isBottom=!0},loadingStart:function(){Ba["a"].loading({duration:0,forbidClick:!0,message:"加载中..."})},loadinngEnd:function(){Ba["a"].clear()},clearTimerSpaceInfo:function(){clearTimeout(X.spaceTimer),X.spaceTimer=null},timerSpaceInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3;X.spaceTimer=setTimeout((function(){X.getSpaceInfo(),X.clearTimerSpaceInfo()}),e)},isWork:!1,isMetting:!1,checkIsSpaceScene:function(){X.scenarioArr.map((function(e){"OVERTIME"===e.sceneType&&(X.isWork=!0)}))},scenarioArr:V,sceneConfigTimer:B,clearSceneConfigTimer:function(){clearTimeout(X.sceneConfigTimer)},querySpaceSceneConfigTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e5;X.clearSceneConfigTimer(),X.sceneConfigTimer=setTimeout((function(){X.querySpaceSceneConfig(),X.clearSceneConfigTimer()}),e)},querySpaceSceneConfig:function(){var e={spaceId:X.spaceInfo.spaceId},t=Object(ge["A"])(e);Object(ve["I"])(t).then((function(e){var t,n=e,a=null!==(t=null===n||void 0===n?void 0:n.data)&&void 0!==t?t:[];X.scenarioArr=a,X.checkIsSpaceScene(),X.querySpaceSceneConfigTimer()})).catch((function(e){X.querySpaceSceneConfigTimer()}))},workkArr:M,secenTimer:U,clearSecenTimer:function(){clearTimeout(X.secenTimer),X.secenTimer=null},clearEquipTimer:function(){clearTimeout(X.equipTimer),X.equipTimer=null},getSpaceEquipListTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;X.clearEquipTimer(),X.equipTimer=setTimeout((function(){X.getSpaceEquipList(),X.clearEquipTimer()}),e)},getSpaceEquipList:function(){var e={spaceId:X.spaceInfo.spaceId},t=Object(ge["A"])(e);Object(ve["u"])(t).then((function(e){var t=e.data||[];X.spaceEquipList=t,X.checkDeviceShowWork()})).catch((function(e){}))},queryCustomAndScenceTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;X.clearSecenTimer(),X.secenTimer=setTimeout((function(){X.queryCustomAndScence(),X.clearSecenTimer()}),e)},queryCustomAndScence:function(){var e={spaceId:X.spaceInfo.spaceId},t=Object(ge["A"])(e);Object(ve["F"])(t).then((function(e){for(var t,n=null!==(t=null===e||void 0===e?void 0:e.data)&&void 0!==t?t:[],a=0;a<n.length;a++){var r,o,c=null!==(r=null===(o=n[a])||void 0===o?void 0:o.customSceneList)&&void 0!==r?r:[];c=c.sort(X.compare)}X.workkArr=n,X.formateManualWorkTime(),X.queryCustomAndScenceTimer()})).catch((function(){X.queryCustomAndScenceTimer()}))},compare:function(e,t){var n=e.startTime,a=t.startTime;return n<a?-1:n>a?1:0},formateManualWorkTime:function(){for(var e=X.workkArr||[],t=0;t<e.length;t++){var n=e[t],a=e[t].spaceCustomContentList||[];if(a&&a.length){a=a.sort(X.compare),n.spaceCustomContentList=a;var r=Object(ge["n"])(),o=Object(ge["a"])("YYYY-MM-DD"),c=Object(ge["b"])(e[t].date);n.cusStartTime=a[0]?a[0].startTime:"",n.cusEndTime=a[0]?a[0].endTime:"",o==c&&(n.cusStartTime="",n.cusEndTime="");for(var i=0;i<a.length;i++)n.cusStartTime&&n.cusEndTime?n.cusEndTime+1===a[i].startTime&&(n.cusEndTime=a[i].endTime):r>=a[i].startTime&&r<=a[i].endTime&&(n.cusStartTime=a[i].startTime,n.cusEndTime=a[i].endTime);n.cusStartTime||(n.cusStartTime=a[0]?a[0].startTime:"",n.cusEndTime=a[0]?a[0].endTime:"")}}},init:function(){X.padNumber=0,X.getSpaceInfo(),X.querySpaceSceneConfig(),X.getSpaceEquipList(),X.queryCustomAndScenceTimer(0),X.getEquipments()},updatePageUrl:function(){var e=window.history,t=window.location.origin+window.location.pathname;e.replaceState("","",t)},spaceData:F,copySpaceData:F,floorId:"",buildingId:"",queryWorkSpace:function(){var e={criteria:{projectId:X.userInfo.projectId,spaceName:"",macAddress:X.userInfo.mac},orders:[{column:"isMajorSpace",asc:!1}]};Object(ve["J"])(e).then((function(e){var t,n=e;"success"===n.result?X.spaceData=null!==(t=null===n||void 0===n?void 0:n.content)&&void 0!==t?t:[]:X.spaceData=[];X.spaceData.map((function(e){X.spaceInfo.spaceId===e.spaceId?(e.active=!0,X.spaceInfo=e):e.active=!1})),X.copySpaceData=JSON.parse(JSON.stringify(X.spaceData))}))},resetSpaceStatus:function(){X.spaceExistenceDevice={curtain:!1,light:!1,airConditioner:!1,bodySensor:!1},X.spaceData.map((function(e){e.active=!1})),X.controlMode=0,X.isWork=!1,X.roomType="",X.officeData.temperature="",X.spaceExistenceDevice=T,X.workkArr=[],X.setForceOverTimeFlag(!1)},isShowMap:!1,defaultSpace:p,moreSpace:function(){X.isShowMap=!0,X.defaultSpace=X.spaceInfo},elChangeExForArray:function(e){for(var t=1,n=0,a=0;a<X.spaceData.length;a++)if(e.spaceId===X.spaceData[a].spaceId&&(X.spaceData[a].active=!0,a>2)){n=a;break}if(n){var r=X.spaceData[t];X.spaceData[t]=X.spaceData[n],X.spaceData[n]=r}},changeSpace:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;X.clearAll(),X.resetSpaceStatus(),X.spaceInfo=e,1===t&&(X.defaultSpace=e,X.elChangeExForArray(e)),e.active=!0,X.init()},timeOutEvent:g,touchNumber:0,gtouchstart:function(e){return X.touchNumber=0,X.timeOutEvent=setTimeout((function(){X.touchNumber=1,X.longPress()}),500),!1},showDeleteButton:function(){return clearInterval(X.touchInterval),X.touchInterval=null,clearTimeout(X.timeOutEvent),X.timeOutEvent,!1},gtouchmove:function(){clearTimeout(this.timeOutEvent),X.timeOutEvent=0},touchInterval:v,longPress:function(){X.timeOutEvent=0,X.touchInterval=setInterval((function(){X.touchNumber++,6===X.touchNumber&&(clearInterval(X.touchInterval),X.touchInterval=null,t.push({name:"home",query:{mac:X.userInfo.mac,type:"logoOut"}}))}),1e3)},clearAll:function(){X.clearTimerSpaceInfo(),X.clearSceneConfigTimer(),X.clearSecenTimer(),X.clearEquipTimer()},contantDetail:O,cusServiceTimer:j,queryCustomerserviceTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36e5;X.cusServiceTimer=setTimeout((function(){clearTimeout(X.cusServiceTimer),X.queryCustomerservice()}),e)},queryCustomerservice:function(){var e={criteria:{projectId:X.userInfo.projectId}};Object(ve["G"])(e).then((function(e){var t,n=e,a=null!==(t=null===n||void 0===n?void 0:n.content)&&void 0!==t?t:[];X.contantDetail=a[0],X.queryCustomerserviceTimer()})).catch((function(){X.queryCustomerserviceTimer()}))}});return Object(a["onBeforeUnmount"])((function(){X.clearAll(),clearTimeout(X.cusServiceTimer),clearTimeout(X.weatherTimer)})),Object(a["onMounted"])((function(){var e=n.query.spaceId;X.spaceInfo={spaceId:e},X.defaultSpace={spaceId:e},X.init(),X.queryWorkSpace(),X.getWeather(),X.queryCustomerservice()})),Object(L["a"])({},Object(a["toRefs"])(X))}});n("bb55"),n("e371");const Bc=he()(Vc,[["render",A],["__scopeId","data-v-33d90844"]]);t["default"]=Bc},8267:function(e,t,n){},8385:function(e,t,n){"use strict";n("2949")},"904e":function(e,t,n){"use strict";n("2b12")},"94d5":function(e,t,n){},9588:function(e,t,n){"use strict";n("1d7e")},9617:function(e,t,n){},"9c88":function(e,t,n){"use strict";n("a58f")},a1fd:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},a434:function(e,t,n){"use strict";var a=n("23e7"),r=n("23cb"),o=n("a691"),c=n("50c4"),i=n("7b0b"),l=n("65f0"),s=n("8418"),m=n("1dde"),u=n("ae40"),d=m("splice"),p=u("splice",{ACCESSORS:!0,0:0,1:2}),f=Math.max,b=Math.min,g=9007199254740991,v="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!d||!p},{splice:function(e,t){var n,a,m,u,d,p,O=i(this),j=c(O.length),h=r(e,j),T=arguments.length;if(0===T?n=a=0:1===T?(n=0,a=j-h):(n=T-2,a=b(f(o(t),0),j-h)),j+n-a>g)throw TypeError(v);for(m=l(O,a),u=0;u<a;u++)d=h+u,d in O&&s(m,u,O[d]);if(m.length=a,n<a){for(u=h;u<j-a;u++)d=u+a,p=u+n,d in O?O[p]=O[d]:delete O[p];for(u=j;u>j-a+n;u--)delete O[u-1]}else if(n>a)for(u=j-a;u>h;u--)d=u+a-1,p=u+n-1,d in O?O[p]=O[d]:delete O[p];for(u=0;u<n;u++)O[u+h]=arguments[u+2];return O.length=j-a+n,m}})},a526:function(e,t,n){},a58f:function(e,t,n){},aae5:function(e,t,n){"use strict";n("dc5d")},af5e:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},b273:function(e,t,n){},b2738:function(e,t,n){},bb55:function(e,t,n){"use strict";n("0638")},bde3:function(e,t,n){},be7f:function(e,t,n){"use strict";n("68ef"),n("cb51"),n("3743"),n("1a04"),n("1146")},c740:function(e,t,n){"use strict";var a=n("23e7"),r=n("b727").findIndex,o=n("44d2"),c=n("ae40"),i="findIndex",l=!0,s=c(i);i in[]&&Array(1)[i]((function(){l=!1})),a({target:"Array",proto:!0,forced:l||!s},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),o(i)},cb41:function(e,t,n){},d3fb:function(e,t,n){"use strict";n.d(t,"a",(function(){return D})),n.d(t,"b",(function(){return C}));var a=n("7a23"),r=n("fe7e"),o=n("f691"),c=n("f344"),i=n("8405"),l=n("b1d2"),s=n("4a89"),m=n("f465"),u=n("4eda"),d=n("543e"),p=n("8da3");function f(e){if(!Object(p["b"])(e))return e;if(Array.isArray(e))return e.map(e=>f(e));if(Object(p["f"])(e)){const t={};return Object.keys(e).forEach(n=>{t[n]=f(e[n])}),t}return e}var b=n("cdd8");const g=200,v=300,O=15,[j,h]=Object(r["a"])("picker-column");function T(e){const{transform:t}=window.getComputedStyle(e),n=t.slice(7,t.length-1).split(", ")[5];return Number(n)}const k=Symbol(j),I=e=>Object(p["f"])(e)&&e.disabled;var S=Object(a["defineComponent"])({name:j,props:{textKey:Object(o["d"])(String),readonly:Boolean,allowHtml:Boolean,className:o["h"],itemHeight:Object(o["d"])(Number),defaultIndex:Object(o["b"])(0),swipeDuration:Object(o["d"])(o["f"]),initialOptions:Object(o["a"])(),visibleItemCount:Object(o["d"])(o["f"])},emits:["change"],setup(e,{emit:t,slots:n}){let r,o,c,l,d;const j=Object(a["ref"])(),S=Object(a["reactive"])({index:e.defaultIndex,offset:0,duration:0,options:f(e.initialOptions)}),y=Object(b["a"])(),x=()=>S.options.length,w=()=>e.itemHeight*(+e.visibleItemCount-1)/2,C=e=>{e=Object(i["d"])(e,0,x());for(let t=e;t<x();t++)if(!I(S.options[t]))return t;for(let t=e-1;t>=0;t--)if(!I(S.options[t]))return t},E=(n,a)=>{n=C(n)||0;const o=-n*e.itemHeight,c=()=>{n!==S.index&&(S.index=n,a&&t("change",n))};r&&o!==S.offset?d=c:c(),S.offset=o},D=t=>{JSON.stringify(t)!==JSON.stringify(S.options)&&(S.options=f(t),E(e.defaultIndex))},N=t=>{r||e.readonly||(d=null,S.duration=g,E(t,!0))},V=t=>Object(p["f"])(t)&&e.textKey in t?t[e.textKey]:t,B=t=>Object(i["d"])(Math.round(-t/e.itemHeight),0,x()-1),A=(t,n)=>{const a=Math.abs(t/n);t=S.offset+a/.003*(t<0?-1:1);const r=B(t);S.duration=+e.swipeDuration,E(r,!0)},L=()=>{r=!1,S.duration=0,d&&(d(),d=null)},W=t=>{if(!e.readonly){if(y.start(t),r){const e=T(j.value);S.offset=Math.min(0,e-w()),o=S.offset}else o=S.offset;S.duration=0,c=Date.now(),l=o,d=null}},q=t=>{if(e.readonly)return;y.move(t),y.isVertical()&&(r=!0,Object(s["e"])(t,!0)),S.offset=Object(i["d"])(o+y.deltaY.value,-x()*e.itemHeight,e.itemHeight);const n=Date.now();n-c>v&&(c=n,l=S.offset)},M=()=>{if(e.readonly)return;const t=S.offset-l,n=Date.now()-c,a=n<v&&Math.abs(t)>O;if(a)return void A(t,n);const o=B(S.offset);S.duration=g,E(o,!0),setTimeout(()=>{r=!1},0)},F=()=>{const t={height:e.itemHeight+"px"};return S.options.map((r,o)=>{const c=V(r),i=I(r),l={role:"button",style:t,tabindex:i?-1:0,class:h("item",{disabled:i,selected:o===S.index}),onClick:()=>N(o)},s={class:"van-ellipsis",[e.allowHtml?"innerHTML":"textContent"]:c};return Object(a["createVNode"])("li",l,[n.option?n.option(r):Object(a["createVNode"])("div",s,null)])})},U=e=>{const{options:t}=S;for(let n=0;n<t.length;n++)if(V(t[n])===e)return E(n)},_=()=>S.options[S.index];return E(S.index),Object(m["k"])(k),Object(u["a"])({state:S,setIndex:E,getValue:_,setValue:U,setOptions:D,stopMomentum:L}),Object(a["watch"])(()=>e.initialOptions,D),Object(a["watch"])(()=>e.defaultIndex,e=>E(e)),()=>Object(a["createVNode"])("div",{class:[h(),e.className],onTouchstart:W,onTouchmove:q,onTouchend:M,onTouchcancel:M},[Object(a["createVNode"])("ul",{ref:j,style:{transform:`translate3d(0, ${S.offset+w()}px, 0)`,transitionDuration:S.duration+"ms",transitionProperty:S.duration?"all":"none"},class:h("wrapper"),onTransitionend:L},[F()])])}});const[y,x,w]=Object(r["a"])("picker"),C={title:String,loading:Boolean,readonly:Boolean,allowHtml:Boolean,itemHeight:Object(o["c"])(44),showToolbar:o["g"],swipeDuration:Object(o["c"])(1e3),visibleItemCount:Object(o["c"])(6),cancelButtonText:String,confirmButtonText:String},E=Object(c["a"])({},C,{columns:Object(o["a"])(),valueKey:String,defaultIndex:Object(o["c"])(0),toolbarPosition:Object(o["e"])("top"),columnsFieldNames:Object});var D=Object(a["defineComponent"])({name:y,props:E,emits:["confirm","cancel","change"],setup(e,{emit:t,slots:n}){const r=Object(a["ref"])(!1),o=Object(a["ref"])([]),{text:p,values:f,children:b}=Object(c["a"])({text:e.valueKey||"text",values:"values",children:"children"},e.columnsFieldNames),{children:g,linkChildren:v}=Object(m["f"])(k);v();const O=Object(a["computed"])(()=>Object(i["j"])(e.itemHeight)),j=Object(a["computed"])(()=>{const t=e.columns[0];if("object"===typeof t){if(b in t)return"cascade";if(f in t)return"object"}return"plain"}),h=()=>{var t;const n=[];let a={[b]:e.columns};while(a&&a[b]){const r=a[b];let o=null!=(t=a.defaultIndex)?t:+e.defaultIndex;while(r[o]&&r[o].disabled){if(!(o<r.length-1)){o=0;break}o++}n.push({[f]:a[b],className:a.className,defaultIndex:o}),a=r[o]}o.value=n},T=()=>{const{columns:t}=e;"plain"===j.value?o.value=[{[f]:t}]:"cascade"===j.value?h():o.value=t,r.value=o.value.some(e=>e[f]&&0!==e[f].length)},I=()=>g.map(e=>e.state.index),y=(e,t)=>{const n=g[e];n&&(n.setOptions(t),r.value=!0)},C=t=>{let n={[b]:e.columns};const a=I();for(let e=0;e<=t;e++)n=n[b][a[e]];while(n&&n[b])t++,y(t,n[b]),n=n[b][n.defaultIndex||0]},E=e=>g[e],D=e=>{const t=E(e);if(t)return t.getValue()},N=(e,t)=>{const n=E(e);n&&(n.setValue(t),"cascade"===j.value&&C(e))},V=e=>{const t=E(e);if(t)return t.state.index},B=(e,t)=>{const n=E(e);n&&(n.setIndex(t),"cascade"===j.value&&C(e))},A=e=>{const t=E(e);if(t)return t.state.options},L=()=>g.map(e=>e.getValue()),W=e=>{e.forEach((e,t)=>{N(t,e)})},q=e=>{e.forEach((e,t)=>{B(t,e)})},M=e=>{"plain"===j.value?t(e,D(0),V(0)):t(e,L(),I())},F=e=>{"cascade"===j.value&&C(e),"plain"===j.value?t("change",D(0),V(0)):t("change",L(),e)},U=()=>{g.forEach(e=>e.stopMomentum()),M("confirm")},_=()=>M("cancel"),P=()=>n.title?n.title():e.title?Object(a["createVNode"])("div",{class:[x("title"),"van-ellipsis"]},[e.title]):void 0,R=()=>{const t=e.cancelButtonText||w("cancel");return Object(a["createVNode"])("button",{type:"button",class:[x("cancel"),l["g"]],onClick:_},[n.cancel?n.cancel():t])},H=()=>{const t=e.confirmButtonText||w("confirm");return Object(a["createVNode"])("button",{type:"button",class:[x("confirm"),l["g"]],onClick:U},[n.confirm?n.confirm():t])},z=()=>{if(e.showToolbar){const e=n.toolbar||n.default;return Object(a["createVNode"])("div",{class:x("toolbar")},[e?e():[R(),P(),H()]])}},Y=()=>o.value.map((t,r)=>{var o;return Object(a["createVNode"])(S,{textKey:p,readonly:e.readonly,allowHtml:e.allowHtml,className:t.className,itemHeight:O.value,defaultIndex:null!=(o=t.defaultIndex)?o:+e.defaultIndex,swipeDuration:e.swipeDuration,initialOptions:t[f],visibleItemCount:e.visibleItemCount,onChange:()=>F(r)},{option:n.option})}),G=e=>{if(r.value){const t={height:O.value+"px"},n={backgroundSize:`100% ${(e-O.value)/2}px`};return[Object(a["createVNode"])("div",{class:x("mask"),style:n},null),Object(a["createVNode"])("div",{class:[l["e"],x("frame")],style:t},null)]}},J=()=>{const t=O.value*+e.visibleItemCount,n={height:t+"px"};return Object(a["createVNode"])("div",{class:x("columns"),style:n,onTouchmove:s["e"]},[Y(),G(t)])};return Object(a["watch"])(()=>e.columns,T,{immediate:!0}),Object(u["a"])({confirm:U,getValues:L,setValues:W,getIndexes:I,setIndexes:q,getColumnIndex:V,setColumnIndex:B,getColumnValue:D,setColumnValue:N,getColumnValues:A,setColumnValues:y}),()=>{var t,r;return Object(a["createVNode"])("div",{class:x()},["top"===e.toolbarPosition?z():null,e.loading?Object(a["createVNode"])(d["a"],{class:x("loading")},null):null,null==(t=n["columns-top"])?void 0:t.call(n),J(),null==(r=n["columns-bottom"])?void 0:r.call(n),"bottom"===e.toolbarPosition?z():null])}}})},d587:function(e,t,n){"use strict";n("cb41")},d58f:function(e,t,n){var a=n("1c0b"),r=n("7b0b"),o=n("44ad"),c=n("50c4"),i=function(e){return function(t,n,i,l){a(n);var s=r(t),m=o(s),u=c(s.length),d=e?u-1:0,p=e?-1:1;if(i<2)while(1){if(d in m){l=m[d],d+=p;break}if(d+=p,e?d<0:u<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:u>d;d+=p)d in m&&(l=n(l,m[d],d,s));return l}};e.exports={left:i(!1),right:i(!0)}},d9d2:function(e,t,n){},dc5d:function(e,t,n){},e2f4:function(e,t,n){"use strict";n("af5e")},e371:function(e,t,n){"use strict";n("32c7")},eaf7:function(e,t,n){},f1fd:function(e,t,n){"use strict";n("5a3d")},f253:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c}));var a=n("c199"),r=n("d3fb");const o=Object(a["a"])(r["a"]);var c=o},fc40:function(e,t,n){"use strict";n("2a3c")},fe6d:function(e,t,n){"use strict";n("bde3")}}]);
  2. //# sourceMappingURL=chunk-3250642b.4a7f75f2.js.map