chunk-52442a6c.62b3d6df.js 195 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-52442a6c"],{"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){},"0d32":function(e,t,n){"use strict";n("3a02")},1196:function(e,t,n){"use strict";n("eaf7")},"11e7":function(e,t,n){"use strict";n("8b1f")},"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)}})},"1d26":function(e,t,n){"use strict";n("7df5")},"1d7e":function(e,t,n){},"20d9":function(e,t,n){"use strict";n("a1fd")},"24ce":function(e,t,n){"use strict";n("b273")},"2b12":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"2b83":function(e,t,n){"use strict";n("9ce4")},"2b99":function(e,t,n){},3228:function(e,t,n){},"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},3537:function(e,t,n){"use strict";n("e92a")},"38d5":function(e,t,n){"use strict";n("68ef")},"3a02":function(e,t,n){},"3e68":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"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")},"6aba":function(e,t,n){"use strict";n("2b99")},"6f74":function(e,t,n){"use strict";n("b936")},"745d":function(e,t,n){"use strict";n("c7bb")},"750b":function(e,t,n){"use strict";n("772f")},"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))},h=()=>a.reduce((e,t)=>(e[t.name]=t.formValue.value,e),{}),O=()=>{const n=h();b().then(()=>t("submit",n)).catch(a=>{t("failed",{values:n,errors:a}),e.scrollToError&&a[0].name&&v(a[0].name)})},j=e=>{Object(l["e"])(e),O()};return o({props:e}),Object(m["a"])({submit:O,validate:b,scrollToField:v,resetValidation:g}),()=>{var e;return Object(r["createVNode"])("form",{class:d(),onSubmit:j},[null==(e=n.default)?void 0:e.call(n)])}}});const b=Object(a["a"])(f);var g=b},"772f":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"7c22":function(e,t,n){"use strict";n("3228")},"7df5":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"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-f7f40dfe"),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"},h=["src"],O=r((function(){return Object(a["createElementVNode"])("span",{class:"temp-text"},"温度",-1)})),j={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"},C={key:0,class:"fotter"},w=["onClick"],x=["src"],D=["src"],E=["src"],V=r((function(){return Object(a["createElementVNode"])("span",null,"…",-1)})),N={class:"main-right"},B={key:0,class:"work-btn"};function L(e,t,n,r,L,A){var W=Object(a["resolveComponent"])("work-config"),M=Object(a["resolveComponent"])("manual-config"),q=Object(a["resolveComponent"])("scenario-config"),F=Object(a["resolveComponent"])("manual-index"),U=Object(a["resolveComponent"])("Air"),_=Object(a["resolveComponent"])("Light"),R=Object(a["resolveComponent"])("Curtain"),P=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"),X=Object(a["resolveComponent"])("com-map"),J=Object(a["resolveComponent"])("contact"),K=Object(a["resolveComponent"])("light-temp");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,h),O,Object(a["createElementVNode"])("span",j,[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",C,[(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,x)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:e.parseImgUrl("ipdImages","rectangle1.svg")},null,8,D)),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,E),V])):Object(a["createCommentVNode"])("",!0)])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",N,["开放"===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"])(M,{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"])(q,{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,onShowLightColorCtrol:e.showLightColorCtrol,id:"lightId",key:"lightId",userIsControl:e.userIsControl,spaceId:e.spaceInfo.spaceId,projectId:e.projectId},null,8,["forceOverTimeFlag","controlMode","seviceEquipmentList","onTriggerWork","onShowLightColorCtrol","userIsControl","spaceId","projectId"])):Object(a["createCommentVNode"])("",!0),e.spaceExistenceDevice.curtain?(Object(a["openBlock"])(),Object(a["createBlock"])(R,{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"])(P,{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"])(X,{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"])(J,{key:0,isShowContact:e.isShowContact,contantDetail:e.contantDetail,onCloseDailog:e.closeContactDailog},null,8,["isShowContact","contantDetail","onCloseDailog"])):Object(a["createCommentVNode"])("",!0),Object(a["createVNode"])(z,{show:e.isLightColorFlag,"onUpdate:show":t[9]||(t[9]=function(t){return e.isLightColorFlag=t}),position:"right","close-on-click-overlay":!0,class:"popup-content",teleport:"#app"},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[e.isLightColorFlag?(Object(a["openBlock"])(),Object(a["createBlock"])(K,{key:0,lightData:e.lightData},null,8,["lightData"])):Object(a["createCommentVNode"])("",!0)])]})),_:1},8,["show"])],4)}n("c975"),n("d81d"),n("fb6a"),n("b680"),n("d3b7"),n("ac1f"),n("25f0"),n("5319"),n("1276");var A=n("5530"),W=(n("96cf"),n("1da1")),M=n("ade3"),q=function(e){return Object(a["pushScopeId"])("data-v-7d28da75"),e=e(),Object(a["popScopeId"])(),e},F={class:"work-content"},U={class:"work-space"},_={class:"space-title"},R=q((function(){return Object(a["createElementVNode"])("div",{class:"device-tip"},"延时期间,空间相关设备会开启",-1)})),P={class:"add-time",id:"addTimeId"},H={key:0,class:"date_box"},z=["onClick"],Y={class:"sliders-list",id:"sliderListId"},G={class:"sliders"},X=["onClick","data-index"],J=q((function(){return Object(a["createElementVNode"])("div",{class:"start",id:"startId"},null,-1)})),K=q((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)})),$=[J,K],Z={class:"add-time-btn"};function Q(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-loading");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",F,[Object(a["createElementVNode"])("div",U,[Object(a["createElementVNode"])("div",_,Object(a["toDisplayString"])(e.spaceInfo.spaceName)+" 申请延时",1),R]),Object(a["createElementVNode"])("div",P,[e.dateArr&&e.dateArr.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",H,[(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,z)})),128))])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Y,[(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",G,[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)})},$)])]),Object(a["createElementVNode"])("div",Z,[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)])}n("99af");var ee=n("2241"),te=(n("e17f"),n("c199")),ne=n("fe7e"),ae=n("f691"),re=n("8405"),oe=n("4a89"),ce=n("f465"),ie=n("cdd8");const[le,se]=Object(ne["a"])("slider"),me={min:Object(ae["c"])(0),max:Object(ae["c"])(100),step:Object(ae["c"])(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:ae["f"],buttonSize:ae["f"],activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var ue=Object(a["defineComponent"])({name:le,props:me,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(ie["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(re["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(re["d"])(t,n,a);const o=Math.round((t-n)/r)*r;return Object(re["a"])(n,o)},v=(e,t)=>JSON.stringify(e)===JSON.stringify(t),h=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]},O=(n,a)=>{n=d(n)?h(n).map(g):g(n),v(n,e.modelValue)||t("update:modelValue",n),a&&!v(n,c)&&t("change",n)},j=t=>{if(t.stopPropagation(),e.disabled||e.readonly)return;const{min:n,reverse:a,vertical:r,modelValue:o}=e,c=Object(ce["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;O(u<=n?[u,t]:[e,u],!0)}else O(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(oe["e"])(n,!0),s.move(n),l.value="dragging";const a=Object(ce["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;O(o)},I=n=>{e.disabled||e.readonly||("dragging"===l.value&&(O(o,!0),t("drag-end",n)),l.value="")},S=t=>{if("number"===typeof t){const e=["left","right"];return se("button-wrapper",e[t])}return se("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:se("button"),style:Object(re["f"])(e.buttonSize)},null)},C=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:oe["i"]},[y(n,t)])};return O(e.modelValue),Object(ce["h"])(()=>e.modelValue),()=>Object(a["createVNode"])("div",{ref:i,style:u.value,class:se({vertical:e.vertical,disabled:e.disabled}),onClick:j},[Object(a["createVNode"])("div",{class:se("bar"),style:b.value},[e.range?[C(0),C(1)]:C()])])}});const de=Object(te["a"])(ue);var pe=de,fe=(n("68ef"),n("9617"),n("ac1e"),n("48a1")),be=n("d257"),ge=n("459d"),ve=Object(a["defineComponent"])({components:{VanSlider:pe},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(be["q"])(),l=[],s={},m="".concat(Object(be["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(be["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(be["k"])()[1];return e},getTomorrowIndex:function(){var e=0;return"今天"===p.nowData.week&&(e=Object(be["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(fe["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(fe["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(be["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(be["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(be["a"])("YYYY-MM-DD"),a=function(n){var a,r,o=Object(be["b"])(e[n].date),c=p.parseCusStartTime(e[n].cusStartTime),i=p.parseCusEndTime(e[n].cusEndTime),l=Object(be["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(be["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(be["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 h=p.formaTimeObj(n[0],"0",r,l.endTime);c.push(h)}}else if(l.startTime>a)if(l.endTime<=r){var O=p.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(O)}else if(l.endTime>r){var j=p.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(j);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(ge["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&&ee["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(A["a"])({},Object(a["toRefs"])(p))}}),he=(n("5d42"),n("6b0d")),Oe=n.n(he);const je=Oe()(ve,[["render",Q],["__scopeId","data-v-7d28da75"]]);var Te=je,ke=function(e){return Object(a["pushScopeId"])("data-v-dfeb0ad2"),e=e(),Object(a["popScopeId"])(),e},Ie={class:"work-content"},Se={class:"work-space"},ye={class:"space-title"},Ce={class:"add-time",id:"addTimeId"},we={key:0,class:"date_box"},xe=["onClick"],De={class:"sliders-list",id:"sliderListId"},Ee={class:"sliders"},Ve=["onClick","data-index"],Ne=["onClick"],Be=ke((function(){return Object(a["createElementVNode"])("div",{class:"start",id:"startId"},null,-1)})),Le=ke((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)})),Ae=[Be,Le],We={class:"add-time-btn"},Me={key:0,class:"device-title"},qe=ke((function(){return Object(a["createElementVNode"])("span",{class:"line"},null,-1)})),Fe=ke((function(){return Object(a["createElementVNode"])("span",{class:"text"},"预约开启设备",-1)})),Ue=ke((function(){return Object(a["createElementVNode"])("span",{class:"line"},null,-1)})),_e=[qe,Fe,Ue],Re={class:"work-device"},Pe=ke((function(){return Object(a["createElementVNode"])("div",{class:"row-title"},"空调",-1)})),He={class:"device-box"},ze=["onClick"],Ye={class:"row-item"},Ge=["src"],Xe=ke((function(){return Object(a["createElementVNode"])("div",{class:"row-title"},"照明",-1)})),Je={class:"device-box"},Ke=["onClick"],$e={class:"row-item"},Ze=["src"],Qe={key:2,class:"device-tip"},et=ke((function(){return Object(a["createElementVNode"])("span",null,"计费方式:",-1)})),tt=ke((function(){return Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",null," * "),Object(a["createTextVNode"])(" 空调延时采用后付费方式,系统将根据您申请的时间产生延时费用。预约时间下您可自由开启空间下的设备。 ")],-1)})),nt=ke((function(){return Object(a["createElementVNode"])("p",null," 收费标准按开机设备对应空间的面积计费,空调加时费用按0.4元/m²·h进行计费,照明设备延时使用不计费。 ",-1)})),at=ke((function(){return Object(a["createElementVNode"])("p",null," 如您提前结束工作,请点击“我要离开”按钮,系统会自动调整设备关闭时间,感谢与您一同共创可持续的办公环境。 ",-1)})),rt=[et,tt,nt,at];function ot(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-loading");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ie,[Object(a["createElementVNode"])("div",Se,[Object(a["createElementVNode"])("div",ye,Object(a["toDisplayString"])(e.spaceInfo.spaceName)+" 申请延时",1)]),Object(a["createElementVNode"])("div",Ce,[e.dateArr&&e.dateArr.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",we,[(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,xe)})),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",Ee,[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,Ne)})),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)})},Ae)])]),Object(a["createElementVNode"])("div",We,[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,_e)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Re,[e.isAir?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[Pe,Object(a["createElementVNode"])("div",He,[(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",Ye,[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,Ge)])],12,ze)):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",Je,[(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",$e,[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,Ze)])],12,Ke)):Object(a["createCommentVNode"])("",!0)],64)})),128))])],64)):Object(a["createCommentVNode"])("",!0),e.isLight||e.isAir?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Qe,rt)):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 ct=Object(a["defineComponent"])({components:{VanSlider:pe},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(be["q"])(),l=[],s={},m=[],u="".concat(Object(be["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(be["s"])(),f=Object(a["reactive"])({userInfo:p,seviceEquipmentList:e.seviceEquipmentList,parseImgUrl:be["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(be["k"])()[1];return e},getTomorrowIndex:function(){var e=0;return"今天"===f.nowData.week&&(e=Object(be["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(fe["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(fe["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(be["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(be["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(be["a"])("YYYY-MM-DD"),a=function(n){var a,r,o=Object(be["b"])(e[n].date),c=e[n].spaceCustomContentList||[],i=Object(be["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(be["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(be["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)-30,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(be["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 h=f.formaTimeObj(n[0],"0",r,l.endTime);c.push(h)}}else if(l.startTime>a)if(l.endTime<=r){var O=f.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(O)}else if(l.endTime>r){var j=f.formaTimeObj(l,"1",l.startTime,l.endTime);o.push(j);var T=f.formaTimeObj(n[0],"0",r,l.endTime);c.push(T)}}var k=0,I=c.concat(o),S=Object(be["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(ge["O"])(e).then((function(e){})).catch((function(){}))},setallLampHttp:function(e){Object(ge["P"])(e).then((function(e){})).catch((function(){}))},saveBatchCustomScene:function(e){f.showLoading=!0,f.formBtn=!0,Object(ge["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&&ee["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(A["a"])({},Object(a["toRefs"])(f))}});n("11e7");const it=Oe()(ct,[["render",ot],["__scopeId","data-v-dfeb0ad2"]]);var lt=it,st={class:"contact-content"},mt=Object(a["createElementVNode"])("div",{class:"title"},"联系我们",-1),ut={class:"contact"},dt={class:"code-box"},pt=["src"],ft=Object(a["createElementVNode"])("div",{class:"title"},"客服微信二维码",-1),bt={class:"phone-box"},gt=["src"],vt={class:"title"},ht=Object(a["createElementVNode"])("div",{class:"concat-text"},"联系方式",-1),Ot=Object(a["createTextVNode"])("我知道了");function jt(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",st,[mt,Object(a["createElementVNode"])("div",ut,[Object(a["createElementVNode"])("div",dt,[Object(a["createElementVNode"])("img",{src:e.imgUrl+"&key="+e.contantDetail.wechatQrCode,alt:""},null,8,pt),ft]),Object(a["createElementVNode"])("div",bt,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","phone-icon.svg"),alt:""},null,8,gt),Object(a["createElementVNode"])("div",vt,Object(a["toDisplayString"])(e.contantDetail.phone),1),ht])]),Object(a["createVNode"])(i,{class:"dailog-btn",onClick:e.closeDailog},{default:Object(a["withCtx"])((function(){return[Ot]})),_:1},8,["onClick"])])]})),_:1},8,["show"])}var Tt=n("543e"),kt=(n("e7e5"),Object(be["s"])()),It=Object(a["defineComponent"])({props:{isShowContact:{type:Boolean,default:function(){return!1}},contantDetail:{type:Object,default:function(){}}},components:Object(M["a"])({VanLoading:Tt["b"]},ee["a"].Component.name,ee["a"].Component),setup:function(e,t){var n=Object(a["getCurrentInstance"])(),r=Object(a["reactive"])({parseImgUrl:be["x"],contantDetail:e.contantDetail,userInfo:kt,imgUrl:n.proxy.$imgUrl,isShowContact:e.isShowContact,closeDailog:function(){t.emit("closeDailog")},queryCustomerservice:function(){var e={criteria:{projectId:r.userInfo.projectId}};Object(ge["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(A["a"])({},Object(a["toRefs"])(r))}});n("904e");const St=Oe()(It,[["render",jt]]);var yt=St,Ct=function(e){return Object(a["pushScopeId"])("data-v-1d74e949"),e=e(),Object(a["popScopeId"])(),e},wt={class:"scene-config"},xt=["src"],Dt={class:"time-text"},Et=["src"],Vt=Ct((function(){return Object(a["createElementVNode"])("div",{class:"del-text"},[Object(a["createElementVNode"])("span",null,"我要"),Object(a["createElementVNode"])("span",null,"离开")],-1)}));function Nt(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",wt,[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,xt),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,Et),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 Bt=n("6c02"),Lt=n("0613"),At=function(e){return Object(a["pushScopeId"])("data-v-10ea159b"),e=e(),Object(a["popScopeId"])(),e},Wt={class:"air-dialog-content"},Mt={class:"dialog-top"},qt=["src"],Ft=At((function(){return Object(a["createElementVNode"])("div",{class:"leave-title"},"工作辛苦了!",-1)})),Ut={class:"leave-popup-body"},_t={key:1,class:"text-status"},Rt={key:2,class:"text-status grey"},Pt=At((function(){return Object(a["createElementVNode"])("span",null,"隐藏",-1)})),Ht=[Pt];function zt(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",Wt,[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,qt)):Object(a["createCommentVNode"])("",!0)]),Ft,Object(a["createElementVNode"])("div",Ut,[(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",_t)):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)})},Ht)])]})),_:1},8,["show"])}var Yt=Object(a["defineComponent"])({props:{isShowLeaveDailog:{type:Boolean,default:function(){return!1}}},components:Object(M["a"])({VanLoading:Tt["b"]},ee["a"].Component.name,ee["a"].Component),setup:function(e,t){var n=Object(a["reactive"])({parseImgUrl:be["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(A["a"])({},Object(a["toRefs"])(n))}});n("1196");const Gt=Oe()(Yt,[["render",zt],["__scopeId","data-v-10ea159b"]]);var Xt=Gt,Jt=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(Bt["d"])(),r={text:"",timer:"",btnText:"",showDel:!1,classColor:"grey"},o="",c=(Object(Lt["b"])(),[]),i=[],l=Object(a["reactive"])({parseImgUrl:be["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(be["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(be["a"])("YYYY-MM-DD"),a=0;a<e.length;a++){var r,o,c=Object(be["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(be["n"])();Object(be["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(be["d"])(i)+"~"+Object(be["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(be["d"])(a.startTime)+"~"+Object(be["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(be["d"])(e)+"~"+Object(be["d"])(n),r&&r.text&&(l.timerText.text="工作时间(今日~".concat(r.text,")"),l.timerText.timer=Object(be["d"])(r.startTime)+"~"+Object(be["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(be["d"])(e)+"~"+Object(be["d"])(n),c&&c.text&&(l.timerText.text="工作时间~".concat(c.text),l.timerText.timer=Object(be["d"])(c.startTime)+"~"+Object(be["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(be["d"])(d.startTime)+"~"+Object(be["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(be["d"])(p.startTime)+"~"+Object(be["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(be["d"])(n)+"~"+Object(be["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(be["d"])(n)+"~"+Object(be["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(be["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(ge["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(A["a"])({},Object(a["toRefs"])(l))}});n("4eee");const Kt=Oe()(Jt,[["render",Nt],["__scopeId","data-v-1d74e949"]]);var $t=Kt,Zt=function(e){return Object(a["pushScopeId"])("data-v-4a4408c0"),e=e(),Object(a["popScopeId"])(),e},Qt={class:"scene-config"},en=["src"],tn={class:"time-text"},nn=["src"],an=Zt((function(){return Object(a["createElementVNode"])("div",{class:"del-text"},[Object(a["createElementVNode"])("span",null,"我要"),Object(a["createElementVNode"])("span",null,"离开")],-1)}));function rn(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",Qt,[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,en),Object(a["createElementVNode"])("div",tn,[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,nn),an])):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 on=function(e){return Object(a["pushScopeId"])("data-v-5934e340"),e=e(),Object(a["popScopeId"])(),e},cn={class:"air-dialog-content"},ln={class:"dialog-top"},sn=["src"],mn=on((function(){return Object(a["createElementVNode"])("div",{class:"leave-title"},"工作辛苦了!",-1)})),un={class:"leave-popup-body"},dn={key:1,class:"text-status"},pn={key:2,class:"text-status grey"},fn=on((function(){return Object(a["createElementVNode"])("span",null,"隐藏",-1)})),bn=[fn];function gn(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",cn,[Object(a["createElementVNode"])("div",ln,[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,sn)):Object(a["createCommentVNode"])("",!0)]),mn,Object(a["createElementVNode"])("div",un,[(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",dn)):Object(a["createCommentVNode"])("",!0),"grey"===e.status?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",pn)):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)})},bn)])]})),_:1},8,["show"])}var vn=Object(a["defineComponent"])({props:{isShowLeaveDailog:{type:Boolean,default:function(){return!1}}},components:Object(M["a"])({VanLoading:Tt["b"]},ee["a"].Component.name,ee["a"].Component),setup:function(e,t){var n=Object(a["reactive"])({parseImgUrl:be["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(A["a"])({},Object(a["toRefs"])(n))}});n("aae5");const hn=Oe()(vn,[["render",gn],["__scopeId","data-v-5934e340"]]);var On=hn,jn=Object(a["defineComponent"])({props:{workkArr:{type:Array,default:function(){return[]}}},components:{LeaveDailog:On},setup:function(e,t){Object(a["getCurrentInstance"])();var n=Object(Bt["d"])(),r={text:"",timer:"",btnText:"",showDel:!1,classColor:"grey"},o="",c=(Object(Lt["b"])(),[]),i=[],l=[],s=Object(a["reactive"])({parseImgUrl:be["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:[],o=!0;r&&r.length&&function(){var n=[];r.map((function(e,t){e.hasOwnProperty("approvalStatus")&&(1==e.approvalStatus&&n.push(e),o=!1)})),o&&(n=e[t].customSceneList),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(be["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(be["a"])("YYYY-MM-DD"),a=0;a<e.length;a++){var r,o,c=Object(be["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(be["n"])();Object(be["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(be["d"])(i)+"~"+Object(be["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(be["d"])(a.startTime)+"~"+Object(be["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(be["d"])(e)+"~"+Object(be["d"])(n),r&&r.text&&(s.timerText.text="工作时间(今日~".concat(r.text,")"),s.timerText.timer=Object(be["d"])(r.startTime)+"~"+Object(be["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(be["d"])(e)+"~"+Object(be["d"])(n),c&&c.text&&(s.timerText.text="工作时间~".concat(c.text),s.timerText.timer=Object(be["d"])(c.startTime)+"~"+Object(be["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(be["d"])(d.startTime)+"~"+Object(be["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(be["d"])(p.startTime)+"~"+Object(be["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(be["d"])(n)+"~"+Object(be["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(be["d"])(n)+"~"+Object(be["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(be["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(be["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(ge["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(A["a"])({},Object(a["toRefs"])(s))}});n("6aba");const Tn=Oe()(jn,[["render",rn],["__scopeId","data-v-4a4408c0"]]);var kn=Tn,In={class:"scene-config"},Sn=["onClick"],yn=["src"];function Cn(e,t,n,r,o,c){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",In,[(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,yn),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(t.sceneName),1)],14,Sn)})),128))])}var wn=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(Bt["d"])(),r=(Object(Lt["b"])(),{DISCUSSING:Object(be["x"])("ipdImages","taolun.svg"),PROJECTING:Object(be["x"])("ipdImages","touying.svg"),ADJOURNMENT:Object(be["x"])("ipdImages","sanhui.svg")}),o=[],c=Object(a["reactive"])({parseImgUrl:be["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(be["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(ge["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(A["a"])({},Object(a["toRefs"])(c))}});n("0d32");const xn=Oe()(wn,[["render",Cn],["__scopeId","data-v-1fed2403"]]);var Dn=xn,En=n("0500"),Vn=function(e){return Object(a["pushScopeId"])("data-v-54f78787"),e=e(),Object(a["popScopeId"])(),e},Nn={class:"header-content"},Bn={class:"weather"},Ln=["src"],An={class:"weather-text"},Wn={class:"pr5"},Mn=Vn((function(){return Object(a["createElementVNode"])("span",null,"/",-1)})),qn=Vn((function(){return Object(a["createElementVNode"])("span",{class:"pr5"},"PM2.5",-1)})),Fn={class:"pr5"};function Un(e,t,n,r,o,c){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Nn,[Object(a["createElementVNode"])("div",Bn,[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",An,[Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",Wn,Object(a["toDisplayString"])(e.outWeather.temperature?e.outWeather.temperature:"--")+"℃",1),Mn,qn,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.outWeather.pm25?e.outWeather.pm25:"--"),1)]),Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",Fn,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 _n=n("ad06"),Rn=(n("c3a6"),Object(a["defineComponent"])({props:{outWeather:{type:Object,default:function(){return{}}}},components:{VanIcon:_n["b"]},setup:function(){var e=Object(Bt["d"])(),t=Object(a["reactive"])({goBack:function(){window.history.go(-1)},setPermanentSpace:function(){e.push({path:"/mySpace"})}});return Object(A["a"])({},Object(a["toRefs"])(t))}}));n("9c88");const Pn=Oe()(Rn,[["render",Un],["__scopeId","data-v-54f78787"]]);var Hn=Pn,zn=n("3ba9"),Yn=function(e){return Object(a["pushScopeId"])("data-v-44ad189c"),e=e(),Object(a["popScopeId"])(),e},Gn={class:"air"},Xn={class:"air-top"},Jn={class:"air-desc"},Kn=Yn((function(){return Object(a["createElementVNode"])("p",{class:"air-title"},"空调",-1)})),$n={class:"air-temperature"},Zn={key:0},Qn={key:0,class:"air-status"},ea={key:1,class:"air-loading"},ta=["src"],na={class:"air-right"},aa=["src"],ra={key:0,class:"air-control"},oa=Yn((function(){return Object(a["createElementVNode"])("div",{class:"control-title"},"温度调节",-1)})),ca={class:"btn-box"},ia=["src"],la=["src"],sa={key:1,class:"air-control"},ma=Yn((function(){return Object(a["createElementVNode"])("div",{class:"control-title"},"风量调节",-1)})),ua={class:"btn-box"},da=["src"],pa=["src"],fa={class:"air-dialog-content"},ba={class:"dialog-top"},ga=["src"],va={class:"dialog-text"},ha={class:"air-body-item-num"},Oa={key:0,class:"air-temp-num"},ja={key:1,class:"air-temp-load"},Ta={key:0,class:"air-notice"},ka=Yn((function(){return Object(a["createElementVNode"])("span",null,"确定",-1)})),Ia=[ka];function Sa(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",Gn,[Object(a["createElementVNode"])("div",Xn,[Object(a["createElementVNode"])("div",Jn,[Kn,Object(a["createElementVNode"])("p",$n,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.airData.tempSet?e.airData.tempSet:"")+" ",1),e.airData.tempSet?(Object(a["openBlock"])(),Object(a["createElementBlock"])("sup",Zn,"℃")):Object(a["createCommentVNode"])("",!0)]),e.hasAir?(Object(a["openBlock"])(),Object(a["createElementBlock"])("p",Qn,Object(a["toDisplayString"])(e.airData.isOpen?"空调已开启":"空调已关闭"),1)):Object(a["createCommentVNode"])("",!0),e.airData.isOpen?(Object(a["openBlock"])(),Object(a["createElementBlock"])("p",ea,[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,ta)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.airData.spaceStatus),1)])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",na,[e.airData.airImg?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:e.airData.airImg,alt:""},null,8,aa)):(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",ra,[oa,Object(a["createElementVNode"])("div",ca,[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,ia)]),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,la)])])])):Object(a["createCommentVNode"])("",!0),e.userIsControl&&e.airData.isOpen&&e.showAirVolumeBtn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",sa,[ma,Object(a["createElementVNode"])("div",ua,[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,da)]),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,pa)])])])):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",fa,[Object(a["createElementVNode"])("div",ba,[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,ga)]),Object(a["createElementVNode"])("div",va,[Object(a["createElementVNode"])("div",ha,[e.airSetText.notice?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Oa,Object(a["toDisplayString"])(e.airSetText.notice),1)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ja,[Object(a["createVNode"])(i,{type:"spinner"})]))]),e.airSetText.remark&&e.airSetText.remark.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("p",Ta,[(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"]))},Ia)])]})),_:1},8,["show"])])}const[ya,Ca]=Object(ne["a"])("switch"),wa={size:ae["f"],loading:Boolean,disabled:Boolean,modelValue:ae["h"],activeColor:String,inactiveColor:String,activeValue:{type:ae["h"],default:!0},inactiveValue:{type:ae["h"],default:!1}};var xa=Object(a["defineComponent"])({name:ya,props:wa,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"])(Tt["a"],{class:Ca("loading"),color:t},null)}};return Object(ce["h"])(()=>e.modelValue),()=>{const{size:t,loading:c,disabled:i,activeColor:l,inactiveColor:s}=e,m=n(),u={fontSize:Object(re["b"])(t),backgroundColor:m?l:s};return Object(a["createVNode"])("div",{role:"switch",class:Ca({on:m,loading:c,disabled:i}),style:u,tabindex:i?void 0:0,"aria-checked":m,onClick:r},[Object(a["createVNode"])("div",{class:Ca("node")},[o()])])}}});const Da=Object(te["a"])(xa);var Ea,Va=Da,Na=(n("e3b3"),n("d9d2"),n("d399")),Ba=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:(Ea={Switch:Va},Object(M["a"])(Ea,ee["a"].Component.name,ee["a"].Component),Object(M["a"])(Ea,"Loading",Tt["b"]),Ea),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:be["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(ge["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(ge["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(be["x"])("page-officehome","air_close.png")):l.airData.icon&&6!==l.airData.icon&&(l.airData.isOpen=!0,l.airData.airImg=Object(be["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(be["x"])("page-officehome","air_close.png")}))},airChange:function(){l.userIsControl?l.loadingAir?Object(Na["a"])("指令正在下发中,勿重复操作!"):l.airComfir():Object(Na["a"])("您没有当前空间的控制权限!")},airComfir:function(){var e=l.airData.isOpen?"要关闭空调吗?":"要开启空调吗?",n=l.airData.isOpen?"关闭":"开启";ee["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(ge["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(be["x"])("page-officehome","temp-keep.png");break;case 2:e=Object(be["x"])("page-officehome","temp_cold.svg");break;case 3:e=Object(be["x"])("page-officehome","temp_sun.png");break;default:e="";break}return e}));return Object(A["a"])({airRunImg:s},Object(a["toRefs"])(l))}});n("24ce"),n("20d9");const La=Oe()(Ba,[["render",Sa],["__scopeId","data-v-44ad189c"]]);var Aa=La,Wa=function(e){return Object(a["pushScopeId"])("data-v-5b42318b"),e=e(),Object(a["popScopeId"])(),e},Ma={class:"air"},qa={class:"air-top"},Fa={class:"air-desc"},Ua=Wa((function(){return Object(a["createElementVNode"])("p",{class:"air-title"},"空调",-1)})),_a={class:"air-temperature"},Ra=Wa((function(){return Object(a["createElementVNode"])("sup",null,"℃",-1)})),Pa={key:0},Ha={key:1},za={class:"air-right"},Ya=["src"],Ga={class:"air-control air-control-padding"},Xa={class:"control-box"},Ja={class:"temp-text"},Ka={class:"temp-slider",id:"sliderId"},$a={class:"slider-bar",id:"barId"},Za={class:"bar-temp"},Qa=Wa((function(){return Object(a["createElementVNode"])("div",{class:"bar-circle",id:"handId"},null,-1)})),er={class:"temp-text"},tr=Wa((function(){return Object(a["createElementVNode"])("div",{class:"control-text"},"温度设定",-1)})),nr={class:"air-control"},ar={class:"control-box"},rr={class:"volume-box"},or={class:"number"},cr=Wa((function(){return Object(a["createElementVNode"])("div",{class:"text"},"风量调节",-1)})),ir={class:"volume-icon"},lr=["src"],sr=["src"],mr=Wa((function(){return Object(a["createElementVNode"])("span",null," AUTO",-1)})),ur=[mr],dr={class:"air-control"},pr={class:"control-box"},fr={class:"volume-box"},br={class:"model"},gr=Wa((function(){return Object(a["createElementVNode"])("div",{class:"text"},"模式设定",-1)})),vr={class:"volume-icon"},hr=["src"],Or=["src"],jr=["src"],Tr={key:1,class:"air-child"},kr={class:"open-title"},Ir={class:"adjust-item"},Sr={class:"adjust-text"},yr=Wa((function(){return Object(a["createElementVNode"])("span",{class:"adjust-title"},"温度",-1)})),Cr={class:"adjust-item"},wr={class:"adjust-text"},xr=Wa((function(){return Object(a["createElementVNode"])("span",{class:"adjust-title"},"档位",-1)})),Dr={class:"adjust-item"},Er={class:"adjust-text"},Vr=Wa((function(){return Object(a["createElementVNode"])("span",{class:"adjust-title"},"模式",-1)}));function Nr(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",qa,[Object(a["createElementVNode"])("div",Fa,[Ua,Object(a["createElementVNode"])("p",_a,[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",Ha,"收起全部")):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Pa,"查看全部"))])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",za,[e.airData.airImg?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:e.airData.airImg,alt:""},null,8,Ya)):(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",Ga,[Object(a["createElementVNode"])("div",Xa,[Object(a["createElementVNode"])("div",Ja,Object(a["toDisplayString"])(e.airData.minTempSet)+"℃",1),Object(a["createElementVNode"])("div",Ka,[(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",$a,[Object(a["createElementVNode"])("div",Za,Object(a["toDisplayString"])(e.realTemp)+"℃",1),Qa])]),Object(a["createElementVNode"])("div",er,Object(a["toDisplayString"])(e.airData.maxTempSet)+"℃",1)]),tr]),Object(a["createElementVNode"])("div",nr,[Object(a["createElementVNode"])("div",ar,[Object(a["createElementVNode"])("div",rr,[Object(a["createElementVNode"])("div",or,[(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))]),cr]),Object(a["createElementVNode"])("div",ir,[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,lr)],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,sr)],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")})},ur,2)])])]),Object(a["createElementVNode"])("div",dr,[Object(a["createElementVNode"])("div",pr,[Object(a["createElementVNode"])("div",fr,[Object(a["createElementVNode"])("div",br,Object(a["toDisplayString"])(1==e.airData.workMode?"制冷":2==e.airData.workMode?"制热":"通风"),1),gr]),Object(a["createElementVNode"])("div",vr,[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,hr)],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,Or)],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,jr)],2)])])])],4)):Object(a["createCommentVNode"])("",!0),e.showChild?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Tr,[(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",kr,[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",Ir,[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",Sr,[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"]),yr]),Object(a["createElementVNode"])("div",Cr,[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",wr,[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"]),xr]),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",Er,[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)])}n("c740");var Br=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},ee["a"].Component.name,ee["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:be["x"],part:1,airData:n,modeName:"",showAirVolumeBtn:!1,showDialog:!1,airTimer:r,airSetText:{notice:"",remark:[],nowImg:"",toWhere:"",designTemperature:0},showAll:function(){return Object(W["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(fe["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&&"switch"==e)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(ge["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(W["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,e.workMode>3&&(e.workMode=1);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(be["A"])(e);Object(ge["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(be["x"])("page-officehome","openair.png"):d.airData.airImg=Object(be["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(A["a"])({},Object(a["toRefs"])(d))}});n("3537"),n("9b14");const Lr=Oe()(Br,[["render",Nr],["__scopeId","data-v-5b42318b"]]);var Ar=Lr,Wr=function(e){return Object(a["pushScopeId"])("data-v-74f060e6"),e=e(),Object(a["popScopeId"])(),e},Mr={key:0,class:"light"},qr={class:"light-top"},Fr={class:"light-desc"},Ur={class:"light-title"},_r={class:"light-right"},Rr={key:0,class:"switch-box"},Pr=["src"],Hr={key:0,class:"light-main-control"},zr={key:0,class:"main-color"},Yr=["src"],Gr={key:1},Xr={key:1,class:"light-box"},Jr=["onClick"],Kr={class:"control-top"},$r=["src"],Zr={class:"control-bottom"},Qr={class:"control-title"},eo=["src"],to=Wr((function(){return Object(a["createElementVNode"])("span",null,"展开更多",-1)}));function no(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("Switch"),l=Object(a["resolveComponent"])("van-icon");return e.lampList&&e.lampList.length?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Mr,[Object(a["createElementVNode"])("div",qr,[Object(a["createElementVNode"])("div",Fr,[Object(a["createElementVNode"])("p",Ur,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)]),Object(a["createElementVNode"])("div",_r,[e.isShowChildLight?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Rr,[Object(a["createElementVNode"])("span",{class:"switch-item",onClick:t[0]||(t[0]=function(t){return e.eqChange("allLamp",!0,0)})},"全开"),Object(a["createElementVNode"])("span",{class:"switch-item",onClick:t[1]||(t[1]=function(t){return e.eqChange("allLamp",!1,0)})},"全关")])):Object(a["createCommentVNode"])("",!0),e.isShowChildLight?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:e.lightImg,alt:""},null,8,Pr))])]),e.isShowChildLight?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Hr,[e.lampList[0].bright||e.lampList[0].colorTemperature?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",zr,[Object(a["createElementVNode"])("img",{src:e.lightColorImg,onClick:t[2]||(t[2]=function(t){return e.showLightColorCtrol(e.lampList[0])}),alt:""},null,8,Yr)])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gr)),e.showFlag?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:2,disabled:!e.userIsControl,modelValue:e.lampSw,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.lampSw=t}),onClick:t[4]||(t[4]=function(t){return e.eqChange("allLamp","",0)}),"inactive-color":"rgba(196, 196, 196, 0.4)",class:"switch-btn"},null,8,["disabled","modelValue"]))])),e.isShowChildLight?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Xr,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.lampList,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:t.id},[(e.showFlag?n<e.lampList.length:n<2)?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:"light-control",onClick:function(n){return e.showLightColorCtrol(t)}},[Object(a["createElementVNode"])("div",Kr,[Object(a["createElementVNode"])("img",{src:t.switch?t.imgOpen:t.imgClose,alt:""},null,8,$r),Object(a["createVNode"])(i,{"active-color":"$elActiveColor",disabled:!e.userIsControl,modelValue:t.switch,"onUpdate:modelValue":function(e){return t.switch=e},size:"14px",onClick:Object(a["withModifiers"])((function(a){return e.eqChange("main",t,n)}),["stop"]),"inactive-color":"rgba(196, 196, 196, 0.2)",class:"child-switch"},null,8,["disabled","modelValue","onUpdate:modelValue","onClick"])]),Object(a["createElementVNode"])("div",Zr,[Object(a["createElementVNode"])("div",Qr,Object(a["toDisplayString"])(t.localName),1),t.bright||t.colorTemperature?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,style:Object(a["normalizeStyle"])({opacity:t.switch?"1":"0.3"}),src:e.lightColorImg,alt:""},null,12,eo)):Object(a["createCommentVNode"])("",!0)])],8,Jr)):Object(a["createCommentVNode"])("",!0)],64)})),128))])):Object(a["createCommentVNode"])("",!0),e.lampList&&e.lampList.length>2?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:2,class:"show-all",onClick:t[5]||(t[5]=Object(a["withModifiers"])((function(){return e.showAll&&e.showAll.apply(e,arguments)}),["stop"]))},[Object(a["createVNode"])(l,{name:e.lightIcon,class:"light-icon"},null,8,["name"]),to])):Object(a["createCommentVNode"])("",!0)])):Object(a["createCommentVNode"])("",!0)}n("4de4");var ao=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,spaceId:e.spaceId,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,lightColorImg:Object(be["x"])("page-officehome","lightColorControl.svg"),lightImg:Object(be["x"])("page-officehome","lamp_close.png"),lampSw:!1,showAll:function(){l.showFlag=!l.showFlag,l.showFlag?l.lightIcon="arrow-up":l.lightIcon="arrow-down"},showLightColorCtrol:function(e){e.switch&&t.emit("showLightColorCtrol",e)},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(ge["m"])({spaceId:l.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",1==a[o].lightType?(a[o].imgOpen=Object(be["x"])("page-officehome","lamp_open.png"),a[o].imgClose=Object(be["x"])("page-officehome","lamp_close.png")):(a[o].imgOpen=Object(be["x"])("page-officehome","atmLamp_small_open.png"),a[o].imgClose=Object(be["x"])("page-officehome","atmLamp_small_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(be["x"])("page-officehome","lamp_open.png"):Object(be["x"])("page-officehome","lamp_close.png"),a[0]&&1!==a[0].lightType&&(l.lightImg=l.lampSw?Object(be["x"])("page-officehome","atmLamp_small_open.png"):Object(be["x"])("page-officehome","atmLamp_small_close.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(""!==n&&(l.lampSw=n),l.forceOverTimeFlag&&l.lampSw&&r)return void t.emit("triggerWork",3);l.loadingLight=!0,l.lightImg=l.lampSw?Object(be["x"])("page-officehome","lamp_open.png"):Object(be["x"])("page-officehome","lamp_close.png");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(Na["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(ge["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(ge["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.clearLightStatusTimer(),l.lightsStatusTimer=setTimeout((function(){l.clearLightStatusTimer(),l.getLampList()}),e)}}),s=Object(a["computed"])((function(){return l.lampList.length&&l.lampList.length>1}));return Object(a["watch"])([function(){return e},function(){return e.spaceId}],(function(e,t){e[0]&&(l.userIsControl=e[0].userIsControl,l.controlMode=e[0].controlMode,l.forceOverTimeFlag=e[0].forceOverTimeFlag,l.seviceEquipmentList=e[0].seviceEquipmentList),e[1]&&e[1]!=t[1]&&(l.clearLightStatusTimer(),l.spaceId=e[1],l.showFlag=!1,l.getLampList())}),{deep:!1,immediate:!1}),Object(a["onBeforeUnmount"])((function(){l.clearLightStatusTimer()})),Object(a["onMounted"])((function(){l.getLampList()})),Object(A["a"])({isShowChildLight:s},Object(a["toRefs"])(l))}});n("6f74"),n("1d26");const ro=Oe()(ao,[["render",no],["__scopeId","data-v-74f060e6"]]);var oo=ro,co=function(e){return Object(a["pushScopeId"])("data-v-e5733310"),e=e(),Object(a["popScopeId"])(),e},io={key:0,class:"curtain"},lo={class:"curtain-top"},so={class:"curtain-desc"},mo={class:"curtain-title"},uo={class:"curtain-status"},po={class:"curtain-tip"},fo=co((function(){return Object(a["createElementVNode"])("span",null,"显示全部",-1)})),bo={class:"curtain-right"},go=["src"],vo={key:0,class:"curtain-control"},ho={key:0,class:"timer-text"},Oo=["src"],jo={key:0,class:"timer-text"},To=["src"],ko={class:"child-title"},Io={class:"curtain-control"},So=["onClick"],yo={key:0,class:"timer-text"},Co=["src"],wo=["onClick"],xo={key:0,class:"timer-text"},Do=["src"];function Eo(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",io,[Object(a["createElementVNode"])("div",lo,[Object(a["createElementVNode"])("div",so,[Object(a["createElementVNode"])("p",mo,Object(a["toDisplayString"])(e.curtainData.length&&1==e.curtainData.length?e.curtainData[0].name:"窗帘"),1),Object(a["createElementVNode"])("p",uo,[Object(a["createElementVNode"])("span",po,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"]),fo])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",bo,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","curtain-img.svg"),alt:""},null,8,go),e.showFlag?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",vo,[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",ho,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,Oo))],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",jo,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,To))],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",ko,Object(a["toDisplayString"])(t.name),1),Object(a["createElementVNode"])("div",Io,[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",yo,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,Co))],10,So),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",xo,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,Do))],10,wo)])])})),128)):Object(a["createCommentVNode"])("",!0)])):Object(a["createCommentVNode"])("",!0)}var Vo=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:be["x"],timer:n,getEqpGroup:function(){var t={criteria:{projectId:e.projectId,spaceId:e.spaceId,type:0},orders:[{column:"sortNum",asc:!0}]};Object(ge["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(ge["N"])(a).then((function(e){}))}}else Object(Na["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(ge["N"])(i).then((function(e){}))}}else Object(Na["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(A["a"])({isShowChildLight:c},Object(a["toRefs"])(o))}});n("9588");const No=Oe()(Vo,[["render",Eo],["__scopeId","data-v-e5733310"]]);var Bo=No,Lo=function(e){return Object(a["pushScopeId"])("data-v-18f3164f"),e=e(),Object(a["popScopeId"])(),e},Ao=Lo((function(){return Object(a["createElementVNode"])("div",{class:"top"},[Object(a["createElementVNode"])("span",null,"选择工作结束时间")],-1)})),Wo={class:"btns"};function Mo(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-picker");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Ao,(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",Wo,[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 qo=n("f253"),Fo=(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:qo["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(be["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(Na["a"])("请选择时间")},setWorkOverTime:function(){var n=Object(be["a"])();"明天"===i.checkValues[0]&&(n=Object(be["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(ge["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(A["a"])({picker:n},Object(a["toRefs"])(i))}}));n("0970");const Uo=Oe()(Fo,[["render",Mo],["__scopeId","data-v-18f3164f"]]);var _o=Uo,Ro={class:"nav"},Po={class:"nav-left"},Ho=["onClick"],zo=["src"],Yo=["src"],Go={class:"nav-right"},Xo=["onClick"],Jo=["src"],Ko=["src"];function $o(e,t,n,r,o,c){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ro,[Object(a["createElementVNode"])("div",Po,[(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,zo)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:t.img,alt:""},null,8,Yo))],10,Ho)),[[a["vShow"],n<3&&t.noShow]])})),128))]),Object(a["createElementVNode"])("div",Go,[(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,Jo)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:t.img,alt:""},null,8,Ko))],10,Xo)),[[a["vShow"],n>=3&&t.noShow]])})),128))])])}var Zo=Object(a["defineComponent"])({props:{navList:{type:Array,default:function(){return[]}}},setup:function(e,t){Object(Bt["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(A["a"])({},Object(a["toRefs"])(r))}});n("7c22");const Qo=Oe()(Zo,[["render",$o],["__scopeId","data-v-1f8e6930"]]);var ec=Qo,tc={class:"scene-dailog"},nc={class:"title"},ac={class:"dailog-content"},rc=["src"],oc={class:"status-text1"},cc=Object(a["createTextVNode"])(" 切换至 "),ic=Object(a["createTextVNode"])(" 场景 "),lc=Object(a["createTextVNode"])("切换中..."),sc={key:1,class:"status-text2"},mc={key:0},uc=Object(a["createTextVNode"])("我知道了");function dc(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",tc,[Object(a["createElementVNode"])("div",nc,Object(a["toDisplayString"])(e.secenaroStatus.localName),1),Object(a["createElementVNode"])("div",ac,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","taolun-big.svg")},null,8,rc),Object(a["createElementVNode"])("span",oc,[cc,Object(a["createElementVNode"])("i",null,Object(a["toDisplayString"])(e.secenaroStatus.sceneName),1),ic]),e.secenaroStatus.loading?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:0,class:"status-text2"},{default:Object(a["withCtx"])((function(){return[lc]})),_:1})):Object(a["createCommentVNode"])("",!0),e.secenaroStatus.loading?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",sc,[e.secenaroStatus.lodingText?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",mc," 已为您切换至适宜"+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[uc]})),_:1},8,["onClick"])])}var pc=Object(a["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},scenarioArr:{type:Array,default:function(){return[]}},secenaroStatus:{type:Object,default:function(){}}},components:{VanLoading:Tt["b"]},setup:function(e,t){var n=Object(a["reactive"])({parseImgUrl:be["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(A["a"])({},Object(a["toRefs"])(n))}});n("5c73");const fc=Oe()(pc,[["render",dc],["__scopeId","data-v-f8a217b2"]]);var bc=fc,gc=n("cda6"),vc={class:"map-home map-home-pading"},hc={class:"map-top"};function Oc(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",vc,[Object(a["createElementVNode"])("div",hc,[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 jc={class:"space-home"},Tc={class:"com-search"},kc={class:"search-icon"},Ic=["src"],Sc={class:"space-box"},yc=["onClick"];function Cc(e,t,n,r,o,c){var i=Object(a["resolveComponent"])("van-search");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",jc,[Object(a["createElementVNode"])("div",Tc,[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",kc,[Object(a["createElementVNode"])("img",{src:e.parseImgUrl("search-icon","search-icon.svg"),alt:""},null,8,Ic)])]),Object(a["createElementVNode"])("div",Sc,[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,yc)})),128)):Object(a["createCommentVNode"])("",!0)])])}var wc=n("d961"),xc=(n("5852"),Object(a["defineComponent"])({props:{spaceData:{type:Array,default:function(){return[]}},spaceInfo:{type:Object,default:function(){}}},components:{vanSearch:wc["a"]},setup:function(e,t){Object(Bt["d"])();var n=Object(be["s"])(),r=(Object(Lt["b"])(),[]),o=Object(a["reactive"])({parseImgUrl:be["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(ge["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(A["a"])({},Object(a["toRefs"])(o))}}));n("f1fd");const Dc=Oe()(xc,[["render",Cc],["__scopeId","data-v-4b041186"]]);var Ec=Dc,Vc=n("772a"),Nc=(n("38d5"),n("565f")),Bc=(n("be7f"),n("34e9")),Lc=(n("0653"),n("b650")),Ac=(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:Vc["a"],vanField:Nc["b"],CellGroup:Bc["a"],vanButton:Lc["b"],SpaceBox:Ec,MapBox:En["a"]},setup:function(e,t){Object(Bt["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(ge["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(A["a"])({},Object(a["toRefs"])(r))}}));n("fe6d");const Wc=Oe()(Ac,[["render",Oc],["__scopeId","data-v-55c81230"]]);var Mc=Wc,qc=function(e){return Object(a["pushScopeId"])("data-v-21af28f0"),e=e(),Object(a["popScopeId"])(),e},Fc={class:"light-temp"},Uc=qc((function(){return Object(a["createElementVNode"])("div",{class:"light-tep-top"},[Object(a["createElementVNode"])("span",null,"氛围灯")],-1)})),_c={key:0,class:"bright-box"},Rc={class:"bight-text"},Pc=qc((function(){return Object(a["createElementVNode"])("span",null,"亮度",-1)})),Hc={class:"light-control"},zc={class:"bight-slider",id:"sliderId1"},Yc=qc((function(){return Object(a["createElementVNode"])("div",{class:"slider-bar",id:"handId1"},null,-1)})),Gc={key:1,class:"bright-box"},Xc={class:"bight-text"},Jc=qc((function(){return Object(a["createElementVNode"])("span",null,"色温",-1)})),Kc=qc((function(){return Object(a["createElementVNode"])("div",{class:"light-control"},[Object(a["createElementVNode"])("div",{class:"bight-slider temp-slider",id:"sliderId2"},[Object(a["createElementVNode"])("div",{class:"slider-bar",id:"handId2"})])],-1)}));function $c(e,t,n,r,o,c){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Fc,[Uc,e.lightData.bright?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",_c,[Object(a["createElementVNode"])("div",Rc,[Pc,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.lightData.brightValueRate)+"%",1)]),Object(a["createElementVNode"])("div",Hc,[Object(a["createElementVNode"])("div",zc,[Object(a["createElementVNode"])("div",{class:"item-now",style:Object(a["normalizeStyle"])({width:e.itemWidth})},null,4),Yc])])])):Object(a["createCommentVNode"])("",!0),e.lightData.colorTemperature?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gc,[Object(a["createElementVNode"])("div",Xc,[Jc,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.lightData.colorTempValueRate)+"%",1)]),Kc])):Object(a["createCommentVNode"])("",!0)])}var Zc=Object(a["defineComponent"])({props:{lightData:{type:Object,default:function(){}}},components:{Switch:Va},setup:function(e,t){var n=null,r=null,o=Object(a["reactive"])({lampSw:!1,itemWidth:"0%",lightData:e.lightData,swiperIinit:!1,setSpaceContrl:function(e){Object(ge["O"])(e).then((function(e){}))},timeTemp:n,timeTempNum:1,timeColor:r,timeColorNum:1,getTimeNum:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=((new Date).getTime()-e)/1e3,n=parseInt(t);return 1==n},changContrlVal:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=[];1==e?(o.lightData.brightValue<o.lightData.brightMinValue&&(o.lightData.brightValue=o.lightData.brightMinValue),o.lightData.brightValue=Math.floor(o.lightData.brightValue),n=[{id:o.lightData.id,code:"brightSet",value:o.lightData.brightValue}],2==t?o.getTimeNum(o.timeTemp)&&(o.setSpaceContrl(n),o.timeTemp=(new Date).getTime()):o.setSpaceContrl(n)):2==e&&(o.lightData.colorTempValue<o.lightData.colorTempMinValue&&(o.lightData.colorTempValue=o.lightData.colorTempMinValue),o.lightData.colorTempValue=Math.floor(o.lightData.colorTempValue),n=[{id:o.lightData.id,code:"colorTemperatureSet",value:o.lightData.colorTempValue}],2==t?o.getTimeNum(o.timeColor)&&(o.setSpaceContrl(n),o.timeColor=(new Date).getTime()):o.setSpaceContrl(n))},changContrlValEnd:function(e){1==e?o.changContrlVal(1,1):2==e&&o.changContrlVal(2,1)},setTimeContrl:function(e){1==e?o.timeTemp=(new Date).getTime():2==e&&(o.timeColor=(new Date).getTime())},setLightDataMax:function(){o.lightData.brightMaxValue=o.lightData.brightMaxValue?o.lightData.brightMaxValue:100,o.lightData.colorTempMaxValue=o.lightData.colorTempMaxValue?o.lightData.colorTempMaxValue:100},setBarValue:function(e,t,n,a){if(o.setLightDataMax(),1==e){var r=o.lightData.brightMaxValue-o.lightData.brightMinValue,c=r/(t-a),i=100/r;o.lightData.brightValueRate=n*c*i,o.lightData.brightValueRate=Math.floor(o.lightData.brightValueRate);o.lightData.brightValueRate>=98||o.lightData.brightValueRate;o.lightData.brightValue=o.lightData.brightValueRate*i,o.itemWidth=n+a/2+"px"}else if(2==e){var l=o.lightData.colorTempMaxValue-o.lightData.colorTempMinValue,s=l/(t-a),m=100/l;o.lightData.colorTempValueRate=n*s*m,o.lightData.colorTempValueRate=Math.floor(o.lightData.colorTempValueRate),o.lightData.colorTempValue=o.lightData.colorTempValueRate*m}},getDefaultVal:function(e,t,n,a){var r="";if(1==e){o.lightData.brightValue=o.lightData.brightValue<=o.lightData.brightMinValue?0:o.lightData.brightValue,o.lightData.brightValue>o.lightData.brightMaxValue&&(o.lightData.brightValue=o.lightData.brightMaxValue);var c=o.lightData.brightMaxValue/(t-n),i=100/o.lightData.brightMaxValue;r=o.lightData.brightValue/i/c/i,o.lightData.brightValueRate=Math.floor(o.lightData.brightValue/i),o.itemWidth=r+n/2+"px"}else if(2==e){o.lightData.colorTempValue=o.lightData.colorTempValue<=o.lightData.colorTempMinValue?0:o.lightData.colorTempValue,o.lightData.colorTempValue>o.lightData.colorTempMaxValue&&(o.lightData.colorTempValue=o.lightData.colorTempMaxValue);var l=o.lightData.colorTempMaxValue/(t-n),s=100/o.lightData.colorTempMaxValue;r=o.lightData.colorTempValue/s/l/s,o.lightData.colorTempValueRate=Math.floor(o.lightData.colorTempValue/s)}a.style.left=r+"px"},endBoxSwiper:function(){o.swiperIinit=!0;var e=document.querySelector("#handId1"),t=document.querySelector("#sliderId1"),n=!1,a=0,r=t?t.offsetWidth:1;if(e){var c=e.getBoundingClientRect().width;o.getDefaultVal(1,r,c,e),e.addEventListener("touchstart",(function(t){a=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left),n=!0,o.setTimeContrl(1)})),e.addEventListener("touchend",(function(e){n=!1,o.changContrlValEnd(1)})),Object(fe["a"])(e,{swipeLeft:function(t){if(n){a=Math.abs(a);var i=Math.abs(t.mation.moveX-t.mation.startX),l=a-i;l=l<0?0:l,e.style.left=l+"px",o.setBarValue(1,r,l,c),o.changContrlVal(1)}},swipeRight:function(t){if(n){a=Math.abs(a);var i=Math.abs(t.mation.moveX-t.mation.startX),l=a+i;l=l>=r-c?r-c:l,e.style.left=l+"px",o.setBarValue(1,r,l,c),o.changContrlVal(1)}}})}},tempBoxSwiper:function(){o.swiperIinit=!0;var e=document.querySelector("#handId2"),t=document.querySelector("#sliderId2"),n=!1,a=0,r=t?t.offsetWidth:1;if(e){var c=e.getBoundingClientRect().width;o.getDefaultVal(2,r,c,e),e.addEventListener("touchstart",(function(t){a=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left),n=!0,o.setTimeContrl(2)})),e.addEventListener("touchend",(function(e){n=!1,o.changContrlValEnd(2)})),Object(fe["a"])(e,{swipeLeft:function(t){if(n){a=Math.abs(a);var i=Math.abs(t.mation.moveX-t.mation.startX),l=a-i;l=l<0?0:l,e.style.left=l+"px",o.setBarValue(2,r,l,c),o.changContrlVal(2)}},swipeRight:function(t){if(n){a=Math.abs(a);var i=Math.abs(t.mation.moveX-t.mation.startX),l=a+i;l=l>=r-c?r-c:l,e.style.left=l+"px",o.setBarValue(2,r,l,c),o.changContrlVal(2)}}})}},barSwiperInit:function(){return Object(W["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:Object(a["nextTick"])((function(){o.endBoxSwiper(),o.tempBoxSwiper()}));case 1:case"end":return e.stop()}}),e)})))()}});return Object(a["watch"])(e,(function(e){})),Object(a["onBeforeUnmount"])((function(){})),Object(a["onMounted"])((function(){o.barSwiperInit()})),Object(A["a"])({},Object(a["toRefs"])(o))}});n("745d");const Qc=Oe()(Zc,[["render",$c],["__scopeId","data-v-21af28f0"]]);var ei,ti=Qc,ni=n("e41f"),ai=(n("8a58"),n("66d6")),ri=n("6a79"),oi=n("5581"),ci=Object(a["defineComponent"])({components:(ei={MapBox:En["a"],ComMap:Mc,ScenarioDailog:bc,LightTemp:ti,Header:Hn,Comheader:zn["a"],NavBar:ec,Air:Aa,ManualIndex:Ar,ManualOvertime:lt,Light:oo,Curtain:Bo,TimeBox:_o,WorkOvertime:Te,WorkConfig:$t,ManualConfig:kn,ScenarioConfig:Dn,Detail:gc["default"],Contact:yt},Object(M["a"])(ei,ee["a"].Component.name,ee["a"].Component),Object(M["a"])(ei,"VanPopup",ni["b"]),Object(M["a"])(ei,"VanIcon",_n["b"]),ei),beforeRouteEnter:function(e,t,n){var a=Object(oi["a"])();a&&"null"!=a?n():n("/error")},setup:function(){var e=Object(a["getCurrentInstance"])(),t=Object(Bt["d"])(),n=Object(Bt["c"])(),r=window.document,o=r.body.clientHeight,c={},i=null,l=null,s={},m={},u={hasAir:!0,hasBlowing:!1,hasLamp:!1},d=[],p={},f={},b=Lt["a"].state.user.projectId,g={},v={},h={},O={},j=null,T={headImg:"",headScene:"",tipText:"选择工作结束时间",tipTextSwatch:!1},k={curtain:!1,light:!1,airConditioner:!1,bodySensor:!1},I={},S=null,y={},C=Object(be["s"])(),w={},x=null,D=[{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"}]}],E=[],V=null,N=null,B=null,L=[{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:"%"}],M=[],q=[],F=[],U=[],_=[],R={},P=Object(be["a"])("YYYY.MM.DD HH:mm"),H=Object(be["l"])(),z=[],Y=0,G=null,X=[],J=[],K=null,$=Object(a["reactive"])({equipTimer:K,seviceEquipmentList:X,spaceEquipList:J,enterType:1,deviceItem:G,parseImgUrl:be["x"],fileUrl:e.proxy.$fileUrl,nowDate:P,nowWeek:H,isShowWork:!1,isShowMetting:!1,localName:"",airTemp:"",userIsControl:!0,spaceModelTimer:V,spaceTempTimer:N,userSpaceInfo:E,spaceTimer:x,workInfo:y,intervalTimer:S,roomType:"",showSpaceTip:!1,mapOpacity:0,opacityV:1,childRef:I,hideTopImg:!1,isBottom:!1,isScrool:!1,officeData:m,popList:d,popupType:"scenario",showSecenDetailDalig:!1,sceneDetail:g,showScenario:!1,projectId:b,spaceInfo:f,headerInfo:T,topbgimg:"",userInfo:C,deviceIcon:"arrow",visible:!1,outWeather:c,vanPopupIndex:"",spaceEqFlagObj:u,spaceExistenceDevice:k,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:D,isACATVA:!1,showWorkOff:!1,envlist:L,realEevList:F,navList:[{top:0,id:"airId",code:"air",name:"温度/湿度",noShow:!0,img:Object(be["x"])("page-officehome","temp.png"),activeImg:Object(be["x"])("page-officehome","temp_active.svg")},{top:0,id:"lightId",code:"lamp",name:"光照",noShow:!1,img:Object(be["x"])("page-officehome","lamp.png"),activeImg:Object(be["x"])("page-officehome","lamp_active.svg")},{top:0,id:"curtainId",code:"curtain",name:"窗帘",noShow:!1,img:Object(be["x"])("page-officehome","curtain-nav.svg"),activeImg:Object(be["x"])("page-officehome","curtain-nav-active.svg")},{top:0,id:4,code:"mySpace",name:"常驻空间",noShow:!1,activeImg:Object(be["x"])("page-officehome","mySpaceIcon.svg"),img:Object(be["x"])("page-officehome","mySpaceIcon.svg")},{top:0,id:5,code:"switchSpace",name:"我的",noShow:!0,activeImg:Object(be["x"])("page-officehome","mapIcon.png"),img:Object(be["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(){$.isShowContact=!0},isLightColorFlag:!1,lightData:w,showLightColorCtrol:function(e){$.isLightColorFlag=!0,$.lightData=e},closeContactDailog:function(){$.isShowContact=!1},padBgImg:"",setPadBgImg:function(){0===$.padImgData.isBgDefault&&$.padImgData.bgImage&&$.padImgData.bgImage.fileId?$.padBgImg=$.fileUrl+"&key=".concat($.padImgData.bgImage.fileId):"个人"==$.roomType?$.padBgImg=Object(be["x"])("ipdImages","pad_img2.png"):"会议室"===$.roomType?$.padBgImg=Object(be["x"])("ipdImages","pad_img3.png"):($.roomType,$.padBgImg=Object(be["x"])("ipdImages","pad_img1.png"))},logImg:"",setPadLogo:function(){0===$.padImgData.isLogoDefault&&$.padImgData.logoImage&&$.padImgData.logoImage.fileId?$.logImg=$.fileUrl+"&key=".concat($.padImgData.logoImage.fileId):$.logImg=""},padImgData:z,padNumber:0,getPadImg:function(){var e={funcType:$.officeData.roomFuncType,spaceId:$.spaceInfo.spaceId},t=Object(be["A"])(e);$.padNumber<1&&($.padNumber=1,Object(ge["q"])(t).then((function(e){"success"===e.result&&($.padImgData=e.data,$.setPadBgImg(),$.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;$.enterType=e,$.deviceItem=t||null,$.isShowWork=!0},checkDeviceShowWork:function(){$.spaceEquipList.map((function(e){e.id=e.equipmentId})),$.seviceEquipmentList=$.spaceEquipList},closeWork:function(){$.isShowWork=!1,$.queryCustomAndScenceTimer(0)},forceOverTimeFlag:!1,setForceOverTimeFlag:function(e){"开放"===$.roomType&&e?$.forceOverTimeFlag=!0:$.forceOverTimeFlag=!1},getCompanyInfo:function(){return Object(W["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(ge["h"])({companyId:ai["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;$.weatherTimer=setTimeout((function(){clearTimeout($.weatherTimer),$.getWeather()}),e)},getWeather:function(){var e={openid:$.userInfo.openid,pubname:$.userInfo.pubname,projectId:Lt["a"].state.user.projectId},t=Object(be["A"])(e);Object(ge["C"])(t).then((function(e){var t,n=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:{};$.outWeather=n;var a=n.text;$.getWeatherIcon(a),$.getnowTime(a),$.getWeatherTimer()}))},getnowTime:function(e){var t=Object(be["h"])();e.indexOf("霾")>-1?$.topbgimg=Object(be["x"])("weather","office_smog.jpg"):$.topbgimg=t>=6&&t<19?Object(be["x"])("weather","office_bright.jpg"):Object(be["x"])("weather","office_night.jpg")},getWeatherIcon:function(e){e?e&&e.indexOf("晴")>-1?$.outWeather.imgname=Object(be["x"])("weather","sun.png"):e&&e.indexOf("雨")>-1?$.outWeather.imgname=Object(be["x"])("weather","rain.png"):e&&e.indexOf("阴")>-1||e.indexOf("云")>-1?$.outWeather.imgname=Object(be["x"])("weather","cloudy.png"):e&&e.indexOf("霾")>-1?$.outWeather.imgname=Object(be["x"])("weather","mai.png"):e&&e.indexOf("雾")>-1?$.outWeather.imgname=Object(be["x"])("weather","fog.png"):e&&e.indexOf("风")>-1?$.outWeather.imgname=Object(be["x"])("weather","wind.png"):e&&e.indexOf("雷")>-1?$.outWeather.imgname=Object(be["x"])("weather","thunder.png"):$.outWeather.imgname=Object(be["x"])("weather","sun.png"):$.outWeather.imgname=Object(be["x"])("weather","sun.png")},checkSpaceType:function(e){var t=Object(ri["b"])(e);"个人"===t?($.roomType="个人",$.headerInfo.headImg=Object(be["x"])("page-officehome","office_person_2.png"),$.headerInfo.headScene="工作",$.popList=$.listOffice):"会议室"===t?($.roomType="会议室",$.popList=JSON.parse(JSON.stringify($.listSen)),$.headerInfo.headImg=Object(be["x"])("page-officehome","office_normal_2.png"),$.getPageMeetingSceneHttp()):"开放"===t?($.roomType="开放",$.headerInfo.headImg=Object(be["x"])("page-officehome","office_publi_2.png")):($.roomType="其它",$.headerInfo.headImg=Object(be["x"])("page-officehome","office_publi_2.png")),"会议室"!==t&&$.timerSpaceInfo()},checkUserSpace:function(){for(var e=!1,t=0;t<$.userSpaceInfo.length;t++)if($.spaceInfo.spaceId===$.userSpaceInfo[t].sp_id){e=!0;break}$.userIsControl=e},getUserControlAuth:function(){Object(ge["B"])().then((function(e){var t=e;"success"===t.result?$.userSpaceInfo=t.data:$.userSpaceInfo=[],$.checkUserSpace()})).catch((function(){$.userSpaceInfo=[],$.checkUserSpace()}))},controlMode:Y,getSpaceInfo:function(){var e={criteria:{spaceId:$.spaceInfo.spaceId,projectId:$.userInfo.projectId},pubname:$.userInfo.pubname,openid:$.userInfo.openid};Object(ge["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]&&($.officeData=n[0]),$.officeData=$.officeData?$.officeData:{},$.officeData.localName&&($.localName=$.officeData.localName),$.officeData.temperature&&($.officeData.temperature=1*$.officeData.temperature.toFixed(1)),$.controlMode=$.officeData.controlMode,$.checkSpaceType($.officeData.roomFuncType),$.formatSpaceInfo(n),$.getPadImg(),$.loadinngEnd()})).catch((function(){$.loadinngEnd(),$.timerSpaceInfo()}))},getSpaceModeTimer:function(){$.spaceModelTimer=setTimeout((function(){$.getSpaceMode(),clearTimeout($.spaceModelTimer),$.spaceModelTimer=null}),1e3)},getSpaceMode:function(){Object(ge["y"])().then((function(e){$.getSpaceModeTimer()})).catch((function(){$.getSpaceModeTimer()}))},getSpaceTempTimer:function(){$.spaceTempTimer=setTimeout((function(){clearTimeout($.spaceTempTimer),$.spaceTempTimer=null,$.getSpaceTemp()}))},getSpaceTemp:function(){Object(ge["z"])().then((function(e){$.getSpaceTempTimer()})).catch((function(){$.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?"":"轻度污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.2) 0%, #CD0B00 100%)":"中度污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.5) 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="",a=parseFloat(e);a?"humidity"==t?n=a<30?"干燥":a>70?"潮湿":"健康":"co2"==t&&(a<=800?n="健康":a>800&&a<=1e3?n="达标":a>1e3&&a<=1500?n="略高":a>1500&&(n="超标")):"pm25"==t?a>=0&&a<35?n="健康":a>=35&&a<=75?n="良":a>75&&a<=115?n="轻度污染":a>115&&a<=150?n="中度污染":a>150&&a<=250?n="重度污染":a>250&&(n="严重污染"):"hcho"==t&&(n=a<=.1?"健康":"超标");var r=$.setEnvBg(t,n);return{levelTxt:n,bgColor:r}},setPageheight:function(){Object(a["nextTick"])((function(){r.getElementById("envBox").style.height=r.getElementById("envBox").offsetHeight+"px"}))},changeEnvValue:function(e){e.co2>1e3?e.co2=1e3:e.pm25>75?e.pm25=75:e.hcho>.1?e.hcho=.1:e.humidity<30?e.humidity=30:e.humidity>70&&(e.humidity=70)},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("Pj1101020007"===$.userInfo.projectId&&$.changeEnvValue(n),n.co2||0==n.co2){var a=$.checkLevel(n.co2,"co2");$.envlist[1].bgColor=a.bgColor,$.envlist[1].num=n.co2}else $.envlist[1].num="--",$.envlist[1].bgColor="";if(n.pm25||0===n.pm25){var r=$.checkLevel(n.pm25,"pm25");$.envlist[2].bgColor=r.bgColor,$.envlist[2].num=n.pm25}else $.envlist[2].num="--",$.envlist[2].bgColor="";if(n.hcho||0==n.hcho){var o=$.checkLevel(n.hcho,"hcho");$.envlist[0].bgColor=o.bgColor,$.envlist[0].num=n.hcho.toFixed(2)}else $.envlist[0].num="--",$.envlist[0].bgColor="";if(n.humidity||0==n.humidity){var c=$.checkLevel(n.humidity,"humidity");$.envlist[3].bgColor=c.bgColor,$.envlist[3].num=n.humidity.toFixed(0)}else $.envlist[3].num="--",$.envlist[3].bgColor=""}},activeType:"",getPageMeetingSceneHttp:function(){var e={spaceId:$.spaceInfo.spaceId};Object(ge["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"),$.activeType=n,$.timerSpaceInfo()})).catch((function(){$.timerSpaceInfo()}))},secenaroStatus:s,setHeadScene:function(e,t){$.activeType=e.sceneType,1==t&&($.isShowMetting=!0),$.secenaroStatus={localName:$.officeData.localName,loading:e.loading,lodingText:e.lodingText,sceneName:e.sceneName}},closeDailog:function(){$.isShowMetting=!1},isShowDetail:!1,detailQuery:p,handleDetail:function(e){$.isShowDetail=!0,$.detailQuery.funcid=e.funcid,$.detailQuery.spaceId=$.spaceInfo.spaceId},updateAirTemp:function(e){$.airTemp=e,$.setHeadSceneAirTemp()},setHeadSceneAirTemp:function(){if($.sceneDetail&&$.sceneDetail.textObj&&$.sceneDetail.textObj.length&&$.airTemp&&("DISCUSSING"==$.sceneDetail.code||"PROJECTING"==$.sceneDetail.code))for(var e=0;e<$.sceneDetail.textObj.length;e++){var t=$.sceneDetail.textObj;"air"===t.type&&(t.text=t.text+",目标温度"+$.airTemp)}},handlePreClose:function(){var e=Object(be["a"])(),t=Object(be["h"])();t<10&&(t="0".concat(t));var n={projectId:$.projectId,objectId:$.spaceInfo.spaceId,endDate:e,endTime:t+"0000",type:3};Object(ge["a"])(n).then((function(e){var t=e;"success"==t.result&&$.changeLampStatus()}))},changeLampStatus:function(){$.showWorkOff=!1,$.headerInfo.tipText="选择工作结束时间",$.headerInfo.tipTextSwatch=!0},equimentsTimer:l,setEquimentsTimer:function(){},getEquipments:function(){var e={spaceId:$.spaceInfo.spaceId},t=Object(be["A"])(e);Object(ge["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 $.spaceExistenceDevice){for(var o=!1,c=0;c<a.length;c++)r==a[c]&&(o=!0);$.spaceExistenceDevice[r]=o}$.spaceExistenceDevice.light?$.navList[1].noShow=!0:$.navList[1].noShow=!1,$.spaceExistenceDevice.curtain?$.navList[2].noShow=!0:$.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";$.userIsControl?($.showScenario=!$.showScenario,$.showScenario?$.deviceIcon="arrow-down":$.deviceIcon="arrow",$.popupType=e):Object(Na["a"])("您没有当前空间的控制权限!")},triggerCheckSpace:function(){var e=r.getElementById("envContent"),t=r.getElementById("houseDes"),n=t.offsetHeight;$.opacityV=0,$.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);$.hideTopImg=!0,$.isBottom=!0},loadingStart:function(){Na["a"].loading({duration:0,forbidClick:!0,message:"加载中..."})},loadinngEnd:function(){Na["a"].clear()},clearTimerSpaceInfo:function(){clearTimeout($.spaceTimer),$.spaceTimer=null},timerSpaceInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3;$.spaceTimer=setTimeout((function(){$.getSpaceInfo(),$.clearTimerSpaceInfo()}),e)},isWork:!1,isMetting:!1,checkIsSpaceScene:function(){$.scenarioArr.map((function(e){"OVERTIME"===e.sceneType&&($.isWork=!0)}))},scenarioArr:M,sceneConfigTimer:q,clearSceneConfigTimer:function(){clearTimeout($.sceneConfigTimer)},querySpaceSceneConfigTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e5;$.clearSceneConfigTimer(),$.sceneConfigTimer=setTimeout((function(){$.querySpaceSceneConfig(),$.clearSceneConfigTimer()}),e)},querySpaceSceneConfig:function(){var e={spaceId:$.spaceInfo.spaceId},t=Object(be["A"])(e);Object(ge["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:[];$.scenarioArr=a,$.checkIsSpaceScene(),$.querySpaceSceneConfigTimer()})).catch((function(e){$.querySpaceSceneConfigTimer()}))},workkArr:U,secenTimer:R,clearSecenTimer:function(){clearTimeout($.secenTimer),$.secenTimer=null},clearEquipTimer:function(){clearTimeout($.equipTimer),$.equipTimer=null},getSpaceEquipListTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e5;$.clearEquipTimer(),$.equipTimer=setTimeout((function(){$.getSpaceEquipList(),$.clearEquipTimer()}),e)},getSpaceEquipList:function(){var e={spaceId:$.spaceInfo.spaceId},t=Object(be["A"])(e);Object(ge["u"])(t).then((function(e){var t=e.data||[];$.spaceEquipList=t,$.checkDeviceShowWork(),$.getSpaceEquipListTimer()})).catch((function(e){$.getSpaceEquipListTimer()}))},queryCustomAndScenceTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;$.clearSecenTimer(),$.secenTimer=setTimeout((function(){$.queryCustomAndScence(),$.clearSecenTimer()}),e)},queryCustomAndScence:function(){var e={spaceId:$.spaceInfo.spaceId},t=Object(be["A"])(e);Object(ge["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($.compare)}$.workkArr=n,$.formateManualWorkTime(),$.queryCustomAndScenceTimer()})).catch((function(){$.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=$.workkArr||[],t=0;t<e.length;t++){var n=e[t],a=e[t].spaceCustomContentList||[];if(a&&a.length){a=a.sort($.compare),n.spaceCustomContentList=a;var r=Object(be["n"])(),o=Object(be["a"])("YYYY-MM-DD"),c=Object(be["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(){$.padNumber=0,$.getSpaceInfo(),$.querySpaceSceneConfig(),$.getSpaceEquipList(),$.queryCustomAndScenceTimer(0),$.getEquipments()},updatePageUrl:function(){var e=window.history,t=window.location.origin+window.location.pathname;e.replaceState("","",t)},spaceData:_,copySpaceData:_,floorId:"",buildingId:"",queryWorkSpace:function(){var e={criteria:{projectId:$.userInfo.projectId,spaceName:"",macAddress:$.userInfo.mac},orders:[{column:"isMajorSpace",asc:!1}]};Object(ge["J"])(e).then((function(e){var t,n=e;"success"===n.result?$.spaceData=null!==(t=null===n||void 0===n?void 0:n.content)&&void 0!==t?t:[]:$.spaceData=[];$.spaceData.map((function(e){$.spaceInfo.spaceId===e.spaceId?(e.active=!0,$.spaceInfo=e):e.active=!1})),$.copySpaceData=JSON.parse(JSON.stringify($.spaceData))}))},resetSpaceStatus:function(){$.spaceExistenceDevice={curtain:!1,light:!1,airConditioner:!1,bodySensor:!1},$.spaceData.map((function(e){e.active=!1})),$.controlMode=0,$.isWork=!1,$.roomType="",$.officeData.temperature="",$.spaceExistenceDevice=k,$.workkArr=[],$.setForceOverTimeFlag(!1)},isShowMap:!1,defaultSpace:f,moreSpace:function(){$.isShowMap=!0,$.defaultSpace=$.spaceInfo},elChangeExForArray:function(e){for(var t=1,n=0,a=0;a<$.spaceData.length;a++)if(e.spaceId===$.spaceData[a].spaceId&&($.spaceData[a].active=!0,a>2)){n=a;break}if(n){var r=$.spaceData[t];$.spaceData[t]=$.spaceData[n],$.spaceData[n]=r}},changeSpace:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;$.clearAll(),$.resetSpaceStatus(),$.spaceInfo=e,1===t&&($.defaultSpace=e,$.elChangeExForArray(e)),e.active=!0,$.init()},timeOutEvent:v,touchNumber:0,gtouchstart:function(e){return $.touchNumber=0,$.timeOutEvent=setTimeout((function(){$.touchNumber=1,$.longPress()}),500),!1},showDeleteButton:function(){return clearInterval($.touchInterval),$.touchInterval=null,clearTimeout($.timeOutEvent),$.timeOutEvent,!1},gtouchmove:function(){clearTimeout(this.timeOutEvent),$.timeOutEvent=0},touchInterval:h,longPress:function(){$.timeOutEvent=0,$.touchInterval=setInterval((function(){$.touchNumber++,6===$.touchNumber&&(clearInterval($.touchInterval),$.touchInterval=null,t.push({name:"home",query:{mac:$.userInfo.mac,type:"logoOut"}}))}),1e3)},clearAll:function(){$.clearTimerSpaceInfo(),$.clearSceneConfigTimer(),$.clearSecenTimer(),$.clearEquipTimer()},contantDetail:O,cusServiceTimer:j,queryCustomerserviceTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36e5;$.cusServiceTimer=setTimeout((function(){clearTimeout($.cusServiceTimer),$.queryCustomerservice()}),e)},queryCustomerservice:function(){var e={criteria:{projectId:$.userInfo.projectId}};Object(ge["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:[];$.contantDetail=a[0],$.queryCustomerserviceTimer()})).catch((function(){$.queryCustomerserviceTimer()}))},dateInter:B,setDateTime:function(){$.dateInter=setInterval((function(){$.nowDate=Object(be["a"])("YYYY.MM.DD HH:mm"),$.nowWeek=Object(be["l"])()}),6e4)}});return Object(a["onBeforeUnmount"])((function(){$.clearAll(),clearInterval($.dateInter),clearTimeout($.cusServiceTimer),clearTimeout($.weatherTimer)})),Object(a["onMounted"])((function(){var e=n.query.spaceId;$.spaceInfo={spaceId:e},$.defaultSpace={spaceId:e},$.setDateTime(),$.init(),$.queryWorkSpace(),$.getWeather(),$.queryCustomerservice()})),Object(A["a"])({},Object(a["toRefs"])($))}});n("2b83"),n("750b");const ii=Oe()(ci,[["render",L],["__scopeId","data-v-f7f40dfe"]]);t["default"]=ii},8267:function(e,t,n){},"8b1f":function(e,t,n){},"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){},"9b14":function(e,t,n){"use strict";n("3e68")},"9c88":function(e,t,n){"use strict";n("a58f")},"9ce4":function(e,t,n){},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,h=i(this),O=c(h.length),j=r(e,O),T=arguments.length;if(0===T?n=a=0:1===T?(n=0,a=O-j):(n=T-2,a=b(f(o(t),0),O-j)),O+n-a>g)throw TypeError(v);for(m=l(h,a),u=0;u<a;u++)d=j+u,d in h&&s(m,u,h[d]);if(m.length=a,n<a){for(u=j;u<O-a;u++)d=u+a,p=u+n,d in h?h[p]=h[d]:delete h[p];for(u=O;u>O-a+n;u--)delete h[u-1]}else if(n>a)for(u=O-a;u>j;u--)d=u+a-1,p=u+n-1,d in h?h[p]=h[d]:delete h[p];for(u=0;u<n;u++)h[u+j]=arguments[u+2];return h.length=O-a+n,m}})},a526:function(e,t,n){},a58f:function(e,t,n){},aae5:function(e,t,n){"use strict";n("dc5d")},b273:function(e,t,n){},b936:function(e,t,n){},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)},c7bb:function(e,t,n){},d3fb:function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return x}));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,h=15,[O,j]=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(O),I=e=>Object(p["f"])(e)&&e.disabled;var S=Object(a["defineComponent"])({name:O,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 O=Object(a["ref"])(),S=Object(a["reactive"])({index:e.defaultIndex,offset:0,duration:0,options:f(e.initialOptions)}),y=Object(b["a"])(),C=()=>S.options.length,w=()=>e.itemHeight*(+e.visibleItemCount-1)/2,x=e=>{e=Object(i["d"])(e,0,C());for(let t=e;t<C();t++)if(!I(S.options[t]))return t;for(let t=e-1;t>=0;t--)if(!I(S.options[t]))return t},D=(n,a)=>{n=x(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},E=t=>{JSON.stringify(t)!==JSON.stringify(S.options)&&(S.options=f(t),D(e.defaultIndex))},V=t=>{r||e.readonly||(d=null,S.duration=g,D(t,!0))},N=t=>Object(p["f"])(t)&&e.textKey in t?t[e.textKey]:t,B=t=>Object(i["d"])(Math.round(-t/e.itemHeight),0,C()-1),L=(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,D(r,!0)},A=()=>{r=!1,S.duration=0,d&&(d(),d=null)},W=t=>{if(!e.readonly){if(y.start(t),r){const e=T(O.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}},M=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,-C()*e.itemHeight,e.itemHeight);const n=Date.now();n-c>v&&(c=n,l=S.offset)},q=()=>{if(e.readonly)return;const t=S.offset-l,n=Date.now()-c,a=n<v&&Math.abs(t)>h;if(a)return void L(t,n);const o=B(S.offset);S.duration=g,D(o,!0),setTimeout(()=>{r=!1},0)},F=()=>{const t={height:e.itemHeight+"px"};return S.options.map((r,o)=>{const c=N(r),i=I(r),l={role:"button",style:t,tabindex:i?-1:0,class:j("item",{disabled:i,selected:o===S.index}),onClick:()=>V(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(N(t[n])===e)return D(n)},_=()=>S.options[S.index];return D(S.index),Object(m["k"])(k),Object(u["a"])({state:S,setIndex:D,getValue:_,setValue:U,setOptions:E,stopMomentum:A}),Object(a["watch"])(()=>e.initialOptions,E),Object(a["watch"])(()=>e.defaultIndex,e=>D(e)),()=>Object(a["createVNode"])("div",{class:[j(),e.className],onTouchstart:W,onTouchmove:M,onTouchend:q,onTouchcancel:q},[Object(a["createVNode"])("ul",{ref:O,style:{transform:`translate3d(0, ${S.offset+w()}px, 0)`,transitionDuration:S.duration+"ms",transitionProperty:S.duration?"all":"none"},class:j("wrapper"),onTransitionend:A},[F()])])}});const[y,C,w]=Object(r["a"])("picker"),x={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},D=Object(c["a"])({},x,{columns:Object(o["a"])(),valueKey:String,defaultIndex:Object(o["c"])(0),toolbarPosition:Object(o["e"])("top"),columnsFieldNames:Object});var E=Object(a["defineComponent"])({name:y,props:D,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 h=Object(a["computed"])(()=>Object(i["j"])(e.itemHeight)),O=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"}),j=()=>{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"===O.value?o.value=[{[f]:t}]:"cascade"===O.value?j():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)},x=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]},D=e=>g[e],E=e=>{const t=D(e);if(t)return t.getValue()},V=(e,t)=>{const n=D(e);n&&(n.setValue(t),"cascade"===O.value&&x(e))},N=e=>{const t=D(e);if(t)return t.state.index},B=(e,t)=>{const n=D(e);n&&(n.setIndex(t),"cascade"===O.value&&x(e))},L=e=>{const t=D(e);if(t)return t.state.options},A=()=>g.map(e=>e.getValue()),W=e=>{e.forEach((e,t)=>{V(t,e)})},M=e=>{e.forEach((e,t)=>{B(t,e)})},q=e=>{"plain"===O.value?t(e,E(0),N(0)):t(e,A(),I())},F=e=>{"cascade"===O.value&&x(e),"plain"===O.value?t("change",E(0),N(0)):t("change",A(),e)},U=()=>{g.forEach(e=>e.stopMomentum()),q("confirm")},_=()=>q("cancel"),R=()=>n.title?n.title():e.title?Object(a["createVNode"])("div",{class:[C("title"),"van-ellipsis"]},[e.title]):void 0,P=()=>{const t=e.cancelButtonText||w("cancel");return Object(a["createVNode"])("button",{type:"button",class:[C("cancel"),l["g"]],onClick:_},[n.cancel?n.cancel():t])},H=()=>{const t=e.confirmButtonText||w("confirm");return Object(a["createVNode"])("button",{type:"button",class:[C("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:C("toolbar")},[e?e():[P(),R(),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:h.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:h.value+"px"},n={backgroundSize:`100% ${(e-h.value)/2}px`};return[Object(a["createVNode"])("div",{class:C("mask"),style:n},null),Object(a["createVNode"])("div",{class:[l["e"],C("frame")],style:t},null)]}},X=()=>{const t=h.value*+e.visibleItemCount,n={height:t+"px"};return Object(a["createVNode"])("div",{class:C("columns"),style:n,onTouchmove:s["e"]},[Y(),G(t)])};return Object(a["watch"])(()=>e.columns,T,{immediate:!0}),Object(u["a"])({confirm:U,getValues:A,setValues:W,getIndexes:I,setIndexes:M,getColumnIndex:N,setColumnIndex:B,getColumnValue:E,setColumnValue:V,getColumnValues:L,setColumnValues:y}),()=>{var t,r;return Object(a["createVNode"])("div",{class:C()},["top"===e.toolbarPosition?z():null,e.loading?Object(a["createVNode"])(d["a"],{class:C("loading")},null):null,null==(t=n["columns-top"])?void 0:t.call(n),X(),null==(r=n["columns-bottom"])?void 0:r.call(n),"bottom"===e.toolbarPosition?z():null])}}})},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){},e92a:function(e,t,n){},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},fe6d:function(e,t,n){"use strict";n("bde3")}}]);
  2. //# sourceMappingURL=chunk-52442a6c.62b3d6df.js.map