1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1f824794"],{"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")},"3ef8":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"407d":function(e,t,n){"use strict";n("bb1b")},4179:function(e,t,n){"use strict";n("4f78")},4235:function(e,t,n){"use strict";n("6606")},"43c2":function(e,t,n){},4458:function(e,t,n){"use strict";n("86bc")},"4b8a":function(e,t,n){"use strict";n("28b1")},"4dd8":function(e,t,n){"use strict";n("efa9")},"4f78":function(e,t,n){},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")},"694b":function(e,t,n){"use strict";n("ee96")},"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){},"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-37275e70"),e=e(),Object(o.popScopeId)(),e}n.r(t),n("b0c0");var o=n("7a23"),c={class:"main-left"},r={class:"left-time"},i={class:"weather"},l=["src"],s=["src"],m=a((function(){return Object(o.createElementVNode)("span",null," 联系客服",-1)})),u={class:"left-space"},d={class:"text"},p={class:"space-info"},f={class:"space-temp"},b=["src"],g=a((function(){return Object(o.createElementVNode)("span",{class:"temp-text"},"温度",-1)})),O=a((function(){return Object(o.createElementVNode)("sup",null,"℃",-1)})),h={class:"space-env"},j=["onClick"],v=["src"],T={class:"env-text"},k={key:0,class:"fotter"},I=["onClick"],y=["src"],S=["src"],C=["src"],w=a((function(){return Object(o.createElementVNode)("span",null,"…",-1)})),D={class:"main-right"},E={key:0,class:"work-btn"},x={key:0},N={key:0};function V(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 B=n("5530"),L=(n("96cf"),n("1da1")),A=n("ade3"),q={class:"work-content"},M={class:"work-space"},W={class:"space-title"},F=V((function(){return Object(o.createElementVNode)("div",{class:"device-tip"},"延时期间,空间相关设备会开启",-1)})),U={class:"add-time",id:"addTimeId"},_={key:0,class:"date_box"},R=["onClick"],P={class:"sliders-list",id:"sliderListId"},H={class:"sliders"},z=["onClick","data-index"],X=[V((function(){return Object(o.createElementVNode)("div",{class:"start",id:"startId"},null,-1)})),V((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)}))],Y={class:"add-time-btn"};n("99af");var G=n("2241"),K=(n("e17f"),n("c199")),J=n("fe7e"),Z=n("f691"),$=n("8405"),Q=n("4a89"),ee=n("f465"),te=n("cdd8");const[ne,ae]=Object(J.a)("slider");var oe={min:Object(Z.c)(0),max:Object(Z.c)(100),step:Object(Z.c)(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:Z.f,buttonSize:Z.f,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};oe=Object(o.defineComponent)({name:ne,props:oe,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(te.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($.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($.d)(t,n,a),a=Math.round((t-n)/o)*o;return Object($.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(ee.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(Q.e)(n,!0),s.move(n),l.value="dragging";n=Object(ee.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"],ae("button-wrapper",m[i])):ae("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:Q.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:ae("button"),style:Object($.f)(e.buttonSize)},null)})(u,t)])};return g(e.modelValue),Object(ee.h)(()=>e.modelValue),()=>Object(o.createVNode)("div",{ref:i,style:u.value,class:ae({vertical:e.vertical,disabled:e.disabled}),onClick:O},[Object(o.createVNode)("div",{class:ae("bar"),style:p.value},[e.range?[v(0),v(1)]:v()])])}}),oe=Object(K.a)(oe);function ce(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 re(e){return Object(o.pushScopeId)("data-v-e19a3620"),e=e(),Object(o.popScopeId)(),e}n("68ef"),n("9617"),n("ac1e");var ie=n("d257"),le=n("459d"),se=Object(o.defineComponent)({components:{VanSlider:oe},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(ie.r)(),c="".concat(Object(ie.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(ie.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(ie.l)()[1]},getTomorrowIndex:function(){var e=0;return"今天"===i.nowData.week?Object(ie.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)})),ce(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())})),ce(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(ie.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(ie.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(ie.b)("YYYY-MM-DD")),a=0;a<e.length;a++)!function(n){for(var a=Object(ie.c)(e[n].date),o=i.parseCusStartTime(e[n].cusStartTime),c=i.parseCusEndTime(e[n].cusEndTime),r=Object(ie.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(ie.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(ie.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(le.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&&G.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(B.a)({},Object(o.toRefs)(i))}}),me=(n("407d"),n("6b0d")),ue=(me=n.n(me),se=me()(se,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("van-loading");return Object(o.openBlock)(),Object(o.createElementBlock)("div",q,[Object(o.createElementVNode)("div",M,[Object(o.createElementVNode)("div",W,Object(o.toDisplayString)(e.spaceInfo.spaceName)+" 申请延时",1),F]),Object(o.createElementVNode)("div",U,[e.dateArr&&e.dateArr.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",_,[(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,R)})),128))])):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",P,[(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",H,[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,z)])])})),128)),Object(o.createElementVNode)("div",{class:"slider-btn",id:"sliderBtnId",onClick:t[0]||(t[0]=function(){return e.triggerDelTime&&e.triggerDelTime.apply(e,arguments)})},X)])]),Object(o.createElementVNode)("div",Y,[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"}),de={class:"work-space"},pe={class:"space-title"},fe={class:"add-time",id:"addTimeId"},be={key:0,class:"date_box"},ge=["onClick"],Oe={class:"sliders-list",id:"sliderListId"},he={class:"sliders"},je=["onClick","data-index"],ve=["onClick"],Te=[re((function(){return Object(o.createElementVNode)("div",{class:"start",id:"startId"},null,-1)})),re((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)}))],ke={class:"add-time-btn"},Ie={key:0,class:"device-title"},ye=[re((function(){return Object(o.createElementVNode)("span",{class:"line"},null,-1)})),re((function(){return Object(o.createElementVNode)("span",{class:"text"},"预约开启设备",-1)})),re((function(){return Object(o.createElementVNode)("span",{class:"line"},null,-1)}))],Se={class:"work-device"},Ce=re((function(){return Object(o.createElementVNode)("div",{class:"row-title"},"空调",-1)})),we={class:"device-box"},De=["onClick"],Ee={class:"row-item"},xe=["src"],Ne=re((function(){return Object(o.createElementVNode)("div",{class:"row-title"},"照明",-1)})),Ve={class:"device-box"},Be=["onClick"],Le={class:"row-item"},Ae=["src"],qe={key:2,class:"device-tip"},Me=[re((function(){return Object(o.createElementVNode)("span",null,[Object(o.createElementVNode)("i",null,"*"),Object(o.createTextVNode)(" 设备加时提示:")],-1)})),re((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");oe=Object(o.defineComponent)({components:{VanSlider:oe},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(ie.r)(),c="".concat(Object(ie.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(ie.t)()),i=Object(o.reactive)({userInfo:r,seviceEquipmentList:e.seviceEquipmentList,parseImgUrl:ie.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(ie.l)()[1]},getTomorrowIndex:function(){var e=0;return"今天"===i.nowData.week?Object(ie.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)})),ce(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())})),ce(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(ie.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(ie.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(ie.b)("YYYY-MM-DD")),a=0;a<e.length;a++)!function(n){for(var a=Object(ie.c)(e[n].date),o=e[n].spaceCustomContentList||[],c=Object(ie.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(ie.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(ie.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(ie.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(ie.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(le.R)(e).then((function(e){})).catch((function(){}))},setallLampHttp:function(e){Object(le.S)(e).then((function(e){})).catch((function(){}))},saveBatchCustomScene:function(e){i.showLoading=!0,i.formBtn=!0,Object(le.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&&G.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(B.a)({},Object(o.toRefs)(i))}}),n("92f1"),oe=me()(oe,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("van-loading");return Object(o.openBlock)(),Object(o.createElementBlock)("div",ue,[Object(o.createElementVNode)("div",de,[Object(o.createElementVNode)("div",pe,Object(o.toDisplayString)(e.spaceInfo.spaceName)+" 申请延时",1)]),Object(o.createElementVNode)("div",fe,[e.dateArr&&e.dateArr.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",be,[(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,ge)})),128))])):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",Oe,[(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",he,[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,je)])])})),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,ve)})),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)})},Te)])]),Object(o.createElementVNode)("div",ke,[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",Ie,ye)):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",Se,[e.isAir?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:0},[Ce,Object(o.createElementVNode)("div",we,[(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",Ee,[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,xe)])],12,De)):Object(o.createCommentVNode)("",!0)],64)})),128))])],64)):Object(o.createCommentVNode)("",!0),e.isLight?(Object(o.openBlock)(),Object(o.createElementBlock)(o.Fragment,{key:1},[Ne,Object(o.createElementVNode)("div",Ve,[(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",Le,[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,Ae)])],12,Be)):Object(o.createCommentVNode)("",!0)],64)})),128))])],64)):Object(o.createCommentVNode)("",!0),e.isAir?(Object(o.openBlock)(),Object(o.createElementBlock)("div",qe,Me)):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 We={class:"contact-content"},Fe=Object(o.createElementVNode)("div",{class:"title"},"联系我们",-1),Ue={class:"contact"},_e={class:"code-box"},Re=["src"],Pe=Object(o.createElementVNode)("div",{class:"title"},"客服微信二维码",-1),He={class:"phone-box"},ze=["src"],Xe={class:"title"},Ye=Object(o.createElementVNode)("div",{class:"concat-text"},"联系方式",-1),Ge=Object(o.createTextVNode)("我知道了"),Ke=n("543e"),Je=(n("e7e5"),Object(ie.t)()),Ze=Object(o.defineComponent)({props:{isShowContact:{type:Boolean,default:function(){return!1}},contantDetail:{type:Object,default:function(){}}},components:Object(A.a)({VanLoading:Ke.b},G.a.Component.name,G.a.Component),setup:function(e,t){var n=Object(o.getCurrentInstance)(),a=Object(o.reactive)({parseImgUrl:ie.y,contantDetail:e.contantDetail,userInfo:Je,imgUrl:n.proxy.$imgUrl,isShowContact:e.isShowContact,closeDailog:function(){t.emit("closeDailog")},queryCustomerservice:function(){var e={criteria:{projectId:a.userInfo.projectId}};Object(le.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(B.a)({},Object(o.toRefs)(a))}}),$e=(Ze=(n("4458"),me()(Ze,[["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",We,[Fe,Object(o.createElementVNode)("div",Ue,[Object(o.createElementVNode)("div",_e,[Object(o.createElementVNode)("img",{src:e.imgUrl+"&key="+e.contantDetail.wechatQrCode,alt:""},null,8,Re),Pe]),Object(o.createElementVNode)("div",He,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","phone-icon.svg"),alt:""},null,8,ze),Object(o.createElementVNode)("div",Xe,Object(o.toDisplayString)(e.contantDetail.phone),1),Ye])]),Object(o.createVNode)(i,{class:"dailog-btn",onClick:e.closeDailog},{default:Object(o.withCtx)((function(){return[Ge]})),_:1},8,["onClick"])])]})),_:1},8,["show"])}]])),{class:"scene-config"}),Qe=["src"],et={class:"time-text"},tt=["src"],nt=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 at(e){return Object(o.pushScopeId)("data-v-10ea159b"),e=e(),Object(o.popScopeId)(),e}var ot=n("6c02"),ct=n("0613"),rt={class:"air-dialog-content"},it={class:"dialog-top"},lt=["src"],st=at((function(){return Object(o.createElementVNode)("div",{class:"leave-title"},"工作辛苦了!",-1)})),mt={class:"leave-popup-body"},ut={key:1,class:"text-status"},dt={key:2,class:"text-status grey"},pt=[at((function(){return Object(o.createElementVNode)("span",null,"隐藏",-1)}))],ft=Object(o.defineComponent)({props:{isShowLeaveDailog:{type:Boolean,default:function(){return!1}}},components:Object(A.a)({VanLoading:Ke.b},G.a.Component.name,G.a.Component),setup:function(e,t){var n=Object(o.reactive)({parseImgUrl:ie.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(B.a)({},Object(o.toRefs)(n))}}),bt=(ft=(n("1196"),me()(ft,[["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",rt,[Object(o.createElementVNode)("div",it,[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,lt)):Object(o.createCommentVNode)("",!0)]),st,Object(o.createElementVNode)("div",mt,[(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",ut)):Object(o.createCommentVNode)("",!0),"grey"===e.status?(Object(o.openBlock)(),Object(o.createElementBlock)("span",dt)):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.text),1)])})),128))]),Object(o.createElementVNode)("div",{class:"dialog-btns",onClick:t[0]||(t[0]=function(){return e.closeDailog&&e.closeDailog.apply(e,arguments)})},pt)])]})),_:1},8,["show"])}],["__scopeId","data-v-10ea159b"]])),ft=Object(o.defineComponent)({props:{workkArr:{type:Array,default:function(){return[]}}},components:{LeaveDailog:ft},setup:function(e,t){Object(o.getCurrentInstance)();var n=Object(ot.d)(),a=(Object(ct.b)(),Object(o.reactive)({parseImgUrl:ie.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(ie.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(ie.b)("YYYY-MM-DD"),o=0;o<e.length;o++){var c,r=Object(ie.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(ie.o)();Object(ie.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(ie.e)(i)+"~"+Object(ie.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(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(n)+"~"+Object(ie.e)(o),e&&e.text&&(a.timerText.text="工作时间(今日~".concat(e.text,")"),a.timerText.timer=Object(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(n)+"~"+Object(ie.e)(o),e&&e.text&&(a.timerText.text="工作时间~".concat(e.text),a.timerText.timer=Object(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(n)+"~"+Object(ie.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(ie.e)(n)+"~"+Object(ie.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(ie.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(le.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(B.a)({},Object(o.toRefs)(a))}}),ft=(n("2447"),me()(ft,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("leave-dailog");return Object(o.openBlock)(),Object(o.createElementBlock)("div",$e,[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,Qe),Object(o.createElementVNode)("div",et,[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,tt),nt])):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"}),gt=["src"],Ot={class:"time-text"},ht=["src"],jt=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 vt(e){return Object(o.pushScopeId)("data-v-de46fb16"),e=e(),Object(o.popScopeId)(),e}var Tt={class:"air-dialog-content"},kt={class:"dialog-top"},It=["src"],yt=vt((function(){return Object(o.createElementVNode)("div",{class:"leave-title"},"工作辛苦了!",-1)})),St={class:"leave-popup-body"},Ct={key:1,class:"text-status"},wt={key:2,class:"text-status grey"},Dt=[vt((function(){return Object(o.createElementVNode)("span",null,"隐藏",-1)}))],Et=Object(o.defineComponent)({props:{isShowLeaveDailog:{type:Boolean,default:function(){return!1}}},components:Object(A.a)({VanLoading:Ke.b},G.a.Component.name,G.a.Component),setup:function(e,t){var n=Object(o.reactive)({parseImgUrl:ie.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(B.a)({},Object(o.toRefs)(n))}}),xt=(Et=(n("a9fd"),me()(Et,[["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",Tt,[Object(o.createElementVNode)("div",kt,[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,It)):Object(o.createCommentVNode)("",!0)]),yt,Object(o.createElementVNode)("div",St,[(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",Ct)):Object(o.createCommentVNode)("",!0),"grey"===e.status?(Object(o.openBlock)(),Object(o.createElementBlock)("span",wt)):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)})},Dt)])]})),_:1},8,["show"])}],["__scopeId","data-v-de46fb16"]])),n("5118")),Nt=(Et=Object(o.defineComponent)({props:{workkArr:{type:Array,default:function(){return[]}}},components:{LeaveDailog:Et},setup:function(e,t){Object(o.getCurrentInstance)();var n=Object(ot.d)(),a=(Object(ct.b)(),Object(o.reactive)({parseImgUrl:ie.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(ie.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(ie.b)("YYYY-MM-DD"),o=0;o<e.length;o++){var c,r=Object(ie.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(ie.o)();Object(ie.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(ie.e)(i)+"~"+Object(ie.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(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(n)+"~"+Object(ie.e)(o),e&&e.text&&(a.timerText.text="工作时间(今日~".concat(e.text,")"),a.timerText.timer=Object(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(n)+"~"+Object(ie.e)(o),e&&e.text&&(a.timerText.text="工作时间~".concat(e.text),a.timerText.timer=Object(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(e.startTime)+"~"+Object(ie.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(ie.e)(n)+"~"+Object(ie.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(ie.e)(n)+"~"+Object(ie.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(ie.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(ie.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(le.O)(a.delTimeArr).then((function(e){a.leaveBtnFlag=!1,t.emit("closeWork");var n=Object(xt.setTimeout)((function(){t.emit("leaveWork"),Object(xt.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(B.a)({},Object(o.toRefs)(a))}}),Et=(n("4b8a"),me()(Et,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("leave-dailog");return Object(o.openBlock)(),Object(o.createElementBlock)("div",bt,[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,gt),Object(o.createElementVNode)("div",Ot,[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,ht),jt])):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"}),Vt=["onClick"],Bt=["src"];function Lt(e){return Object(o.pushScopeId)("data-v-3e78a67a"),e=e(),Object(o.popScopeId)(),e}var At=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(ot.d)(),a=(Object(ct.b)(),{DISCUSSING:Object(ie.y)("ipdImages","taolun.svg"),PROJECTING:Object(ie.y)("ipdImages","touying.svg"),ADJOURNMENT:Object(ie.y)("ipdImages","sanhui.svg")}),c=Object(o.reactive)({parseImgUrl:ie.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(ie.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(le.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(B.a)({},Object(o.toRefs)(c))}}),qt=(At=(n("b2ec"),me()(At,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Nt,[(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,Bt),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(t.sceneName),1)],14,Vt)})),128))])}],["__scopeId","data-v-0c8e2a5e"]])),n("0500")),Mt={class:"header-content"},Wt={class:"weather"},Ft=["src"],Ut={class:"weather-text"},_t={class:"pr5"},Rt=Lt((function(){return Object(o.createElementVNode)("span",null,"/",-1)})),Pt=Lt((function(){return Object(o.createElementVNode)("span",{class:"pr5"},"PM2.5",-1)})),Ht={class:"pr5"};function zt(e){return Object(o.pushScopeId)("data-v-0f70331e"),e=e(),Object(o.popScopeId)(),e}var Xt=n("ad06"),Yt=(n("c3a6"),Object(o.defineComponent)({props:{outWeather:{type:Object,default:function(){return{}}}},components:{VanIcon:Xt.b},setup:function(){var e=Object(ot.d)(),t=Object(o.reactive)({goBack:function(){window.history.go(-1)},setPermanentSpace:function(){e.push({path:"/mySpace"})}});return Object(B.a)({},Object(o.toRefs)(t))}})),Gt=(Yt=(n("7ed5"),me()(Yt,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Mt,[Object(o.createElementVNode)("div",Wt,[Object(o.withDirectives)(Object(o.createElementVNode)("img",{src:e.outWeather.imgname,class:"weather-icon",alt:""},null,8,Ft),[[o.vShow,e.outWeather.imgname]]),Object(o.createElementVNode)("div",Ut,[Object(o.createElementVNode)("p",null,[Object(o.createElementVNode)("span",_t,Object(o.toDisplayString)(e.outWeather.temperature||"--")+"℃",1),Rt,Pt,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.outWeather.pm25||"--"),1)]),Object(o.createElementVNode)("p",null,[Object(o.createElementVNode)("span",Ht,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")),Kt={class:"air"},Jt={class:"air-top"},Zt={class:"air-desc"},$t=zt((function(){return Object(o.createElementVNode)("p",{class:"air-title"},"空调",-1)})),Qt={class:"air-temperature"},en={key:0},tn={key:0,class:"air-status"},nn={key:1,class:"air-loading"},an=["src"],on={class:"air-right"},cn=["src"],rn={key:0,class:"air-control"},ln=zt((function(){return Object(o.createElementVNode)("div",{class:"control-title"},"温度调节",-1)})),sn={class:"btn-box"},mn=["src"],un=["src"],dn={key:1,class:"air-control"},pn=zt((function(){return Object(o.createElementVNode)("div",{class:"control-title"},"风量调节",-1)})),fn={class:"btn-box"},bn=["src"],gn=["src"],On={class:"air-dialog-content"},hn={class:"dialog-top"},jn=["src"],vn={class:"dialog-text"},Tn={class:"air-body-item-num"},kn={key:0,class:"air-temp-num"},In={key:1,class:"air-temp-load"},yn={key:0,class:"air-notice"},Sn=[zt((function(){return Object(o.createElementVNode)("span",null,"确定",-1)}))];const[Cn,wn]=Object(J.a)("switch");function Dn(e){return Object(o.pushScopeId)("data-v-00673b20"),e=e(),Object(o.popScopeId)(),e}J={size:Z.f,loading:Boolean,disabled:Boolean,modelValue:Z.h,activeColor:String,inactiveColor:String,activeValue:{type:Z.h,default:!0},inactiveValue:{type:Z.h,default:!1}},Z=Object(o.defineComponent)({name:Cn,props:J,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(ee.h)(()=>e.modelValue),()=>{var{size:t,loading:c,disabled:r,activeColor:i,inactiveColor:l}=e,s=n(),t={fontSize:Object($.b)(t),backgroundColor:s?i:l};return Object(o.createVNode)("div",{role:"switch",class:wn({on:s,loading:c,disabled:r}),style:t,tabindex:r?void 0:0,"aria-checked":s,onClick:a},[Object(o.createVNode)("div",{class:wn("node")},[(()=>{var t;if(e.loading)return t=n()?e.activeColor:e.inactiveColor,Object(o.createVNode)(Ke.a,{class:wn("loading"),color:t},null)})()])])}}}),J=Object(K.a)(Z);var En=(n("e3b3"),n("d9d2"),n("d399")),xn=(Z=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:(K={Switch:J},Object(A.a)(K,G.a.Component.name,G.a.Component),Object(A.a)(K,"Loading",Ke.b),K),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:ie.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(le.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(le.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(ie.y)("page-officehome","air_close.png")):a.airData.icon&&6!==a.airData.icon&&(a.airData.isOpen=!0,a.airData.airImg=Object(ie.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(ie.y)("page-officehome","air_close.png")}))},airChange:function(){a.userIsControl?a.loadingAir?Object(En.a)("指令正在下发中,勿重复操作!"):a.airComfir():Object(En.a)("您没有当前空间的控制权限!")},airComfir:function(){var e=a.airData.isOpen?"要关闭空调吗?":"要开启空调吗?",n=a.airData.isOpen?"关闭":"开启";G.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(le.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(ie.y)("page-officehome","temp-keep.png");break;case 2:e=Object(ie.y)("page-officehome","temp_cold.svg");break;case 3:e=Object(ie.y)("page-officehome","temp_sun.png");break;default:e=""}return e})));return Object(B.a)({airRunImg:c},Object(o.toRefs)(a))}}),K=(n("0143"),n("6f3b"),me()(Z,[["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",Kt,[Object(o.createElementVNode)("div",Jt,[Object(o.createElementVNode)("div",Zt,[$t,Object(o.createElementVNode)("p",Qt,[Object(o.createTextVNode)(Object(o.toDisplayString)(e.airData.tempSet||"")+" ",1),e.airData.tempSet?(Object(o.openBlock)(),Object(o.createElementBlock)("sup",en,"℃")):Object(o.createCommentVNode)("",!0)]),e.hasAir?(Object(o.openBlock)(),Object(o.createElementBlock)("p",tn,Object(o.toDisplayString)(e.airData.isOpen?"空调已开启":"空调已关闭"),1)):Object(o.createCommentVNode)("",!0),e.airData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("p",nn,[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,an)):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.airData.spaceStatus),1)])):Object(o.createCommentVNode)("",!0)]),Object(o.createElementVNode)("div",on,[e.airData.airImg?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.airData.airImg,alt:""},null,8,cn)):(Object(o.openBlock)(),Object(o.createBlock)(i,{key:1,style:{"padding-top":"20px"}})),e.hasAir?(Object(o.openBlock)(),Object(o.createBlock)(l,{key:2,class:"switch-btn",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",rn,[ln,Object(o.createElementVNode)("div",sn,[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,mn)]),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,un)])])])):Object(o.createCommentVNode)("",!0),e.userIsControl&&e.airData.isOpen&&e.showAirVolumeBtn?(Object(o.openBlock)(),Object(o.createElementBlock)("div",dn,[pn,Object(o.createElementVNode)("div",fn,[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,bn)]),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,gn)])])])):Object(o.createCommentVNode)("",!0),Object(o.createVNode)(s,{show:e.showDialog,"onUpdate:show":t[5]||(t[5]=function(t){return e.showDialog=t}),class:"dialog-width","show-confirm-button":!1,"show-cancel-button":!1},{default:Object(o.withCtx)((function(){return[Object(o.createElementVNode)("div",On,[Object(o.createElementVNode)("div",hn,[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,jn)]),Object(o.createElementVNode)("div",vn,[Object(o.createElementVNode)("div",Tn,[e.airSetText.notice?(Object(o.openBlock)(),Object(o.createElementBlock)("div",kn,Object(o.toDisplayString)(e.airSetText.notice),1)):(Object(o.openBlock)(),Object(o.createElementBlock)("div",In,[Object(o.createVNode)(i,{type:"spinner"})]))]),e.airSetText.remark&&e.airSetText.remark.length?(Object(o.openBlock)(),Object(o.createElementBlock)("p",yn,[(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"]))},Sn)])]})),_:1},8,["show"])])}],["__scopeId","data-v-0f70331e"]])),{key:0,class:"floor"}),Nn={class:"com-top"},Vn={class:"com-desc"},Bn=Dn((function(){return Object(o.createElementVNode)("p",{class:"com-top-title"},"地暖",-1)})),Ln={class:"com-top-temperature"},An=Dn((function(){return Object(o.createElementVNode)("sup",null,"℃",-1)})),qn={class:"com-right"},Mn=["src"],Wn={class:"top-switch"},Fn={key:0,class:"top-nav"},Un={key:1},_n={key:0,class:"com-control com-control-padding"},Rn={class:"control-box"},Pn={class:"temp-slider",id:"slideFloorId"},Hn={class:"slider-bar",id:"barFloorId"},zn={class:"bar-temp"},Xn=Dn((function(){return Object(o.createElementVNode)("div",{class:"bar-circle",id:"handFloorId"},null,-1)})),Yn={class:"temp-left",id:"tempLeftId"},Gn={class:"temp-right"},Kn={key:1,class:"line"},Jn={key:2,class:"light-box"},Zn={class:"control-top"},$n={class:"control-temp"},Qn=Dn((function(){return Object(o.createElementVNode)("sup",null,"℃",-1)})),ea={class:"control-bottom"},ta={class:"control-title"},na=["onClick","src"];function aa(e){return Object(o.pushScopeId)("data-v-d8f86c52"),e=e(),Object(o.popScopeId)(),e}var oa=n("4362"),ca=(Z=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:J},setup:function(e,t){var n=Object(o.reactive)({distroyFlag:!1,seviceEquipmentList:e.seviceEquipmentList,forceOverTimeFlag:e.forceOverTimeFlag,spaceId:e.spaceId,heatingData:{},isOpen:!1,parseImgUrl:ie.y,showFloorBox:e.showFloorBox,timeOut:null,loadingFlag:!1,floorHeatingList:[],floorHeathingStatus:null,swiperIinit:!1,part:1,realTemp:0,navType:"all",runStatus:0,lightColorImg:Object(ie.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(En.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(le.R)(e).then((function(e){n.loadingFlag=!1,t&&(t.loading=!1)})).catch((function(){n.loadingFlag=!1,t.loading=!1,Object(En.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(oa.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()})),ce(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(ie.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(ie.a)(n.realTemp)))}}))},setRelTemp:function(){n.realTemp=n.heatingData.tempSet||0,n.realTemp&&(n.realTemp=n.realTemp.toFixed(1),n.realTemp=Object(ie.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(ie.a)(e.tempSet))}))},getFloorHeatingList:function(){var e=Object(ie.B)({spaceId:n.spaceId});Object(le.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(ie.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(B.a)({},Object(o.toRefs)(n))}}),Z=(n("7248"),me()(Z,[["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",xn,[Object(o.createElementVNode)("div",Nn,[Object(o.createElementVNode)("div",Vn,[Bn,Object(o.createElementVNode)("span",Ln,[Object(o.createTextVNode)(Object(o.toDisplayString)(e.realTemp||"--")+" ",1),An])]),Object(o.createElementVNode)("div",qn,[Object(o.createElementVNode)("img",{src:e.isOpen?e.parseImgUrl("page-officehome","heating-active.svg"):e.parseImgUrl("page-officehome","heating.svg"),alt:""},null,8,Mn)])]),Object(o.createElementVNode)("div",Wn,[e.floorHeatingList&&1<e.floorHeatingList.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Fn,[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",Un)),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",_n,[Object(o.createElementVNode)("div",Rn,[Object(o.createElementVNode)("div",Pn,[Object(o.createElementVNode)("div",Hn,[Object(o.createElementVNode)("div",zn,Object(o.toDisplayString)(e.realTemp?e.realTemp+"℃":"--"),1),Xn]),Object(o.createElementVNode)("div",Yn,Object(o.toDisplayString)(e.heatingData.minTempSet),1),Object(o.createElementVNode)("div",Gn,Object(o.toDisplayString)(e.heatingData.maxTempSet),1)])])])):Object(o.createCommentVNode)("",!0),"child"==e.navType?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Kn)):Object(o.createCommentVNode)("",!0),"child"==e.navType?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Jn,[(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",Zn,[Object(o.createElementVNode)("div",$n,[Object(o.createElementVNode)("span",null,[Object(o.createTextVNode)(Object(o.toDisplayString)(t.tempSet||"--"),1),Qn]),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",ea,[Object(o.createElementVNode)("div",ta,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,na)])])})),128))])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)}],["__scopeId","data-v-00673b20"]])),{class:"air"}),ra={class:"com-top"},ia={class:"com-desc"},la=aa((function(){return Object(o.createElementVNode)("p",{class:"com-top-title"},"空调",-1)})),sa={class:"com-top-temperature"},ma=aa((function(){return Object(o.createElementVNode)("sup",null,"℃",-1)})),ua={class:"com-right"},da=["src"],pa=["src"],fa={class:"top-switch"},ba={key:0,class:"top-nav"},ga={key:1},Oa={key:0,class:"line"},ha={key:1,class:"main-temp"},ja={class:"com-control com-control-padding"},va={class:"temp-slider",id:"sliderId"},Ta={class:"slider-bar",id:"barId"},ka={class:"bar-temp"},Ia=aa((function(){return Object(o.createElementVNode)("div",{class:"bar-circle",style:{border:"2px solid rgba(255, 255, 255, 1)"},id:"handId"},null,-1)})),ya={class:"temp-left",id:"tempManualLeftId"},Sa={class:"temp-right"},Ca={key:0,class:"com-control"},wa={class:"control-box"},Da={class:"volume-box"},Ea={class:"number"},xa=aa((function(){return Object(o.createElementVNode)("div",{class:"text"},"风量调节",-1)})),Na={class:"volume-icon"},Va=["src"],Ba=["src"],La=["src"],Aa={key:1,class:"com-control"},qa={class:"control-box"},Ma={class:"volume-box"},Wa={class:"model"},Fa=aa((function(){return Object(o.createElementVNode)("div",{class:"text"},"模式设定",-1)})),Ua={class:"volume-icon"},_a=["src"],Ra=["src"],Pa=["src"],Ha={key:1,class:"air-child"},za=["onClick"],Xa={class:"open-title"},Ya={class:"open-temp-box"},Ga=aa((function(){return Object(o.createElementVNode)("sup",null,"°C",-1)})),Ka={key:0,class:"text-box"},Ja=["src"],Za=aa((function(){return Object(o.createElementVNode)("span",null,"制热模式",-1)})),$a={key:1,class:"text-box"},Qa=["src"],eo=aa((function(){return Object(o.createElementVNode)("span",null,"制冷模式",-1)})),to={key:2,class:"text-box"},no=["src"],ao=aa((function(){return Object(o.createElementVNode)("span",null,"通风模式",-1)})),oo={class:"control-bottom"},co={class:"control-title"},ro=["src"];n("c740");var io=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(A.a)({Switch:J},G.a.Component.name,G.a.Component),setup:function(e,t){var n=Object(o.reactive)({seviceEquipmentList:e.seviceEquipmentList,lightColorImg:Object(ie.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:ie.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(L.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,ce(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(ie.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(ie.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(ie.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(le.R)(e).then((function(e){n.loadinngEnd()})).catch((function(){n.loadinngEnd(),Object(En.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(ie.a)(e.tempSet))}))},barSwiperInit:function(){return Object(L.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(ie.B)(t);Object(le.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(ie.a)(n.airTemp)),n.airData.maxTempSet=t.maxTempSet||32,n.airData.minTempSet=t.minTempSet||16,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(B.a)({},Object(o.toRefs)(n))}}),lo=(io=(n("4179"),me()(io,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("Switch");return Object(o.openBlock)(),Object(o.createElementBlock)("div",ca,[Object(o.createElementVNode)("div",ra,[Object(o.createElementVNode)("div",ia,[la,Object(o.createElementVNode)("p",sa,[Object(o.createTextVNode)(Object(o.toDisplayString)(e.airTemp||"--")+" ",1),ma])]),Object(o.createElementVNode)("div",ua,[e.airData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("page-officehome","openair.svg"),alt:""},null,8,da)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","air_close.svg"),alt:""},null,8,pa))])]),Object(o.createElementVNode)("div",fa,[e.equipList&&1<e.equipList.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",ba,[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",ga)),"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",Oa)):Object(o.createCommentVNode)("",!0),"all"==e.navType&&e.airData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("div",ha,[Object(o.withDirectives)(Object(o.createElementVNode)("div",ja,[Object(o.createElementVNode)("div",va,[Object(o.createElementVNode)("div",Ta,[Object(o.createElementVNode)("div",ka,Object(o.toDisplayString)(e.realTemp)+"℃",1),Ia]),Object(o.createElementVNode)("div",ya,Object(o.toDisplayString)(e.airData.minTempSet),1),Object(o.createElementVNode)("div",Sa,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",Ca,[Object(o.createElementVNode)("div",wa,[Object(o.createElementVNode)("div",Da,[Object(o.createElementVNode)("div",Ea,[(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))]),xa]),Object(o.createElementVNode)("div",Na,[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,Va)],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,Ba)],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,La)],2)])])])):Object(o.createCommentVNode)("",!0),e.airData.boundPoint&&e.airData.boundPoint.modeSetBound?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Aa,[Object(o.createElementVNode)("div",qa,[Object(o.createElementVNode)("div",Ma,[Object(o.createElementVNode)("div",Wa,Object(o.toDisplayString)(1==e.airData.workMode?"制冷":2==e.airData.workMode?"制热":"通风"),1),Fa]),Object(o.createElementVNode)("div",Ua,[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,_a)],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,Ra)],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,Pa)],2)])])])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)],64)):Object(o.createCommentVNode)("",!0),"child"==e.navType?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ha,[(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",Xa,[Object(o.createElementVNode)("div",Ya,[Object(o.createElementVNode)("span",null,[Object(o.createTextVNode)(Object(o.toDisplayString)(t.tempSet||"--"),1),Ga]),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",Ka,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","hot-small.svg"),alt:""},null,8,Ja),Za])):1==t.workMode?(Object(o.openBlock)(),Object(o.createElementBlock)("div",$a,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","cold-small.svg"),alt:""},null,8,Qa),eo])):(Object(o.openBlock)(),Object(o.createElementBlock)("div",to,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","tongfeng-small.svg"),alt:""},null,8,no),ao]))],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",oo,[Object(o.createElementVNode)("div",co,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,ro)):Object(o.createCommentVNode)("",!0)])],8,za)})),128))])):Object(o.createCommentVNode)("",!0)])}],["__scopeId","data-v-d8f86c52"]])),{key:0,class:"light"}),so={class:"light-top"},mo={class:"light-desc"},uo={class:"light-title"},po={class:"light-right"},fo={key:0,class:"switch-box"},bo=["src"],go={key:0,class:"light-main-control"},Oo={key:0,class:"main-color"},ho=["src"],jo={key:1},vo={key:1,class:"light-box"},To=["onClick"],ko={class:"control-top"},Io=["src"],yo={class:"control-bottom"},So={class:"control-title"},Co=["src"],wo={key:0},Do={key:1};n("4de4");var Eo=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:J},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(ie.y)("page-officehome","lightColorControl.svg"),lightImg:Object(ie.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(le.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(ie.y)("page-officehome","lamp_open.png"),a[c].imgClose=Object(ie.y)("page-officehome","lamp_close.png")):(a[c].imgOpen=Object(ie.y)("page-officehome","atmLamp_small_open.png"),a[c].imgClose=Object(ie.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(ie.y)("page-officehome","lamp_open.png"):Object(ie.y)("page-officehome","lamp_close.png"),a[0]&&1!==a[0].lightType&&(n.lightImg=n.lampSw?Object(ie.y)("page-officehome","atmLamp_small_open.png"):Object(ie.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(ie.y)("page-officehome","lamp_open.png"):Object(ie.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(En.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(le.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(En.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(le.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(ie.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(B.a)({isShowChildLight:a},Object(o.toRefs)(n))}}),xo=(Eo=(n("f3cc"),n("83b6"),me()(Eo,[["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",lo,[Object(o.createElementVNode)("div",so,[Object(o.createElementVNode)("div",mo,[Object(o.createElementVNode)("p",uo,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",po,[e.isShowChildLight?(Object(o.openBlock)(),Object(o.createElementBlock)("div",fo,[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,bo))])]),e.isShowChildLight?Object(o.createCommentVNode)("",!0):(Object(o.openBlock)(),Object(o.createElementBlock)("div",go,[e.lampList[0].bright||e.lampList[0].colorTemperature?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Oo,[Object(o.createElementVNode)("img",{src:e.lightColorImg,onClick:t[2]||(t[2]=function(t){return e.showLightColorCtrol(e.lampList[0])}),alt:""},null,8,ho)])):(Object(o.openBlock)(),Object(o.createElementBlock)("div",jo)),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",vo,[(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",ko,[Object(o.createElementVNode)("img",{src:t.switch?t.imgOpen:t.imgClose,alt:""},null,8,Io),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",yo,[Object(o.createElementVNode)("div",So,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,Co)):Object(o.createCommentVNode)("",!0)])],8,To)):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",wo,"展开更多")):(Object(o.openBlock)(),Object(o.createElementBlock)("span",Do,"收起全部"))])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)}],["__scopeId","data-v-19dce408"]])),{key:0,class:"curtain"}),No={class:"curtain-top"},Vo={class:"curtain-desc"},Bo={class:"curtain-title"},Lo={class:"curtain-right"},Ao=["src"],qo=["src"],Mo={key:0,class:"curtain-box"},Wo={class:"top-nav"},Fo={key:0,class:"line"},Uo={class:"top-control"},_o=["src"],Ro=["src"],Po=["src"],Ho={key:1},zo=["src"],Xo=["src"],Yo=["src"],Go={key:1},Ko={key:2,class:"curtain-child"},Jo={class:"curtain-name"},Zo={class:"name"},$o={key:0},Qo={class:"curtain-control top-control"},ec=["onClick"],tc=["src"],nc=["onClick"],ac=["src"],oc=["src"],cc={key:1},rc=["onClick"],ic=["src"],lc=["onClick"],sc=["src"],mc=["src"],uc={key:1};function dc(e){return Object(o.pushScopeId)("data-v-6a5e24b3"),e=e(),Object(o.popScopeId)(),e}var pc=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:ie.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(le.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(le.R)(e).then((function(e){a.oldTime=Object(ie.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(ie.b)("YYYY.MM.DD HH:mm:ss");a.oldTime?60<a.getTimeDifference(a.oldTime,e)&&(a.getEqpGroup(),a.clearTimer()):a.oldTime=Object(ie.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(B.a)({},Object(o.toRefs)(a))}}),fc=(pc=(n("ba16"),me()(pc,[["render",function(e,t,n,a,c,r){return e.curtainData&&e.curtainData.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",xo,[Object(o.createElementVNode)("div",No,[Object(o.createElementVNode)("div",Vo,[Object(o.createElementVNode)("p",Bo,Object(o.toDisplayString)(e.curtainData.length&&1==e.curtainData.length?e.curtainData[0].name:"窗帘"),1)]),Object(o.createElementVNode)("div",Lo,[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,Ao)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_roll.svg"),alt:""},null,8,qo))])]),e.curtainData.length&&1<e.curtainData.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Mo,[Object(o.createElementVNode)("div",Wo,[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",Fo)):Object(o.createCommentVNode)("",!0),Object(o.createElementVNode)("div",Uo,[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,_o)])):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,Ro)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_down.svg"),alt:""},null,8,Po))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",Ho,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,zo)])):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,Xo)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_up.svg"),alt:""},null,8,Yo))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",Go,Object(o.toDisplayString)(e.count),1))],2)])],64)):Object(o.createCommentVNode)("",!0),"child"==e.type?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ko,[(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",Jo,[Object(o.createElementVNode)("div",Zo,Object(o.toDisplayString)(t.name),1),t.isOpenSet?(Object(o.openBlock)(),Object(o.createElementBlock)("span",$o,"开度"+Object(o.toDisplayString)(t.openValue)+"%",1)):Object(o.createCommentVNode)("",!0)]),Object(o.createElementVNode)("div",Qo,[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,tc)],8,ec)):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,ac)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_down.svg"),alt:""},null,8,oc))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",cc,Object(o.toDisplayString)(t.count),1))],10,nc),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,ic)],8,rc)):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,sc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("page-officehome","curtain_up.svg"),alt:""},null,8,mc))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",uc,Object(o.toDisplayString)(t.count),1))],10,lc)])])})),128))])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)}],["__scopeId","data-v-1219f778"]])),{class:"curtain-temp"}),bc={class:"curtain-tep-top"},gc={class:"bright-box"},Oc={class:"bight-text"},hc=dc((function(){return Object(o.createElementVNode)("span",null,"设定开度",-1)})),jc=dc((function(){return Object(o.createElementVNode)("span",{class:"line"},null,-1)})),vc={class:"text-aper"},Tc={class:"curtain-control"},kc={class:"bight-slider",id:"curtainSlider1"},Ic=dc((function(){return Object(o.createElementVNode)("div",{class:"slider-bar",id:"curtainHandld1"},null,-1)})),yc=dc((function(){return Object(o.createElementVNode)("div",{class:"temp-left"},"关",-1)})),Sc=dc((function(){return Object(o.createElementVNode)("div",{class:"temp-right"},"开",-1)})),Cc={class:"curtain-control top-control"},wc=["src"],Dc=["src"],Ec={key:1,class:"count-num"},xc=dc((function(){return Object(o.createElementVNode)("span",{class:"title"},"关闭",-1)})),Nc=["src"],Vc=dc((function(){return Object(o.createElementVNode)("span",{class:"title"},"暂停",-1)})),Bc=["src"],Lc=["src"],Ac={key:1,class:"count-num"},qc=dc((function(){return Object(o.createElementVNode)("span",{class:"title"},"打开",-1)})),Mc=Object(o.defineComponent)({props:{curtainData:{type:Array,default:function(){return[]}}},components:{Switch:J},setup:function(e,t){var n=Object(o.reactive)({lampSw:!1,itemWidth:"0%",apertureVal:0,activeIndex:0,count:2,parseImgUrl:ie.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)})),ce(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(le.R)(e).then((function(e){}))},barSwiperInit:function(){return Object(L.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(B.a)({},Object(o.toRefs)(n))}}),Wc=(Mc=(n("4dd8"),me()(Mc,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",fc,[Object(o.createElementVNode)("div",bc,[Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.curtainData&&1<e.curtainData.length?"窗帘":e.curtainObj.name),1)]),Object(o.createElementVNode)("div",gc,[Object(o.createElementVNode)("div",Oc,[hc,jc,Object(o.createElementVNode)("span",vc,Object(o.toDisplayString)(e.apertureVal)+"%",1)]),Object(o.createElementVNode)("div",Tc,[Object(o.createElementVNode)("div",kc,[Object(o.createElementVNode)("div",{class:"item-now",style:Object(o.normalizeStyle)({width:e.itemWidth})},null,4),Ic,yc,Sc])])]),Object(o.createElementVNode)("div",Cc,[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,wc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,class:"curtain-down-icon",src:e.parseImgUrl("page-officehome","curtain_down.svg"),alt:""},null,8,Dc))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",Ec,Object(o.toDisplayString)(e.count),1)),xc],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,Nc),Vc]),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,Bc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,class:"curtain-up-icon",src:e.parseImgUrl("page-officehome","curtain_up.svg"),alt:""},null,8,Lc))],64)):(Object(o.openBlock)(),Object(o.createElementBlock)("span",Ac,Object(o.toDisplayString)(e.count),1)),qc],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)}))),Fc={class:"btns"};n("ddb0");var Uc=n("f253"),_c=(Uc=(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:Uc.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(ie.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(En.a)("请选择时间")},setWorkOverTime:function(){var n=Object(ie.b)();"明天"===a.checkValues[0]&&(n=Object(ie.s)());var o=(o=a.checkValues[1]).replace(":","");n={projectId:e.projectId,objectId:e.spaceId,endDate:n,endTime:o+"00",type:2};Object(le.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(B.a)({picker:n},Object(o.toRefs)(a))}})),Uc=(n("0970"),me()(Uc,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("van-picker");return Object(o.openBlock)(),Object(o.createElementBlock)("div",null,[Wc,(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",Fc,[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"}),Rc={class:"nav-left"},Pc=["onClick"],Hc=["src"],zc=["src"],Xc={class:"nav-right"},Yc=["onClick"],Gc=["src"],Kc=["src"],Jc=Object(o.defineComponent)({props:{navList:{type:Array,default:function(){return[]}}},setup:function(e,t){Object(ot.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(B.a)({},Object(o.toRefs)(n))}}),Zc=(Jc=(n("e337"),me()(Jc,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",_c,[Object(o.createElementVNode)("div",Rc,[(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,Hc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:t.img,alt:""},null,8,zc))],10,Pc)),[[o.vShow,n<3&&t.noShow]])})),128))]),Object(o.createElementVNode)("div",Xc,[(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,Gc)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:t.img,alt:""},null,8,Kc))],10,Yc)),[[o.vShow,3<=n&&t.noShow]])})),128))])])}],["__scopeId","data-v-67166e33"]])),{class:"scene-dailog"}),$c={class:"title"},Qc={class:"dailog-content"},er=["src"],tr={class:"status-text1"},nr=Object(o.createTextVNode)(" 切换至 "),ar=Object(o.createTextVNode)(" 场景 "),or=Object(o.createTextVNode)("切换中..."),cr={key:1,class:"status-text2"},rr={key:0},ir=Object(o.createTextVNode)("我知道了"),lr=Object(o.defineComponent)({props:{projectId:{type:String,default:function(){return""}},scenarioArr:{type:Array,default:function(){return[]}},secenaroStatus:{type:Object,default:function(){}}},components:{VanLoading:Ke.b},setup:function(e,t){var n=Object(o.reactive)({parseImgUrl:ie.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(B.a)({},Object(o.toRefs)(n))}}),sr=(lr=(n("5c73"),me()(lr,[["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",Zc,[Object(o.createElementVNode)("div",$c,Object(o.toDisplayString)(e.secenaroStatus.localName),1),Object(o.createElementVNode)("div",Qc,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","taolun-big.svg")},null,8,er),Object(o.createElementVNode)("span",tr,[nr,Object(o.createElementVNode)("i",null,Object(o.toDisplayString)(e.secenaroStatus.sceneName),1),ar]),e.secenaroStatus.loading?(Object(o.openBlock)(),Object(o.createBlock)(i,{key:0,class:"status-text2"},{default:Object(o.withCtx)((function(){return[or]})),_:1})):Object(o.createCommentVNode)("",!0),e.secenaroStatus.loading?Object(o.createCommentVNode)("",!0):(Object(o.openBlock)(),Object(o.createElementBlock)("span",cr,[e.secenaroStatus.lodingText?(Object(o.openBlock)(),Object(o.createElementBlock)("span",rr," 已为您切换至适宜"+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[ir]})),_:1},8,["onClick"])])}],["__scopeId","data-v-f8a217b2"]])),n("cda6")),mr={class:"map-home map-home-pading"},ur={class:"map-top"},dr={class:"space-home"},pr={class:"com-search"},fr={class:"search-icon"},br=["src"],gr={class:"space-box"},Or=["onClick"];function hr(e){return Object(o.pushScopeId)("data-v-b4fb4e34"),e=e(),Object(o.popScopeId)(),e}var jr=n("d961"),vr=(jr=(n("5852"),Object(o.defineComponent)({props:{spaceData:{type:Array,default:function(){return[]}},spaceInfo:{type:Object,default:function(){}}},components:{vanSearch:jr.a},setup:function(e,t){Object(ot.d)();var n=Object(ie.t)(),a=(Object(ct.b)(),Object(o.reactive)({parseImgUrl:ie.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(le.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(B.a)({},Object(o.toRefs)(a))}})),jr=(n("f1fd"),me()(jr,[["render",function(e,t,n,a,c,r){var i=Object(o.resolveComponent)("van-search");return Object(o.openBlock)(),Object(o.createElementBlock)("div",dr,[Object(o.createElementVNode)("div",pr,[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",fr,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("search-icon","search-icon.svg"),alt:""},null,8,br)])]),Object(o.createElementVNode)("div",gr,[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,Or)})),128)):Object(o.createCommentVNode)("",!0)])])}],["__scopeId","data-v-4b041186"]])),n("772a")),Tr=(n("38d5"),n("565f")),kr=(n("be7f"),n("34e9")),Ir=(n("0653"),n("b650")),yr=(vr=(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:vr.a,vanField:Tr.b,CellGroup:kr.a,vanButton:Ir.b,SpaceBox:jr,MapBox:qt.a},setup:function(e,t){Object(ot.d)(),Object(ct.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(le.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(B.a)({},Object(o.toRefs)(n))}})),Tr=(n("fe6d"),me()(vr,[["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",mr,[Object(o.createElementVNode)("div",ur,[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"}),Sr={class:"light-tep-top"},Cr={key:0,class:"bright-box"},wr={class:"bight-text"},Dr=hr((function(){return Object(o.createElementVNode)("span",null,"亮度",-1)})),Er={class:"light-control"},xr={class:"bight-slider",id:"sliderId1"},Nr=hr((function(){return Object(o.createElementVNode)("div",{class:"slider-bar",id:"handId1"},null,-1)})),Vr={key:1,class:"bright-box"},Br={class:"bight-text"},Lr=hr((function(){return Object(o.createElementVNode)("span",null,"色温",-1)})),Ar=hr((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 qr(e){return Object(o.pushScopeId)("data-v-7c23f336"),e=e(),Object(o.popScopeId)(),e}kr=Object(o.defineComponent)({props:{lightData:{type:Object,default:function(){}}},components:{Switch:J},setup:function(e,t){var n=Object(o.reactive)({lampSw:!1,itemWidth:"0%",lightData:e.lightData,swiperIinit:!1,setSpaceContrl:function(e){Object(le.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)})),ce(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)})),ce(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(L.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(B.a)({},Object(o.toRefs)(n))}}),n("4235"),Ir=me()(kr,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",yr,[Object(o.createElementVNode)("div",Sr,[Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.lightData.localName),1)]),e.lightData.bright?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Cr,[Object(o.createElementVNode)("div",wr,[Dr,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.lightData.brightValueRate)+"%",1)]),Object(o.createElementVNode)("div",Er,[Object(o.createElementVNode)("div",xr,[Object(o.createElementVNode)("div",{class:"item-now",style:Object(o.normalizeStyle)({width:e.itemWidth})},null,4),Nr])])])):Object(o.createCommentVNode)("",!0),e.lightData.colorTemperature?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Vr,[Object(o.createElementVNode)("div",Br,[Lr,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.lightData.colorTempValueRate)+"%",1)]),Ar])):Object(o.createCommentVNode)("",!0)])}],["__scopeId","data-v-b4fb4e34"]]);var Mr={class:"light-temp"},Wr=qr((function(){return Object(o.createElementVNode)("div",{class:"light-tep-top"},[Object(o.createElementVNode)("span",null,"地暖")],-1)})),Fr={class:"bright-box"},Ur={class:"bight-text"},_r=qr((function(){return Object(o.createElementVNode)("span",null,"温度调节",-1)})),Rr={class:"control-box"},Pr={class:"temp-slider",id:"slideFloorId2"},Hr=qr((function(){return Object(o.createElementVNode)("div",{class:"slider-bar",id:"barFloorId2"},[Object(o.createElementVNode)("div",{class:"bar-circle",id:"handFloorId2"})],-1)})),zr={class:"temp-left",id:"tempLeftId"},Xr={class:"temp-right"};function Yr(e){return Object(o.pushScopeId)("data-v-572df90f"),e=e(),Object(o.popScopeId)(),e}jr=Object(o.defineComponent)({props:{floorData:{type:Object,default:function(){}}},components:{Switch:J},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(le.R)(e).then((function(e){})).catch((function(){Object(En.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()})),ce(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(ie.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(ie.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(L.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(B.a)({},Object(o.toRefs)(n))}}),n("eabd"),vr=me()(jr,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Mr,[Wr,Object(o.createElementVNode)("div",Fr,[Object(o.createElementVNode)("div",Ur,[_r,Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.realTemp||"--")+"℃",1)]),Object(o.createElementVNode)("div",Rr,[Object(o.createElementVNode)("div",Pr,[Hr,Object(o.createElementVNode)("div",zr,Object(o.toDisplayString)(e.floorData.minTempSet),1),Object(o.createElementVNode)("div",Xr,Object(o.toDisplayString)(e.floorData.maxTempSet),1)])])])])}],["__scopeId","data-v-7c23f336"]]);var Gr={class:"air"},Kr={class:"child-title"},Jr={class:"child-box"},Zr={key:0,class:"air-control"},$r={class:"air-title"},Qr=Yr((function(){return Object(o.createElementVNode)("div",null,"温度设定",-1)})),ei=Yr((function(){return Object(o.createElementVNode)("div",null,null,-1)})),ti={class:"control-box"},ni={class:"temp-slider",id:"chlidAirSliderId"},ai=Yr((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)})),oi={class:"temp-left"},ci={class:"temp-right"},ri={key:1,class:"air-control"},ii={class:"air-title"},li=Yr((function(){return Object(o.createElementVNode)("div",null,"风速",-1)})),si=Yr((function(){return Object(o.createElementVNode)("div",null,null,-1)})),mi={class:"volume-box"},ui={class:"number"},di={class:"control-box control-box-padding"},pi={class:"icon-box"},fi=["src"],bi=Yr((function(){return Object(o.createElementVNode)("span",null,"调小",-1)})),gi={class:"icon-box"},Oi=["src"],hi=Yr((function(){return Object(o.createElementVNode)("span",null,"调大",-1)})),ji={class:"icon-box"},vi=["src"],Ti=Yr((function(){return Object(o.createElementVNode)("span",null,"自动",-1)})),ki={key:2,class:"air-control"},Ii={class:"air-title"},yi=Yr((function(){return Object(o.createElementVNode)("div",null,"模式",-1)})),Si=Yr((function(){return Object(o.createElementVNode)("div",null,null,-1)})),Ci={key:0},wi={key:1},Di={key:2},Ei={class:"control-box control-box-padding"},xi={class:"icon-box"},Ni=["src"],Vi=Yr((function(){return Object(o.createElementVNode)("span",null,"制冷",-1)})),Bi={class:"icon-box"},Li=["src"],Ai=Yr((function(){return Object(o.createElementVNode)("span",null,"制热",-1)})),qi={class:"icon-box"},Mi=["src"],Wi=Yr((function(){return Object(o.createElementVNode)("span",null,"通风",-1)})),Fi=(kr=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(A.a)({Switch:J},G.a.Component.name,G.a.Component),setup:function(e,t){var n=Object(o.reactive)({seviceEquipmentList:e.seviceEquipmentList,lightColorImg:Object(ie.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:ie.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})),ce(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(ie.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(ie.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(le.R)(e).then((function(e){n.loadinngEnd()})).catch((function(){n.loadinngEnd(),Object(En.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(L.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(B.a)({},Object(o.toRefs)(n))}}),jr=(n("560d"),n("eb51"),me()(kr,[["render",function(e,t,n,a,c,r){return Object(o.openBlock)(),Object(o.createElementBlock)("div",Gr,[Object(o.createElementVNode)("div",Kr,Object(o.toDisplayString)(e.airData.localName),1),Object(o.createElementVNode)("div",Jr,[e.airData.boundPoint&&e.airData.boundPoint.tempSetBound?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Zr,[Object(o.createElementVNode)("div",$r,[Qr,ei,Object(o.createElementVNode)("div",null,Object(o.toDisplayString)(e.realTemp)+"℃",1)]),Object(o.createElementVNode)("div",ti,[Object(o.createElementVNode)("div",ni,[ai,Object(o.createElementVNode)("div",oi,Object(o.toDisplayString)(e.airData.minTempSet),1),Object(o.createElementVNode)("div",ci,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",ri,[Object(o.createElementVNode)("div",ii,[li,si,Object(o.createElementVNode)("div",null,[Object(o.createElementVNode)("div",mi,[Object(o.createElementVNode)("div",ui,[(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",di,[Object(o.createElementVNode)("div",pi,[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,fi)],4),bi]),Object(o.createElementVNode)("div",gi,[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,Oi)],4),hi]),Object(o.createElementVNode)("div",ji,[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,vi)],2),Ti])])])):Object(o.createCommentVNode)("",!0),e.airData.boundPoint&&e.airData.boundPoint.modeSetBound?(Object(o.openBlock)(),Object(o.createElementBlock)("div",ki,[Object(o.createElementVNode)("div",Ii,[yi,Si,1===e.airData.workMode?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ci,"制冷")):2===e.airData.workMode?(Object(o.openBlock)(),Object(o.createElementBlock)("div",wi,"制热")):(Object(o.openBlock)(),Object(o.createElementBlock)("div",Di,"通风"))]),Object(o.createElementVNode)("div",Ei,[Object(o.createElementVNode)("div",xi,[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,Ni)],2),Vi]),Object(o.createElementVNode)("div",Bi,[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,Li)],2),Ai]),Object(o.createElementVNode)("div",qi,[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,Mi)],2),Wi])])])):Object(o.createCommentVNode)("",!0)])])}],["__scopeId","data-v-572df90f"]])),{key:0,class:"socket-box"}),Ui={class:"socket-top"},_i={class:"socket-desc"},Ri=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)})),Pi={key:0,class:"socket-status"},Hi={key:1,class:"socket-status"},zi={class:"socket-right"},Xi=["src"],Yi=["src"],Gi={class:"top-switch"},Ki={key:0,class:"top-nav"},Ji={key:1},Zi={class:"child-item"},$i=(kr=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(A.a)({Switch:J},G.a.Component.name,G.a.Component),setup:function(e,t){Object(ot.c)();var n=Object(o.reactive)({parseImgUrl:ie.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(ie.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(ie.B)(t);Object(le.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(le.R)(e).then((function(e){})).catch((function(){Object(En.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(B.a)({},Object(o.toRefs)(n))}}),J=(n("157e"),me()(kr,[["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",Fi,[Object(o.createElementVNode)("div",Ui,[Object(o.createElementVNode)("div",_i,[Ri,e.socketData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("p",Pi,"插座已开启")):(Object(o.openBlock)(),Object(o.createElementBlock)("p",Hi,"插座已关闭"))]),Object(o.createElementVNode)("div",zi,[e.socketData.isOpen?(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:0,src:e.parseImgUrl("ipdImages","socket-active.svg"),alt:""},null,8,Xi)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:e.parseImgUrl("ipdImages","socket.svg"),alt:""},null,8,Yi))])]),Object(o.createElementVNode)("div",Gi,[e.socketData&&e.socketData.equipList&&1<e.socketData.equipList.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",Ki,[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",Ji)),"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",Zi,[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"]])),kr=n("e41f"),n("8a58"),n("66d6")),Qi=n("6a79"),el=n("5581");Tr=Object(o.defineComponent)({components:(qt={MapBox:qt.a,ComMap:Tr,ScenarioDailog:lr,LightTemp:Ir,Header:Yt,Comheader:Gt.a,NavBar:Jc,Air:K,FloorHeating:Z,ManualIndex:io,ManualOvertime:oe,ChildAirControl:jr,Light:Eo,Curtain:pc,TimeBox:Uc,WorkOvertime:se,WorkConfig:ft,ManualConfig:Et,ScenarioConfig:At,Detail:sr.default,Contact:Ze,ChildTempSet:vr,CurtainOpening:Mc,Socket:J},Object(A.a)(qt,G.a.Component.name,G.a.Component),Object(A.a)(qt,"VanPopup",kr.b),Object(A.a)(qt,"VanIcon",Xt.b),qt),beforeRouteEnter:function(e,t,n){var a=Object(el.a)();a&&"null"!=a?n():n("/error")},setup:function(){var e=Object(o.getCurrentInstance)(),t=Object(ot.d)(),n=Object(ot.c)(),a=window.document,c=a.body.clientHeight,r={},i=ct.a.state.user.projectId,l=Object(ie.t)(),s=[],m=Object(ie.b)("YYYY.MM.DD HH:mm"),u=Object(ie.m)(),d=Object(o.reactive)({equipTimer:null,seviceEquipmentList:[],spaceEquipList:[],enterType:1,deviceItem:null,parseImgUrl:ie.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(ie.y)("page-officehome","temp.png"),activeImg:Object(ie.y)("page-officehome","temp_active.svg")},{top:0,id:"lightId",code:"lamp",name:"光照",noShow:!1,img:Object(ie.y)("page-officehome","lamp.png"),activeImg:Object(ie.y)("page-officehome","lamp_active.svg")},{top:0,id:"curtainId",code:"curtain",name:"窗帘",noShow:!1,img:Object(ie.y)("page-officehome","curtain-nav.svg"),activeImg:Object(ie.y)("page-officehome","curtain-nav-active.svg")},{top:0,id:4,code:"mySpace",name:"常驻空间",noShow:!1,activeImg:Object(ie.y)("page-officehome","mySpaceIcon.svg"),img:Object(ie.y)("page-officehome","mySpaceIcon.svg")},{top:0,id:5,code:"switchSpace",name:"我的",noShow:!0,activeImg:Object(ie.y)("page-officehome","mapIcon.png"),img:Object(ie.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(ie.y)("ipdImages","pad_img2.png"):"会议室"===d.roomType?d.padBgImg=Object(ie.y)("ipdImages","pad_img3.png"):(d.roomType,d.padBgImg=Object(ie.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(ie.B)(e);d.padNumber<1&&(d.padNumber=1,Object(le.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(L.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(le.i)({companyId:$i.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:ct.a.state.user.projectId};e=Object(ie.B)(e);Object(le.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(ie.i)();-1<e.indexOf("霾")?d.topbgimg=Object(ie.y)("weather","office_smog.jpg"):d.topbgimg=6<=t&&t<19?Object(ie.y)("weather","office_bright.jpg"):Object(ie.y)("weather","office_night.jpg")},getWeatherIcon:function(e){!e||-1<e.indexOf("晴")?d.outWeather.imgname=Object(ie.y)("weather","sun.png"):e&&-1<e.indexOf("雨")?d.outWeather.imgname=Object(ie.y)("weather","rain.png"):e&&-1<e.indexOf("阴")||-1<e.indexOf("云")?d.outWeather.imgname=Object(ie.y)("weather","cloudy.png"):e&&-1<e.indexOf("霾")?d.outWeather.imgname=Object(ie.y)("weather","mai.png"):e&&-1<e.indexOf("雾")?d.outWeather.imgname=Object(ie.y)("weather","fog.png"):e&&-1<e.indexOf("风")?d.outWeather.imgname=Object(ie.y)("weather","wind.png"):e&&-1<e.indexOf("雷")?d.outWeather.imgname=Object(ie.y)("weather","thunder.png"):d.outWeather.imgname=Object(ie.y)("weather","sun.png")},checkSpaceType:function(e){e=Object(Qi.b)(e),"个人"===e?(d.roomType="个人",d.headerInfo.headImg=Object(ie.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(ie.y)("page-officehome","office_normal_2.png"),d.getPageMeetingSceneHttp()):(d.roomType="开放"===e?"开放":"其它",d.headerInfo.headImg=Object(ie.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(le.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(le.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(le.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(le.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(le.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(ie.b)(),t=Object(ie.i)();t<10&&(t="0".concat(t)),e={projectId:d.projectId,objectId:d.spaceInfo.spaceId,endDate:e,endTime:t+"0000",type:3};Object(le.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(ie.B)(e);Object(le.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(En.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(){En.a.loading({duration:0,forbidClick:!0,message:"加载中..."})},loadinngEnd:function(){En.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(ie.B)(e);Object(le.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(ie.B)(e);Object(le.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(ie.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(ie.B)(t);Object(le.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(ie.o)(),c=Object(ie.b)("YYYY-MM-DD"),r=Object(ie.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(le.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(le.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(ie.b)("YYYY.MM.DD HH:mm"),d.nowWeek=Object(ie.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(B.a)({},Object(o.toRefs)(d))}});n("694b"),n("be4e"),t.default=me()(Tr,[["render",function(e,t,n,a,V,B){var L=Object(o.resolveComponent)("WorkConfig"),A=Object(o.resolveComponent)("ManualConfig"),q=Object(o.resolveComponent)("scenario-config"),M=Object(o.resolveComponent)("manual-index"),W=Object(o.resolveComponent)("Air"),F=Object(o.resolveComponent)("floor-heating"),U=Object(o.resolveComponent)("Light"),_=Object(o.resolveComponent)("Curtain"),R=Object(o.resolveComponent)("Socket"),P=Object(o.resolveComponent)("work-overtime"),H=Object(o.resolveComponent)("manual-overtime"),z=Object(o.resolveComponent)("van-popup"),X=Object(o.resolveComponent)("scenario-dailog"),Y=Object(o.resolveComponent)("detail"),G=Object(o.resolveComponent)("com-map"),K=Object(o.resolveComponent)("contact"),J=Object(o.resolveComponent)("light-temp"),Z=Object(o.resolveComponent)("ChildTempSet"),$=Object(o.resolveComponent)("curtain-opening"),Q=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,[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",i,[Object(o.withDirectives)(Object(o.createElementVNode)("img",{src:e.outWeather.imgname,class:"weather-icon",alt:""},null,8,l),[[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,s),m])):Object(o.createCommentVNode)("",!0)],32),Object(o.createElementVNode)("div",u,[Object(o.createElementVNode)("div",d,[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",p,[Object(o.createElementVNode)("div",f,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","template-icon.svg"),alt:""},null,8,b),g,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),O])])]),Object(o.createElementVNode)("div",h,[(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,v),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(t.name),1)]),Object(o.createElementVNode)("div",T,[Object(o.createTextVNode)(Object(o.toDisplayString)(t.num)+" ",1),Object(o.createElementVNode)("sup",null,Object(o.toDisplayString)(t.unit),1)])],14,j)})),128))])]),e.spaceData&&1<e.spaceData.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",k,[(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,y)):(Object(o.openBlock)(),Object(o.createElementBlock)("img",{key:1,src:0==n?e.parseImgUrl("ipdImages","rectangle1.svg"):e.parseImgUrl("ipdImages","rectangle2.svg")},null,8,S)),Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(t.spaceName),1)],10,I)):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,C),w])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)]),Object(o.createElementVNode)("div",D,["开放"===e.roomType&&e.isWork||"会议室"===e.roomType&&e.scenarioArr&&e.scenarioArr.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",E,["开放"===e.roomType&&e.isWork&&0==e.controlMode?(Object(o.openBlock)(),Object(o.createBlock)(L,{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)(A,{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)(q,{key:2,activeType:e.activeType,scenarioArr:e.scenarioArr,spaceId:e.spaceInfo.spaceId,projectId:e.projectId,onSetHeadScene:e.setHeadScene},null,8,["activeType","scenarioArr","spaceId","projectId","onSetHeadScene"])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0),1==e.controlMode&&e.spaceExistenceDevice.airConditioner?(Object(o.openBlock)(),Object(o.createBlock)(M,{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)(W,{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)(F,{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)(U,{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)(_,{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)(R,{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)(z,{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)(P,{key:0,spaceInfo:e.spaceInfo,onCloseWork:e.closeWork,projectId:e.projectId,workkArr:e.workkArr},null,8,["spaceInfo","onCloseWork","projectId","workkArr"])):Object(o.createCommentVNode)("",!0),e.isShowWork&&1==e.controlMode?(Object(o.openBlock)(),Object(o.createBlock)(H,{key:1,seviceEquipmentList:e.seviceEquipmentList,enterType:e.enterType,deviceItem:e.deviceItem,spaceInfo:e.spaceInfo,onCloseWork:e.closeWork,projectId:e.projectId,workkArr:e.workkArr},null,8,["seviceEquipmentList","enterType","deviceItem","spaceInfo","onCloseWork","projectId","workkArr"])):Object(o.createCommentVNode)("",!0)]})),_:1},8,["show"]),Object(o.createVNode)(z,{show:e.isShowMetting,"onUpdate:show":t[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)(X,{secenaroStatus:e.secenaroStatus,onCloseDailog:e.closeDailog},null,8,["secenaroStatus","onCloseDailog"])]})),_:1},8,["show"]),Object(o.createVNode)(z,{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)(Y,{key:0,query:e.detailQuery},null,8,["query"])):Object(o.createCommentVNode)("",!0)]})),_:1},8,["show"]),Object(o.createVNode)(z,{show:e.isShowMap,"onUpdate:show":t[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)(G,{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)(K,{key:0,isShowContact:e.isShowContact,contantDetail:e.contantDetail,onCloseDailog:e.closeContactDailog},null,8,["isShowContact","contantDetail","onCloseDailog"])):Object(o.createCommentVNode)("",!0),Object(o.createVNode)(z,{show:e.isLightColorFlag,"onUpdate:show":t[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)(J,{key:0,lightData:e.lightData},null,8,["lightData"])):Object(o.createCommentVNode)("",!0)])]})),_:1},8,["show"]),Object(o.createVNode)(z,{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)(Z,{key:0,floorData:e.floorData},null,8,["floorData"])):Object(o.createCommentVNode)("",!0)])]})),_:1},8,["show"]),Object(o.createVNode)(z,{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",x,[e.isCurtainOpening?(Object(o.openBlock)(),Object(o.createBlock)($,{key:0,curtainData:e.curtainData},null,8,["curtainData"])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)]})),_:1},8,["show","onClickOverlay"]),Object(o.createVNode)(z,{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",N,[e.isChildAirControl?(Object(o.openBlock)(),Object(o.createBlock)(Q,{key:0,airData:e.airData},null,8,["airData"])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)]})),_:1},8,["show","onClickOverlay"])],4)}],["__scopeId","data-v-37275e70"]])},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){},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){},be4e:function(e,t,n){"use strict";n("3ef8")},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){},ee96: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")},fe6d:function(e,t,n){"use strict";n("bde3")}}]);
|