chunk-36916a40.91e658a7.js 235 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-36916a40"],{"0143":function(e,t,n){"use strict";n("c9d9")},"0653":function(e,t,n){"use strict";n("68ef"),n("5c56")},"0970":function(e,t,n){"use strict";n("60f5")},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,c=n("a640"),r=n("ae40"),i=n("2d00");n=n("605d"),c=c("reduce"),r=r("reduce",{1:0});a({target:"Array",proto:!0,forced:!c||!r||!n&&79<i&&i<83},{reduce:function(e){return o(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}})},"157e":function(e,t,n){"use strict";n("5934")},1746:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},1980:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},2447:function(e,t,n){"use strict";n("e384")},"28b1":function(e,t,n){},"34e9":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));t=n("c199");var a=n("7a23"),o=n("fe7e"),c=n("f691"),r=n("b1d2");const[i,l]=Object(o.a)("cell-group");n={title:String,inset:Boolean,border:c.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}),{[r.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")},"407d":function(e,t,n){"use strict";n("bb1b")},4235:function(e,t,n){"use strict";n("6606")},"43c2":function(e,t,n){},4458:function(e,t,n){"use strict";n("86bc")},"4b02":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"4b8a":function(e,t,n){"use strict";n("28b1")},"4dd8":function(e,t,n){"use strict";n("efa9")},5118:function(e,t,n){(function(e){var a=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function c(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new c(o.call(setTimeout,a,arguments),clearTimeout)},t.setInterval=function(){return new c(o.call(setInterval,a,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(a,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n("6017"),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n("c8ba"))},5148:function(e,t,n){},"560d":function(e,t,n){"use strict";n("43c2")},"58ab":function(e,t,n){},5934:function(e,t,n){},"5a3d":function(e,t,n){},"5c56":function(e,t,n){},"5c73":function(e,t,n){"use strict";n("8267")},6017:function(e,t,n){(function(e,t){!function(e,n){"use strict";var a,o,c,r,i,l,s,m;function u(e){delete o[e]}function d(e){if(c)setTimeout(d,0,e);else{var t=o[e];if(t){c=!0;try{var a=t,r=a.callback,i=a.args;switch(i.length){case 0:r();break;case 1:r(i[0]);break;case 2:r(i[0],i[1]);break;case 3:r(i[0],i[1],i[2]);break;default:r.apply(n,i)}}finally{u(e),c=!1}}}}function p(){function t(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(n)&&d(+t.data.slice(n.length))}var n="setImmediate$"+Math.random()+"$";e.addEventListener?e.addEventListener("message",t,!1):e.attachEvent("onmessage",t),i=function(t){e.postMessage(n+t,"*")}}e.setImmediate||(a=1,c=!(o={}),r=e.document,m=(m=Object.getPrototypeOf&&Object.getPrototypeOf(e))&&m.setTimeout?m:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){d(e)}))}:function(){var t,n;if(e.postMessage&&!e.importScripts)return t=!0,n=e.onmessage,e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}()?p():i=e.MessageChannel?((s=new MessageChannel).port1.onmessage=function(e){d(e.data)},function(e){s.port2.postMessage(e)}):r&&"onreadystatechange"in r.createElement("script")?(l=r.documentElement,function(e){var t=r.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,l.removeChild(t),t=null},l.appendChild(t)}):function(e){setTimeout(d,0,e)},m.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];return o[a]={callback:e,args:t},i(a),a++},m.clearImmediate=u)}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n("c8ba"),n("4362"))},"60f5":function(e,t,n){},6576:function(e,t,n){},6606:function(e,t,n){},"66b9":function(e,t,n){"use strict";n("68ef"),n("cb51"),n("3743"),n("e3b3"),n("bc1b")},"6c88":function(e,t,n){"use strict";n("fa13")},"6eb7":function(e,t,n){},"6f3b":function(e,t,n){"use strict";n("9167")},7248:function(e,t,n){"use strict";n("8211")},"74a6":function(e,t,n){},"74d8":function(e,t,n){"use strict";n("4b02")},"772a":function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));t=n("c199");var a=n("7a23"),o=n("fe7e"),c=n("f691"),r=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:c.f,labelAlign:String,inputAlign:String,scrollToError:Boolean,validateFirst:Boolean,submitOnEnter:c.g,validateTrigger:Object(c.e)("onBlur"),showErrorMessage:c.g,errorMessageAlign:String},o=Object(a.defineComponent)({name:m,props:n,emits:["submit","failed"],setup(e,{emit:t,slots:n}){const{children:o,linkChildren:c}=Object(l.f)(r.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))},O=()=>{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)})},h=e=>{Object(i.e)(e),O()};return c({props:e}),Object(s.a)({submit:O,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:h},[null==(e=n.default)?void 0:e.call(n)])}}});var d=Object(t.a)(o)},"7ed5":function(e,t,n){"use strict";n("5148")},"7f3f":function(e,t,n){"use strict";function a(e){return Object(o.pushScopeId)("data-v-50bafe57"),e=e(),Object(o.popScopeId)(),e}n.r(t),n("b0c0");var o=n("7a23"),c={class:"main-left"},r={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"},O={class:"space-temp"},h=["src"],j=a((function(){return Object(o.createElementVNode)("span",{class:"temp-text"},"温度",-1)})),v=a((function(){return Object(o.createElementVNode)("sup",null,"℃",-1)})),T={class:"space-env"},k=["onClick"],I=["src"],y={class:"env-text"},S={key:0,class:"fotter"},C=["onClick"],w=["src"],D=["src"],E=["src"],x=a((function(){return Object(o.createElementVNode)("span",null,"…",-1)})),N={class:"main-right"},V={key:0,class:"work-btn"},B={key:0},L={key:0};function A(e){return Object(o.pushScopeId)("data-v-719ebd15"),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 q=n("5530"),M=(n("96cf"),n("1da1")),W=n("ade3"),F={class:"work-content"},U={class:"work-space"},_={class:"space-title"},R=A((function(){return Object(o.createElementVNode)("div",{class:"device-tip"},"延时期间,空间相关设备会开启",-1)})),P={class:"add-time",id:"addTimeId"},H={key:0,class:"date_box"},z=["onClick"],X={class:"sliders-list",id:"sliderListId"},Y={class:"sliders"},G=["onClick","data-index"],K=[A((function(){return Object(o.createElementVNode)("div",{class:"start",id:"startId"},null,-1)})),A((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 Z=n("2241"),$=(n("e17f"),n("c199")),Q=n("fe7e"),ee=n("f691"),te=n("8405"),ne=n("4a89"),ae=n("f465"),oe=n("cdd8");const[ce,re]=Object(Q.a)("slider");var ie={min:Object(ee.c)(0),max:Object(ee.c)(100),step:Object(ee.c)(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:ee.f,buttonSize:ee.f,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};ie=Object(o.defineComponent)({name:ce,props:ie,emits:["change","drag-end","drag-start","update:modelValue"],setup(e,{emit:t,slots:n}){let a,c,r;const i=Object(o.ref)(),l=Object(o.ref)(),s=Object(oe.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(te.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(te.d)(t,n,a),a=Math.round((t-n)/o)*o;return Object(te.a)(n,a)},b=(e,t)=>JSON.stringify(e)===JSON.stringify(t),g=(n,a)=>{var o,c;n=d(n)?(c=null!=(c=(o=n)[0])?c:Number(e.min),((o=null!=(o=o[1])?o:Number(e.max))<c?[o,c]:[c,o]).map(f)):f(n),b(n,e.modelValue)||t("update:modelValue",n),a&&!b(n,r)&&t("change",n)},O=t=>{if(t.stopPropagation(),!e.disabled&&!e.readonly){const{min:o,reverse:c,vertical:r,modelValue:l}=e,s=Object(ae.l)(i);var n,a=r?s.height:s.width;t=Number(o)+(r?c?s.bottom-t.clientY:t.clientY-s.top:c?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)}},h=n=>{if(!e.disabled&&!e.readonly){"start"===l.value&&t("drag-start",n),Object(ne.e)(n,!0),s.move(n),l.value="dragging";n=Object(ae.l)(i);let o=(e.vertical?s.deltaY:s.deltaX).value/(e.vertical?n.height:n.width)*m.value;e.reverse&&(o=-o),d(r)?(n=e.reverse?1-a:a,c[n]=r[n]+o):c=r+o,g(c)}},j=n=>{e.disabled||e.readonly||("dragging"===l.value&&(g(c,!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),c=e.modelValue,r=d(c)?c.map(f):f(c),l.value="start")},onTouchmove:h,onTouchend:j,onTouchcancel:j,onClick:ne.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(te.f)(e.buttonSize)},null)})(u,t)])};return g(e.modelValue),Object(ae.h)(()=>e.modelValue),()=>Object(o.createVNode)("div",{ref:i,style:u.value,class:re({vertical:e.vertical,disabled:e.disabled}),onClick:O},[Object(o.createVNode)("div",{class:re("bar"),style:p.value},[e.range?[v(0),v(1)]:v()])])}}),ie=Object($.a)(ie);function le(e,t){function n(){}var a,o,c=!1,r=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){r=e.touches[0].pageX,i=e.touches[0].pageY,s=l=0}),{passive:!0}),e.addEventListener("touchmove",(function(t){var n;c=!0,a=t.touches[0].pageX,o=t.touches[0].pageY,t.mation={startX:r,startY:i,moveX:a,moveY:o,disX:l,disY:s},m.drag.call(e,t),c&&(n=Math.abs(a-r),(Math.abs(o-i)<n?0<a-r?m.swipeRight:m.swipeLeft:0<o-r?m.swipeDown:m.swipeUp).call(e,t))}),{passive:!0}),e.addEventListener("touchend",(function(e){c=!1}))}function se(e){return Object(o.pushScopeId)("data-v-e19a3620"),e=e(),Object(o.popScopeId)(),e}n("68ef"),n("9617"),n("ac1e");var me=n("d257"),ue=n("459d"),de=Object(o.defineComponent)({components:{VanSlider:ie},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(me.r)(),c="".concat(Object(me.y)("ipdImages","time-check.svg")),r=(c="linear-gradient(0deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2)), url(".concat(c,")"),Object(me.t)()),i=Object(o.reactive)({userInfo:r,isEvent:!1,screenInfo:{screenWidth:0,screenHeight:0},projectId:e.projectId,workkArr:e.workkArr,bgRed:c,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(me.l)()[1]},getTomorrowIndex:function(){var e=0;return"今天"===i.nowData.week?Object(me.l)()[1]:e},getNowPerstion:function(e){var t=i.getNowIndex(),n={nowIndex:t,len:4},a=e[t].formatTimer,o=i.parseCusStartTime(i.nowData.cusStartTime),c=i.parseCusEndTime(i.nowData.cusEndTime);return o<=a&&a<=c?e.map((function(e,t){e.formatTimer===c&&(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)})),le(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"),c=document.querySelectorAll(".slider-box")[0],r=0,l=0,s=0,m=!1;n.addEventListener("touchstart",(function(e){m=!1,isNaN(parseInt(o.style.left))||parseInt(o.style.left),r=isNaN(parseInt(a.style.left))?0:parseInt(a.style.left),l=a.offsetWidth,s=c.offsetWidth})),n.addEventListener("touchend",(function(e){var t;m&&(l=a.offsetWidth,t=Math.ceil(l/c.offsetWidth),i.startIndex+t>=i.timerArr.length-1&&(t=i.timerArr.length-1-i.startIndex),a.style.width=c.offsetWidth*t+"px",a.style.background="rgba(0,0,0,0.2)",i.setOptionnalPerstion(i.startIndex,t),m=!1,i.checkPersionService())})),le(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=c.offsetWidth,l-e<=o?a.style.width=o+"px":(a.style.width=l-e+"px",i.cancelSliderBoxColor()),Object(me.y)("ipdImages","time-wait.svg"),a.style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))",r+(l-e)-s<n&&(o=n+s-(r+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,r+l+n+2*c.offsetWidth>=e&&(u=-o-(r+l+n+2*c.offsetWidth-e),t.style.left=u+"px",s<=o&&(t.style.left=-s+"px")),r+l+n+c.offsetWidth>=t.offsetWidth?a.style.width=t.offsetWidth-r-c.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")),c=i.getTomorrowIndex(),r=0;r<o.length;r++)c<=r&&(o[r].style.background="transparent");for(var l=Object(me.y)("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(me.b)("YYYY-MM-DD")),a=0;a<e.length;a++)!function(n){for(var a=Object(me.c)(e[n].date),o=i.parseCusStartTime(e[n].cusStartTime),c=i.parseCusEndTime(e[n].cusEndTime),r=Object(me.u)(new Date(a).getDay()),l=(a===t&&(r="今天"),[]),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&&c&&l.map((function(e){e.formatTimer>=o&&e.formatTimer<c?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(me.h)(new Date(a)),week:r,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=[],c=(t=(e.map((function(e,t){var c;n<e.startTime?a<e.startTime||a>=e.startTime&&(c=i.formaTimeObj(e,"1",e.startTime,e.endTime),o.push(c)):n>=e.startTime&&n<e.endTime?a<=e.endTime?(c=i.formaTimeObj(e,"1",e.startTime,e.endTime),o.push(c)):a>e.endTime&&(c=i.formaTimeObj(e,"1",e.startTime,e.endTime),o.push(c),n=e.startTime):n>=e.endTime?n===e.endTime&&(c=i.formaTimeObj(e,"1",e.startTime,e.endTime),o.push(c),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):c<=n&&n===c&&(n=i.nowData.cusEndTime),t=Object(me.o)(),c="0","今天"===i.nowData.week&&n<=t&&t<=a&&(c="2"),t=i.formaTimeObj(e[0],c,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,c=[],r=[],l=!1,s=0;s<n.length;s++){var m=n[s];if(a==m.startTime&&o==m.endTime){m=i.formaTimeObj(m,"1",m.startTime,m.endTime),c.push(m),l=!0;break}}if(!l)for(var u=0;u<n.length;u++){var d,p,f,b,g=n[u];g.startTime<a?g.endTime<=o?(d=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(d),d=i.formaTimeObj(n[0],"0",g.startTime,a),r.push(d)):g.endTime>o&&(d=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(d),p=i.formaTimeObj(n[0],"0",g.startTime,a),r.push(p),p=i.formaTimeObj(n[0],"0",o,g.endTime),r.push(p)):g.startTime==g.startTime?g.endTime<=o?(p=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(p)):g.endTime>o&&(f=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(f),f=i.formaTimeObj(n[0],"0",o,g.endTime),r.push(f)):g.startTime>a&&(g.endTime<=o?(f=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(f)):g.endTime>o&&(b=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(b),b=i.formaTimeObj(n[0],"0",o,g.endTime),r.push(b)))}return r.concat(c)}return[]},closeWorkTimer:function(){i.formBtn=!1,t.emit("closeWork","cancel")},addWorkTimer:function(){var e=i.formateAddTimer();i.saveBatchCustomScene(e)},saveBatchCustomScene:function(e){i.showLoading=!0,i.formBtn=!0,Object(ue.O)(e).then((function(e){t.emit("closeWork"),i.showLoading=!1,i.formBtn=!1})).catch((function(){t.emit("closeWork","cancel"),i.showLoading=!1,i.formBtn=!1}))},isUpdate:!1,triggerDelTime:function(){var e=i.formateDelTimer();e&&e.length&&Z.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(q.a)({},Object(o.toRefs)(i))}}),pe=(n("407d"),n("6b0d")),fe=(pe=n.n(pe),de=pe()(de,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("van-loading");return Object(o.openBlock)(),Object(o.createElementBlock)("div",F,[Object(o.createElementVNode)("div",U,[Object(o.createElementVNode)("div",_,Object(o.toDisplayString)(e.spaceInfo.spaceName)+" 申请延时",1),R]),Object(o.createElementVNode)("div",P,[e.dateArr&&e.dateArr.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",H,[(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,z)})),128))])):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",X,[(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)})},K)])]),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-719ebd15"]]),{class:"work-content"}),be={class:"work-space"},ge={class:"space-title"},Oe={class:"add-time",id:"addTimeId"},he={key:0,class:"date_box"},je=["onClick"],ve={class:"sliders-list",id:"sliderListId"},Te={class:"sliders"},ke=["onClick","data-index"],Ie=["onClick"],ye=[se((function(){return Object(o.createElementVNode)("div",{class:"start",id:"startId"},null,-1)})),se((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"},we=[se((function(){return Object(o.createElementVNode)("span",{class:"line"},null,-1)})),se((function(){return Object(o.createElementVNode)("span",{class:"text"},"预约开启设备",-1)})),se((function(){return Object(o.createElementVNode)("span",{class:"line"},null,-1)}))],De={class:"work-device"},Ee=se((function(){return Object(o.createElementVNode)("div",{class:"row-title"},"空调",-1)})),xe={class:"device-box"},Ne=["onClick"],Ve={class:"row-item"},Be=["src"],Le=se((function(){return Object(o.createElementVNode)("div",{class:"row-title"},"照明",-1)})),Ae={class:"device-box"},qe=["onClick"],Me={class:"row-item"},We=["src"],Fe={key:2,class:"device-tip"},Ue=[se((function(){return Object(o.createElementVNode)("span",null,[Object(o.createElementVNode)("i",null,"*"),Object(o.createTextVNode)(" 设备加时提示:")],-1)})),se((function(){return Object(o.createElementVNode)("ul",null,[Object(o.createElementVNode)("li",null," 工作日大厦提供固定时段空调,其余时间可通过“预约加时”功能额外申请空调使用时间"),Object(o.createElementVNode)("li",null,"空调加时采用后付费方式,系统将依据真实使用时长,空间面积和加时单价据实计算加时费用,空调加时单价为0.4元/㎡·h"),Object(o.createElementVNode)("li",null,[Object(o.createTextVNode)("提交完申请,待您所在公司"),Object(o.createElementVNode)("b",null,"行政人员审批通过后"),Object(o.createTextVNode)(",预约时段内您可自由开关空间下的设备")]),Object(o.createElementVNode)("li",null,"如您提前结束使用,请点击“我要离开”按钮,系统会自动调整设备关闭时间"),Object(o.createElementVNode)("li",null,"我们期待与您共创可持续的办公空间。")],-1)}))];n("13d5"),n("a434"),n("a9e3");ie=Object(o.defineComponent)({components:{VanSlider:ie},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(me.r)(),c="".concat(Object(me.y)("ipdImages","time-check.svg")),r=(c="linear-gradient(0deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2)), url(".concat(c,")"),Object(me.t)()),i=Object(o.reactive)({userInfo:r,seviceEquipmentList:e.seviceEquipmentList,parseImgUrl:me.y,isEvent:!1,screenInfo:{screenWidth:0,screenHeight:0},projectId:e.projectId,workkArr:e.workkArr,bgRed:c,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(me.l)()[1]},getTomorrowIndex:function(){var e=0;return"今天"===i.nowData.week?Object(me.l)()[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},c=e[a].formatTimer,r=i.parseCusStartTime(i.nowData.cusStartTime),l=i.parseCusEndTime(i.nowData.cusEndTime),s=i.nowData.spaceCustomContentList||[];return r<=c&&c<=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)}))):c<r?e.map((function(e,t){e.formatTimer===r&&(o.len=t-a,4<o.len&&(o.len=4))})):l<=c&&(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)})),le(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"),c=document.querySelectorAll(".slider-box")[0],r=0,l=0,s=0,m=!1;n.addEventListener("touchstart",(function(e){m=!1,isNaN(parseInt(o.style.left))||parseInt(o.style.left),r=isNaN(parseInt(a.style.left))?0:parseInt(a.style.left),l=a.offsetWidth,s=c.offsetWidth})),n.addEventListener("touchend",(function(e){var t;m&&(l=a.offsetWidth,t=Math.ceil(l/c.offsetWidth),i.startIndex+t>=i.timerArr.length-1&&(t=i.timerArr.length-1-i.startIndex),a.style.width=c.offsetWidth*t+"px",a.style.background="rgba(0,0,0,0.2)",i.setOptionnalPerstion(i.startIndex,t),m=!1,i.checkPersionService())})),le(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=c.offsetWidth,l-e<=o?a.style.width=o+"px":(a.style.width=l-e+"px",i.cancelSliderBoxColor()),Object(me.y)("ipdImages","time-wait.svg"),a.style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))",r+(l-e)-s<n&&(o=n+s-(r+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,r+l+n+2*c.offsetWidth>=e&&(u=-o-(r+l+n+2*c.offsetWidth-e),t.style.left=u+"px",s<=o&&(t.style.left=-s+"px")),r+l+n+c.offsetWidth>=t.offsetWidth?a.style.width=t.offsetWidth-r-c.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")),c=i.getTomorrowIndex(),r=0;r<o.length;r++)c<=r&&(o[r].style.background="transparent");for(var l=Object(me.y)("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(me.b)("YYYY-MM-DD")),a=0;a<e.length;a++)!function(n){for(var a=Object(me.c)(e[n].date),o=e[n].spaceCustomContentList||[],c=Object(me.u)(new Date(a).getDay()),r=(a===t&&(c="今天"),[]),l=0;l<i.timerArr.length;l++){var s={timer:i.timerArr[l],isCheck:!1,isServiceTime:!1,formatTimer:i.timerArr[l].replace(/[:]/g,"")+"00"};r.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<r.length;a++)i.isCusTimeBefore(o,e.endTime)?(t=i.parseCusStartTime(e.startTime),n=i.parseCusStartTime(e.endTime),r[a].formatTimer>=t&&r[a].formatTimer<n&&(r[a].isCheck=!0)):(t=i.parseCusEndTime(e.startTime),n=i.parseCusEndTime(e.endTime),r[a].formatTimer>=t&&r[a].formatTimer<n&&(r[a].isCheck=!0))})),o.map((function(e){var t=i.parseCusStartTime(e.startTime),n=i.parseCusEndTime(e.endTime);t&&n&&r.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(me.h)(new Date(a)),week:c,timerArr:r})}(a);i.dateArr.map((function(e,t){t===i.activeIndex&&i.checkDate(e,t)}))},clearDateActive:function(){i.dateArr.map((function(e){e.isActive=!1}))},clearTimerBoxStyle:function(){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),c=Object(me.o)(),r=i.nowTimerArr,l=0,s=0;r.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,c<n&&i.approvalData.push(o)}()}}},checkDate:function(e,t){i.clearDateActive(),e.isActive=!0,i.activeIndex=t,i.nowTimerArr=i.dateArr[t].timerArr,i.nowData=i.dateArr[t],i.formateEquipment(),Object(o.nextTick)((function(){i.clearTimerBoxStyle(),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=[],c=(t=(e.map((function(e,t){var c;n<e.startTime?a<e.startTime||a>=e.startTime&&(c=i.formaTimeObj(e,"1",e.startTime,e.endTime),o.push(c),a=a>e.endTime?a:e.endTime):n>=e.startTime&&n<e.endTime?a<=e.endTime?(c=i.formaTimeObj(e,"1",e.startTime,e.endTime),o.push(c)):a>e.endTime&&(c=i.formaTimeObj(e,"1",e.startTime,e.endTime),o.push(c),n=e.startTime):n>=e.endTime?n===e.endTime&&(c=i.formaTimeObj(e,"1",e.startTime,e.endTime),o.push(c),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):c<=n&&n===c&&(n=i.nowData.cusEndTime),t=Object(me.o)(),c="0","今天"===i.nowData.week&&n<=t&&t<=a&&(c="2"),t=i.formaTimeObj(e[0],c,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,c=[],r=[],l=!1,s=0;s<n.length;s++){var m=n[s];if(m.startTime===a&&m.endTime===o){m=i.formaTimeObj(m,"1",m.startTime,m.endTime),c.push(m),l=!0;break}}if(!l)for(var u=0;u<n.length;u++){var d,p,f,b,g=n[u];g.startTime<a&&g.endTime>a?g.endTime<=o?(d=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(d),d=i.formaTimeObj(g,"0",g.startTime,a),r.push(d)):g.endTime>o&&(d=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(d),p=i.formaTimeObj(g,"0",g.startTime,a),r.push(p),p=i.formaTimeObj(g,"0",o,g.endTime),r.push(p)):g.startTime===a?g.endTime<=o?(p=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(p)):g.endTime>o&&(f=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(f),f=i.formaTimeObj(g,"0",o,g.endTime),r.push(f)):g.startTime>a&&(g.endTime<=o?(f=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(f)):g.endTime>o&&(b=i.formaTimeObj(g,"1",g.startTime,g.endTime),c.push(b),b=i.formaTimeObj(g,"0",o,g.endTime),r.push(b)))}var O=0,h=r.concat(c),j=Object(me.o)();return h.map((function(e,t){"1"==e.type&&j>=e.startTime&&j<=e.endTime&&(e.type="3",O=e.startTime,e.endTimeReal=j)})),h.map((function(e,t){"0"==e.type&&O&&e.endTime<=O&&h.splice(t,1)})),h}return[]},closeWorkTimer:function(){i.formBtn=!1,t.emit("closeWork","cancel")},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,c=0;c<n.length&&!(o=!(t.objectId!=n[c].id||!n[c].isExeSpaceTime)||o);c++);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(ue.R)(e).then((function(e){})).catch((function(){}))},setallLampHttp:function(e){Object(ue.S)(e).then((function(e){})).catch((function(){}))},saveBatchCustomScene:function(e){i.showLoading=!0,i.formBtn=!0,Object(ue.O)(e).then((function(e){t.emit("closeWork"),i.showLoading=!1,i.formBtn=!1})).catch((function(){t.emit("closeWork","cancel"),i.showLoading=!1,i.formBtn=!1}))},isUpdate:!1,triggerDelTime:function(){var e=i.formateDelTimer();e&&e.length&&Z.a.confirm({title:"确认",message:"确定删除当前时间吗?"}).then((function(){var t=[];e.map((function(e){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){e.sceneEquipList=t})),i.saveBatchCustomScene(e,2)})).catch((function(){}))}});return Object(o.watch)([function(){return e},function(){return e.workkArr}],(function(e,t){i.workkArr=e[1],e[1]&&t[1]&&(e[1].toString(),t[1].toString()),e[0]&&(i.projectId=e[0].projectId,i.enterType=e[0].enterType,i.deviceItem=e[0].deviceItem,i.seviceEquipmentList=e[0].seviceEquipmentList)}),{deep:!0,immediate:!0}),Object(o.onMounted)((function(){i.setWorkTimeList()})),Object(q.a)({},Object(o.toRefs)(i))}}),n("92f1"),ie=pe()(ie,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("van-loading");return Object(o.openBlock)(),Object(o.createElementBlock)("div",fe,[Object(o.createElementVNode)("div",be,[Object(o.createElementVNode)("div",ge,Object(o.toDisplayString)(e.spaceInfo.spaceName)+" 申请延时",1)]),Object(o.createElementVNode)("div",Oe,[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,je)})),128))])):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",ve,[(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",Te,[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,ke)])])})),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,Ie)})),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)})},ye)])]),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,we)):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",De,[e.isAir?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[Ee,Object(o.createElementVNode)("div",xe,[(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",Ve,[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,Be)])],12,Ne)):Object(o.createCommentVNode)("",!0)],64)})),128))])],64)):Object(o.createCommentVNode)("",!0),e.isLight?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:1},[Le,Object(o.createElementVNode)("div",Ae,[(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",Me,[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,We)])],12,qe)):Object(o.createCommentVNode)("",!0)],64)})),128))])],64)):Object(o.createCommentVNode)("",!0),e.isAir?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Fe,Ue)):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-e19a3620"]]);var _e={class:"contact-content"},Re=Object(o.createElementVNode)("div",{class:"title"},"联系我们",-1),Pe={class:"contact"},He={class:"code-box"},ze=["src"],Xe=Object(o.createElementVNode)("div",{class:"title"},"客服微信二维码",-1),Ye={class:"phone-box"},Ge=["src"],Ke={class:"title"},Je=Object(o.createElementVNode)("div",{class:"concat-text"},"联系方式",-1),Ze=Object(o.createTextVNode)("我知道了"),$e=n("543e"),Qe=(n("e7e5"),Object(me.t)()),et=Object(o.defineComponent)({props:{isShowContact:{type:Boolean,default:function(){return!1}},contantDetail:{type:Object,default:function(){}}},components:Object(W.a)({VanLoading:$e.b},Z.a.Component.name,Z.a.Component),setup:function(e,t){var n=Object(o.getCurrentInstance)(),a=Object(o.reactive)({parseImgUrl:me.y,contantDetail:e.contantDetail,userInfo:Qe,imgUrl:n.proxy.$imgUrl,isShowContact:e.isShowContact,closeDailog:function(){t.emit("closeDailog")},queryCustomerservice:function(){var e={criteria:{projectId:a.userInfo.projectId}};Object(ue.I)(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(q.a)({},Object(o.toRefs)(a))}}),tt=(et=(n("4458"),pe()(et,[["render",function(e,t,n,a,c,r){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",_e,[Re,Object(o.createElementVNode)("div",Pe,[Object(o.createElementVNode)("div",He,[Object(o.createElementVNode)("img",{src:e.imgUrl+"&key="+e.contantDetail.wechatQrCode,alt:""},null,8,ze),Xe]),Object(o.createElementVNode)("div",Ye,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","phone-icon.svg"),alt:""},null,8,Ge),Object(o.createElementVNode)("div",Ke,Object(o.toDisplayString)(e.contantDetail.phone),1),Je])]),Object(o.createVNode)(i,{class:"dailog-btn",onClick:e.closeDailog},{default:Object(o.withCtx)((function(){return[Ze]})),_:1},8,["onClick"])])]})),_:1},8,["show"])}]])),{class:"scene-config"}),nt=["src"],at={class:"time-text"},ot=["src"],ct=function(e){return Object(o.pushScopeId)("data-v-bffde110"),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 it=n("6c02"),lt=n("0613"),st={class:"air-dialog-content"},mt={class:"dialog-top"},ut=["src"],dt=rt((function(){return Object(o.createElementVNode)("div",{class:"leave-title"},"工作辛苦了!",-1)})),pt={class:"leave-popup-body"},ft={key:1,class:"text-status"},bt={key:2,class:"text-status grey"},gt=[rt((function(){return Object(o.createElementVNode)("span",null,"隐藏",-1)}))],Ot=Object(o.defineComponent)({props:{isShowLeaveDailog:{type:Boolean,default:function(){return!1}}},components:Object(W.a)({VanLoading:$e.b},Z.a.Component.name,Z.a.Component),setup:function(e,t){var n=Object(o.reactive)({parseImgUrl:me.y,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(q.a)({},Object(o.toRefs)(n))}}),ht=(Ot=(n("1196"),pe()(Ot,[["render",function(e,t,n,a,c,r){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",st,[Object(o.createElementVNode)("div",mt,[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,ut)):Object(o.createCommentVNode)("",!0)]),dt,Object(o.createElementVNode)("div",pt,[(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",ft)):Object(o.createCommentVNode)("",!0),"grey"===e.status?(Object(o.openBlock)(),Object(o.createElementBlock)("span",bt)):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)})},gt)])]})),_:1},8,["show"])}],["__scopeId","data-v-10ea159b"]])),Ot=Object(o.defineComponent)({props:{workkArr:{type:Array,default:function(){return[]}}},components:{LeaveDailog:Ot},setup:function(e,t){Object(o.getCurrentInstance)();var n=Object(it.d)(),a=(Object(lt.b)(),Object(o.reactive)({parseImgUrl:me.y,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,c=a.workkArr;return a.text="",Object(me.f)(e,t,n,o,c,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,c=0;c<e.length;c++)if(t>=e[c].startTime&&t<=e[c].endTime){n.startTime=e[c].startTime,n.endTime=e[c].endTime,o=!(n.type=3);break}o&&(n.type=4)}return n},delTimeArr:[],customSceneList:[],formateWorkTime:function(){for(var e=a.workkArr,n=Object(me.b)("YYYY-MM-DD"),o=0;o<e.length;o++){var c,r=Object(me.c)(e[o].date),i=e[o].cusStartTime,l=e[o].cusEndTime,s=null!=(c=null==(c=e[o])?void 0:c.customSceneList)?c:[],m=Object(me.o)();Object(me.u)(new Date(r).getDay()),r===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(me.e)(i)+"~"+Object(me.e)(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(me.e)(e.startTime)+"~"+Object(me.e)(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(me.e)(n)+"~"+Object(me.e)(o),e&&e.text&&(a.timerText.text="工作时间(今日~".concat(e.text,")"),a.timerText.timer=Object(me.e)(e.startTime)+"~"+Object(me.e)(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(me.e)(n)+"~"+Object(me.e)(o),e&&e.text&&(a.timerText.text="工作时间~".concat(e.text),a.timerText.timer=Object(me.e)(e.startTime)+"~"+Object(me.e)(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(me.e)(e.startTime)+"~"+Object(me.e)(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(me.e)(e.startTime)+"~"+Object(me.e)(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,c=a.checkWorkTime(e,t);3===c.type?(n=c.startTime,o=c.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(me.e)(n)+"~"+Object(me.e)(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(me.e)(n)+"~"+Object(me.e)(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(me.o)(),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(ue.O)(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(q.a)({},Object(o.toRefs)(a))}}),Ot=(n("2447"),pe()(Ot,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("leave-dailog");return Object(o.openBlock)(),Object(o.createElementBlock)("div",tt,[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,nt),Object(o.createElementVNode)("div",at,[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,ot),ct])):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-bffde110"]])),{class:"scene-config"}),jt=["src"],vt={class:"time-text"},Tt=["src"],kt=function(e){return Object(o.pushScopeId)("data-v-2abd54c4"),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 It(e){return Object(o.pushScopeId)("data-v-de46fb16"),e=e(),Object(o.popScopeId)(),e}var yt={class:"air-dialog-content"},St={class:"dialog-top"},Ct=["src"],wt=It((function(){return Object(o.createElementVNode)("div",{class:"leave-title"},"工作辛苦了!",-1)})),Dt={class:"leave-popup-body"},Et={key:1,class:"text-status"},xt={key:2,class:"text-status grey"},Nt=[It((function(){return Object(o.createElementVNode)("span",null,"隐藏",-1)}))],Vt=Object(o.defineComponent)({props:{isShowLeaveDailog:{type:Boolean,default:function(){return!1}}},components:Object(W.a)({VanLoading:$e.b},Z.a.Component.name,Z.a.Component),setup:function(e,t){var n=Object(o.reactive)({parseImgUrl:me.y,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(q.a)({},Object(o.toRefs)(n))}}),Bt=(Vt=(n("a9fd"),pe()(Vt,[["render",function(e,t,n,a,c,r){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",yt,[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)]),wt,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",Et)):Object(o.createCommentVNode)("",!0),"grey"===e.status?(Object(o.openBlock)(),Object(o.createElementBlock)("span",xt)):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)})},Nt)])]})),_:1},8,["show"])}],["__scopeId","data-v-de46fb16"]])),n("5118")),Lt=(Vt=Object(o.defineComponent)({props:{workkArr:{type:Array,default:function(){return[]}}},components:{LeaveDailog:Vt},setup:function(e,t){Object(o.getCurrentInstance)();var n=Object(it.d)(),a=(Object(lt.b)(),Object(o.reactive)({parseImgUrl:me.y,leaveBtnFlag:!1,workkArr:[],forcedOverTimeFlag:!1,onSubmit:function(e){n.push({path:"/choice-project"})},childTriggerWork:function(){t.emit("triggerWork",1)},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:[],c=!0;o&&o.length&&function(){var n=[];o.map((function(e,t){e.hasOwnProperty("approvalStatus")&&(1==e.approvalStatus&&n.push(e),c=!1)})),c&&(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,c=a.workkArr;return a.text="",Object(me.f)(e,t,n,o,c,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,c=0;c<e.length;c++)if(t>=e[c].startTime&&t<=e[c].endTime){n.startTime=e[c].startTime,n.endTime=e[c].endTime,o=!(n.type=3);break}o&&(n.type=4)}return n},delTimeArr:[],customSceneList:[],formateWorkTime:function(){for(var e=a.workkArr,n=Object(me.b)("YYYY-MM-DD"),o=0;o<e.length;o++){var c,r=Object(me.c)(e[o].date),i=e[o].cusStartTime,l=e[o].cusEndTime,s=null!=(c=null==(c=e[o])?void 0:c.customSceneList)?c:[],m=Object(me.o)();Object(me.u)(new Date(r).getDay()),r===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(me.e)(i)+"~"+Object(me.e)(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(me.e)(e.startTime)+"~"+Object(me.e)(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(me.e)(n)+"~"+Object(me.e)(o),e&&e.text&&(a.timerText.text="工作时间(今日~".concat(e.text,")"),a.timerText.timer=Object(me.e)(e.startTime)+"~"+Object(me.e)(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(me.e)(n)+"~"+Object(me.e)(o),e&&e.text&&(a.timerText.text="工作时间~".concat(e.text),a.timerText.timer=Object(me.e)(e.startTime)+"~"+Object(me.e)(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(me.e)(e.startTime)+"~"+Object(me.e)(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(me.e)(e.startTime)+"~"+Object(me.e)(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,c=a.checkWorkTime(e,t);3===c.type?(n=c.startTime,o=c.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(me.e)(n)+"~"+Object(me.e)(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(me.e)(n)+"~"+Object(me.e)(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(me.o)(),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(me.o)();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(ue.O)(a.delTimeArr).then((function(e){a.leaveBtnFlag=!1,t.emit("closeWork");var n=Object(Bt.setTimeout)((function(){t.emit("leaveWork"),Object(Bt.clearTimeout)(n),n=null}),1e3)})).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(q.a)({},Object(o.toRefs)(a))}}),Vt=(n("4b8a"),pe()(Vt,[["render",function(e,t,n,a,c,r){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,jt),Object(o.createElementVNode)("div",vt,[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,Tt),kt])):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-2abd54c4"]])),{class:"scene-config"}),At=["onClick"],qt=["src"];function Mt(e){return Object(o.pushScopeId)("data-v-3e78a67a"),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(it.d)(),a=(Object(lt.b)(),{DISCUSSING:Object(me.y)("ipdImages","taolun.svg"),PROJECTING:Object(me.y)("ipdImages","touying.svg"),ADJOURNMENT:Object(me.y)("ipdImages","sanhui.svg")}),c=Object(o.reactive)({parseImgUrl:me.y,spaceId:e.spaceId,scenarioArr:[],scenarioImgArr:a,activeType:e.activeType,onSubmit:function(e){n.push({path:"/choice-project"})},formatScenarioImg:function(){c.scenarioArr.map((function(e){e.img=c.scenarioImgArr[e.sceneType],"DISCUSSING"===e.sceneType?e.order=1:"PROJECTING"===e.sceneType?e.order=2:"ADJOURNMENT"===e.sceneType?e.order=3:e.order=4})),c.scenarioArr=c.scenarioArr.sort((function(e,t){return e.order-t.order}))},handleScene:function(n){var a=Object(me.t)();a={spaceId:c.spaceId,projectId:e.projectId,type:n.sceneType,pubname:a.pubname};n.loading=!0,n.lodingText="正在切换至",t.emit("setHeadScene",n,1),Object(ue.T)(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){c.activeType=e.activeType,c.scenarioArr=e.scenarioArr,c.spaceId=e.spaceId,c.formatScenarioImg()}),{deep:!1,immediate:!0}),Object(o.onMounted)((function(){})),Object(q.a)({},Object(o.toRefs)(c))}}),Ft=(Wt=(n("b2ec"),pe()(Wt,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Lt,[(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,qt),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(t.sceneName),1)],14,At)})),128))])}],["__scopeId","data-v-0c8e2a5e"]])),n("0500")),Ut={class:"header-content"},_t={class:"weather"},Rt=["src"],Pt={class:"weather-text"},Ht={class:"pr5"},zt=Mt((function(){return Object(o.createElementVNode)("span",null,"/",-1)})),Xt=Mt((function(){return Object(o.createElementVNode)("span",{class:"pr5"},"PM2.5",-1)})),Yt={class:"pr5"};function Gt(e){return Object(o.pushScopeId)("data-v-0f70331e"),e=e(),Object(o.popScopeId)(),e}var Kt=n("ad06"),Jt=(n("c3a6"),Object(o.defineComponent)({props:{outWeather:{type:Object,default:function(){return{}}}},components:{VanIcon:Kt.b},setup:function(){var e=Object(it.d)(),t=Object(o.reactive)({goBack:function(){window.history.go(-1)},setPermanentSpace:function(){e.push({path:"/mySpace"})}});return Object(q.a)({},Object(o.toRefs)(t))}})),Zt=(Jt=(n("7ed5"),pe()(Jt,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Ut,[Object(o.createElementVNode)("div",_t,[Object(o.withDirectives)(Object(o.createElementVNode)("img",{src:e.outWeather.imgname,class:"weather-icon",alt:""},null,8,Rt),[[o.vShow,e.outWeather.imgname]]),Object(o.createElementVNode)("div",Pt,[Object(o.createElementVNode)("p",null,[Object(o.createElementVNode)("span",Ht,Object(o.toDisplayString)(e.outWeather.temperature||"--")+"℃",1),zt,Xt,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.outWeather.pm25||"--"),1)]),Object(o.createElementVNode)("p",null,[Object(o.createElementVNode)("span",Yt,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-3e78a67a"]])),n("3ba9")),$t={class:"air"},Qt={class:"air-top"},en={class:"air-desc"},tn=Gt((function(){return Object(o.createElementVNode)("p",{class:"air-title"},"空调",-1)})),nn={class:"air-temperature"},an={key:0},on={key:0,class:"air-status"},cn={key:1,class:"air-loading"},rn=["src"],ln={class:"air-right"},sn=["src"],mn={key:0,class:"air-control"},un=Gt((function(){return Object(o.createElementVNode)("div",{class:"control-title"},"温度调节",-1)})),dn={class:"btn-box"},pn=["src"],fn=["src"],bn={key:1,class:"air-control"},gn=Gt((function(){return Object(o.createElementVNode)("div",{class:"control-title"},"风量调节",-1)})),On={class:"btn-box"},hn=["src"],jn=["src"],vn={class:"air-dialog-content"},Tn={class:"dialog-top"},kn=["src"],In={class:"dialog-text"},yn={class:"air-body-item-num"},Sn={key:0,class:"air-temp-num"},Cn={key:1,class:"air-temp-load"},wn={key:0,class:"air-notice"},Dn=[Gt((function(){return Object(o.createElementVNode)("span",null,"确定",-1)}))];const[En,xn]=Object(Q.a)("switch");function Nn(e){return Object(o.pushScopeId)("data-v-00673b20"),e=e(),Object(o.popScopeId)(),e}Q={size:ee.f,loading:Boolean,disabled:Boolean,modelValue:ee.h,activeColor:String,inactiveColor:String,activeValue:{type:ee.h,default:!0},inactiveValue:{type:ee.h,default:!1}},ee=Object(o.defineComponent)({name:En,props:Q,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(ae.h)(()=>e.modelValue),()=>{var{size:t,loading:c,disabled:r,activeColor:i,inactiveColor:l}=e,s=n(),t={fontSize:Object(te.b)(t),backgroundColor:s?i:l};return Object(o.createVNode)("div",{role:"switch",class:xn({on:s,loading:c,disabled:r}),style:t,tabindex:r?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)})()])])}}}),Q=Object($.a)(ee);var Vn=(n("e3b3"),n("d9d2"),n("d399")),Bn=(ee=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:Q},Object(W.a)($,Z.a.Component.name,Z.a.Component),Object(W.a)($,"Loading",$e.b),$),setup:function(e,t){var n=e,a=Object(o.reactive)({loadingAir:!1,distroyFlag:!1,temperature:e.temperature,userIsControl:e.userIsControl,forceOverTimeFlag:e.forceOverTimeFlag,firstLoadingAir:!0,spaceId:e.spaceId,domAirOpeen:!1,feedbackTimer:null,parseImgUrl:me.y,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(ue.k)(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.distroyFlag||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]:"",c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r={projectId:n.projectId,objectId:a.spaceId};"feedback"===e&&(r.id=c),Object(ue.l)(r).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(me.y)("page-officehome","air_close.png")):a.airData.icon&&6!==a.airData.icon&&(a.airData.isOpen=!0,a.airData.airImg=Object(me.y)("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,c):a.getAirInfoToTimer(),a.firstLoadingAir=!1})).catch((function(){a.getAirInfoToTimer(),a.firstLoadingAir=!1,a.airData.airImg=Object(me.y)("page-officehome","air_close.png")}))},airChange:function(){a.userIsControl?a.loadingAir?Object(Vn.a)("指令正在下发中,勿重复操作!"):a.airComfir():Object(Vn.a)("您没有当前空间的控制权限!")},airComfir:function(){var e=a.airData.isOpen?"要关闭空调吗?":"要开启空调吗?",n=a.airData.isOpen?"关闭":"开启";Z.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(ue.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}))}}),c=(Object(o.watch)([function(){return e},function(){return e.spaceId}],(function(e,t){e[1]&&e[1]!=t[1]&&(a.spaceId=e[1],a.distroyFlag=!1,a.getAirInfo()),e[0]&&(a.temperature=e[0].temperature,a.userIsControl=e[0].userIsControl,a.forceOverTimeFlag=e[0].forceOverTimeFlag)}),{deep:!1,immediate:!0}),Object(o.onBeforeUnmount)((function(){a.distroyFlag=!0,a.airTimer&&(clearTimeout(a.airTimer),a.airTimer=null),a.feedbackTimer&&(clearTimeout(a.feedbackTimer),a.feedbackTimer=null)})),Object(o.onMounted)((function(){a.firstLoadingAir=!0,a.distroyFlag=!1,a.getAirInfo(),a.getEquipmentListHttp()})),Object(o.computed)((function(){var e="";switch(a.airData.icon){case 1:e=Object(me.y)("page-officehome","temp-keep.png");break;case 2:e=Object(me.y)("page-officehome","temp_cold.svg");break;case 3:e=Object(me.y)("page-officehome","temp_sun.png");break;default:e=""}return e})));return Object(q.a)({airRunImg:c},Object(o.toRefs)(a))}}),$=(n("0143"),n("6f3b"),pe()(ee,[["render",function(e,t,n,a,c,r){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",$t,[Object(o.createElementVNode)("div",Qt,[Object(o.createElementVNode)("div",en,[tn,Object(o.createElementVNode)("p",nn,[Object(o.createTextVNode)(Object(o.toDisplayString)(e.airData.tempSet||"")+" ",1),e.airData.tempSet?(Object(o.openBlock)(),Object(o.createElementBlock)("sup",an,"℃")):Object(o.createCommentVNode)("",!0)]),e.hasAir?(Object(o.openBlock)(),Object(o.createElementBlock)("p",on,Object(o.toDisplayString)(e.airData.isOpen?"空调已开启":"空调已关闭"),1)):Object(o.createCommentVNode)("",!0),e.airData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("p",cn,[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,rn)):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.airData.spaceStatus),1)])):Object(o.createCommentVNode)("",!0)]),Object(o.createElementVNode)("div",ln,[e.airData.airImg?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.airData.airImg,alt:""},null,8,sn)):(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",size:23,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",mn,[un,Object(o.createElementVNode)("div",dn,[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,pn)]),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,fn)])])])):Object(o.createCommentVNode)("",!0),e.userIsControl&&e.airData.isOpen&&e.showAirVolumeBtn?(Object(o.openBlock)(),Object(o.createElementBlock)("div",bn,[gn,Object(o.createElementVNode)("div",On,[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,hn)]),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,jn)])])])):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",vn,[Object(o.createElementVNode)("div",Tn,[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,kn)]),Object(o.createElementVNode)("div",In,[Object(o.createElementVNode)("div",yn,[e.airSetText.notice?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Sn,Object(o.toDisplayString)(e.airSetText.notice),1)):(Object(o.openBlock)(),Object(o.createElementBlock)("div",Cn,[Object(o.createVNode)(i,{type:"spinner"})]))]),e.airSetText.remark&&e.airSetText.remark.length?(Object(o.openBlock)(),Object(o.createElementBlock)("p",wn,[(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"]))},Dn)])]})),_:1},8,["show"])])}],["__scopeId","data-v-0f70331e"]])),{key:0,class:"floor"}),Ln={class:"com-top"},An={class:"com-desc"},qn=Nn((function(){return Object(o.createElementVNode)("p",{class:"com-top-title"},"地暖",-1)})),Mn={class:"com-top-temperature"},Wn=Nn((function(){return Object(o.createElementVNode)("sup",null,"℃",-1)})),Fn={class:"com-right"},Un=["src"],_n={class:"top-switch"},Rn={key:0,class:"top-nav"},Pn={key:1},Hn={key:0,class:"com-control com-control-padding"},zn={class:"control-box"},Xn={class:"temp-slider",id:"slideFloorId"},Yn={class:"slider-bar",id:"barFloorId"},Gn={class:"bar-temp"},Kn=Nn((function(){return Object(o.createElementVNode)("div",{class:"bar-circle",id:"handFloorId"},null,-1)})),Jn={class:"temp-left",id:"tempLeftId"},Zn={class:"temp-right"},$n={key:1,class:"line"},Qn={key:2,class:"light-box"},ea={class:"control-top"},ta={class:"control-temp"},na=Nn((function(){return Object(o.createElementVNode)("sup",null,"℃",-1)})),aa={class:"control-bottom"},oa={class:"control-title"},ca=["onClick","src"];function ra(e){return Object(o.pushScopeId)("data-v-140a1d95"),e=e(),Object(o.popScopeId)(),e}var ia=n("4362"),la=(ee=Object(o.defineComponent)({props:{projectId:{type:String,default:function(){return""}},spaceId:{type:String,default:function(){return""}},showFloorBox:{type:Boolean,default:function(){return!1}},userIsControl:{type:Boolean,default:function(){return!1}},forceOverTimeFlag:{type:Boolean,default:function(){return!1}},seviceEquipmentList:{type:Array,default:function(){return[]}}},components:{Switch:Q},setup:function(e,t){var n=Object(o.reactive)({distroyFlag:!1,seviceEquipmentList:e.seviceEquipmentList,forceOverTimeFlag:e.forceOverTimeFlag,spaceId:e.spaceId,heatingData:{},isOpen:!1,parseImgUrl:me.y,showFloorBox:e.showFloorBox,timeOut:null,loadingFlag:!1,floorHeatingList:[],floorHeathingStatus:null,swiperIinit:!1,part:1,realTemp:0,navType:"all",runStatus:0,lightColorImg:Object(me.y)("page-officehome","lightColorControl.svg"),showFloorHeating:function(e){e.switch?(e.minTempSet=n.heatingData.minTempSet,e.maxTempSet=n.heatingData.maxTempSet,t.emit("showFloorHeating",e)):Object(Vn.a)("请先开启地暖,才可温度调节!")},changeZongAir:function(e){var t;"temp"==e&&!n.heatingData.runStatus||(t=[],n.floorHeatingList.map((function(a){var o="temp"==e?a.tempSetCode:a.switchCode,c="temp"==e?n.realTemp:n.isOpen?1:0;a={id:a.id,code:o,value:c};t.push(a)})),n.loadingFlag||(n.loadingFlag=!1,n.setSpaceCondtioners(t)))},changeChildZongAir:function(e,t){var a=t.switch?1:0,o=[];n.floorHeatingList.map((function(t){var c="temp"==e?t.tempSetCode:t.switchCode,r="temp"==e?n.realTemp:a;t={id:t.id,code:c,value:r};o.push(t)})),t.loading||(t.loading=!0,n.setSpaceCondtioners(o,t))},setSpaceCondtioners:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;Object(ue.R)(e).then((function(e){n.loadingFlag=!1,t&&(t.loading=!1)})).catch((function(){n.loadingFlag=!1,t.loading=!1,Object(Vn.a)("连接异常,请检查网络!")}))},eqChangeSwitch:function(e,t){"main"==e?(n.isOpen=!n.isOpen,n.loading=!0,n.isOpen&&n.sliderInit(),n.changeZongAir("switch")):n.changeChildZongAir("switch",t)},eqChangeTemp:function(){n.changeZongAir("temp")},checkNav:function(){n.navType=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"all",n.swiperIinit=!1,n.sliderInit()},getEleWidth:function(e){return e?e.getBoundingClientRect().width:1},sliderInit:function(){Object(ia.nextTick)((function(){"all"==n.navType&&n.isOpen&&n.endBoxSwiper(),"all"==n.navType&&n.setBarNowPerstion()}))},endBoxSwiper:function(){var e=document.querySelector("#handFloorId"),t=document.querySelector("#barFloorId"),a=document.querySelector("#slideFloorId"),o=!1,c=0,r=n.getEleWidth(a),i=(a=n.getEleWidth(t),document.querySelector("#tempLeftId"));n.getEleWidth(i),1<r&&(r-=a);var l=(n.heatingData.maxTempSet-n.heatingData.minTempSet)/r;n.part=l,e&&(e.addEventListener("touchstart",(function(e){c=isNaN(parseInt(t.style.left))?0:parseInt(t.style.left),o=!0})),e.addEventListener("touchend",(function(e){o=!1,n.eqChangeTemp()})),le(e,{swipeLeft:function(e){o&&(c=Math.abs(c),e=Math.abs(e.mation.moveX-e.mation.startX),e=(e=c-e)<0?0:e,t.style.left=e+"px",n.realTemp=e*l+n.heatingData.minTempSet,n.realTemp&&(n.realTemp=n.realTemp.toFixed(1),n.realTemp=Object(me.a)(n.realTemp)))},swipeRight:function(e){o&&(c=Math.abs(c),e=Math.abs(e.mation.moveX-e.mation.startX),e=r<(e=c+e)?r:e,t.style.left=e+"px",n.realTemp=e*l+n.heatingData.minTempSet,n.realTemp&&(n.realTemp=n.realTemp.toFixed(1),n.realTemp=Object(me.a)(n.realTemp)))}}))},setRelTemp:function(){n.realTemp=n.heatingData.tempSet||0,n.realTemp&&(n.realTemp=n.realTemp.toFixed(1),n.realTemp=Object(me.a)(n.realTemp))},setBarNowPerstion:function(){var e,t,a=document.querySelector("#barFloorId");a&&(t=document.querySelector("#slideFloorId"),e=document.querySelector("#tempLeftId"),n.getEleWidth(e),n.realTemp>=n.heatingData.minTempSet&&n.realTemp<=n.heatingData.maxTempSet?(e=(n.realTemp-n.heatingData.minTempSet)/n.part,a&&(a.style.left=e+"px")):!n.realTemp||n.realTemp<n.heatingData.minTempSet?a.style.left="0px":n.realTemp>n.heatingData.maxTempSet&&(e=t.offsetWidth,t=a.offsetWidth,a.style.left=e-t+"px"))},formateDataStatus:function(){n.heatingData.runStatus?n.isOpen=!0:n.isOpen=!1,n.floorHeatingList.map((function(e){e.switch=!!e.runStatus,e.tempSet&&(e.tempSet=e.tempSet.toFixed(1),e.tempSet=Object(me.a)(e.tempSet))}))},getFloorHeatingList:function(){var e=Object(me.B)({spaceId:n.spaceId});Object(ue.K)(e).then((function(e){e=e?e.data:{},(n.heatingData=e).equipList&&e.equipList.length&&(n.floorHeatingList=e.equipList||[]),n.formateDataStatus(),n.setRelTemp(),n.sliderInit(),n.startfloorHeathingStatus()})).catch((function(){n.startfloorHeathingStatus()}))},loadingTimer:0,loading:!1,setLoadingNumber:function(){var e=setInterval((function(){n.loadingTimer++,15<=n.loadingTimer&&(clearInterval(e),n.loading=!1)}),1e3)},clearFloorHeathingTimer:function(){clearTimeout(n.floorHeathingStatus),n.floorHeathingStatus=null},startfloorHeathingStatus:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:15e3,t=Object(me.o)();15e3==e&&t<"070000"&&"200000"<t&&(e=3e5),n.clearFloorHeathingTimer(),n.floorHeathingStatus=setTimeout((function(){n.distroyFlag||n.getFloorHeatingList()}),e)}});return Object(o.watch)([function(){return e},function(){return e.spaceId}],(function(e,t){e[0]&&(n.forceOverTimeFlag=e[0].forceOverTimeFlag,n.seviceEquipmentList=e[0].seviceEquipmentList,n.showFloorBox=e[0].showFloorBox),e[1]&&t[1]&&e[1]!=t[1]&&(n.distroyFlag=!1,n.floorHeatingList=[],n.heatingData={},n.swiperIinit=!1,n.navType="all",n.spaceId=e[1],n.clearFloorHeathingTimer(),n.getFloorHeatingList())}),{deep:!0,immediate:!0}),Object(o.onBeforeUnmount)((function(){n.distroyFlag=!0,n.clearFloorHeathingTimer()})),Object(o.onMounted)((function(){n.distroyFlag=!1,n.getFloorHeatingList()})),Object(q.a)({},Object(o.toRefs)(n))}}),ee=(n("7248"),pe()(ee,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("Switch");return e.floorHeatingList&&e.floorHeatingList.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Bn,[Object(o.createElementVNode)("div",Ln,[Object(o.createElementVNode)("div",An,[qn,Object(o.createElementVNode)("span",Mn,[Object(o.createTextVNode)(Object(o.toDisplayString)(e.realTemp||"--")+" ",1),Wn])]),Object(o.createElementVNode)("div",Fn,[Object(o.createElementVNode)("img",{src:e.isOpen?e.parseImgUrl("page-officehome","heating-active.svg"):e.parseImgUrl("page-officehome","heating.svg"),alt:""},null,8,Un)])]),Object(o.createElementVNode)("div",_n,[e.floorHeatingList&&1<e.floorHeatingList.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Rn,[Object(o.createElementVNode)("span",{class:Object(o.normalizeClass)("all"==e.navType?"nav-active":""),onClick:t[0]||(t[0]=function(t){return e.checkNav("all")})}," 总控制 ",2),Object(o.createElementVNode)("span",{class:Object(o.normalizeClass)("child"==e.navType?"nav-active":""),onClick:t[1]||(t[1]=function(t){return e.checkNav("child")})}," 子设备 ",2)])):(Object(o.openBlock)(),Object(o.createElementBlock)("div",Pn)),Object(o.createVNode)(i,{class:"switch-btn",loading:e.loadingFlag,disabled:e.loadingFlag,"model-value":e.isOpen,onClick:t[2]||(t[2]=Object(o.withModifiers)((function(t){return e.eqChangeSwitch("main",e.floorHeatingList[0])}),["stop"])),"inactive-color":"rgba(196, 196, 196, 0.4)"},null,8,["loading","disabled","model-value"])]),e.isOpen&&"all"==e.navType?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Hn,[Object(o.createElementVNode)("div",zn,[Object(o.createElementVNode)("div",Xn,[Object(o.createElementVNode)("div",Yn,[Object(o.createElementVNode)("div",Gn,Object(o.toDisplayString)(e.realTemp?e.realTemp+"℃":"--"),1),Kn]),Object(o.createElementVNode)("div",Jn,Object(o.toDisplayString)(e.heatingData.minTempSet),1),Object(o.createElementVNode)("div",Zn,Object(o.toDisplayString)(e.heatingData.maxTempSet),1)])])])):Object(o.createCommentVNode)("",!0),"child"==e.navType?(Object(o.openBlock)(),Object(o.createElementBlock)("div",$n)):Object(o.createCommentVNode)("",!0),"child"==e.navType?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Qn,[(Object(o.openBlock)(!0),Object(o.createElementBlock)(o.Fragment,null,Object(o.renderList)(e.floorHeatingList,(function(t){return Object(o.openBlock)(),Object(o.createElementBlock)("div",{key:t.id,class:"light-control"},[Object(o.createElementVNode)("div",ea,[Object(o.createElementVNode)("div",ta,[Object(o.createElementVNode)("span",null,[Object(o.createTextVNode)(Object(o.toDisplayString)(t.tempSet||"--"),1),na]),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(t.runStatus?"已开启":"已关闭"),1)]),Object(o.createVNode)(i,{"active-color":"$elActiveColor",modelValue:t.switch,"onUpdate:modelValue":function(e){return t.switch=e},loading:t.loading,onClick:Object(o.withModifiers)((function(n){return e.eqChangeSwitch("child",t)}),["stop"]),"inactive-color":"rgba(196, 196, 196, 0.2)",class:"child-switch"},null,8,["modelValue","onUpdate:modelValue","loading","onClick"])]),Object(o.createElementVNode)("div",aa,[Object(o.createElementVNode)("div",oa,Object(o.toDisplayString)(t.localName),1),Object(o.createElementVNode)("img",{onClick:function(n){return e.showFloorHeating(t)},class:Object(o.normalizeClass)(t.switch?"":"img-disabled"),src:e.lightColorImg,alt:""},null,10,ca)])])})),128))])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)}],["__scopeId","data-v-00673b20"]])),{class:"air"}),sa={class:"com-top"},ma={class:"com-desc"},ua=ra((function(){return Object(o.createElementVNode)("p",{class:"com-top-title"},"空调",-1)})),da={class:"com-top-temperature"},pa=ra((function(){return Object(o.createElementVNode)("sup",null,"℃",-1)})),fa={class:"com-right"},ba=["src"],ga=["src"],Oa={class:"top-switch"},ha={key:0,class:"top-nav"},ja={key:1},va={key:0,class:"line"},Ta={key:1,class:"main-temp"},ka={class:"com-control com-control-padding"},Ia={class:"temp-slider",id:"sliderId"},ya={class:"slider-bar",id:"barId"},Sa={class:"bar-temp"},Ca=ra((function(){return Object(o.createElementVNode)("div",{class:"bar-circle",style:{border:"2px solid rgba(255, 255, 255, 1)"},id:"handId"},null,-1)})),wa={class:"temp-left",id:"tempManualLeftId"},Da={class:"temp-right"},Ea={key:0,class:"com-control"},xa={class:"control-box"},Na={class:"volume-box"},Va={class:"number"},Ba=ra((function(){return Object(o.createElementVNode)("div",{class:"text"},"风量调节",-1)})),La={class:"volume-icon"},Aa=["src"],qa=["src"],Ma=["src"],Wa={key:1,class:"com-control"},Fa={class:"control-box"},Ua={class:"volume-box"},_a={class:"model"},Ra=ra((function(){return Object(o.createElementVNode)("div",{class:"text"},"模式设定",-1)})),Pa={class:"volume-icon"},Ha=["src"],za=["src"],Xa=["src"],Ya={key:1,class:"air-child"},Ga=["onClick"],Ka={class:"open-title"},Ja={class:"open-temp-box"},Za=ra((function(){return Object(o.createElementVNode)("sup",null,"°C",-1)})),$a={key:0,class:"text-box"},Qa=["src"],eo=ra((function(){return Object(o.createElementVNode)("span",null,"制热模式",-1)})),to={key:1,class:"text-box"},no=["src"],ao=ra((function(){return Object(o.createElementVNode)("span",null,"制冷模式",-1)})),oo={key:2,class:"text-box"},co=["src"],ro=ra((function(){return Object(o.createElementVNode)("span",null,"通风模式",-1)})),io={class:"control-bottom"},lo={class:"control-title"},so=["src"];n("c740");var mo=Object(o.defineComponent)({props:{temperature:{type:Number,default:function(){return 0}},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(W.a)({Switch:Q},Z.a.Component.name,Z.a.Component),setup:function(e,t){var n=Object(o.reactive)({seviceEquipmentList:e.seviceEquipmentList,lightColorImg:Object(me.y)("page-officehome","lightColorControl.svg"),navType:"all",valueDom:null,spaceId:e.spaceId,valueHeight:null,equipList:[],cotrolLoading:!1,loadingNum: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:me.y,part:1,airData:{avg:"",icon:1,spaceStatus:"",notice:"",mode:0,tempSet:0,maxTempSet:32,minTempSet:16,isAutoGear:0,workMode:0,gear:0,boundPoint:{},isOpen:!1,runStatus:0},modeName:"",showAirVolumeBtn:!1,showDialog:!1,airTimer:null,distroyFlag:!1,airSetText:{notice:"",remark:[],nowImg:"",toWhere:"",designTemperature:0},checkNav:function(){n.navType=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"all",n.swiperIinit=!1,"child"!=n.navType&&n.updateParentSatus(),n.getAirInfo(1)},showAirColorCtrol:function(e){e.isOpen&&(e.maxTempSet=n.airData.maxTempSet,e.minTempSet=n.airData.minTempSet,t.emit("showChildAirControl",e))},showAll:function(){return Object(M.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.showChild=!n.showChild,"arrow-up"===n.lightIcon?n.lightIcon="arrow-down":n.lightIcon="arrow-up",n.showChild?n.updateChildSatus():n.updateParentSatus(),n.getAirInfo(1);case 4:case"end":return e.stop()}}),e)})))()},setBarNowPerstion:function(){n.realTemp=n.airTemp;var e,t,a=document.querySelector("#barId");a&&(e=document.querySelector("#sliderId"),e=n.getEleWidth(e),n.airTemp>=n.airData.minTempSet&&n.airTemp<=n.airData.maxTempSet?(t=(n.airTemp-n.airData.minTempSet)/n.part,a&&(a.style.left=t+"px")):!n.airTemp||n.airTemp<n.airData.minTempSet?a.style.left=0:n.airTemp>n.airData.maxTempSet&&(t=a.offsetWidth,a.style.left=e-t+n.sliderPading+"px"))},getEleWidth:function(e){return e?e.getBoundingClientRect().width:1},endBoxSwiper:function(){var e=document.querySelector("#handId"),t=document.querySelector("#barId"),a=document.querySelector("#sliderId"),o=!1,c=0,r=(n.sliderPading=2,n.getEleWidth(a)),i=(a=n.getEleWidth(t),a=(1<r&&(r-=a),(n.airData.maxTempSet-n.airData.minTempSet)/r),a);n.part=a,e&&(e.addEventListener("touchstart",(function(e){var n=t&&t.style&&t.style.left||0;c=isNaN(parseInt(n))?0:parseInt(n),o=!0})),e.addEventListener("touchend",(function(e){o=!1,n.changeZongAir("temp",n.realTemp),n.airTemp=n.realTemp})),n.swiperIinit=!0,le(e,{swipeLeft:function(e){o&&(c=Math.abs(c),e=Math.abs(e.mation.moveX-e.mation.startX),e=(e=c-e)<0?0:e,t.style.left=e+"px",(e=e*i+n.airData.minTempSet)&&(n.realTemp=e.toFixed(1),n.realTemp=Object(me.a)(n.realTemp)))},swipeRight:function(e){var a;o&&(c=Math.abs(c),e=Math.abs(e.mation.moveX-e.mation.startX),(a=(e=r<(e=c+e)?r:e)*i+n.airData.minTempSet)&&(n.realTemp=a.toFixed(1),n.realTemp=Object(me.a)(n.realTemp)),t.style.left=e+n.sliderPading+"px")}}))},getAirInfoToTimer:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:15e3,t=Object(me.o)();15e3==e&&t<"070000"&&"200000"<t&&(e=3e5),n.airTimer&&(clearTimeout(n.airTimer),n.airTimer=null),n.airTimer=setTimeout((function(){n.distroyFlag||n.loadingNum||n.getAirInfo()}),e)},getTimerLen:function(){var e="",t=15;return(e=n.equipList&&n.equipList.length?n.equipList[0].equipmentCategory:e)&&"ACATVI"==e?15:t},switchTimer:null,setLoadingNumber:function(){var e=n.getTimerLen();n.switchTimer=setInterval((function(){n.loadingNum++,n.loadingNum>=e&&(clearInterval(n.switchTimer),n.switchTimer=null,n.loadingAir=!1,n.loadingNum=0,n.getAirInfoToTimer(0))}),1e3)},formatAirData:function(e,t){var a={};if("temp"==e&&(a.codeKey="tempSetCode",a.value=t),"gear"==e&&"windLow"==t){if(!(1<n.airData.gear))return;n.airData.gear--,n.airData.isAutoGear=0,a.value=n.airData.gear,a.codeKey="gearCode"}if("gear"==e&&"windUp"==t){if(!(n.airData.gear<3))return;n.airData.gear++,n.airData.isAutoGear=0,a.value=n.airData.gear,a.codeKey="gearCode"}return"gear"==e&&"auto"==t&&(n.airData.isAutoGear=n.airData.isAutoGear?0:1,a.value=n.airData.isAutoGear?4:n.airData.gear,a.codeKey="gearCode"),"mode"==e&&(n.airData.workMode=t,a.codeKey="modeSetCode",a.value=t),a},loadingStart:function(){n.cotrolLoading=!0},loadinngEnd:function(){n.cotrolLoading=!1},setChildLoadingNumber:function(e){var t=n.getTimerLen();e.loadingNum=1,e.timer=setInterval((function(){e.loadingNum++,e.loadingNum>=t&&(clearInterval(e.timer),e.timer=null,e.loadingNum=0,n.getAirInfoToTimer(0))}),1e3)},childDisabled:function(e,t){clearTimeout(e.timeOuter),e.timeOuter=setInterval((function(){e.num--,0==e.num&&(n.setSpaceCondtioners(t),clearTimeout(e.timeOuter))}),1e3)},changeChildItemAir:function(e,a,o){var c=!a.isOpen,r=n.checkDeviceIsExeSpaceTime([a]);if(n.forceOverTimeFlag&&c&&r&&"switch"==e)t.emit("triggerWork",2,a);else if(a.isOpen||"switch"===e){if(c=[],"switch"===e){if(1<=a.loadingNum&&a.loadingNum<=15)return;a.isOpen=!a.isOpen,r={id:a.id,code:a.switchCode,value:a.isOpen?"1":"0"},c.push(r)}else if("temp"===e){if(a.num=2,"up"===o){if(a.tempSet>=n.airData.maxTempSet)return;a.tempSet=a.tempSet+.5}else if("down"===o){if(a.tempSet<=n.airData.minTempSet)return;a.tempSet=a.tempSet-.5}r={id:a.id,code:a.tempSetCode,value:a.tempSet},c.push(r),n.childDisabled(a,c)}else if("gear"===e){if("up"===o){if(a.isAutoGear)return;3<=a.gear?a.isAutoGear=1:(a.gear++,a.isAutoGear=0)}else if("down"===o){if(!a.isAutoGear&&a.gear<=1)return;a.isAutoGear?(a.isAutoGear=0,a.gear=3):a.gear--}r={id:a.id,code:a.gearCode,value:a.isAutoGear?4:a.gear},c.push(r)}else if("model"===e){if("up"===o){if(3<=a.workMode)return;a.workMode++}else if("down"===o){if(a.workMode<=1)return;a.workMode--}r={id:a.id,code:a.modeSetCode,value:a.workMode},c.push(r)}n.updateAirStatus(),"temp"!==e&&n.setSpaceCondtioners(c)}},setSpaceCondtioners:function(e){Object(ue.R)(e).then((function(e){n.loadinngEnd()})).catch((function(){n.loadinngEnd(),Object(Vn.a)("连接异常,请检查网络!")}))},changeZongAir:function(e,t){var a,o;!n.airData.isOpen||(a=n.formatAirData(e,t))&&a.codeKey&&(o=[],n.equipList.map((function(e){e={id:e.id,code:e[a.codeKey],value:a.value},o.push(e)})),n.cotrolLoading||(n.loadingStart(),n.updateAirStatus(),n.setSpaceCondtioners(o)))},checkDeviceIsExeSpaceTime:function(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=n.seviceEquipmentList,a=!1,o=0;o<t.length;o++){for(var c=0;c<e.length;c++)if(t[o].id==e[c].id&&t[o].isExeSpaceTime){a=!0;break}if(a)break}return a},updateCloseSwitchFromWork:function(){n.getAirInfo(1)},updateSwitchFromWork:function(e){e?n.equipList.map((function(t){t.id===e.id&&(t.isOpen=!0,n.airData.isOpen=!0)})):n.airData.isOpen=!0,Object(o.nextTick)((function(){n.barSwiperInit()}))},updateAirStatus:function(){clearTimeout(n.airTimer),n.airTimer=null,n.loadingNum=1,n.switchTimer||n.setLoadingNumber()},updateChildSatus:function(){n.equipList.map((function(e){e.isOpen=n.airData.isOpen}))},updateParentSatus:function(){var e=!1;n.equipList.map((function(t){t.isOpen&&(e=!0)})),n.airData.isOpen=e},airChange:function(){var e,a=!n.airData.isOpen,c=n.checkDeviceIsExeSpaceTime(n.equipList);n.forceOverTimeFlag&&a&&c?t.emit("triggerWork",2):(n.airData.isOpen=!n.airData.isOpen,n.loadingAir=!0,n.updateAirStatus(),n.swiperIinit=!1,n.airData.isOpen&&Object(o.nextTick)((function(){n.barSwiperInit()})),e=[],n.equipList.map((function(t){t={id:t.id,code:t.switchCode,value:n.airData.isOpen?"1":"0"},e.push(t)})),n.setSpaceCondtioners(e))},formateSetChildStatus:function(){n.equipList.map((function(e){e.isOpen=1===e.runStatus,e.boundPoint=e.boundPoint||{},e.tempSet&&(e.tempSet=e.tempSet.toFixed(1),e.tempSet=Object(me.a)(e.tempSet))}))},barSwiperInit:function(){return Object(M.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.airData.isOpen&&!n.showChild&&(n.swiperIinit||n.endBoxSwiper(),n.setBarNowPerstion());case 1:case"end":return e.stop()}}),e)})))()},setChildSelectList:function(){n.equipList.map((function(e){for(var t=[],a=n.airData.minTempSet;a<=n.airData.maxTempSet;a+=.5)t.push(a);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})),n.setValueHeight()},setValueHeight:function(){n.valueHeight||(n.valueDom=n.valueDom||document.querySelectorAll(".value")[0],n.valueHeight=n.valueDom?n.valueDom.offsetHeight:0)},updateChildPerstion:function(){n.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=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t={spaceId:n.spaceId};t=Object(me.B)(t);Object(ue.L)(t).then((function(t){t=t.data||{},n.firstLoadingAir=!1,n.loadingAir=!1,n.airTemp=t.tempSet,n.airTemp&&(n.airTemp=n.airTemp.toFixed(1),n.airTemp=Object(me.a)(n.airTemp)),n.airData.maxTempSet=t.maxTempSet,n.airData.minTempSet=t.minTempSet,n.airData.isOpen=!!t.runStatus,n.airData.runStatus=t.runStatus,n.airData.isAutoGear=t.isAutoGear,n.airData.gear=t.gear||0,n.airData.workMode=t.workMode,n.airData.boundPoint=t.boundPoint||{},n.equipList=t.equipList,n.formateSetChildStatus(),Object(o.nextTick)((function(){n.barSwiperInit()})),0==e&&n.getAirInfoToTimer()})).catch((function(){0==e&&n.getAirInfoToTimer(3e3)}))}});return Object(o.watch)([function(){return e},function(){return e.spaceId}],(function(e,t){e[0]&&(n.temperature=e[0].temperature,n.userIsControl=e[0].userIsControl,n.forceOverTimeFlag=e[0].forceOverTimeFlag,n.seviceEquipmentList=e[0].seviceEquipmentList),e[1]&&e[1]!=t[1]&&(n.spaceId=e[1],n.swiperIinit=!1,n.distroyFlag=!1,n.getAirInfoToTimer(0))}),{deep:!0,immediate:!0}),Object(o.onBeforeUnmount)((function(){n.airTimer&&(clearTimeout(n.airTimer),n.airTimer=null,n.distroyFlag=!0)})),Object(o.onMounted)((function(){n.spaceId=e.spaceId,n.distroyFlag=!1,n.getAirInfoToTimer(0)})),Object(q.a)({},Object(o.toRefs)(n))}}),uo=(mo=(n("6c88"),pe()(mo,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("Switch");return Object(o.openBlock)(),Object(o.createElementBlock)("div",la,[Object(o.createElementVNode)("div",sa,[Object(o.createElementVNode)("div",ma,[ua,Object(o.createElementVNode)("p",da,[Object(o.createTextVNode)(Object(o.toDisplayString)(e.airTemp||"--")+" ",1),pa])]),Object(o.createElementVNode)("div",fa,[e.airData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("page-officehome","openair.svg"),alt:""},null,8,ba)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","air_close.svg"),alt:""},null,8,ga))])]),Object(o.createElementVNode)("div",Oa,[e.equipList&&1<e.equipList.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",ha,[Object(o.createElementVNode)("span",{class:Object(o.normalizeClass)("all"==e.navType?"nav-active":""),onClick:t[0]||(t[0]=function(t){return e.checkNav("all")})}," 总控制 ",2),Object(o.createElementVNode)("span",{class:Object(o.normalizeClass)("child"==e.navType?"nav-active":""),onClick:t[1]||(t[1]=function(t){return e.checkNav("child")})}," 子设备 ",2)])):(Object(o.openBlock)(),Object(o.createElementBlock)("div",ja)),"all"==e.navType&&e.airData.boundPoint&&e.airData.boundPoint.switchSetBound?(Object(o.openBlock)(),Object(o.createBlock)(i,{key:2,class:"switch-btn",size:23,"inactive-color":"rgba(196, 196, 196, 0.4)",onClick:e.airChange,"model-value":e.airData.isOpen},null,8,["onClick","model-value"])):Object(o.createCommentVNode)("",!0)]),e.airData.boundPoint&&(e.airData.boundPoint.tempSetBound||e.airData.boundPoint.gearSetBound||e.airData.boundPoint.modeSetBound)?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[e.airData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("div",va)):Object(o.createCommentVNode)("",!0),"all"==e.navType&&e.airData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ta,[Object(o.withDirectives)(Object(o.createElementVNode)("div",ka,[Object(o.createElementVNode)("div",Ia,[Object(o.createElementVNode)("div",ya,[Object(o.createElementVNode)("div",Sa,Object(o.toDisplayString)(e.realTemp)+"℃",1),Ca]),Object(o.createElementVNode)("div",wa,Object(o.toDisplayString)(e.airData.minTempSet),1),Object(o.createElementVNode)("div",Da,Object(o.toDisplayString)(e.airData.maxTempSet),1)])],512),[[o.vShow,e.airData.boundPoint&&e.airData.boundPoint.tempSetBound]]),e.airData.boundPoint&&e.airData.boundPoint.gearSetBound?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ea,[Object(o.createElementVNode)("div",xa,[Object(o.createElementVNode)("div",Na,[Object(o.createElementVNode)("div",Va,[(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))]),Ba]),Object(o.createElementVNode)("div",La,[Object(o.createElementVNode)("div",{class:"icon-item",style:Object(o.normalizeStyle)({opacity:e.airData.gear<=1?"0.6":1}),onClick:t[2]||(t[2]=function(t){return e.changeZongAir("gear","windLow")})},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","wind_small.svg")},null,8,Aa)],4),Object(o.createElementVNode)("div",{class:"icon-item",style:Object(o.normalizeStyle)({opacity:3<=e.airData.gear?"0.6":1}),onClick:t[3]||(t[3]=function(t){return e.changeZongAir("gear","windUp")})},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","wind_big.svg")},null,8,qa)],4),Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["icon-item",e.airData.isAutoGear?"active-color":""]),onClick:t[4]||(t[4]=function(t){return e.changeZongAir("gear","auto")})},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","A.svg")},null,8,Ma)],2)])])])):Object(o.createCommentVNode)("",!0),e.airData.boundPoint&&e.airData.boundPoint.modeSetBound?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Wa,[Object(o.createElementVNode)("div",Fa,[Object(o.createElementVNode)("div",Ua,[Object(o.createElementVNode)("div",_a,Object(o.toDisplayString)(1==e.airData.workMode?"制冷":2==e.airData.workMode?"制热":"通风"),1),Ra]),Object(o.createElementVNode)("div",Pa,[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,Ha)],2),Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["icon-item",2===e.airData.workMode?"active-color":""]),onClick:t[6]||(t[6]=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,za)],2),Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["icon-item",3===e.airData.workMode?"active-color":""]),onClick:t[7]||(t[7]=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,Xa)],2)])])])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)],64)):Object(o.createCommentVNode)("",!0),"child"==e.navType?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ya,[(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",onClick:function(n){return e.showAirColorCtrol(t)},key:"child"+n},[Object(o.createElementVNode)("div",Ka,[Object(o.createElementVNode)("div",Ja,[Object(o.createElementVNode)("span",null,[Object(o.createTextVNode)(Object(o.toDisplayString)(t.tempSet||"--"),1),Za]),t.boundPoint&&t.boundPoint.modeSetBound?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[2==t.workMode?(Object(o.openBlock)(),Object(o.createElementBlock)("div",$a,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","hot-small.svg"),alt:""},null,8,Qa),eo])):1==t.workMode?(Object(o.openBlock)(),Object(o.createElementBlock)("div",to,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","cold-small.svg"),alt:""},null,8,no),ao])):(Object(o.openBlock)(),Object(o.createElementBlock)("div",oo,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","tongfeng-small.svg"),alt:""},null,8,co),ro]))],64)):Object(o.createCommentVNode)("",!0)]),t.boundPoint&&t.boundPoint.switchSetBound?(Object(o.openBlock)(),Object(o.createBlock)(i,{key:0,onClick:Object(o.withModifiers)((function(n){return e.changeChildItemAir("switch",t,"switch")}),["stop"]),"model-value":t.isOpen,class:"child-switch","inactive-color":"rgba(196, 196, 196, 0.4)"},null,8,["onClick","model-value"])):Object(o.createCommentVNode)("",!0)]),Object(o.createElementVNode)("div",io,[Object(o.createElementVNode)("div",lo,Object(o.toDisplayString)(t.localName),1),t.boundPoint&&(t.boundPoint.tempSetBound||t.boundPoint.gearSetBound||t.boundPoint.modeSetBound)?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,class:Object(o.normalizeClass)(t.isOpen?"":"img-disabled"),src:e.lightColorImg,alt:""},null,10,so)):Object(o.createCommentVNode)("",!0)])],8,Ga)})),128))])):Object(o.createCommentVNode)("",!0)])}],["__scopeId","data-v-140a1d95"]])),{key:0,class:"light"}),po={class:"light-top"},fo={class:"light-desc"},bo={class:"light-title"},go={class:"light-right"},Oo={key:0,class:"switch-box"},ho=["src"],jo={key:0,class:"light-main-control"},vo={key:0,class:"main-color"},To=["src"],ko={key:1},Io={key:1,class:"light-box"},yo=["onClick"],So={class:"control-top"},Co=["src"],wo={class:"control-bottom"},Do={class:"control-title"},Eo=["src"],xo={key:0},No={key:1};n("4de4");var Vo=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}},showLight:{type:Boolean,default:function(){return!1}},seviceEquipmentList:{type:Array,default:function(){return[]}}},components:{Switch:Q},setup:function(e,t){var n=Object(o.reactive)({distroyFlag:!1,seviceEquipmentList:e.seviceEquipmentList,showLight:e.showLight,spaceId:e.spaceId,projectId:e.projectId,controlMode:e.controlMode,userIsControl:e.userIsControl,forceOverTimeFlag:e.forceOverTimeFlag,setStatus:0,lightParams:[],allowSvg:"down_Arrow.svg",timeOut:null,lightIcon:"arrow-down",showFlag:!1,loadingLight:!1,loading:!1,initData:[],lampList:[],lightsStatusTimer:null,startCheckLightsTime:0,lightColorImg:Object(me.y)("page-officehome","lightColorControl.svg"),lightImg:Object(me.y)("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&&(e.bright||e.colorTemperature)&&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 c=0;c<e.length;c++)if(t[o].id==e[c].id&&t[o].isExeSpaceTime){a=!0;break}if(a)break}return a},updateSwitchFromWork:function(){n.getLampList(1)},getLampList:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;Object(ue.n)({spaceId:n.spaceId}).then((function(t){if(t&&"success"==t.result){for(var a=null!=(t=null==t?void 0:t.content)?t:[],o=!1,c=0;c<a.length;c++)a[c].type="lamp",1==a[c].lightType?(a[c].imgOpen=Object(me.y)("page-officehome","lamp_open.png"),a[c].imgClose=Object(me.y)("page-officehome","lamp_close.png")):(a[c].imgOpen=Object(me.y)("page-officehome","atmLamp_small_open.png"),a[c].imgClose=Object(me.y)("page-officehome","atmLamp_small_close.png")),a[c].switch=!!a[c].runStatus,a[c].runStatus&&(o=!0),a[c].loading=!1;n.initData=JSON.parse(JSON.stringify(a)),n.lampSw=o,n.lampList=a,n.lightImg=n.lampSw?Object(me.y)("page-officehome","lamp_open.png"):Object(me.y)("page-officehome","lamp_close.png"),a[0]&&1!==a[0].lightType&&(n.lightImg=n.lampSw?Object(me.y)("page-officehome","atmLamp_small_open.png"):Object(me.y)("page-officehome","atmLamp_small_close.png"))}0==e&&n.startLightsStatusTimer()})).catch((function(){0==e&&n.startLightsStatusTimer(2e3)}))},eqChange:function(e,a,o){if(n.userIsControl)if("allLamp"===e){var c=n.checkDeviceIsExeSpaceTime(n.lampList);if(""!==a&&(n.lampSw=a),n.forceOverTimeFlag&&n.lampSw&&c)return n.lampSw=!n.lampSw,void t.emit("triggerWork",3);n.loading=!0,n.loadingLight=!0,n.lightImg=n.lampSw?Object(me.y)("page-officehome","lamp_open.png"):Object(me.y)("page-officehome","lamp_close.png"),c=n.lampSw,n.setStatus=15,n.updateAllLampStatus(c),n.setLamp(e,"",c,0)}else{if(c=n.checkDeviceIsExeSpaceTime([a]),n.forceOverTimeFlag&&a.switch&&c)return a.switch=!a.switch,void t.emit("triggerWork",3,a);a.loading=!0;c=a.switch;var r=a.id;n.setStatus=15,n.updateLampStatus(a,c),n.setLamp(e,r,c,o,a)}else Object(Vn.a)("您没有当前空间的控制权限!")},statusInterval:null,setStatusNum:function(){n.statusInterval||(n.statusInterval=setInterval((function(){n.setStatus--,1==n.setStatus&&(n.setStatus=0,clearInterval(n.statusInterval))}),1e3))},setLamp:function(e,t,a,o){var c=4<arguments.length&&void 0!==arguments[4]?arguments[4]:null,r=[];if("allLamp"===e){for(var i=0;i<n.initData.length;i++)n.initData[i].switch=a;r=n.initData}else r=[{id:t,switch:a}];n.lightParams=r,Object(ue.S)(r).then((function(e){n.setStatusNum(),c&&(c.loading=!1),"success"!==e.result&&n.initLampLoading()})).catch((function(e){n.setStatusNum(),c&&(c.loading=!1),Object(Vn.a)("连接异常,请检查网络!")}))},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,c){var r,i,l;e.success&&e.success.length&&("allLamp"===t?n.updateAllLampLoading(e.success):n.updateLampLoading(c),n.getLampList()),e.processing&&e.processing.length&&(r=n.lightParams,i=e.processing,l=[],i.map((function(e){for(var t={id:e.id,orderSeqNum:e.orderSeqNum},n=0;n<r.length;n++)if(e.id===r[n].id){t.switch=r[n].switch;break}l.push(t)})),n.checkChangeLightStatusSuccess(l,t,a,o,c)),e.error&&e.error.length&&("allLamp"===t?n.updateAllLampLoading(e.error):n.updateLampLoading(c))},judgeChangeResponeseSuccess:function(e){for(var t=null!=(e=null==e?void 0:e.content)?e:[],n=[],a=[],o=[],c=0;c<t.length;c++){var r=t[c];r.result="success",(200===r.state&&"success"===r.exeResult?a:200===r.state&&"processing:rcvd"===r.exeResult||202===r.state&&!r.exeResult?n:o).push(r)}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,c){Object(ue.B)(e).then((function(e){e=n.judgeChangeResponeseSuccess(e),n.getTimeLampStatus(e,t,a,o,c)}))},clearLightStatusTimer:function(){clearTimeout(n.lightsStatusTimer),n.lightsStatusTimer=null},startLightsStatusTimer:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:15e3,t=Object(me.o)();15e3==e&&t<"070000"&&"200000"<t&&(e=3e5),n.lampList&&0===n.lampList.length&&(e=15e3),"Pj3101060003"!=n.projectId&&"Pj1101080259"!=n.projectId||(e=2e3),n.clearLightStatusTimer(),n.lightsStatusTimer=setTimeout((function(){n.getLampList(0)}),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.showLight=e[0].showLight,n.userIsControl=e[0].userIsControl,n.controlMode=e[0].controlMode,n.forceOverTimeFlag=e[0].forceOverTimeFlag,n.seviceEquipmentList=e[0].seviceEquipmentList),e[1]&&t[1]&&e[1]!=t[1]&&(n.clearLightStatusTimer(),n.showFlag=!1,n.lampList=[],n.setStatus=0,n.spaceId=e[1],n.getLampList(0))}),{deep:!0,immediate:!0}),Object(o.onBeforeUnmount)((function(){n.distroyFlag=!0,n.clearLightStatusTimer()})),Object(o.onMounted)((function(){n.getLampList(0)})),Object(q.a)({isShowChildLight:a},Object(o.toRefs)(n))}}),Bo=(Vo=(n("f3cc"),n("83b6"),pe()(Vo,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("Switch"),l=Object(o.resolveComponent)("van-icon");return e.showLight&&e.lampList&&e.lampList.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",uo,[Object(o.createElementVNode)("div",po,[Object(o.createElementVNode)("div",fo,[Object(o.createElementVNode)("p",bo,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",go,[e.isShowChildLight?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Oo,[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,ho))])]),e.isShowChildLight?Object(o.createCommentVNode)("",!0):(Object(o.openBlock)(),Object(o.createElementBlock)("div",jo,[e.lampList[0].bright||e.lampList[0].colorTemperature?(Object(o.openBlock)(),Object(o.createElementBlock)("div",vo,[Object(o.createElementVNode)("img",{src:e.lightColorImg,onClick:t[2]||(t[2]=function(t){return e.showLightColorCtrol(e.lampList[0])}),alt:""},null,8,To)])):(Object(o.openBlock)(),Object(o.createElementBlock)("div",ko)),e.showFlag?Object(o.createCommentVNode)("",!0):(Object(o.openBlock)(),Object(o.createBlock)(i,{key:2,size:23,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",Io,[(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",So,[Object(o.createElementVNode)("img",{src:t.switch?t.imgOpen:t.imgClose,alt:""},null,8,Co),Object(o.createVNode)(i,{"active-color":"$elActiveColor",disabled:!e.userIsControl,modelValue:t.switch,"onUpdate:modelValue":function(e){return t.switch=e},loading:t.loading,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","loading","onClick"])]),Object(o.createElementVNode)("div",wo,[Object(o.createElementVNode)("div",Do,Object(o.toDisplayString)(t.localName),1),t.bright||t.colorTemperature?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,class:Object(o.normalizeClass)(t.switch?"":"img-disabled"),src:e.lightColorImg,alt:""},null,10,Eo)):Object(o.createCommentVNode)("",!0)])],8,yo)):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"]),"arrow-down"==e.lightIcon?(Object(o.openBlock)(),Object(o.createElementBlock)("span",xo,"展开更多")):(Object(o.openBlock)(),Object(o.createElementBlock)("span",No,"收起全部"))])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)}],["__scopeId","data-v-19dce408"]])),{key:0,class:"curtain"}),Lo={class:"curtain-top"},Ao={class:"curtain-desc"},qo={class:"curtain-title"},Mo={class:"curtain-right"},Wo=["src"],Fo=["src"],Uo={key:0,class:"curtain-box"},_o={class:"top-nav"},Ro={key:0,class:"line"},Po={class:"top-control"},Ho=["src"],zo=["src"],Xo=["src"],Yo={key:1},Go=["src"],Ko=["src"],Jo=["src"],Zo={key:1},$o={key:2,class:"curtain-child"},Qo={class:"curtain-name"},ec={class:"name"},tc={key:0},nc={class:"curtain-control top-control"},ac=["onClick"],oc=["src"],cc=["onClick"],rc=["src"],ic=["src"],lc={key:1},sc=["onClick"],mc=["src"],uc=["onClick"],dc=["src"],pc=["src"],fc={key:1};function bc(e){return Object(o.pushScopeId)("data-v-6a5e24b3"),e=e(),Object(o.popScopeId)(),e}var gc=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,t){var n=e.projectId,a=Object(o.reactive)({curtainData:[],userIsControl:e.userIsControl,lightIcon:"arrow-down",projectId:n,type:"all",countText:"",count:2,curtainOpen:!1,curtainClose:!1,parseImgUrl:me.y,activeIndex:0,openCurtainOpening:function(e){t.emit("showCurtainOpening",e)},checkNav:function(e){a.type=e},getEqpGroup:function(){var t={criteria:{projectId:e.projectId,spaceId:e.spaceId,type:0},orders:[{column:"sortNum",asc:!0}]};Object(ue.q)(t).then((function(e){a.curtainData=e.count?e.content:[],a.curtainData.map((function(e){e.count=0,e.activeIndex=0}))}))},interval:{},countInterval:function(){a.interval=setInterval((function(){a.count--,0==a.count&&(a.count=2,a.activeIndex=0,clearInterval(a.interval))}),1e3)},countChildInterval:function(e){a.interval=setInterval((function(){e.count--,0==e.count&&(e.count=2,e.activeIndex=0,clearInterval(a.interval))}),1e3)},openCurtainMain:function(e){a.activeIndex==e&&0!==a.count||(a.activeIndex=e,a.count=2,a.countInterval(),a.formateCurtainData(e))},formateValue:function(e){return 1==e?0:2==e?1:2},formateCurtainData:function(e){var t=[],n=a.formateValue(e);a.curtainData.map((function(e){e={id:e.equipId,code:"EquipSwitchSet",value:n},t.push(e)})),a.changeCurtainStatus(t)},changeCurtainStatus:function(e){Object(ue.R)(e).then((function(e){a.oldTime=Object(me.b)("YYYY.MM.DD HH:mm:ss"),a.timer||a.updateGroupPeing()}))},openCurtainClid:function(e,t){a.curtainData.map((function(e){e.count=0,e.activeIndex=0})),e.activeIndex=t;var n=[];t={id:e.equipId,code:"EquipSwitchSet",value:a.formateValue(t)};n.push(t),e.count=2,a.countChildInterval(e),a.changeCurtainStatus(n)},oldTime:null,timer:null,clearTimer:function(){clearInterval(a.timer),a.timer=null},updateGroupPeing:function(){a.timer=setInterval((function(){var e=Object(me.b)("YYYY.MM.DD HH:mm:ss");a.oldTime?60<a.getTimeDifference(a.oldTime,e)&&(a.getEqpGroup(),a.clearTimer()):a.oldTime=Object(me.b)("YYYY.MM.DD HH:mm:ss")}),1e3)},getTimeDifference:function(e,t){return e=new Date(e),t=new Date(t),e=e.getTime(),t=t.getTime(),t=Number(t)-Number(e),parseInt(t/1e3)}});return Object(o.watch)(e,(function(e){e.spaceId&&(a.getEqpGroup(),a.userIsControl=e.userIsControl)})),Object(o.onBeforeUnmount)((function(){a.clearTimer(),clearInterval(a.interval)})),Object(o.onMounted)((function(){a.getEqpGroup()})),Object(q.a)({},Object(o.toRefs)(a))}}),Oc=(gc=(n("ba16"),pe()(gc,[["render",function(e,t,n,a,c,r){return e.curtainData&&e.curtainData.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Bo,[Object(o.createElementVNode)("div",Lo,[Object(o.createElementVNode)("div",Ao,[Object(o.createElementVNode)("p",qo,Object(o.toDisplayString)(e.curtainData.length&&1==e.curtainData.length?e.curtainData[0].name:"窗帘"),1)]),Object(o.createElementVNode)("div",Mo,[4!==e.curtainData[0].equipmentType&&5!==e.curtainData[0].equipmentType?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("page-officehome","curtain_new.svg"),alt:""},null,8,Wo)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_roll.svg"),alt:""},null,8,Fo))])]),e.curtainData.length&&1<e.curtainData.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Uo,[Object(o.createElementVNode)("div",_o,[Object(o.createElementVNode)("span",{class:Object(o.normalizeClass)("all"==e.type?"nav-active":""),onClick:t[0]||(t[0]=function(t){return e.checkNav("all")})}," 总控制 ",2),Object(o.createElementVNode)("span",{class:Object(o.normalizeClass)("child"==e.type?"nav-active":""),onClick:t[1]||(t[1]=function(t){return e.checkNav("child")})}," 子设备 ",2)])])):Object(o.createCommentVNode)("",!0),"all"==e.type?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:1},[e.curtainData.length&&1<e.curtainData.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ro)):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",Po,[e.curtainData[0].isOpenSet?(Object(o.openBlock)(),Object(o.createElementBlock)("div",{key:0,class:"control-item",onClick:t[2]||(t[2]=function(t){return e.openCurtainOpening(e.curtainData)})},[Object(o.createElementVNode)("img",{class:"curtain-opening-icon",src:e.parseImgUrl("page-officehome","curtain_opening.svg"),alt:""},null,8,Ho)])):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["control-item",1==e.activeIndex?"control-item-active":""]),onClick:t[3]||(t[3]=function(t){return e.openCurtainMain(1)})},[1!==e.activeIndex?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[4!==e.curtainData[0].equipmentType&&5!==e.curtainData[0].equipmentType?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("page-officehome","curtain_left.svg"),alt:""},null,8,zo)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_down.svg"),alt:""},null,8,Xo))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",Yo,Object(o.toDisplayString)(e.count),1))],2),e.curtainData[0].stopSet?(Object(o.openBlock)(),Object(o.createElementBlock)("div",{key:1,class:"control-item",onClick:t[4]||(t[4]=function(t){return e.openCurtainMain(3)})},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("page-officehome","curtain_stop.svg"),alt:""},null,8,Go)])):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["control-item",2==e.activeIndex?"control-item-active":""]),onClick:t[5]||(t[5]=function(t){return e.openCurtainMain(2)})},[2!==e.activeIndex?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[4!==e.curtainData[0].equipmentType&&5!==e.curtainData[0].equipmentType?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("page-officehome","curtain_right.svg"),alt:""},null,8,Ko)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_up.svg"),alt:""},null,8,Jo))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",Zo,Object(o.toDisplayString)(e.count),1))],2)])],64)):Object(o.createCommentVNode)("",!0),"child"==e.type?(Object(o.openBlock)(),Object(o.createElementBlock)("div",$o,[(Object(o.openBlock)(!0),Object(o.createElementBlock)(o.Fragment,null,Object(o.renderList)(e.curtainData,(function(t){return Object(o.openBlock)(),Object(o.createElementBlock)("div",{class:"child-item",key:t.id},[Object(o.createElementVNode)("div",Qo,[Object(o.createElementVNode)("div",ec,Object(o.toDisplayString)(t.name),1),t.isOpenSet?(Object(o.openBlock)(),Object(o.createElementBlock)("span",tc,"开度"+Object(o.toDisplayString)(t.openValue)+"%",1)):Object(o.createCommentVNode)("",!0)]),Object(o.createElementVNode)("div",nc,[t.isOpenSet?(Object(o.openBlock)(),Object(o.createElementBlock)("div",{key:0,class:"control-item",onClick:function(n){return e.openCurtainOpening([t])}},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("page-officehome","curtain_opening.svg"),alt:""},null,8,oc)],8,ac)):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["control-item",1==t.activeIndex?"control-item-active":""]),onClick:function(n){return e.openCurtainClid(t,1)}},[1!=t.activeIndex?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[4!==t.equipmentType&&5!==t.equipmentType?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("page-officehome","curtain_left.svg"),alt:""},null,8,rc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_down.svg"),alt:""},null,8,ic))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",lc,Object(o.toDisplayString)(t.count),1))],10,cc),t.stopSet?(Object(o.openBlock)(),Object(o.createElementBlock)("div",{key:1,class:"control-item control-stop",onClick:function(n){return e.openCurtainClid(t,3)}},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("page-officehome","curtain_stop.svg"),alt:""},null,8,mc)],8,sc)):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["control-item",2==t.activeIndex?"control-item-active":""]),onClick:function(n){return e.openCurtainClid(t,2)}},[2!=t.activeIndex?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[4!==t.equipmentType&&5!==t.equipmentType?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("page-officehome","curtain_right.svg"),alt:""},null,8,dc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_up.svg"),alt:""},null,8,pc))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",fc,Object(o.toDisplayString)(t.count),1))],10,uc)])])})),128))])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)}],["__scopeId","data-v-1219f778"]])),{class:"curtain-temp"}),hc={class:"curtain-tep-top"},jc={class:"bright-box"},vc={class:"bight-text"},Tc=bc((function(){return Object(o.createElementVNode)("span",null,"设定开度",-1)})),kc=bc((function(){return Object(o.createElementVNode)("span",{class:"line"},null,-1)})),Ic={class:"text-aper"},yc={class:"curtain-control"},Sc={class:"bight-slider",id:"curtainSlider1"},Cc=bc((function(){return Object(o.createElementVNode)("div",{class:"slider-bar",id:"curtainHandld1"},null,-1)})),wc=bc((function(){return Object(o.createElementVNode)("div",{class:"temp-left"},"关",-1)})),Dc=bc((function(){return Object(o.createElementVNode)("div",{class:"temp-right"},"开",-1)})),Ec={class:"curtain-control top-control"},xc=["src"],Nc=["src"],Vc={key:1,class:"count-num"},Bc=bc((function(){return Object(o.createElementVNode)("span",{class:"title"},"关闭",-1)})),Lc=["src"],Ac=bc((function(){return Object(o.createElementVNode)("span",{class:"title"},"暂停",-1)})),qc=["src"],Mc=["src"],Wc={key:1,class:"count-num"},Fc=bc((function(){return Object(o.createElementVNode)("span",{class:"title"},"打开",-1)})),Uc=Object(o.defineComponent)({props:{curtainData:{type:Array,default:function(){return[]}}},components:{Switch:Q},setup:function(e,t){var n=Object(o.reactive)({lampSw:!1,itemWidth:"0%",apertureVal:0,activeIndex:0,count:2,parseImgUrl:me.y,curtainObj:{},curtainData:e.curtainData,curtainItem:"",endBoxSwiper:function(){var e,t=document.querySelector("#curtainHandld1"),a=document.querySelector("#curtainSlider1"),o=!1,c=0,r=a?a.offsetWidth:1;t&&(e=t.getBoundingClientRect().width,t.addEventListener("touchstart",(function(e){c=isNaN(parseInt(t.style.left))?0:parseInt(t.style.left),o=!0})),t.addEventListener("touchend",(function(e){o=!1,n.formateCurtainData(4)})),le(t,{swipeLeft:function(a){o&&(c=Math.abs(c),a=Math.abs(a.mation.moveX-a.mation.startX),a=(a=c-a)<0?0:a,t.style.left=a+"px",n.itemWidth=a+e/2+"px",n.apertureVal=a/(r-e)*100,n.apertureVal=Math.floor(n.apertureVal))},swipeRight:function(a){o&&(c=Math.abs(c),a=Math.abs(a.mation.moveX-a.mation.startX),a=r-e<=(a=c+a)?r-e:a,t.style.left=a+"px",n.itemWidth=a+e/2+"px",n.apertureVal=a/(r-e)*100,n.apertureVal=Math.floor(n.apertureVal))}}))},interval:{},countInterval:function(){n.interval=setInterval((function(){n.count--,0==n.count&&(n.count=2,n.activeIndex=0,clearInterval(n.interval))}),1e3)},openCurtainMain:function(e){n.activeIndex==e&&0!==n.count||(n.activeIndex=e,n.count=2,n.countInterval(),n.formateCurtainData(e))},formateValue:function(e){return 1==e?0:2==e?1:2},formateCurtainData:function(e){var t=[],a=0;a=1==e?0:2==e?1:3==e?2:n.apertureVal;n.curtainData.map((function(n){n={id:n.equipId,code:4==e?"EquipOpeningSet":"EquipSwitchSet",value:a},t.push(n)})),n.changeCurtainStatus(t)},changeCurtainStatus:function(e){Object(ue.R)(e).then((function(e){}))},barSwiperInit:function(){return Object(M.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(o.nextTick)((function(){n.endBoxSwiper()}));case 1:case"end":return e.stop()}}),e)})))()}});return Object(o.watch)(e,(function(e){})),Object(o.onBeforeUnmount)((function(){})),Object(o.onMounted)((function(){n.curtainObj=n.curtainData[0],n.barSwiperInit()})),Object(q.a)({},Object(o.toRefs)(n))}}),_c=(Uc=(n("4dd8"),pe()(Uc,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Oc,[Object(o.createElementVNode)("div",hc,[Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.curtainData&&1<e.curtainData.length?"窗帘":e.curtainObj.name),1)]),Object(o.createElementVNode)("div",jc,[Object(o.createElementVNode)("div",vc,[Tc,kc,Object(o.createElementVNode)("span",Ic,Object(o.toDisplayString)(e.apertureVal)+"%",1)]),Object(o.createElementVNode)("div",yc,[Object(o.createElementVNode)("div",Sc,[Object(o.createElementVNode)("div",{class:"item-now",style:Object(o.normalizeStyle)({width:e.itemWidth})},null,4),Cc,wc,Dc])])]),Object(o.createElementVNode)("div",Ec,[Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["control-item",1==e.activeIndex?"control-item-active":""]),onClick:t[0]||(t[0]=function(t){return e.openCurtainMain(1)})},[1!=e.activeIndex?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[4!=e.curtainObj.equipmentType&&5!=e.curtainObj.equipmentType?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,class:"curtain-left-icon",src:e.parseImgUrl("page-officehome","curtain_left.svg"),alt:""},null,8,xc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,class:"curtain-down-icon",src:e.parseImgUrl("page-officehome","curtain_down.svg"),alt:""},null,8,Nc))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",Vc,Object(o.toDisplayString)(e.count),1)),Bc],2),Object(o.createElementVNode)("div",{class:"control-item control-stop",onClick:t[1]||(t[1]=function(t){return e.openCurtainMain(3)})},[Object(o.createElementVNode)("img",{class:"curtain-stop-icon",src:e.parseImgUrl("page-officehome","curtain_stop.svg"),alt:""},null,8,Lc),Ac]),Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["control-item",2==e.activeIndex?"control-item-active":""]),onClick:t[2]||(t[2]=function(t){return e.openCurtainMain(2)})},[2!=e.activeIndex?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[4!=e.curtainObj.equipmentType&&5!=e.curtainObj.equipmentType?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("page-officehome","curtain_right.svg"),alt:""},null,8,qc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,class:"curtain-up-icon",src:e.parseImgUrl("page-officehome","curtain_up.svg"),alt:""},null,8,Mc))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",Wc,Object(o.toDisplayString)(e.count),1)),Fc],2)])])}],["__scopeId","data-v-6a5e24b3"]])),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)}))),Rc={class:"btns"};n("ddb0");var Pc=n("f253"),Hc=(Pc=(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:Pc.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(me.i)();var o=0,c=0;if(e.cusStartTime&&t+2<e.cusStartTime)o=t+1,c=e.cusStartTime;else if(e.cusStartTime&&t+2>=e.cusStartTime)o=t>e.cusEndTime?t+1:e.cusEndTime+1,c=24;else{if(e.cusStartTime)return;o=t+1,c=24}for(var r=o;r<c+1;r++){var i={label:"".concat(r,":00"),value:r};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(Vn.a)("请选择时间")},setWorkOverTime:function(){var n=Object(me.b)();"明天"===a.checkValues[0]&&(n=Object(me.s)());var o=(o=a.checkValues[1]).replace(":","");n={projectId:e.projectId,objectId:e.spaceId,endDate:n,endTime:o+"00",type:2};Object(ue.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(q.a)({picker:n},Object(o.toRefs)(a))}})),Pc=(n("0970"),pe()(Pc,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("van-picker");return Object(o.openBlock)(),Object(o.createElementBlock)("div",null,[_c,(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",Rc,[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"}),zc={class:"nav-left"},Xc=["onClick"],Yc=["src"],Gc=["src"],Kc={class:"nav-right"},Jc=["onClick"],Zc=["src"],$c=["src"],Qc=Object(o.defineComponent)({props:{navList:{type:Array,default:function(){return[]}}},setup:function(e,t){Object(it.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(q.a)({},Object(o.toRefs)(n))}}),er=(Qc=(n("e337"),pe()(Qc,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Hc,[Object(o.createElementVNode)("div",zc,[(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,Yc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:t.img,alt:""},null,8,Gc))],10,Xc)),[[o.vShow,n<3&&t.noShow]])})),128))]),Object(o.createElementVNode)("div",Kc,[(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,Zc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:t.img,alt:""},null,8,$c))],10,Jc)),[[o.vShow,3<=n&&t.noShow]])})),128))])])}],["__scopeId","data-v-67166e33"]])),{class:"scene-dailog"}),tr={class:"title"},nr={class:"dailog-content"},ar=["src"],or={class:"status-text1"},cr=Object(o.createTextVNode)(" 切换至 "),rr=Object(o.createTextVNode)(" 场景 "),ir=Object(o.createTextVNode)("切换中..."),lr={key:1,class:"status-text2"},sr={key:0},mr=Object(o.createTextVNode)("我知道了"),ur=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:me.y,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(q.a)({},Object(o.toRefs)(n))}}),dr=(ur=(n("5c73"),pe()(ur,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("van-loading"),l=Object(o.resolveComponent)("buttons");return Object(o.openBlock)(),Object(o.createElementBlock)("div",er,[Object(o.createElementVNode)("div",tr,Object(o.toDisplayString)(e.secenaroStatus.localName),1),Object(o.createElementVNode)("div",nr,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","taolun-big.svg")},null,8,ar),Object(o.createElementVNode)("span",or,[cr,Object(o.createElementVNode)("i",null,Object(o.toDisplayString)(e.secenaroStatus.sceneName),1),rr]),e.secenaroStatus.loading?(Object(o.openBlock)(),Object(o.createBlock)(i,{key:0,class:"status-text2"},{default:Object(o.withCtx)((function(){return[ir]})),_:1})):Object(o.createCommentVNode)("",!0),e.secenaroStatus.loading?Object(o.createCommentVNode)("",!0):(Object(o.openBlock)(),Object(o.createElementBlock)("span",lr,[e.secenaroStatus.lodingText?(Object(o.openBlock)(),Object(o.createElementBlock)("span",sr," 已为您切换至适宜"+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[mr]})),_:1},8,["onClick"])])}],["__scopeId","data-v-f8a217b2"]])),n("cda6")),pr={class:"map-home map-home-pading"},fr={class:"map-top"},br={class:"space-home"},gr={class:"com-search"},Or={class:"search-icon"},hr=["src"],jr={class:"space-box"},vr=["onClick"];function Tr(e){return Object(o.pushScopeId)("data-v-b4fb4e34"),e=e(),Object(o.popScopeId)(),e}var kr=n("d961"),Ir=(kr=(n("5852"),Object(o.defineComponent)({props:{spaceData:{type:Array,default:function(){return[]}},spaceInfo:{type:Object,default:function(){}}},components:{vanSearch:kr.a},setup:function(e,t){Object(it.d)();var n=Object(me.t)(),a=(Object(lt.b)(),Object(o.reactive)({parseImgUrl:me.y,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(ue.N)(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(q.a)({},Object(o.toRefs)(a))}})),kr=(n("f1fd"),pe()(kr,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("van-search");return Object(o.openBlock)(),Object(o.createElementBlock)("div",br,[Object(o.createElementVNode)("div",gr,[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",Or,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("search-icon","search-icon.svg"),alt:""},null,8,hr)])]),Object(o.createElementVNode)("div",jr,[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,vr)})),128)):Object(o.createCommentVNode)("",!0)])])}],["__scopeId","data-v-4b041186"]])),n("772a")),yr=(n("38d5"),n("565f")),Sr=(n("be7f"),n("34e9")),Cr=(n("0653"),n("b650")),wr=(Ir=(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:Ir.a,vanField:yr.b,CellGroup:Sr.a,vanButton:Cr.b,SpaceBox:kr,MapBox:Ft.a},setup:function(e,t){Object(it.d)(),Object(lt.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(ue.o)(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(q.a)({},Object(o.toRefs)(n))}})),yr=(n("fe6d"),pe()(Ir,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("map-box"),l=Object(o.resolveComponent)("space-box");return Object(o.openBlock)(),Object(o.createElementBlock)("div",pr,[Object(o.createElementVNode)("div",fr,[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"}),Dr={class:"light-tep-top"},Er={key:0,class:"bright-box"},xr={class:"bight-text"},Nr=Tr((function(){return Object(o.createElementVNode)("span",null,"亮度",-1)})),Vr={class:"light-control"},Br={class:"bight-slider",id:"sliderId1"},Lr=Tr((function(){return Object(o.createElementVNode)("div",{class:"slider-bar",id:"handId1"},null,-1)})),Ar={key:1,class:"bright-box"},qr={class:"bight-text"},Mr=Tr((function(){return Object(o.createElementVNode)("span",null,"色温",-1)})),Wr=Tr((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)}));function Fr(e){return Object(o.pushScopeId)("data-v-7c23f336"),e=e(),Object(o.popScopeId)(),e}Sr=Object(o.defineComponent)({props:{lightData:{type:Object,default:function(){}}},components:{Switch:Q},setup:function(e,t){var n=Object(o.reactive)({lampSw:!1,itemWidth:"0%",lightData:e.lightData,swiperIinit:!1,setSpaceContrl:function(e){Object(ue.R)(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 c;n.setLightDataMax(),1==e?(c=n.lightData.brightMaxValue-n.lightData.brightMinValue,n.lightData.brightValueRate=a*(c/(t-o))*(c=100/c),n.lightData.brightValueRate=Math.floor(n.lightData.brightValueRate),98<=n.lightData.brightValueRate||n.lightData.brightValueRate,n.lightData.brightValue=n.lightData.brightValueRate*c,n.itemWidth=a+o/2+"px"):2==e&&(c=n.lightData.colorTempMaxValue-n.lightData.colorTempMinValue,n.lightData.colorTempValueRate=a*(c/(t-o))*(e=100/c),n.lightData.colorTempValueRate=Math.floor(n.lightData.colorTempValueRate),n.lightData.colorTempValue=n.lightData.colorTempValueRate*e)},getDefaultVal:function(e,t,a,o){var c,r,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),c=n.lightData.brightMaxValue/(t-a),r=100/n.lightData.brightMaxValue,i=n.lightData.brightValue/r/c/r,n.lightData.brightValueRate=Math.floor(n.lightData.brightValue/r),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),c=n.lightData.colorTempMaxValue/(t-a),r=100/n.lightData.colorTempMaxValue,i=n.lightData.colorTempValue/r/c/r,n.lightData.colorTempValueRate=Math.floor(n.lightData.colorTempValue/r)),o.style.left=i+"px"},endBoxSwiper:function(){n.swiperIinit=!0;var e,t=document.querySelector("#handId1"),a=document.querySelector("#sliderId1"),o=!1,c=0,r=a?a.offsetWidth:1;t&&(e=t.getBoundingClientRect().width,n.getDefaultVal(1,r,e,t),t.addEventListener("touchstart",(function(e){c=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)})),le(t,{swipeLeft:function(a){o&&(c=Math.abs(c),a=Math.abs(a.mation.moveX-a.mation.startX),a=(a=c-a)<0?0:a,t.style.left=a+"px",n.setBarValue(1,r,a,e),n.changContrlVal(1))},swipeRight:function(a){o&&(c=Math.abs(c),a=Math.abs(a.mation.moveX-a.mation.startX),a=r-e<=(a=c+a)?r-e:a,t.style.left=a+"px",n.setBarValue(1,r,a,e),n.changContrlVal(1))}}))},tempBoxSwiper:function(){n.swiperIinit=!0;var e,t=document.querySelector("#handId2"),a=document.querySelector("#sliderId2"),o=!1,c=0,r=a?a.offsetWidth:1;t&&(e=t.getBoundingClientRect().width,n.getDefaultVal(2,r,e,t),t.addEventListener("touchstart",(function(e){c=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)})),le(t,{swipeLeft:function(a){o&&(c=Math.abs(c),a=Math.abs(a.mation.moveX-a.mation.startX),a=(a=c-a)<0?0:a,t.style.left=a+"px",n.setBarValue(2,r,a,e),n.changContrlVal(2))},swipeRight:function(a){o&&(c=Math.abs(c),a=Math.abs(a.mation.moveX-a.mation.startX),a=r-e<=(a=c+a)?r-e:a,t.style.left=a+"px",n.setBarValue(2,r,a,e),n.changContrlVal(2))}}))},barSwiperInit:function(){return Object(M.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(q.a)({},Object(o.toRefs)(n))}}),n("4235"),Cr=pe()(Sr,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",wr,[Object(o.createElementVNode)("div",Dr,[Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.lightData.localName),1)]),e.lightData.bright?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Er,[Object(o.createElementVNode)("div",xr,[Nr,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.lightData.brightValueRate)+"%",1)]),Object(o.createElementVNode)("div",Vr,[Object(o.createElementVNode)("div",Br,[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",Ar,[Object(o.createElementVNode)("div",qr,[Mr,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.lightData.colorTempValueRate)+"%",1)]),Wr])):Object(o.createCommentVNode)("",!0)])}],["__scopeId","data-v-b4fb4e34"]]);var Ur={class:"light-temp"},_r=Fr((function(){return Object(o.createElementVNode)("div",{class:"light-tep-top"},[Object(o.createElementVNode)("span",null,"地暖")],-1)})),Rr={class:"bright-box"},Pr={class:"bight-text"},Hr=Fr((function(){return Object(o.createElementVNode)("span",null,"温度调节",-1)})),zr={class:"control-box"},Xr={class:"temp-slider",id:"slideFloorId2"},Yr=Fr((function(){return Object(o.createElementVNode)("div",{class:"slider-bar",id:"barFloorId2"},[Object(o.createElementVNode)("div",{class:"bar-circle",id:"handFloorId2"})],-1)})),Gr={class:"temp-left",id:"tempLeftId"},Kr={class:"temp-right"};function Jr(e){return Object(o.pushScopeId)("data-v-572df90f"),e=e(),Object(o.popScopeId)(),e}kr=Object(o.defineComponent)({props:{floorData:{type:Object,default:function(){}}},components:{Switch:Q},setup:function(e,t){var n=Object(o.reactive)({lampSw:!1,itemWidth:"0%",realTemp:0,part:0,floorData:e.floorData,swiperIinit:!1,changeChildTemp:function(){var e=[],t={id:n.floorData.id,code:n.floorData.tempSetCode,value:n.realTemp};e.push(t),n.setSpaceCondtioners(e)},setSpaceCondtioners:function(e){Object(ue.R)(e).then((function(e){})).catch((function(){Object(Vn.a)("连接异常,请检查网络!")}))},getEleWidth:function(e){return e?e.getBoundingClientRect().width:1},sliderPading:0,endBoxSwiper:function(){n.swiperIinit=!0;var e=document.querySelector("#handFloorId2"),t=document.querySelector("#barFloorId2"),a=document.querySelector("#slideFloorId2"),o=document.querySelector("#tempLeftId"),c=(o=n.getEleWidth(o),n.sliderPading=o,!1),r=0,i=n.getEleWidth(a),l=(o=n.getEleWidth(t),a=(1<i&&(i-=o),(n.floorData.maxTempSet-n.floorData.minTempSet)/i),a);n.part=l,e&&(e.addEventListener("touchstart",(function(e){r=isNaN(parseInt(t.style.left))?0:parseInt(t.style.left),c=!0})),e.addEventListener("touchend",(function(e){c=!1,n.changeChildTemp()})),le(e,{swipeLeft:function(e){c&&(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",n.realTemp=e*l+n.floorData.minTempSet,n.realTemp&&(n.realTemp=n.realTemp.toFixed(1),n.realTemp=Object(me.a)(n.realTemp)))},swipeRight:function(e){c&&(r=Math.abs(r),e=Math.abs(e.mation.moveX-e.mation.startX),e=i<(e=r+e)?i:e,t.style.left=e+"px",n.realTemp=e*l+n.floorData.minTempSet,n.realTemp&&(n.realTemp=n.realTemp.toFixed(1),n.realTemp=Object(me.a)(n.realTemp)))}}))},setBarNowPerstion:function(){n.realTemp=n.floorData&&n.floorData.tempSet?n.floorData.tempSet:0;var e,t,a=document.querySelector("#barFloorId2");a&&(t=document.querySelector("#slideFloorId2"),0!==n.realTemp&&n.realTemp>=n.floorData.minTempSet&&n.realTemp<=n.floorData.maxTempSet?(e=(n.realTemp-n.floorData.minTempSet)/n.part,e=Math.floor(e)+n.sliderPading,a&&(a.style.left=e+"px")):!n.realTemp||n.realTemp<n.floorData.minTempSet?a.style.left=n.sliderPading+"px":n.realTemp>n.floorData.maxTempSet&&(e=t.offsetWidth,t=a.offsetWidth,a.style.left=e-t+"px"))},barSwiperInit:function(){return Object(M.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.setBarNowPerstion()}));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(q.a)({},Object(o.toRefs)(n))}}),n("eabd"),Ir=pe()(kr,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Ur,[_r,Object(o.createElementVNode)("div",Rr,[Object(o.createElementVNode)("div",Pr,[Hr,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.realTemp||"--")+"℃",1)]),Object(o.createElementVNode)("div",zr,[Object(o.createElementVNode)("div",Xr,[Yr,Object(o.createElementVNode)("div",Gr,Object(o.toDisplayString)(e.floorData.minTempSet),1),Object(o.createElementVNode)("div",Kr,Object(o.toDisplayString)(e.floorData.maxTempSet),1)])])])])}],["__scopeId","data-v-7c23f336"]]);var Zr={class:"air"},$r={class:"child-title"},Qr={class:"child-box"},ei={key:0,class:"air-control"},ti={class:"air-title"},ni=Jr((function(){return Object(o.createElementVNode)("div",null,"温度设定",-1)})),ai=Jr((function(){return Object(o.createElementVNode)("div",null,null,-1)})),oi={class:"control-box"},ci={class:"temp-slider",id:"chlidAirSliderId"},ri=Jr((function(){return Object(o.createElementVNode)("div",{class:"slider-bar",id:"chlidAirBarId"},[Object(o.createElementVNode)("div",{class:"bar-circle",style:{border:"2px solid rgba(246, 249, 254, 1)"}})],-1)})),ii={class:"temp-left"},li={class:"temp-right"},si={key:1,class:"air-control"},mi={class:"air-title"},ui=Jr((function(){return Object(o.createElementVNode)("div",null,"风速",-1)})),di=Jr((function(){return Object(o.createElementVNode)("div",null,null,-1)})),pi={class:"volume-box"},fi={class:"number"},bi={class:"control-box control-box-padding"},gi={class:"icon-box"},Oi=["src"],hi=Jr((function(){return Object(o.createElementVNode)("span",null,"调小",-1)})),ji={class:"icon-box"},vi=["src"],Ti=Jr((function(){return Object(o.createElementVNode)("span",null,"调大",-1)})),ki={class:"icon-box"},Ii=["src"],yi=Jr((function(){return Object(o.createElementVNode)("span",null,"自动",-1)})),Si={key:2,class:"air-control"},Ci={class:"air-title"},wi=Jr((function(){return Object(o.createElementVNode)("div",null,"模式",-1)})),Di=Jr((function(){return Object(o.createElementVNode)("div",null,null,-1)})),Ei={key:0},xi={key:1},Ni={key:2},Vi={class:"control-box control-box-padding"},Bi={class:"icon-box"},Li=["src"],Ai=Jr((function(){return Object(o.createElementVNode)("span",null,"制冷",-1)})),qi={class:"icon-box"},Mi=["src"],Wi=Jr((function(){return Object(o.createElementVNode)("span",null,"制热",-1)})),Fi={class:"icon-box"},Ui=["src"],_i=Jr((function(){return Object(o.createElementVNode)("span",null,"通风",-1)})),Ri=(Sr=Object(o.defineComponent)({props:{temperature:{type:Number,default:function(){return 0}},airData:{type:Object,default:function(){}},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(W.a)({Switch:Q},Z.a.Component.name,Z.a.Component),setup:function(e,t){var n=Object(o.reactive)({seviceEquipmentList:e.seviceEquipmentList,lightColorImg:Object(me.y)("page-officehome","lightColorControl.svg"),navType:"all",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,airData:e.airData,realTemp:16,temperature:e.temperature,userIsControl:e.userIsControl,forceOverTimeFlag:e.forceOverTimeFlag,firstLoadingAir:!0,domAirOpeen:!1,swiperIinit:!1,parseImgUrl:me.y,part:1,modeName:"",showAirVolumeBtn:!1,showDialog:!1,airTimer:null,airSetText:{notice:"",remark:[],nowImg:"",toWhere:"",designTemperature:0},setBarNowPerstion:function(){n.realTemp=n.airTemp;var e,t,a=document.querySelector("#chlidAirBarId");a&&(t=document.querySelector("#chlidAirSliderId"),n.airTemp>=n.airData.minTempSet&&n.airTemp<=n.airData.maxTempSet?(e=(n.airTemp-n.airData.minTempSet)/n.part,e=Math.floor(e),a&&(a.style.left=e+"px")):!n.airTemp||n.airTemp<n.airData.minTempSet?a.style.left="0px":n.airTemp>n.airData.maxTempSet&&(e=t.offsetWidth,t=a.offsetWidth,a.style.left=e-t+n.sliderPading+"px"))},getEleWidth:function(e){return e?e.getBoundingClientRect().width:1},endBoxSwiper:function(){n.swiperIinit=!0;var e=document.querySelector("#chlidAirBarId"),t=document.querySelector("#chlidAirBarId"),a=document.querySelector("#chlidAirSliderId"),o=!1,c=0,r=(n.sliderPading=2,n.getEleWidth(a)),i=(a=n.getEleWidth(t),a=(1<r&&(r-=a),(n.airData.maxTempSet-n.airData.minTempSet)/r),a);n.part=a,e&&(e.addEventListener("touchstart",(function(e){c=isNaN(parseInt(t.style.left))?0:parseInt(t.style.left),o=!0})),e.addEventListener("touchend",(function(e){o=!1,n.changeZongAir("temp",n.realTemp),n.airTemp=n.realTemp})),le(e,{swipeLeft:function(e){o&&(c=Math.abs(c),e=Math.abs(e.mation.moveX-e.mation.startX),e=(e=c-e)<0?0:e,t.style.left=e+"px",n.realTemp=e*i+n.airData.minTempSet,n.realTemp&&(n.realTemp=n.realTemp.toFixed(1),n.realTemp=Object(me.a)(n.realTemp)))},swipeRight:function(e){o&&(c=Math.abs(c),e=Math.abs(e.mation.moveX-e.mation.startX),e=r<(e=c+e)?r:e,n.realTemp=e*i+n.airData.minTempSet,n.realTemp&&(n.realTemp=n.realTemp.toFixed(1),n.realTemp=Object(me.a)(n.realTemp)),t.style.left=e+n.sliderPading+"px")}}))},getTimerLen:function(){var e="",t=15;return(e=n.equipList&&n.equipList.length?n.equipList[0].equipmentCategory:e)&&"ACATVI"==e?15:t},switchTimer:null,formatAirData:function(e,t){var a={};if("temp"==e&&(a.codeKey="tempSetCode",a.value=t),"gear"==e&&"windLow"==t){if(!(1<n.airData.gear))return;n.airData.gear--,n.airData.isAutoGear=0,a.value=n.airData.gear,a.codeKey="gearCode"}if("gear"==e&&"windUp"==t){if(!(n.airData.gear<3))return;n.airData.gear++,n.airData.isAutoGear=0,a.value=n.airData.gear,a.codeKey="gearCode"}return"gear"==e&&"auto"==t&&(n.airData.isAutoGear=n.airData.isAutoGear?0:1,a.value=n.airData.isAutoGear?4:n.airData.gear,a.codeKey="gearCode"),"mode"==e&&(n.airData.workMode=t,a.codeKey="modeSetCode",a.value=t),a},loadingStart:function(){n.cotrolLoading=!0},loadinngEnd:function(){n.cotrolLoading=!1},setSpaceCondtioners:function(e){Object(ue.R)(e).then((function(e){n.loadinngEnd()})).catch((function(){n.loadinngEnd(),Object(Vn.a)("连接异常,请检查网络!")}))},changeZongAir:function(e,t){e=n.formatAirData(e,t);e&&e.codeKey&&(t={id:n.airData.id,code:n.airData[e.codeKey],value:e.value},(e=[]).push(t),n.cotrolLoading||(n.loadingStart(),n.setSpaceCondtioners(e)))},barSwiperInit:function(){return Object(M.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.endBoxSwiper(),n.setBarNowPerstion();case 2:case"end":return e.stop()}}),e)})))()}});return Object(o.onBeforeUnmount)((function(){})),Object(o.onMounted)((function(){n.airTemp=e.airData.tempSet,Object(o.nextTick)((function(){n.barSwiperInit()}))})),Object(q.a)({},Object(o.toRefs)(n))}}),kr=(n("560d"),n("eb51"),pe()(Sr,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Zr,[Object(o.createElementVNode)("div",$r,Object(o.toDisplayString)(e.airData.localName),1),Object(o.createElementVNode)("div",Qr,[e.airData.boundPoint&&e.airData.boundPoint.tempSetBound?(Object(o.openBlock)(),Object(o.createElementBlock)("div",ei,[Object(o.createElementVNode)("div",ti,[ni,ai,Object(o.createElementVNode)("div",null,Object(o.toDisplayString)(e.realTemp)+"℃",1)]),Object(o.createElementVNode)("div",oi,[Object(o.createElementVNode)("div",ci,[ri,Object(o.createElementVNode)("div",ii,Object(o.toDisplayString)(e.airData.minTempSet),1),Object(o.createElementVNode)("div",li,Object(o.toDisplayString)(e.airData.maxTempSet),1)])])])):Object(o.createCommentVNode)("",!0),e.airData.boundPoint&&e.airData.boundPoint.gearSetBound?(Object(o.openBlock)(),Object(o.createElementBlock)("div",si,[Object(o.createElementVNode)("div",mi,[ui,di,Object(o.createElementVNode)("div",null,[Object(o.createElementVNode)("div",pi,[Object(o.createElementVNode)("div",fi,[(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))])])])]),Object(o.createElementVNode)("div",bi,[Object(o.createElementVNode)("div",gi,[Object(o.createElementVNode)("div",{class:"icon-item",style:Object(o.normalizeStyle)({opacity:e.airData.gear<=1?"0.6":1}),onClick:t[0]||(t[0]=function(t){return e.changeZongAir("gear","windLow")})},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","wind_small.svg")},null,8,Oi)],4),hi]),Object(o.createElementVNode)("div",ji,[Object(o.createElementVNode)("div",{class:"icon-item",style:Object(o.normalizeStyle)({opacity:3<=e.airData.gear?"0.6":1}),onClick:t[1]||(t[1]=function(t){return e.changeZongAir("gear","windUp")})},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","wind_big.svg")},null,8,vi)],4),Ti]),Object(o.createElementVNode)("div",ki,[Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["icon-item",e.airData.isAutoGear?"active-color":""]),onClick:t[2]||(t[2]=function(t){return e.changeZongAir("gear","auto")})},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","A.svg")},null,8,Ii)],2),yi])])])):Object(o.createCommentVNode)("",!0),e.airData.boundPoint&&e.airData.boundPoint.modeSetBound?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Si,[Object(o.createElementVNode)("div",Ci,[wi,Di,1===e.airData.workMode?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ei,"制冷")):2===e.airData.workMode?(Object(o.openBlock)(),Object(o.createElementBlock)("div",xi,"制热")):(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ni,"通风"))]),Object(o.createElementVNode)("div",Vi,[Object(o.createElementVNode)("div",Bi,[Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["icon-item",1===e.airData.workMode?"active-color":""]),onClick:t[3]||(t[3]=function(t){return e.changeZongAir("mode",1)})},[Object(o.createElementVNode)("img",{src:2===e.airData.workMode?e.parseImgUrl("ipdImages","aircoldblue.svg"):e.parseImgUrl("ipdImages","aircoldblack.svg")},null,8,Li)],2),Ai]),Object(o.createElementVNode)("div",qi,[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:1===e.airData.workMode?e.parseImgUrl("ipdImages","airsunred.svg"):e.parseImgUrl("ipdImages","airsunblack.svg")},null,8,Mi)],2),Wi]),Object(o.createElementVNode)("div",Fi,[Object(o.createElementVNode)("div",{class:Object(o.normalizeClass)(["icon-item",3===e.airData.workMode?"active-color":""]),onClick:t[5]||(t[5]=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,Ui)],2),_i])])])):Object(o.createCommentVNode)("",!0)])])}],["__scopeId","data-v-572df90f"]])),{key:0,class:"socket-box"}),Pi={class:"socket-top"},Hi={class:"socket-desc"},zi=function(e){return Object(o.pushScopeId)("data-v-4e4af746"),e=e(),Object(o.popScopeId)(),e}((function(){return Object(o.createElementVNode)("p",{class:"socket-title"},"智能插座",-1)})),Xi={key:0,class:"socket-status"},Yi={key:1,class:"socket-status"},Gi={class:"socket-right"},Ki=["src"],Ji=["src"],Zi={class:"top-switch"},$i={key:0,class:"top-nav"},Qi={key:1},el={class:"child-item"},tl=(Sr=Object(o.defineComponent)({props:{temperature:{type:Number,default:function(){return 0}},showSocket:{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(W.a)({Switch:Q},Z.a.Component.name,Z.a.Component),setup:function(e,t){Object(it.c)();var n=Object(o.reactive)({parseImgUrl:me.y,distroyFlag:!1,showSocket:e.showSocket,navType:"all",projectId:e.projectId,spaceId:e.spaceId,socketData:{isOpen:!1},checkNav:function(){n.navType=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"all"},getTimerLen:function(){return 15},loadingTimer:null,loadingNum:0,setLoadingNumber:function(){var e=n.getTimerLen();n.loadingTimer=setInterval((function(){n.loadingNum++,n.loadingNum>=e&&(clearInterval(n.loadingTimer),n.loadingTimer=null,n.loadingNum=0,n.getSocketTimer(0))}),1e3)},updateLoadingNum:function(){clearTimeout(n.socketTimer),n.socketTimer=null,n.loadingNum=1,n.loadingTimer||n.setLoadingNumber()},socketTimer:null,getSocketTimer:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:15e3,t=Object(me.o)();15e3==e&&t<"070000"&&"200000"<t&&(e=3e5),n.socketTimer&&(clearTimeout(n.socketTimer),n.socketTimer=null),n.socketTimer=setTimeout((function(){n.distroyFlag||n.loadingNum||n.querySocketInfo()}),e)},querySocketInfo:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t={spaceId:n.spaceId,equipType:"socket"};t=Object(me.B)(t);Object(ue.J)(t).then((function(t){t=t.data||{},n.socketData=t,n.socketData&&n.socketData.runStatus&&(n.socketData.isOpen=!0),n.socketData&&n.socketData.equipList&&n.socketData.equipList.length&&n.socketData.equipList.map((function(e){e.isOpen=!!e.runStatus})),0==e&&n.getSocketTimer()})).catch((function(){0==e&&n.getSocketTimer()}))},updateParentSwitch:function(){var e=!1;n.socketData.equipList.map((function(t){t.isOpen&&(e=!0)})),n.socketData.isOpen=e},updateChildSwitch:function(){n.socketData.equipList.map((function(e){e.isOpen=n.socketData.isOpen}))},socketControl:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,a=(n.updateLoadingNum(),[]);"all"==e?(n.socketData.isOpen=!n.socketData.isOpen,n.socketData&&n.socketData.equipList&&n.socketData.equipList.length&&(n.updateChildSwitch(),n.socketData.equipList.map((function(e){e={id:e.id,code:e.switchCode,value:n.socketData.isOpen?1:0},a.push(e)})))):"child"==e&&(t.isOpen=!t.isOpen,e={id:t.id,code:t.switchCode,value:t.isOpen?1:0},a.push(e),n.updateParentSwitch()),n.setSpaceCondtioners(a)},setSpaceCondtioners:function(e){Object(ue.R)(e).then((function(e){})).catch((function(){Object(Vn.a)("连接异常,请检查网络!")}))}});return Object(o.watch)([function(){return e},function(){return e.spaceId}],(function(e,t){e[0]&&(n.showSocket=e[0].showSocket),e[1]&&e[1]!=t[1]&&(n.distroyFlag=!1,n.spaceId=e[1],n.querySocketInfo())}),{deep:!0,immediate:!0}),Object(o.onBeforeUnmount)((function(){n.distroyFlag=!0,clearTimeout(n.socketTimer),n.socketTimer=null})),Object(o.onMounted)((function(){n.distroyFlag=!1,n.querySocketInfo(1)})),Object(q.a)({},Object(o.toRefs)(n))}}),Q=(n("157e"),pe()(Sr,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("Switch");return e.socketData&&e.socketData.equipList&&e.socketData.equipList.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ri,[Object(o.createElementVNode)("div",Pi,[Object(o.createElementVNode)("div",Hi,[zi,e.socketData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("p",Xi,"插座已开启")):(Object(o.openBlock)(),Object(o.createElementBlock)("p",Yi,"插座已关闭"))]),Object(o.createElementVNode)("div",Gi,[e.socketData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("ipdImages","socket-active.svg"),alt:""},null,8,Ki)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("ipdImages","socket.svg"),alt:""},null,8,Ji))])]),Object(o.createElementVNode)("div",Zi,[e.socketData&&e.socketData.equipList&&1<e.socketData.equipList.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",$i,[Object(o.createElementVNode)("span",{class:Object(o.normalizeClass)("all"==e.navType?"nav-active":""),onClick:t[0]||(t[0]=function(t){return e.checkNav("all")})}," 总控制 ",2),Object(o.createElementVNode)("span",{class:Object(o.normalizeClass)("child"==e.navType?"nav-active":""),onClick:t[1]||(t[1]=function(t){return e.checkNav("child")})}," 子设备 ",2)])):(Object(o.openBlock)(),Object(o.createElementBlock)("div",Qi)),"all"==e.navType?(Object(o.openBlock)(),Object(o.createBlock)(i,{key:2,class:"switch-btn",size:23,onClick:t[2]||(t[2]=function(t){return e.socketControl("all")}),"inactive-color":"rgba(196, 196, 196, 0.4)","model-value":e.socketData.isOpen},null,8,["model-value"])):Object(o.createCommentVNode)("",!0)]),"child"==e.navType?(Object(o.openBlock)(!0),Object(o.createElementBlock)(o.Fragment,{key:0},Object(o.renderList)(e.socketData.equipList,(function(t){return Object(o.openBlock)(),Object(o.createElementBlock)("div",{class:"socket-child",key:t.id},[Object(o.createElementVNode)("div",el,[Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(t.localName),1),Object(o.createVNode)(i,{class:"switch-btn",onClick:function(n){return e.socketControl("child",t)},"model-value":t.isOpen,"inactive-color":"rgba(196, 196, 196, 0.4)",size:23},null,8,["onClick","model-value"])])])})),128)):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)}],["__scopeId","data-v-4e4af746"]])),Sr=n("e41f"),n("8a58"),n("66d6")),nl=n("6a79"),al=n("5581");yr=Object(o.defineComponent)({components:(Ft={MapBox:Ft.a,ComMap:yr,ScenarioDailog:ur,LightTemp:Cr,Header:Jt,Comheader:Zt.a,NavBar:Qc,Air:$,FloorHeating:ee,ManualIndex:mo,ManualOvertime:ie,ChildAirControl:kr,Light:Vo,Curtain:gc,TimeBox:Pc,WorkOvertime:de,WorkConfig:Ot,ManualConfig:Vt,ScenarioConfig:Wt,Detail:dr.default,Contact:et,ChildTempSet:Ir,CurtainOpening:Uc,Socket:Q},Object(W.a)(Ft,Z.a.Component.name,Z.a.Component),Object(W.a)(Ft,"VanPopup",Sr.b),Object(W.a)(Ft,"VanIcon",Kt.b),Ft),beforeRouteEnter:function(e,t,n){var a=Object(al.a)();a&&"null"!=a?n():n("/error")},setup:function(){var e=Object(o.getCurrentInstance)(),t=Object(it.d)(),n=Object(it.c)(),a=window.document,c=a.body.clientHeight,r={},i=lt.a.state.user.projectId,l=Object(me.t)(),s=[],m=Object(me.b)("YYYY.MM.DD HH:mm"),u=Object(me.m)(),d=Object(o.reactive)({equipTimer:null,seviceEquipmentList:[],spaceEquipList:[],enterType:1,deviceItem:null,parseImgUrl:me.y,fileUrl:e.proxy.$fileUrl,nowDate:m,nowWeek:u,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,curtainRef:{},manualAirRef:{},lightRef:{},hideTopImg:!1,isBottom:!1,isScrool:!1,officeData:{},popList:[],popupType:"scenario",showSecenDetailDalig:!1,sceneDetail:{},showScenario:!1,projectId:i,spaceInfo:r,headerInfo:{headImg:"",headScene:"",tipText:"选择工作结束时间",tipTextSwatch:!1},topbgimg:"",userInfo:l,deviceIcon:"arrow",visible:!1,outWeather:{},vanPopupIndex:"",spaceEqFlagObj:{hasAir:!0,hasBlowing:!1,hasLamp:!1},spaceExistenceDevice:{curtain:!1,light:!1,airConditioner:!1,bodySensor:!1,floorHeating:!1,socket:!1},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(me.y)("page-officehome","temp.png"),activeImg:Object(me.y)("page-officehome","temp_active.svg")},{top:0,id:"lightId",code:"lamp",name:"光照",noShow:!1,img:Object(me.y)("page-officehome","lamp.png"),activeImg:Object(me.y)("page-officehome","lamp_active.svg")},{top:0,id:"curtainId",code:"curtain",name:"窗帘",noShow:!1,img:Object(me.y)("page-officehome","curtain-nav.svg"),activeImg:Object(me.y)("page-officehome","curtain-nav-active.svg")},{top:0,id:4,code:"mySpace",name:"常驻空间",noShow:!1,activeImg:Object(me.y)("page-officehome","mySpaceIcon.svg"),img:Object(me.y)("page-officehome","mySpaceIcon.svg")},{top:0,id:5,code:"switchSpace",name:"我的",noShow:!0,activeImg:Object(me.y)("page-officehome","mapIcon.png"),img:Object(me.y)("page-officehome","mapIcon.png")}],meetingRoomSence:[{code:"DISCUSSING",name:"讨论"},{code:"PROJECTING",name:"演示"},{code:"ADJOURNMENT",name:"散会"}],nextCusStartTime:0,cusEndTime:0,cusStartTime:0,isShowContact:!1,showContact:function(){d.isShowContact=!0},isFloorHeatingTemp:!1,floorData:{},showFloorHeating:function(e){d.isFloorHeatingTemp=!0,d.floorData=e},isLightColorFlag:!1,lightData:{},showLightColorCtrol:function(e){d.isLightColorFlag=!0,d.lightData=e},curtainData:[],isCurtainOpening:!1,showCurtainOpening:function(e){d.curtainData=e,d.isCurtainOpening=!0},airData:{},isChildAirControl:!1,showChildAirControl:function(e){d.airData=e,d.isChildAirControl=!0},closeChildAirControl:function(){d.manualAirRef.getAirInfo(1)},closeCurtainOpening:function(){d.curtainRef.updateGroupPeing()},closeContactDailog:function(){d.isShowContact=!1},padBgImg:"",setPadBgImg:function(){0===d.padImgData.isBgDefault&&d.padImgData.bgImage&&d.padImgData.bgImage.fileId?d.padBgImg=d.fileUrl+"&key=".concat(d.padImgData.bgImage.fileId):"个人"==d.roomType?d.padBgImg=Object(me.y)("ipdImages","pad_img2.png"):"会议室"===d.roomType?d.padBgImg=Object(me.y)("ipdImages","pad_img3.png"):(d.roomType,d.padBgImg=Object(me.y)("ipdImages","pad_img1.png"))},logImg:"",setPadLogo:function(){0===d.padImgData.isLogoDefault&&d.padImgData.logoImage&&d.padImgData.logoImage.fileId?d.logImg=d.fileUrl+"&key=".concat(d.padImgData.logoImage.fileId):d.logImg=""},padImgData:[],padNumber:0,getPadImg:function(){var e={funcType:d.officeData.roomFuncType,spaceId:d.spaceInfo.spaceId};e=Object(me.B)(e);d.padNumber<1&&(d.padNumber=1,Object(ue.r)(e).then((function(e){"success"===e.result&&(d.padImgData=e.data,d.setPadBgImg(),d.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;d.enterType=e,d.deviceItem=t||null,d.isShowWork=!0,d.queryCustomAndScence(2)},checkDeviceShowWork:function(){d.spaceEquipList.map((function(e){e.id=e.equipmentId})),d.seviceEquipmentList=d.spaceEquipList},leaveWork:function(){d.manualAirRef&&d.manualAirRef.updateCloseSwitchFromWork(),d.lightRef&&d.lightRef.updateSwitchFromWork()},closeWork:function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"confirm";d.isShowWork=!1,d.queryCustomAndScence(2),"confirm"==t&&(e=setTimeout((function(){d.manualAirRef&&d.manualAirRef.updateCloseSwitchFromWork(),d.lightRef&&d.lightRef.updateSwitchFromWork(),clearTimeout(e),e=null}),1e3))},forceOverTimeFlag:!1,setForceOverTimeFlag:function(e){"开放"===d.roomType&&e?d.forceOverTimeFlag=!0:d.forceOverTimeFlag=!1},getCompanyInfo:function(){return Object(M.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(ue.i)({companyId:tl.a.companyKey});case 2:t=e.sent,t.data;case 4:case"end":return e.stop()}}),e)})))()},weatherTimer:null,getWeatherTimer:function(){d.weatherTimer=setTimeout((function(){clearTimeout(d.weatherTimer),d.getWeather()}),0<arguments.length&&void 0!==arguments[0]?arguments[0]:36e5)},getWeather:function(){var e={openid:d.userInfo.openid,pubname:d.userInfo.pubname,projectId:lt.a.state.user.projectId};e=Object(me.B)(e);Object(ue.D)(e).then((function(e){e=null!=(e=null==e?void 0:e.content)?e:{},e=(d.outWeather=e).text,d.getWeatherIcon(e),d.getnowTime(e),d.getWeatherTimer()})).catch((function(){d.getWeatherTimer(5e3)}))},getnowTime:function(e){var t=Object(me.i)();-1<e.indexOf("霾")?d.topbgimg=Object(me.y)("weather","office_smog.jpg"):d.topbgimg=6<=t&&t<19?Object(me.y)("weather","office_bright.jpg"):Object(me.y)("weather","office_night.jpg")},getWeatherIcon:function(e){!e||-1<e.indexOf("晴")?d.outWeather.imgname=Object(me.y)("weather","sun.png"):e&&-1<e.indexOf("雨")?d.outWeather.imgname=Object(me.y)("weather","rain.png"):e&&-1<e.indexOf("阴")||-1<e.indexOf("云")?d.outWeather.imgname=Object(me.y)("weather","cloudy.png"):e&&-1<e.indexOf("霾")?d.outWeather.imgname=Object(me.y)("weather","mai.png"):e&&-1<e.indexOf("雾")?d.outWeather.imgname=Object(me.y)("weather","fog.png"):e&&-1<e.indexOf("风")?d.outWeather.imgname=Object(me.y)("weather","wind.png"):e&&-1<e.indexOf("雷")?d.outWeather.imgname=Object(me.y)("weather","thunder.png"):d.outWeather.imgname=Object(me.y)("weather","sun.png")},checkSpaceType:function(e){e=Object(nl.b)(e),"个人"===e?(d.roomType="个人",d.headerInfo.headImg=Object(me.y)("page-officehome","office_person_2.png"),d.headerInfo.headScene="工作",d.popList=d.listOffice):"会议室"===e?(d.roomType="会议室",d.popList=JSON.parse(JSON.stringify(d.listSen)),d.headerInfo.headImg=Object(me.y)("page-officehome","office_normal_2.png"),d.getPageMeetingSceneHttp()):(d.roomType="开放"===e?"开放":"其它",d.headerInfo.headImg=Object(me.y)("page-officehome","office_publi_2.png")),"会议室"!==e&&d.timerSpaceInfo()},checkUserSpace:function(){for(var e=!1,t=0;t<d.userSpaceInfo.length;t++)if(d.spaceInfo.spaceId===d.userSpaceInfo[t].sp_id){e=!0;break}d.userIsControl=e},getUserControlAuth:function(){Object(ue.C)().then((function(e){"success"===e.result?d.userSpaceInfo=e.data:d.userSpaceInfo=[],d.checkUserSpace()})).catch((function(){d.userSpaceInfo=[],d.checkUserSpace()}))},controlMode:null,getSpaceInfo:function(){var e={criteria:{spaceId:d.spaceInfo.spaceId,projectId:d.userInfo.projectId},pubname:d.userInfo.pubname,openid:d.userInfo.openid};Object(ue.x)(e).then((function(e){e=null!=(e=null==e?void 0:e.content)?e:[],e[0]&&(d.officeData=e[0]),d.officeData=d.officeData||{},d.officeData.localName&&(d.localName=d.officeData.localName),d.officeData.temperature&&(d.officeData.temperature=+d.officeData.temperature.toFixed(1)),d.controlMode=d.officeData.controlMode||0,d.checkSpaceType(d.officeData.roomFuncType),d.formatSpaceInfo(e),d.getPadImg(),d.loadinngEnd()})).catch((function(){d.loadinngEnd(),d.timerSpaceInfo(2e3)}))},getSpaceModeTimer:function(){d.spaceModelTimer=setTimeout((function(){d.getSpaceMode(),clearTimeout(d.spaceModelTimer),d.spaceModelTimer=null}),1e3)},getSpaceMode:function(){Object(ue.z)().then((function(e){d.getSpaceModeTimer()})).catch((function(){d.getSpaceModeTimer()}))},getSpaceTempTimer:function(){d.spaceTempTimer=setTimeout((function(){clearTimeout(d.spaceTempTimer),d.spaceTempTimer=null,d.getSpaceTemp()}))},getSpaceTemp:function(){Object(ue.A)().then((function(e){d.getSpaceTempTimer()})).catch((function(){d.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=d.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"===d.userInfo.projectId&&d.changeEnvValue(o),o.co2||0==o.co2?(n=d.checkLevel(o.co2,"co2"),d.envlist[1].bgColor=n.bgColor,d.envlist[1].num=o.co2):(d.envlist[1].num="--",d.envlist[1].bgColor=""),o.pm25||0===o.pm25?(n=d.checkLevel(o.pm25,"pm25"),d.envlist[2].bgColor=n.bgColor,d.envlist[2].num=o.pm25):(d.envlist[2].num="--",d.envlist[2].bgColor=""),o.hcho||0==o.hcho?(a=d.checkLevel(o.hcho,"hcho"),d.envlist[0].bgColor=a.bgColor,d.envlist[0].num=o.hcho.toFixed(2)):(d.envlist[0].num="--",d.envlist[0].bgColor=""),o.humidity||0==o.humidity?(a=d.checkLevel(o.humidity,"humidity"),d.envlist[3].bgColor=a.bgColor,d.envlist[3].num=o.humidity.toFixed(0)):(d.envlist[3].num="--",d.envlist[3].bgColor="")}},activeType:"",getPageMeetingSceneHttp:function(){var e={spaceId:d.spaceInfo.spaceId};Object(ue.p)(e).then((function(e){e=null!=(e=null==e?void 0:e.content)?e:"",d.activeType=e="OFFWORK"===e?"ADJOURNMENT":e,d.timerSpaceInfo()})).catch((function(){d.timerSpaceInfo(2e3)}))},secenaroStatus:{},setHeadScene:function(e,t){d.activeType=e.sceneType,1==t&&(d.isShowMetting=!0),d.secenaroStatus={localName:d.officeData.localName,loading:e.loading,lodingText:e.lodingText,sceneName:e.sceneName}},closeDailog:function(){d.isShowMetting=!1},isShowDetail:!1,detailQuery:{},handleDetail:function(e){d.isShowDetail=!0,d.detailQuery.funcid=e.funcid,d.detailQuery.spaceId=d.spaceInfo.spaceId},updateAirTemp:function(e){d.airTemp=e,d.setHeadSceneAirTemp()},setHeadSceneAirTemp:function(){if(d.sceneDetail&&d.sceneDetail.textObj&&d.sceneDetail.textObj.length&&d.airTemp&&("DISCUSSING"==d.sceneDetail.code||"PROJECTING"==d.sceneDetail.code))for(var e=0;e<d.sceneDetail.textObj.length;e++){var t=d.sceneDetail.textObj;"air"===t.type&&(t.text=t.text+",目标温度"+d.airTemp)}},handlePreClose:function(){var e=Object(me.b)(),t=Object(me.i)();t<10&&(t="0".concat(t)),e={projectId:d.projectId,objectId:d.spaceInfo.spaceId,endDate:e,endTime:t+"0000",type:3};Object(ue.a)(e).then((function(e){"success"==e.result&&d.changeLampStatus()}))},changeLampStatus:function(){d.showWorkOff=!1,d.headerInfo.tipText="选择工作结束时间",d.headerInfo.tipTextSwatch=!0},clearTimeoutValEquiment:function(){clearTimeout(d.equimentsTimer),d.equimentsTimer=null},equimentsTimer:null,setEquimentsTimer:function(){d.equimentsTimer=setTimeout((function(){d.getEquipments(),d.clearTimeoutValEquiment()}),0<arguments.length&&void 0!==arguments[0]?arguments[0]:36e5)},getEquipments:function(){var e={spaceId:d.spaceInfo.spaceId};e=Object(me.B)(e);Object(ue.w)(e).then((function(e){if("success"===e.result){var t,n=null!=(e=null==e?void 0:e.data)?e:[];for(t in d.spaceExistenceDevice){for(var a=!1,o=0;o<n.length;o++)t==n[o]&&(a=!0);d.spaceExistenceDevice[t]=a}d.spaceExistenceDevice.light?d.navList[1].noShow=!0:d.navList[1].noShow=!1,d.spaceExistenceDevice.curtain?d.navList[2].noShow=!0:d.navList[2].noShow=!1}d.setEquimentsTimer()})).catch((function(){d.setEquimentsTimer(2e3)}))},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";d.userIsControl?(d.showScenario=!d.showScenario,d.showScenario?d.deviceIcon="arrow-down":d.deviceIcon="arrow",d.popupType=e):Object(Vn.a)("您没有当前空间的控制权限!")},triggerCheckSpace:function(){var e=a.getElementById("envContent"),t=a.getElementById("houseDes").offsetHeight,n=(d.opacityV=0,d.mapOpacity=1,e.scrollTop=0),o=setInterval((function(){(n+=15)<c-t?e.style.top=n+"px":(e.style.top=c-t+"px",clearInterval(o))}),10);d.hideTopImg=!0,d.isBottom=!0},loadingStart:function(){Vn.a.loading({duration:0,forbidClick:!0,message:"加载中..."})},loadinngEnd:function(){Vn.a.clear()},clearTimerSpaceInfo:function(){clearTimeout(d.spaceTimer),d.spaceTimer=null},timerSpaceInfo:function(){d.spaceTimer=setTimeout((function(){d.clearTimerSpaceInfo(),d.getSpaceInfo()}),0<arguments.length&&void 0!==arguments[0]?arguments[0]:15e3)},isWork:!1,isMetting:!1,checkIsSpaceScene:function(){var e=!1;d.scenarioArr.map((function(t){"OVERTIME"===t.sceneType&&(d.isWork=!0,e=!0)})),e||(d.isWork=!1),(d.scenarioArr&&0==d.scenarioArr.length||!d.scenarioArr)&&(d.isWork=!1),d.isWork||(d.forceOverTimeFlag=!1)},scenarioArr:[],sceneConfigTimer:[],clearSceneConfigTimer:function(){clearTimeout(d.sceneConfigTimer)},querySpaceSceneConfigTimer:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:6e5;d.clearSceneConfigTimer(),d.sceneConfigTimer=setTimeout((function(){d.querySpaceSceneConfig(),d.clearSceneConfigTimer()}),e)},querySpaceSceneConfig:function(){var e={spaceId:d.spaceInfo.spaceId};e=Object(me.B)(e);Object(ue.M)(e).then((function(e){e=null!=(e=null==e?void 0:e.data)?e:[],d.scenarioArr=e,d.checkIsSpaceScene(),d.querySpaceSceneConfigTimer()})).catch((function(e){d.querySpaceSceneConfigTimer(2e3)}))},workkArr:[],secenTimer:{},clearSecenTimer:function(){clearTimeout(d.secenTimer),d.secenTimer=null},clearEquipTimer:function(){clearTimeout(d.equipTimer),d.equipTimer=null},getSpaceEquipListTimer:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:15e3;d.clearEquipTimer(),d.equipTimer=setTimeout((function(){d.getSpaceEquipList(),d.clearEquipTimer()}),e)},getSpaceEquipList:function(){var e={spaceId:d.spaceInfo.spaceId};e=Object(me.B)(e);Object(ue.v)(e).then((function(e){e=e.data||[],d.spaceEquipList=e,d.checkDeviceShowWork(),d.getSpaceEquipListTimer()})).catch((function(e){d.getSpaceEquipListTimer(2e3)}))},queryCustomAndScenceTimer:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:15e3,t=Object(me.o)();15e3==e&&t<"070000"&&"200000"<t&&(e=3e5),d.clearSecenTimer(),d.secenTimer=setTimeout((function(){d.queryCustomAndScence(),d.clearSecenTimer()}),e)},queryCustomAndScence:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t={spaceId:d.spaceInfo.spaceId};t=Object(me.B)(t);Object(ue.H)(t).then((function(t){for(var n=null!=(t=null==t?void 0:t.data)?t:[],a=0;a<n.length;a++){var o;(null!=(o=null==(o=n[a])?void 0:o.customSceneList)?o:[]).sort(d.compare)}d.formateManualWorkTime(n),d.workkArr=n||[],1==e&&d.queryCustomAndScenceTimer()})).catch((function(){1==e&&d.queryCustomAndScenceTimer(2e3)}))},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(d.compare),n.spaceCustomContentList=a;var o=Object(me.o)(),c=Object(me.b)("YYYY-MM-DD"),r=Object(me.c)(e[t].date);n.cusStartTime=a[0]?a[0].startTime:"",n.cusEndTime=a[0]?a[0].endTime:"",c==r&&(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(){d.padNumber=0,d.getEquipments(),d.querySpaceSceneConfig(),d.getSpaceEquipList(),d.getSpaceInfo(),d.queryCustomAndScenceTimer(0)},updatePageUrl:function(){var e=window.history,t=window.location.origin+window.location.pathname;e.replaceState("","",t)},spaceData:s,copySpaceData:s,floorId:"",buildingId:"",queryWorkSpace:function(){var e={criteria:{projectId:d.userInfo.projectId,spaceName:"",macAddress:d.userInfo.mac},orders:[{column:"isMajorSpace",asc:!1}]};Object(ue.N)(e).then((function(e){"success"==e.result?d.spaceData=null!=(e=null==e?void 0:e.content)?e:[]:d.spaceData=[],d.spaceData.map((function(e){d.spaceInfo.spaceId===e.spaceId?(e.active=!0,d.spaceInfo=e):e.active=!1})),d.copySpaceData=JSON.parse(JSON.stringify(d.spaceData))}))},resetSpaceStatus:function(){d.spaceExistenceDevice={curtain:!1,light:!0,airConditioner:!1,bodySensor:!1,socket:!1,floorHeating:!1},d.spaceData.map((function(e){e.active=!1})),d.controlMode="",d.isWork=!1,d.roomType="",d.officeData.temperature="",d.seviceEquipmentList=[],d.workkArr=[],d.setForceOverTimeFlag(!1)},isShowMap:!1,defaultSpace:r,moreSpace:function(){d.isShowMap=!0,d.defaultSpace=d.spaceInfo},elChangeExForArray:function(e){for(var t,n=0,a=0;a<d.spaceData.length;a++)if(e.spaceId===d.spaceData[a].spaceId&&(d.spaceData[a].active=!0,2<a)){n=a;break}n&&(t=d.spaceData[1],d.spaceData[1]=d.spaceData[n],d.spaceData[n]=t)},refreshSpace:function(){var e={};d.spaceData.map((function(t){t.spaceId===d.spaceInfo.spaceId&&(e=t)})),d.changeSpace(e,2)},changeSpace:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;d.spaceInfo.spaceId==e.spaceId&&2!==t||(d.clearAll(),d.resetSpaceStatus(),d.spaceInfo=e,1===t&&(d.defaultSpace=e,d.elChangeExForArray(e)),e.active=!0,d.init())},timeOutEvent:{},touchNumber:0,gtouchstart:function(e){return d.touchNumber=0,d.timeOutEvent=setTimeout((function(){d.touchNumber=1,d.longPress()}),500),!1},showDeleteButton:function(){return clearInterval(d.touchInterval),d.touchInterval=null,clearTimeout(d.timeOutEvent),d.timeOutEvent,!1},gtouchmove:function(){clearTimeout(this.timeOutEvent),d.timeOutEvent=0},touchInterval:{},longPress:function(){d.timeOutEvent=0,d.touchInterval=setInterval((function(){d.touchNumber++,6===d.touchNumber&&(clearInterval(d.touchInterval),d.touchInterval=null,t.push({name:"home",query:{mac:d.userInfo.mac,type:"logoOut"}}))}),1e3)},clearAll:function(){d.clearTimerSpaceInfo(),d.clearSceneConfigTimer(),d.clearSecenTimer(),d.clearEquipTimer(),d.clearTimeoutValEquiment()},contantDetail:{},cusServiceTimer:null,queryCustomerserviceTimer:function(){d.cusServiceTimer=setTimeout((function(){clearTimeout(d.cusServiceTimer),d.queryCustomerservice()}),0<arguments.length&&void 0!==arguments[0]?arguments[0]:36e5)},queryCustomerservice:function(){var e={criteria:{projectId:d.userInfo.projectId}};Object(ue.I)(e).then((function(e){e=null!=(e=null==e?void 0:e.content)?e:[],d.contantDetail=e[0],d.queryCustomerserviceTimer()})).catch((function(){d.queryCustomerserviceTimer()}))},dateInter:null,setDateTime:function(){d.dateInter=setInterval((function(){d.nowDate=Object(me.b)("YYYY.MM.DD HH:mm"),d.nowWeek=Object(me.m)()}),6e4)}});return Object(o.onBeforeUnmount)((function(){d.clearAll(),clearInterval(d.dateInter),clearTimeout(d.cusServiceTimer),clearTimeout(d.weatherTimer)})),Object(o.onMounted)((function(){var e=n.query.spaceId;d.spaceInfo={spaceId:e},d.defaultSpace={spaceId:e},d.setDateTime(),d.init(),d.queryWorkSpace(),d.getWeather(),d.queryCustomerservice()})),Object(q.a)({},Object(o.toRefs)(d))}});n("9c99"),n("74d8"),t.default=pe()(yr,[["render",function(e,t,n,a,A,q){var M=Object(o.resolveComponent)("WorkConfig"),W=Object(o.resolveComponent)("ManualConfig"),F=Object(o.resolveComponent)("scenario-config"),U=Object(o.resolveComponent)("manual-index"),_=Object(o.resolveComponent)("Air"),R=Object(o.resolveComponent)("floor-heating"),P=Object(o.resolveComponent)("Light"),H=Object(o.resolveComponent)("Curtain"),z=Object(o.resolveComponent)("Socket"),X=Object(o.resolveComponent)("work-overtime"),Y=Object(o.resolveComponent)("manual-overtime"),G=Object(o.resolveComponent)("van-popup"),K=Object(o.resolveComponent)("scenario-dailog"),J=Object(o.resolveComponent)("detail"),Z=Object(o.resolveComponent)("com-map"),$=Object(o.resolveComponent)("contact"),Q=Object(o.resolveComponent)("light-temp"),ee=Object(o.resolveComponent)("ChildTempSet"),te=Object(o.resolveComponent)("curtain-opening"),ne=Object(o.resolveComponent)("ChildAirControl");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",c,[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",r,[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",{onClick:t[4]||(t[4]=Object(o.withModifiers)((function(){return e.refreshSpace&&e.refreshSpace.apply(e,arguments)}),["stop"]))},Object(o.toDisplayString)(e.officeData.localName),1)]),Object(o.createElementVNode)("div",g,[Object(o.createElementVNode)("div",O,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","template-icon.svg"),alt:""},null,8,h),j,Object(o.createElementVNode)("span",{class:"temp-num",onClick:t[5]||(t[5]=function(t){return e.handleDetail(e.envlist[3])})},[Object(o.createTextVNode)(Object(o.toDisplayString)(e.officeData.temperature||"--"),1),v])])]),Object(o.createElementVNode)("div",T,[(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,I),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(t.name),1)]),Object(o.createElementVNode)("div",y,[Object(o.createTextVNode)(Object(o.toDisplayString)(t.num)+" ",1),Object(o.createElementVNode)("sup",null,Object(o.toDisplayString)(t.unit),1)])],14,k)})),128))])]),e.spaceData&&1<e.spaceData.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",S,[(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:Object(o.withModifiers)((function(n){return e.changeSpace(t)}),["stop"])},[t.active?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:0==n?e.parseImgUrl("ipdImages","rectangle1-active.svg"):e.parseImgUrl("ipdImages","rectangle-active.svg")},null,8,w)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:0==n?e.parseImgUrl("ipdImages","rectangle1.svg"):e.parseImgUrl("ipdImages","rectangle2.svg")},null,8,D)),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(t.spaceName),1)],10,C)):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[6]||(t[6]=function(){return e.moreSpace&&e.moreSpace.apply(e,arguments)})},[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","rectangle-fotter.svg")},null,8,E),x])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)]),Object(o.createElementVNode)("div",N,["开放"===e.roomType&&e.isWork||"会议室"===e.roomType&&e.scenarioArr&&e.scenarioArr.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",V,["开放"===e.roomType&&e.isWork&&0==e.controlMode?(Object(o.openBlock)(),Object(o.createBlock)(M,{key:"workCkey",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)(W,{key:"manualckey",workkArr:e.workkArr,onCloseWork:e.closeWork,onLeaveWork:e.leaveWork,onTriggerWork:e.triggerWork,onSetForceOverTimeFlag:e.setForceOverTimeFlag},null,8,["workkArr","onCloseWork","onLeaveWork","onTriggerWork","onSetForceOverTimeFlag"])):Object(o.createCommentVNode)("",!0),"会议室"===e.roomType&&e.scenarioArr&&e.scenarioArr.length?(Object(o.openBlock)(),Object(o.createBlock)(F,{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&&e.spaceExistenceDevice.airConditioner?(Object(o.openBlock)(),Object(o.createBlock)(U,{key:"manualKey",ref:"manualAirRef",onTriggerWork:e.triggerWork,seviceEquipmentList:e.seviceEquipmentList,forceOverTimeFlag:e.forceOverTimeFlag,onUpdateAirTemp:e.updateAirTemp,onShowChildAirControl:e.showChildAirControl,airVolumes:e.officeData.airVolumes,temperature:e.officeData.temperature,spaceId:e.spaceInfo.spaceId,projectId:e.projectId,userIsControl:e.userIsControl},null,8,["onTriggerWork","seviceEquipmentList","forceOverTimeFlag","onUpdateAirTemp","onShowChildAirControl","airVolumes","temperature","spaceId","projectId","userIsControl"])):Object(o.createCommentVNode)("",!0),0===e.controlMode&&e.spaceExistenceDevice.airConditioner?(Object(o.openBlock)(),Object(o.createBlock)(_,{id:"airId",key:"airKey",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.spaceInfo.spaceId&&e.spaceExistenceDevice.floorHeating?(Object(o.openBlock)(),Object(o.createBlock)(R,{forceOverTimeFlag:e.forceOverTimeFlag,showFloorBox:e.spaceExistenceDevice.floorHeating,seviceEquipmentList:e.seviceEquipmentList,onTriggerWork:e.triggerWork,onShowFloorHeating:e.showFloorHeating,id:"floorHeatingId",key:"floorHeatingKey",userIsControl:e.userIsControl,spaceId:e.spaceInfo.spaceId,projectId:e.projectId},null,8,["forceOverTimeFlag","showFloorBox","seviceEquipmentList","onTriggerWork","onShowFloorHeating","userIsControl","spaceId","projectId"])):Object(o.createCommentVNode)("",!0),e.spaceInfo.spaceId?(Object(o.openBlock)(),Object(o.createBlock)(P,{ref:"lightRef",showLight:e.spaceExistenceDevice.light,forceOverTimeFlag:e.forceOverTimeFlag,controlMode:e.controlMode,seviceEquipmentList:e.seviceEquipmentList,onTriggerWork:e.triggerWork,onShowLightColorCtrol:e.showLightColorCtrol,id:"lightId",key:"lightKey",userIsControl:e.userIsControl,spaceId:e.spaceInfo.spaceId,projectId:e.projectId},null,8,["showLight","forceOverTimeFlag","controlMode","seviceEquipmentList","onTriggerWork","onShowLightColorCtrol","userIsControl","spaceId","projectId"])):Object(o.createCommentVNode)("",!0),e.spaceExistenceDevice.curtain&&e.spaceInfo.spaceId?(Object(o.openBlock)(),Object(o.createBlock)(H,{spaceId:e.spaceInfo.spaceId,id:"curtainId",key:"curtainKey",ref:"curtainRef",onShowCurtainOpening:e.showCurtainOpening,userIsControl:e.userIsControl,projectId:e.projectId},null,8,["spaceId","onShowCurtainOpening","userIsControl","projectId"])):Object(o.createCommentVNode)("",!0),e.spaceInfo.spaceId&&e.spaceExistenceDevice.socket?(Object(o.openBlock)(),Object(o.createBlock)(z,{key:6,showSocket:e.spaceExistenceDevice.socket,spaceId:e.spaceInfo.spaceId,projectId:e.projectId},null,8,["showSocket","spaceId","projectId"])):Object(o.createCommentVNode)("",!0)]),Object(o.createVNode)(G,{show:e.isShowWork,"onUpdate:show":t[7]||(t[7]=function(t){return e.isShowWork=t}),position:"right","close-on-click-overlay":!1,class:"popup-content",teleport:"#app"},{default:Object(o.withCtx)((function(){return[e.isShowWork&&0===e.controlMode?(Object(o.openBlock)(),Object(o.createBlock)(X,{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)(Y,{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)(G,{show:e.isShowMetting,"onUpdate:show":t[8]||(t[8]=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)(K,{secenaroStatus:e.secenaroStatus,onCloseDailog:e.closeDailog},null,8,["secenaroStatus","onCloseDailog"])]})),_:1},8,["show"]),Object(o.createVNode)(G,{show:e.isShowDetail,"onUpdate:show":t[9]||(t[9]=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)(J,{key:0,query:e.detailQuery},null,8,["query"])):Object(o.createCommentVNode)("",!0)]})),_:1},8,["show"]),Object(o.createVNode)(G,{show:e.isShowMap,"onUpdate:show":t[10]||(t[10]=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)(Z,{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)($,{key:0,isShowContact:e.isShowContact,contantDetail:e.contantDetail,onCloseDailog:e.closeContactDailog},null,8,["isShowContact","contantDetail","onCloseDailog"])):Object(o.createCommentVNode)("",!0),Object(o.createVNode)(G,{show:e.isLightColorFlag,"onUpdate:show":t[11]||(t[11]=function(t){return e.isLightColorFlag=t}),position:"right","close-on-click-overlay":!0,class:"popup-content-small",teleport:"#app"},{default:Object(o.withCtx)((function(){return[Object(o.createElementVNode)("div",null,[e.isLightColorFlag?(Object(o.openBlock)(),Object(o.createBlock)(Q,{key:0,lightData:e.lightData},null,8,["lightData"])):Object(o.createCommentVNode)("",!0)])]})),_:1},8,["show"]),Object(o.createVNode)(G,{show:e.isFloorHeatingTemp,"onUpdate:show":t[12]||(t[12]=function(t){return e.isFloorHeatingTemp=t}),position:"right","close-on-click-overlay":!0,class:"popup-content-small",teleport:"#app"},{default:Object(o.withCtx)((function(){return[Object(o.createElementVNode)("div",null,[e.isFloorHeatingTemp?(Object(o.openBlock)(),Object(o.createBlock)(ee,{key:0,floorData:e.floorData},null,8,["floorData"])):Object(o.createCommentVNode)("",!0)])]})),_:1},8,["show"]),Object(o.createVNode)(G,{show:e.isCurtainOpening,"onUpdate:show":t[13]||(t[13]=function(t){return e.isCurtainOpening=t}),position:"right","close-on-click-overlay":!0,onClickOverlay:e.closeCurtainOpening,class:"popup-content-small",teleport:"#app"},{default:Object(o.withCtx)((function(){return[e.isCurtainOpening?(Object(o.openBlock)(),Object(o.createElementBlock)("div",B,[e.isCurtainOpening?(Object(o.openBlock)(),Object(o.createBlock)(te,{key:0,curtainData:e.curtainData},null,8,["curtainData"])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)]})),_:1},8,["show","onClickOverlay"]),Object(o.createVNode)(G,{show:e.isChildAirControl,"onUpdate:show":t[14]||(t[14]=function(t){return e.isChildAirControl=t}),position:"right",onClickOverlay:e.closeChildAirControl,class:"popup-content-small",teleport:"#app"},{default:Object(o.withCtx)((function(){return[e.isChildAirControl?(Object(o.openBlock)(),Object(o.createElementBlock)("div",L,[e.isChildAirControl?(Object(o.openBlock)(),Object(o.createBlock)(ne,{key:0,airData:e.airData},null,8,["airData"])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)]})),_:1},8,["show","onClickOverlay"])],4)}],["__scopeId","data-v-50bafe57"]])},8211:function(e,t,n){},8267:function(e,t,n){},"83b6":function(e,t,n){"use strict";n("1980")},"86bc":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},9167:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"92f1":function(e,t,n){"use strict";n("b6a3")},9617:function(e,t,n){},9864:function(e,t,n){},"9c99":function(e,t,n){"use strict";n("9864")},a434:function(e,t,n){"use strict";var a=n("23e7"),o=n("23cb"),c=n("a691"),r=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),O=r(g.length),h=o(e,O);e=arguments.length;if(0===e?n=a=0:a=1===e?(n=0,O-h):(n=e-2,d(u(c(t),0),O-h)),9007199254740991<O+n-a)throw TypeError("Maximum allowed length exceeded");for(m=l(g,a),p=0;p<a;p++)(f=h+p)in g&&s(m,p,g[f]);if(n<(m.length=a)){for(p=h;p<O-a;p++)b=p+n,(f=p+a)in g?g[b]=g[f]:delete g[b];for(p=O;O-a+n<p;p--)delete g[p-1]}else if(a<n)for(p=O-a;h<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+h]=arguments[p+2];return g.length=O-a+n,m}})},a526:function(e,t,n){},a9fd:function(e,t,n){"use strict";n("6eb7")},b2ec:function(e,t,n){"use strict";n("6576")},b6a3:function(e,t,n){},ba16:function(e,t,n){"use strict";n("74a6")},bb1b:function(e,t,n){},bde3:function(e,t,n){},be7f:function(e,t,n){"use strict";n("68ef"),n("cb51"),n("3743"),n("1a04"),n("1146")},c740:function(e,t,n){"use strict";var a=n("23e7"),o=n("b727").findIndex,c=n("44d2"),r=(n=n("ae40"),"findIndex"),i=!0;n=n(r);r in[]&&Array(1)[r]((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)}}),c(r)},c9d9:function(e,t,n){},d3fb:function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return I}));var a=n("7a23"),o=(t=n("fe7e"),n("f691")),c=n("f344"),r=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"),O=Symbol(b),h=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,c,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,y=(n,a)=>{var c=-(n=(e=>{for(let t=e=Object(r.d)(e,0,k());t<k();t++)if(!h(v.options[t]))return t;for(let t=e-1;0<=t;t--)if(!h(v.options[t]))return t})(n)||0)*e.itemHeight,i=()=>{n!==v.index&&(v.index=n,a&&t("change",n))};o&&c!==v.offset?b=i:i(),v.offset=c};var S=t=>{JSON.stringify(t)!==JSON.stringify(v.options)&&(v.options=p(t),y(e.defaultIndex))};const C=t=>Object(d.f)(t)&&e.textKey in t?t[e.textKey]:t,w=t=>Object(r.d)(Math.round(-t/e.itemHeight),0,k()-1),D=()=>{o=!1,v.duration=0,b&&(b(),b=null)},E=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())),c=v.offset,v.duration=0,i=Date.now(),u=c,b=null)},x=t=>{e.readonly||(T.move(t),T.isVertical()&&(o=!0,Object(l.e)(t,!0)),v.offset=Object(r.d)(c+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 y(n,!0);t=w(v.offset),v.duration=200,y(t,!0),setTimeout(()=>{o=!1},0)}},V=()=>{const t={height:e.itemHeight+"px"};return v.options.map((c,r)=>{var i=C(c),l=h(c);l={role:"button",style:t,tabindex:l?-1:0,class:g("item",{disabled:l,selected:r===v.index}),onClick:()=>{var t=r;o||e.readonly||(b=null,v.duration=200,y(t,!0))}},i={class:"van-ellipsis",[e.allowHtml?"innerHTML":"textContent"]:i};return Object(a.createVNode)("li",l,[n.option?n.option(c):Object(a.createVNode)("div",i,null)])})};return y(v.index),Object(s.k)(O),Object(m.a)({state:v,setIndex:y,getValue:()=>v.options[v.index],setValue:e=>{var t=v["options"];for(let n=0;n<t.length;n++)if(C(t[n])===e)return y(n)},setOptions:S,stopMomentum:D}),Object(a.watch)(()=>e.initialOptions,S),Object(a.watch)(()=>e.defaultIndex,e=>y(e)),()=>Object(a.createVNode)("div",{class:[g(),e.className],onTouchstart:E,onTouchmove:x,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:D},[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(c.a)({},I,{columns:Object(o.a)(),valueKey:String,defaultIndex:Object(o.c)(0),toolbarPosition:Object(o.e)("top"),columnsFieldNames:Object});var y=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(c.a)({text:e.valueKey||"text",values:"values",children:"children"},e.columnsFieldNames),{children:g,linkChildren:h}=Object(s.f)(O),v=(h(),Object(a.computed)(()=>Object(r.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"}),y=()=>g.map(e=>e.state.index),S=(e,t)=>{const n=g[e];n&&(n.setOptions(t),o.value=!0)},C=t=>{let n={[b]:e.columns};var a=y();for(let e=0;e<=t;e++)n=n[b][a[e]];for(;n&&n[b];)t++,S(t,n[b]),n=n[b][n.defaultIndex||0]},w=e=>g[e],D=e=>{const t=w(e);if(t)return t.getValue()},E=(e,t)=>{const n=w(e);n&&(n.setValue(t),"cascade"===I.value&&C(e))},x=e=>{if(e=w(e),e)return e.state.index},N=(e,t)=>{const n=w(e);n&&(n.setIndex(t),"cascade"===I.value&&C(e))},V=()=>g.map(e=>e.getValue()),B=e=>{"plain"===I.value?t(e,D(0),x(0)):t(e,V(),y())},L=e=>{"cascade"===I.value&&C(e),"plain"===I.value?t("change",D(0),x(0)):t("change",V(),e)},A=()=>{g.forEach(e=>e.stopMomentum()),B("confirm")},q=()=>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:q},[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},W=()=>{var t=v.value*+e.visibleItemCount,c={height:t+"px"};return Object(a.createVNode)("div",{class:T("columns"),style:c,onTouchmove:l.e},[d.value.map((t,o)=>{var c;return Object(a.createVNode)(j,{textKey:p,readonly:e.readonly,allowHtml:e.allowHtml,className:t.className,itemHeight:v.value,defaultIndex:null!=(c=t.defaultIndex)?c:+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 c=null!=(t=o.defaultIndex)?t:+e.defaultIndex;for(;a[c]&&a[c].disabled;){if(!(c<a.length-1)){c=0;break}c++}n.push({[f]:o[b],className:o.className,defaultIndex:c}),o=a[c]}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)=>{E(t,e)})},getIndexes:y,setIndexes:e=>{e.forEach((e,t)=>{N(t,e)})},getColumnIndex:x,setColumnIndex:N,getColumnValue:D,setColumnValue:E,getColumnValues:e=>{if(e=w(e),e)return e.state.options},setColumnValues:S}),()=>{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),W(),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=c(t),m=r(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"),c=n("7b0b"),r=n("44ad"),i=n("50c4");e.exports={left:a(!1),right:a(!0)}},d9d2:function(e,t,n){},e337:function(e,t,n){"use strict";n("1176")},e384:function(e,t,n){},eabd:function(e,t,n){"use strict";n("ed60")},eaf7:function(e,t,n){},eb51:function(e,t,n){"use strict";n("1746")},ed60:function(e,t,n){},efa9: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},f3cc:function(e,t,n){"use strict";n("58ab")},fa13:function(e,t,n){},fe6d:function(e,t,n){"use strict";n("bde3")}}]);