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