12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6bff15bd"],{"0445":function(e,t,n){},"0653":function(e,t,n){"use strict";n("68ef"),n("5c56")},"067d":function(e,t,n){},"0970":function(e,t,n){"use strict";n("60f5")},1196:function(e,t,n){"use strict";n("eaf7")},2927:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"2d4b":function(e,t,n){"use strict";n("2927")},3228:function(e,t,n){},"34e9":function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var c=n("c199"),o=n("7a23"),a=n("fe7e"),r=n("f691"),i=n("b1d2");const[l,s]=Object(a["a"])("cell-group"),u={title:String,inset:Boolean,border:r["g"]};var d=Object(o["defineComponent"])({name:l,inheritAttrs:!1,props:u,setup(e,{slots:t,attrs:n}){const c=()=>{var c;return Object(o["createVNode"])("div",Object(o["mergeProps"])({class:[s({inset:e.inset}),{[i["d"]]:e.border&&!e.inset}]},n),[null==(c=t.default)?void 0:c.call(t)])},a=()=>Object(o["createVNode"])("div",{class:s("title",{inset:e.inset})},[t.title?t.title():e.title]);return()=>e.title||t.title?Object(o["createVNode"])(o["Fragment"],null,[a(),c()]):c()}});const m=Object(c["a"])(d);var p=m},"38d5":function(e,t,n){"use strict";n("68ef")},"3eb9":function(e,t,n){"use strict";n("e3c7")},"4d9d":function(e,t,n){"use strict";n("506a")},"506a":function(e,t,n){},"55e0":function(e,t,n){"use strict";n("e335")},"5c56":function(e,t,n){},"5e28":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"5ea2":function(e,t,n){"use strict";n("6b58")},"60f5":function(e,t,n){},"66b9":function(e,t,n){"use strict";n("68ef"),n("cb51"),n("3743"),n("e3b3"),n("bc1b")},"67fc":function(e,t,n){"use strict";n("b601")},"69bc":function(e,t,n){},"6b3e":function(e,t,n){"use strict";n("6f89")},"6b58":function(e,t,n){},"6f89":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"772a":function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var c=n("c199"),o=n("7a23"),a=n("fe7e"),r=n("f691"),i=n("b1d2"),l=n("4a89"),s=n("f465"),u=n("4eda");const[d,m]=Object(a["a"])("form"),p={colon:Boolean,disabled:Boolean,readonly:Boolean,showError:Boolean,labelWidth:r["f"],labelAlign:String,inputAlign:String,scrollToError:Boolean,validateFirst:Boolean,submitOnEnter:r["g"],validateTrigger:Object(r["e"])("onBlur"),showErrorMessage:r["g"],errorMessageAlign:String};var f=Object(o["defineComponent"])({name:d,props:p,emits:["submit","failed"],setup(e,{emit:t,slots:n}){const{children:c,linkChildren:a}=Object(s["f"])(i["f"]),r=e=>e?c.filter(t=>e.includes(t.name)):c,d=e=>new Promise((t,n)=>{const c=[],o=r(e);o.reduce((e,t)=>e.then(()=>{if(!c.length)return t.validate().then(e=>{e&&c.push(e)})}),Promise.resolve()).then(()=>{c.length?n(c):t()})}),p=e=>new Promise((t,n)=>{const c=r(e);Promise.all(c.map(e=>e.validate())).then(e=>{e=e.filter(Boolean),e.length?n(e):t()})}),f=e=>{const t=c.find(t=>t.name===e);return t?new Promise((e,n)=>{t.validate().then(t=>{t?n(t):e()})}):Promise.reject()},b=t=>"string"===typeof t?f(t):e.validateFirst?d(t):p(t),g=e=>{"string"===typeof e&&(e=[e]);const t=r(e);t.forEach(e=>{e.resetValidation()})},v=(e,t)=>{c.some(n=>n.name===e&&(n.$el.scrollIntoView(t),!0))},O=()=>c.reduce((e,t)=>(e[t.name]=t.formValue.value,e),{}),j=()=>{const n=O();b().then(()=>t("submit",n)).catch(c=>{t("failed",{values:n,errors:c}),e.scrollToError&&c[0].name&&v(c[0].name)})},h=e=>{Object(l["e"])(e),j()};return a({props:e}),Object(u["a"])({submit:j,validate:b,scrollToField:v,resetValidation:g}),()=>{var e;return Object(o["createVNode"])("form",{class:m(),onSubmit:h},[null==(e=n.default)?void 0:e.call(n)])}}});const b=Object(c["a"])(f);var g=b},"7c22":function(e,t,n){"use strict";n("3228")},"7f3f":function(e,t,n){"use strict";n.r(t);n("b0c0");var c=n("7a23"),o=function(e){return Object(c["pushScopeId"])("data-v-23036dfc"),e=e(),Object(c["popScopeId"])(),e},a={class:"main"},r={class:"main-left"},i={class:"left-top"},l=["src"],s={class:"left-time"},u={class:"weather"},d=["src"],m=["src"],p=o((function(){return Object(c["createElementVNode"])("span",null," 联系客户",-1)})),f={class:"left-space"},b={class:"text"},g={key:0},v=["src"],O=["src"],j={key:2},h={key:3},T={class:"space-info"},k={class:"space-temp"},I=["src"],S=o((function(){return Object(c["createElementVNode"])("span",{class:"temp-text"},"温度",-1)})),w={class:"temp-num"},C=o((function(){return Object(c["createElementVNode"])("sup",null,"℃",-1)})),y={class:"space-env"},x=["onClick"],N=["src"],D={class:"env-text"},E={class:"fotter"},V=["onClick"],B=["src"],A=["src"],L=["src"],W=o((function(){return Object(c["createElementVNode"])("span",null,"…",-1)})),M={class:"main-right"},F={key:0,class:"work-btn"};function _(e,t,n,o,_,U){var q=Object(c["resolveComponent"])("work-config"),P=Object(c["resolveComponent"])("scenario-config"),R=Object(c["resolveComponent"])("Air"),H=Object(c["resolveComponent"])("Light"),z=Object(c["resolveComponent"])("Curtain"),J=Object(c["resolveComponent"])("work-overtime"),Y=Object(c["resolveComponent"])("van-popup"),X=Object(c["resolveComponent"])("scenario-dailog"),G=Object(c["resolveComponent"])("detail"),K=Object(c["resolveComponent"])("com-map"),$=Object(c["resolveComponent"])("contact");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",a,[Object(c["createElementVNode"])("div",r,[Object(c["createElementVNode"])("div",i,[Object(c["createElementVNode"])("img",{class:"logo-icon",src:e.parseImgUrl("ipdImages","shangeyun_logo.svg"),alt:""},null,8,l),Object(c["createElementVNode"])("div",s,[Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.nowDate),1),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.nowWeek),1)]),Object(c["createElementVNode"])("div",u,[Object(c["withDirectives"])(Object(c["createElementVNode"])("img",{src:e.outWeather.imgname,class:"weather-icon",alt:""},null,8,d),[[c["vShow"],e.outWeather.imgname]]),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.outWeather.temperature?e.outWeather.temperature:"--")+"℃",1)]),Object(c["createElementVNode"])("div",{class:"weixiin",onClick:t[0]||(t[0]=function(){return e.showContact&&e.showContact.apply(e,arguments)})},[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","weixin.svg")},null,8,m),p])]),Object(c["createElementVNode"])("div",f,[Object(c["createElementVNode"])("div",b,[Object(c["createElementVNode"])("div",{onTouchstart:t[1]||(t[1]=function(){return e.gtouchstart&&e.gtouchstart.apply(e,arguments)}),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(c["toDisplayString"])(e.officeData.localName),33),!0===e.officeData.isPassengerPass||!1===e.officeData.isPassengerPass?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",g,[e.officeData.isPassengerPass?(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:0,src:e.parseImgUrl("ipdImages","vector-active.svg")},null,8,v)):Object(c["createCommentVNode"])("",!0),e.officeData.isPassengerPass?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:1,src:e.parseImgUrl("ipdImages","vector")},null,8,O)),e.officeData.isPassengerPass?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",j,"有人")):Object(c["createCommentVNode"])("",!0),e.officeData.isPassengerPass?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",h,"无人"))])):Object(c["createCommentVNode"])("",!0)]),Object(c["createElementVNode"])("div",T,[Object(c["createElementVNode"])("div",k,[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","template-icon.svg"),alt:""},null,8,I),S,Object(c["createElementVNode"])("span",w,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.officeData.temperature),1),C])])]),Object(c["createElementVNode"])("div",y,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.envlist,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:Object(c["normalizeClass"])(["env-item",[1==n?"env-color":"",t.bgColor?"env-item-radius":""]]),style:Object(c["normalizeStyle"])([{background:t.bgColor?t.bgColor:""},{opacity:t.bgColor?.8:""}]),key:"env"+n,onClick:function(n){return e.handleDetail(t)}},[Object(c["createElementVNode"])("div",null,[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages",t.img),alt:""},null,8,N),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(t.name),1)]),Object(c["createElementVNode"])("div",D,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(t.num)+" ",1),Object(c["createElementVNode"])("sup",null,Object(c["toDisplayString"])(t.unit),1)])],14,x)})),128))])]),Object(c["createElementVNode"])("div",E,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.spaceData,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])(c["Fragment"],null,[n<3?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:Object(c["normalizeClass"])(["fotter-item",t.active?"fotter-item-active":""]),key:n+"nav",onClick:function(n){return e.changeSpace(t)}},[t.active?(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:0,src:e.parseImgUrl("ipdImages","rectangle-active.svg")},null,8,B)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:1,src:e.parseImgUrl("ipdImages","rectangle1.svg")},null,8,A)),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(t.spaceName),1)],10,V)):Object(c["createCommentVNode"])("",!0)],64)})),256)),e.spaceData&&e.spaceData.length>3?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{key:0,class:"fotter-item-end",onClick:t[4]||(t[4]=function(){return e.moreSpace&&e.moreSpace.apply(e,arguments)})},[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","rectangle-fotter.svg")},null,8,L),W])):Object(c["createCommentVNode"])("",!0)])]),Object(c["createElementVNode"])("div",M,["开放"===e.roomType&&e.isWork||"会议室"===e.roomType&&e.scenarioArr&&e.scenarioArr.length?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",F,["开放"===e.roomType&&e.isWork?(Object(c["openBlock"])(),Object(c["createBlock"])(q,{key:0,scenarioArr:e.scenarioArr,workkArr:e.workkArr,onTriggerWork:e.triggerWork,onSetForceOverTimeFlag:e.setForceOverTimeFlag},null,8,["scenarioArr","workkArr","onTriggerWork","onSetForceOverTimeFlag"])):Object(c["createCommentVNode"])("",!0),"会议室"===e.roomType&&e.scenarioArr&&e.scenarioArr.length?(Object(c["openBlock"])(),Object(c["createBlock"])(P,{key:1,activeType:e.activeType,scenarioArr:e.scenarioArr,spaceId:e.spaceInfo.spaceId,projectId:e.projectId,onSetHeadScene:e.setHeadScene},null,8,["activeType","scenarioArr","spaceId","projectId","onSetHeadScene"])):Object(c["createCommentVNode"])("",!0)])):Object(c["createCommentVNode"])("",!0),e.officeData.temperature||e.spaceExistenceDevice.airConditioner?(Object(c["openBlock"])(),Object(c["createBlock"])(R,{id:"airId",key:"airId",onTriggerWork:e.triggerWork,forceOverTimeFlag:e.forceOverTimeFlag,onUpdateAirTemp:e.updateAirTemp,hasAir:e.spaceExistenceDevice.airConditioner,airVolumes:e.officeData.airVolumes,temperature:e.officeData.temperature,spaceId:e.spaceInfo.spaceId,projectId:e.projectId,isACATVA:e.isACATVA,userIsControl:e.userIsControl},null,8,["onTriggerWork","forceOverTimeFlag","onUpdateAirTemp","hasAir","airVolumes","temperature","spaceId","projectId","isACATVA","userIsControl"])):Object(c["createCommentVNode"])("",!0),e.spaceExistenceDevice.light?(Object(c["openBlock"])(),Object(c["createBlock"])(H,{forceOverTimeFlag:e.forceOverTimeFlag,onTriggerWork:e.triggerWork,id:"lightId",key:"lightId",userIsControl:e.userIsControl,spaceId:e.spaceInfo.spaceId,projectId:e.projectId},null,8,["forceOverTimeFlag","onTriggerWork","userIsControl","spaceId","projectId"])):Object(c["createCommentVNode"])("",!0),e.spaceExistenceDevice.curtain?(Object(c["openBlock"])(),Object(c["createBlock"])(z,{spaceId:e.spaceInfo.spaceId,id:"curtainId",key:"curtainId",userIsControl:e.userIsControl,projectId:e.projectId},null,8,["spaceId","userIsControl","projectId"])):Object(c["createCommentVNode"])("",!0)]),Object(c["createVNode"])(Y,{show:e.isShowWork,"onUpdate:show":t[5]||(t[5]=function(t){return e.isShowWork=t}),position:"right",class:"popup-content",teleport:"#app"},{default:Object(c["withCtx"])((function(){return[e.isShowWork?(Object(c["openBlock"])(),Object(c["createBlock"])(J,{key:0,onCloseWork:e.closeWork,projectId:e.projectId,workkArr:e.workkArr},null,8,["onCloseWork","projectId","workkArr"])):Object(c["createCommentVNode"])("",!0)]})),_:1},8,["show"]),Object(c["createVNode"])(Y,{show:e.isShowMetting,"onUpdate:show":t[6]||(t[6]=function(t){return e.isShowMetting=t}),position:"right","close-on-click-overlay":!1,class:"popup-content",teleport:"#app"},{default:Object(c["withCtx"])((function(){return[Object(c["createVNode"])(X,{secenaroStatus:e.secenaroStatus,onCloseDailog:e.closeDailog},null,8,["secenaroStatus","onCloseDailog"])]})),_:1},8,["show"]),Object(c["createVNode"])(Y,{show:e.isShowDetail,"onUpdate:show":t[7]||(t[7]=function(t){return e.isShowDetail=t}),position:"right","close-on-click-overlay":!0,class:"popup-content",teleport:"#app"},{default:Object(c["withCtx"])((function(){return[e.isShowDetail?(Object(c["openBlock"])(),Object(c["createBlock"])(G,{key:0,query:e.detailQuery},null,8,["query"])):Object(c["createCommentVNode"])("",!0)]})),_:1},8,["show"]),Object(c["createVNode"])(Y,{show:e.isShowMap,"onUpdate:show":t[8]||(t[8]=function(t){return e.isShowMap=t}),class:"map-popup",position:"bottom",style:{width:"100%",height:"70%"},"close-on-click-overlay":!0,teleport:"#app"},{default:Object(c["withCtx"])((function(){return[e.defaultSpace.spaceId&&e.isShowMap?(Object(c["openBlock"])(),Object(c["createBlock"])(K,{key:0,spaceData:e.spaceData,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(c["createCommentVNode"])("",!0)]})),_:1},8,["show"]),Object(c["createVNode"])($,{isShowContact:e.isShowContact,onCloseDailog:e.closeContactDailog},null,8,["isShowContact","onCloseDailog"])])}n("99af"),n("c740"),n("c975"),n("d81d"),n("fb6a"),n("a9e3"),n("b680"),n("d3b7"),n("ac1f"),n("25f0"),n("5319"),n("1276");var U=n("5530"),q=n("2909"),P=(n("96cf"),n("1da1")),R=n("ade3"),H=function(e){return Object(c["pushScopeId"])("data-v-07d7ca74"),e=e(),Object(c["popScopeId"])(),e},z={class:"work-content"},J=H((function(){return Object(c["createElementVNode"])("div",{class:"work-space"},[Object(c["createElementVNode"])("div",{class:"space-title"},"尚格云 申请延时"),Object(c["createElementVNode"])("div",{class:"device-tip"},"延时期间,空间相关设备会开启")],-1)})),Y={class:"add-time",id:"addTimeId"},X={key:0,class:"date_box"},G=["onClick"],K={class:"sliders-list",id:"sliderListId"},$={class:"sliders"},Q=["onClick","data-index"],Z=H((function(){return Object(c["createElementVNode"])("div",{class:"start",id:"startId"},null,-1)})),ee=H((function(){return Object(c["createElementVNode"])("div",{class:"end-box",id:"endBoxId"},[Object(c["createElementVNode"])("div",{class:"end",id:"endId"}),Object(c["createElementVNode"])("div",{class:"end-radio",id:"endRadioId"})],-1)})),te=[Z,ee],ne={class:"add-time-btn"};function ce(e,t,n,o,a,r){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",z,[J,Object(c["createElementVNode"])("div",Y,[e.dateArr&&e.dateArr.length?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",X,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.dateArr,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:Object(c["normalizeClass"])(["date-item",t.isActive?"date-item-active":""]),onClick:Object(c["withModifiers"])((function(c){return e.checkDate(t,n)}),["stop"]),key:"date"+n},[Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(t.week),1),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(t.day),1)],10,G)})),128))])):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("div",K,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.nowTimerArr,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{key:"slider"+n,class:"sliders-wrapper",id:"slidersWrapperId"},[Object(c["createElementVNode"])("div",$,[Object(c["withDirectives"])(Object(c["createElementVNode"])("div",{class:"label"},Object(c["toDisplayString"])(t.timer),513),[[c["vShow"],0===n||n%2===0]]),Object(c["createElementVNode"])("div",{class:"slider-box",onClick:function(c){return e.checkSlider(t,n)},"data-index":n},null,8,Q)])])})),128)),Object(c["createElementVNode"])("div",{class:"slider-btn",id:"sliderBtnId",onClick:t[0]||(t[0]=function(){return e.triggerDelTime&&e.triggerDelTime.apply(e,arguments)})},te)])]),Object(c["createElementVNode"])("div",ne,[Object(c["createElementVNode"])("div",{class:"cancel-btn",onClick:t[1]||(t[1]=function(){return e.closeWorkTimer&&e.closeWorkTimer.apply(e,arguments)})},"取消"),Object(c["createElementVNode"])("div",{class:Object(c["normalizeClass"])(["comfirm-btn",e.formBtn?"comfirm-btn-diabled":""]),onClick:t[2]||(t[2]=function(){return e.addWorkTimer&&e.addWorkTimer.apply(e,arguments)})}," 提交申请 ",2)])])}var oe=n("2241"),ae=(n("e17f"),n("c199")),re=n("fe7e"),ie=n("f691"),le=n("8405"),se=n("4a89"),ue=n("f465"),de=n("cdd8");const[me,pe]=Object(re["a"])("slider"),fe={min:Object(ie["c"])(0),max:Object(ie["c"])(100),step:Object(ie["c"])(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:ie["f"],buttonSize:ie["f"],activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var be=Object(c["defineComponent"])({name:me,props:fe,emits:["change","drag-end","drag-start","update:modelValue"],setup(e,{emit:t,slots:n}){let o,a,r;const i=Object(c["ref"])(),l=Object(c["ref"])(),s=Object(de["a"])(),u=Object(c["computed"])(()=>Number(e.max)-Number(e.min)),d=Object(c["computed"])(()=>{const t=e.vertical?"width":"height";return{background:e.inactiveColor,[t]:Object(le["b"])(e.barHeight)}}),m=t=>e.range&&Array.isArray(t),p=()=>{const{modelValue:t,min:n}=e;return m(t)?100*(t[1]-t[0])/u.value+"%":100*(t-Number(n))/u.value+"%"},f=()=>{const{modelValue:t,min:n}=e;return m(t)?100*(t[0]-Number(n))/u.value+"%":"0%"},b=Object(c["computed"])(()=>{const t=e.vertical?"height":"width",n={[t]:p(),background:e.activeColor};l.value&&(n.transition="none");const c=()=>e.vertical?e.reverse?"bottom":"top":e.reverse?"right":"left";return n[c()]=f(),n}),g=t=>{const n=+e.min,c=+e.max,o=+e.step;t=Object(le["d"])(t,n,c);const a=Math.round((t-n)/o)*o;return Object(le["a"])(n,a)},v=(e,t)=>JSON.stringify(e)===JSON.stringify(t),O=t=>{var n,c;const o=null!=(n=t[0])?n:Number(e.min),a=null!=(c=t[1])?c:Number(e.max);return o>a?[a,o]:[o,a]},j=(n,c)=>{n=m(n)?O(n).map(g):g(n),v(n,e.modelValue)||t("update:modelValue",n),c&&!v(n,r)&&t("change",n)},h=t=>{if(t.stopPropagation(),e.disabled||e.readonly)return;const{min:n,reverse:c,vertical:o,modelValue:a}=e,r=Object(ue["l"])(i),l=()=>o?c?r.bottom-t.clientY:t.clientY-r.top:c?r.right-t.clientX:t.clientX-r.left,s=o?r.height:r.width,d=Number(n)+l()/s*u.value;if(m(a)){const[e,t]=a,n=(e+t)/2;j(d<=n?[d,t]:[e,d],!0)}else j(d,!0)},T=t=>{e.disabled||e.readonly||(s.start(t),a=e.modelValue,r=m(a)?a.map(g):g(a),l.value="start")},k=n=>{if(e.disabled||e.readonly)return;"start"===l.value&&t("drag-start",n),Object(se["e"])(n,!0),s.move(n),l.value="dragging";const c=Object(ue["l"])(i),d=e.vertical?s.deltaY.value:s.deltaX.value,p=e.vertical?c.height:c.width;let f=d/p*u.value;if(e.reverse&&(f=-f),m(r)){const t=e.reverse?1-o:o;a[t]=r[t]+f}else a=r+f;j(a)},I=n=>{e.disabled||e.readonly||("dragging"===l.value&&(j(a,!0),t("drag-end",n)),l.value="")},S=t=>{if("number"===typeof t){const e=["left","right"];return pe("button-wrapper",e[t])}return pe("button-wrapper",e.reverse?"left":"right")},w=(t,o)=>{if("number"===typeof o){const e=n[0===o?"left-button":"right-button"];if(e)return e({value:t})}return n.button?n.button({value:t}):Object(c["createVNode"])("div",{class:pe("button"),style:Object(le["f"])(e.buttonSize)},null)},C=t=>{const n="number"===typeof t?e.modelValue[t]:e.modelValue;return Object(c["createVNode"])("div",{role:"slider",class:S(t),tabindex:e.disabled?void 0:0,"aria-valuemin":e.min,"aria-valuenow":n,"aria-valuemax":e.max,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readonly||void 0,"aria-orientation":e.vertical?"vertical":"horizontal",onTouchstart:e=>{"number"===typeof t&&(o=t),T(e)},onTouchmove:k,onTouchend:I,onTouchcancel:I,onClick:se["i"]},[w(n,t)])};return j(e.modelValue),Object(ue["h"])(()=>e.modelValue),()=>Object(c["createVNode"])("div",{ref:i,style:d.value,class:pe({vertical:e.vertical,disabled:e.disabled}),onClick:h},[Object(c["createVNode"])("div",{class:pe("bar"),style:b.value},[e.range?[C(0),C(1)]:C()])])}});const ge=Object(ae["a"])(be);var ve=ge;n("68ef"),n("9617");function Oe(e,t){var n=!1,c=0,o=0,a=0,r=0,i=0,l=0,s=function(){},u={swipeLeft:s,swipeRight:s,swipeDown:s,swipeUp:s,drag:s};Object.assign(u,t),e.addEventListener("touchstart",(function(e){c=e.touches[0].pageX,o=e.touches[0].pageY,i=0,l=0}),{passive:!0}),e.addEventListener("touchmove",(function(t){if(n=!0,a=t.touches[0].pageX,r=t.touches[0].pageY,t.mation={startX:c,startY:o,moveX:a,moveY:r,disX:i,disY:l},u.drag.call(e,t),n){var s=Math.abs(a-c),d=Math.abs(r-o);s>d?a-c>0?u.swipeRight.call(e,t):u.swipeLeft.call(e,t):r-c>0?u.swipeDown.call(e,t):u.swipeUp.call(e,t)}}),{passive:!0}),e.addEventListener("touchend",(function(e){n=!1}))}var je=n("d257"),he=n("459d"),Te=Object(c["defineComponent"])({components:{VanSlider:ve},props:{workkArr:{type:Array,default:function(){return[]}},projectId:{type:String,default:function(){return""}}},setup:function(e,t){var n=Object(c["getCurrentInstance"])(),o={screenWidth:0,screenHeight:0},a=[],r=[],i=Object(je["p"])(),l=[],s={},u="".concat(Object(je["w"])("ipdImages","time-check.svg")),d="linear-gradient(0deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2)), url(".concat(u,")"),m=Object(je["r"])(),p=Object(c["reactive"])({userInfo:m,screenInfo:o,projectId:e.projectId,workkArr:e.workkArr,bgRed:d,startIndex:0,endIndex:0,nowData:s,nowTimerArr:l,timerArr:i,startLen:0,formBtn:!1,setScreennWidth:function(){var e=document.querySelector("#addTimeId");p.screenInfo.screenWidth=e.offsetWidth},getNowIndex:function(){var e=0;return"今天"===p.nowData.week&&(e=Object(je["j"])()[1]),e},getNowPerstion:function(e){var t=p.getNowIndex(),n={nowIndex:t,len:4},c=e[t].formatTimer,o=p.parseCusStartTime(p.nowData.cusStartTime),a=p.parseCusEndTime(p.nowData.cusEndTime);return c>=o&&c<=a?e.map((function(e,t){e.formatTimer===a&&(n.nowIndex=t)})):c<o&&e.map((function(e,c){e.formatTimer===o&&(n.len=c-t,n.len>4&&(n.len=4))})),n},setOptionnalTime:function(e){var t=document.querySelector("#sliderListId"),n=document.querySelector("#slidersWrapperId"),c=n.getBoundingClientRect().width;t.style.width=c*e.length+"px";var o=p.getNowPerstion(e).nowIndex,a=p.getNowPerstion(e).len,r=c*o;r>p.screenInfo.screenWidth+p.screenInfo.screenWidth/2&&(r-=c),t.style.left=-r+"px",p.setOptionnalPerstion(o,a)},sliderSwiper:function(){var e=document.querySelector("#sliderListId"),t=(document.querySelector("#slidersWrapperId"),e.offsetWidth-p.screenInfo.screenWidth);Oe(e,{swipeLeft:function(n){if(!p.checkMoveTarget(n)){var c=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);c=Math.abs(c),e.style.left=c>=t?-t+"px":-c-Math.abs(n.mation.moveX-n.mation.startX)+"px"}},swipeRight:function(t){if(!p.checkMoveTarget(t)){var n=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);e.style.left=n>=0?"0px":n+Math.abs(t.mation.moveX-t.mation.startX)+"px"}}})},checkMoveTarget:function(e){var t=document.querySelector("#endBoxId"),n=document.querySelector("#endId"),c=document.querySelector("#endRadioId");return e.target===t||e.target===n||e.target===c},checkPersionService:function(){for(var e=!1,t=p.startIndex;t<p.endIndex;t++)if(p.nowTimerArr[t].isServiceTime){e=!0;break}p.formBtn=e},cancelRemoveListener:function(){var e=document.querySelector("#endBoxId");e.removeEventListener("touchstart",(function(e){}),!1),e.removeEventListener("touchend",(function(e){}),!1),e.removeEventListener("touchmove",(function(e){}),!1);var t=document.querySelector("#sliderListId");t.removeEventListener("touchstart",(function(e){}),!1),t.removeEventListener("touchend",(function(e){}),!1),t.removeEventListener("touchmove",(function(e){}),!1)},endBoxSwiper:function(){var e=document.querySelector("#sliderListId"),t=document.querySelector("#endBoxId"),n=document.querySelector("#sliderBtnId"),c=document.querySelector("#startId"),o=document.querySelectorAll(".slider-box")[0],a=0,r=0,i=0,l=0,s=0,u=!1;t.addEventListener("touchstart",(function(t){u=!1,isNaN(parseInt(c.style.left))?0:parseInt(c.style.left),a=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left),r=isNaN(parseInt(n.style.left))?0:parseInt(n.style.left),a=Math.abs(a),l=n.offsetWidth,s=o.offsetWidth})),t.addEventListener("touchend",(function(e){if(u){l=n.offsetWidth;var t=Math.ceil(l/o.offsetWidth);p.startIndex+t>=p.timerArr.length-1&&(t=p.timerArr.length-1-p.startIndex),n.style.width=o.offsetWidth*t+"px",n.style.background="rgba(0,0,0,0.2)",p.setOptionnalPerstion(p.startIndex,t),u=!1,p.checkPersionService()}})),Oe(t,{swipeLeft:function(t){if(p.checkMoveTarget(t)){0,u=!0;var c=Math.abs(t.mation.moveX-t.mation.startX),a=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);a=Math.abs(a);var i=o.offsetWidth;l-c<=i?n.style.width=i+"px":(n.style.width=l-c+"px",p.cancelSliderBoxColor());Object(je["w"])("ipdImages","time-wait.svg");if(n.style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))",r+(l-c)-s<a){var d=a+s-(r+l-c)-a;e.style.left=d>0?"0px":d+"px"}}},swipeRight:function(t){if(p.checkMoveTarget(t)){u=!0,1;var c=Math.abs(t.mation.moveX-t.mation.startX);n.style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))";var a=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left);a=Math.abs(a);var s=e.offsetWidth-p.screenInfo.screenWidth;if(i=a+p.screenInfo.screenWidth,r+l+c+2*o.offsetWidth>=i){var d=-a-(r+l+c+2*o.offsetWidth-i);e.style.left=d+"px",a>=s&&(e.style.left=-s+"px")}r+l+c+o.offsetWidth>=e.offsetWidth?n.style.width=e.offsetWidth-r-o.offsetWidth+"px":n.style.width=l+c+"px"}}})},cancelSliderBoxColor:function(){for(var e=document.querySelectorAll(".slider-box"),t=0;t<e.length;t++)p.nowTimerArr[t].isCheck||t>=p.startIndex&&t<p.startIndex+p.startLen&&(e[t].style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2))")},setOptionnalPerstion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;document.querySelector("#sliderListId");p.startIndex=e,p.startLen=t,p.endIndex=p.startIndex+t;for(var n=document.querySelector("#slidersWrapperId"),c=n.getBoundingClientRect().width,o=document.querySelector("#sliderBtnId"),a=(document.querySelector("#endBoxId"),document.querySelectorAll(".slider-box")),r=p.getNowIndex(),i=0;i<a.length;i++)i>=r&&(a[i].style.background="transparent");for(var l=Object(je["w"])("ipdImages","time-wait.svg"),s=0;s<t;s++)a[e+s].style.background="linear-gradient(0deg, rgba(0, 255, 163, 0.2), rgba(0, 255, 163, 0.2)), url(".concat(l,")");o.style.width=c*t+"px",o.style.background="rgba(0,0,0,0.2)";var u=c*e;o.style.left=u+"px",p.setCheckTimeStyle(),p.setServiceTimerStyle()},setPastTime:function(e){for(var t=document.querySelectorAll(".slider-box"),n=0;n<t.length;n++)n<e&&(t[n].style.background="rgba(196, 196, 196, 0.2)")},setCheckTimeStyle:function(){for(var e=p.nowTimerArr,t=document.querySelectorAll(".slider-box"),n=0;n<e.length;n++)e[n].isCheck&&(t[n].style.background=p.bgRed)},setServiceTimerStyle:function(){for(var e=p.nowTimerArr,t=document.querySelectorAll(".slider-box"),n=0;n<e.length;n++)e[n].isServiceTime&&(t[n].style.background="rgba(196, 196, 196, 0.2)")},parseCusStartTime:function(e){var t=e;if(e){var n=e/100%100;if(n){var c=e/1e4;c=parseInt(c),n<30?t=c<10?"0"+c+"3000":c+"3000":n>30&&(c+=1,t=c<10?"0"+c+"0000":c+"0000")}}return t},parseCusEndTime:function(e){var t=e;if(e){var n=e/100%100;if(n){var c=e/1e4;c=parseInt(c),n<30?t=c<10?"0"+c+"0000":c+"0000":n>30&&(t=c<10?"0"+c+"3000":c+"3000")}}return t},checkSlider:function(e,t){if(t!==p.nowTimerArr.length-1){p.formBtn=!1;var n=p.getNowIndex();if(!(t<n)){if(p.nowData.cusStartTime&&p.nowData.cusEndTime){var c=p.nowTimerArr[t].formatTimer,o=p.parseCusStartTime(p.nowData.cusStartTime),a=p.parseCusEndTime(p.nowData.cusEndTime);if(c>=o&&c<a)return}p.setOptionnalPerstion(t)}}},dateArr:a,myTimeArr:r,setWorkTimeList:function(){var e=p.workkArr;p.dateArr=[];for(var t=Object(je["a"])("YYYY-MM-DD"),n=function(n){var c,o,a=Object(je["b"])(e[n].date),r=p.parseCusStartTime(e[n].cusStartTime),i=p.parseCusEndTime(e[n].cusEndTime),l=Object(je["s"])(new Date(a).getDay());a===t&&(l="今天");for(var s=[],u=0;u<p.timerArr.length;u++){var d={timer:p.timerArr[u],isCheck:!1,formatTimer:p.timerArr[u].replace(/[:]/g,"")+"00"};s.push(d)}var m=null!==(c=null===(o=e[n])||void 0===o?void 0:o.customSceneList)&&void 0!==c?c:[];m.map((function(e){for(var t=0;t<s.length;t++)if(s[t].formatTimer<r){var n=p.parseCusStartTime(e.startTime),c=p.parseCusStartTime(e.endTime);s[t].formatTimer>=n&&s[t].formatTimer<c&&(s[t].isCheck=!0)}else{var o=p.parseCusEndTime(e.startTime),a=p.parseCusEndTime(e.endTime);s[t].formatTimer>=o&&s[t].formatTimer<a&&(s[t].isCheck=!0)}})),r&&i&&s.map((function(e){e.formatTimer>=r&&e.formatTimer<i?e.isServiceTime=!0:e.isServiceTime=!1})),p.dateArr.push({date:a,isActive:!1,oldDate:e[n].date,objectId:e[n].objectId,cusStartTime:e[n].cusStartTime,customSceneList:m,cusEndTime:e[n].cusEndTime,day:Object(je["f"])(new Date(a)),week:l,timerArr:s})},c=0;c<e.length;c++)n(c);p.dateArr.map((function(e,t){t!==p.activeIndex||p.checkDate(e,t)}))},clearTimerBoxStyle:function(){p.dateArr.map((function(e){e.isActive=!1}));for(var e=p.nowTimerArr,t=document.querySelectorAll(".slider-box"),n=0;n<e.length;n++)t[n].style.background="transparent"},activeIndex:0,checkDate:function(e,t){p.clearTimerBoxStyle(),e.isActive=!0,p.activeIndex=t,p.nowTimerArr=p.dateArr[t].timerArr,p.nowData=p.dateArr[t],Object(c["nextTick"])((function(){p.setOptionnalTime(p.nowTimerArr);var e=p.getNowIndex();p.setPastTime(e),p.setCheckTimeStyle(),p.setServiceTimerStyle(),p.changeEl()}))},flag:!1,changeEl:function(){p.setScreennWidth(),p.sliderSwiper(),p.endBoxSwiper()},formateAddTimer:function(){var e=p.nowData.customSceneList,t=p.nowData.timerArr,n=t[p.startIndex].formatTimer,c=t[p.endIndex].formatTimer,o=[];e.map((function(e,t){if(n<e.startTime){if(c<e.startTime);else if(c>=e.startTime){var a=p.formaTimeObj(e,"1",e.startTime,e.endTime);o.push(a),n=n,c=c}}else if(n>=e.startTime&&n<e.endTime){if(c<=e.endTime){var r=p.formaTimeObj(e,"1",e.startTime,e.endTime);o.push(r),n=n,c=c}else if(c>e.endTime){var i=p.formaTimeObj(e,"1",e.startTime,e.endTime);o.push(i),n=e.startTime,c=c}}else if(n>e.endTime){if(n===e.endTime){p.formaTimeObj(e,"1",e.startTime,e.endTime);n=e.startTime,c=c}}else n===e.startTime&&e.endTime}));var a=p.parseCusStartTime(p.nowData.cusStartTime),r=p.parseCusEndTime(p.nowData.cusEndTime);n<a&&c<=a?c===a&&(c=p.nowData.cusStartTime):n>=r&&n===r&&(n=p.nowData.cusEndTime);var i=Object(je["m"])(),l="0";i>=n&&i<=c&&(l="2");var s=p.formaTimeObj(e[0],l,n,c);o.push(s);var u=o;return u},formaTimeObj:function(e,t,n,c){var o={projectId:p.projectId,objectId:p.nowData.objectId,sourceType:"sagacareAndtenantslink",startDate:p.nowData.oldDate,endDate:p.nowData.oldDate,startTime:n,endTime:c,type:t,userId:p.userInfo.userId,userPhone:p.userInfo.userPhone,customSceneEqType:"ALL",userName:p.userInfo.userName};return"1"===t&&(o.id=e.id),o},formateDelTimer:function(){var e=p.nowData.timerArr,t=p.endIndex>0?p.endIndex-1:0;if(e[p.startIndex].isCheck&&e[t].isCheck){var n=p.nowData.customSceneList,c=e[p.startIndex].formatTimer,o=e[p.endIndex].formatTimer,a=[],r=[];n.map((function(e,t){if(e.startTime<c){if(e.endTime<=o){var i=p.formaTimeObj(e,"1",e.startTime,e.endTime);a.push(i);var l=p.formaTimeObj(n[0],"0",e.startTime,c);r.push(l)}else if(e.endTime>o){var s=p.formaTimeObj(e,"1",e.startTime,e.endTime);a.push(s);var u=p.formaTimeObj(n[0],"0",e.startTime,c);r.push(u);var d=p.formaTimeObj(n[0],"0",o,e.endTime);r.push(d)}}else if(e.startTime===e.startTime){if(e.endTime<=o){var m=p.formaTimeObj(e,"1",e.startTime,e.endTime);a.push(m)}else if(e.endTime>o){var f=p.formaTimeObj(e,"1",e.startTime,e.endTime);a.push(f);var b=p.formaTimeObj(n[0],"0",o,e.endTime);r.push(b)}}else if(e.startTime>c)if(e.endTime<=o){var g=p.formaTimeObj(e,"1",e.startTime,e.endTime);a.push(g)}else if(e.endTime>o){var v=p.formaTimeObj(e,"1",e.startTime,e.endTime);a.push(v);var O=p.formaTimeObj(n[0],"0",o,e.endTime);r.push(O)}})),r.map((function(e){var t=Object(je["m"])();t>=e.startTime&&t<=e.endTime&&e.type}));var i=r.concat(a);return i}return[]},closeWorkTimer:function(){p.formBtn=!1},addWorkTimer:function(){var e=p.formateAddTimer();p.saveBatchCustomScene(e)},saveBatchCustomScene:function(e){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;n.proxy.$loadingStart(0),p.formBtn=!0,Object(he["H"])(e).then((function(e){var o=setTimeout((function(){n.proxy.$loadinngEnd(),1===c?t.emit("closeWork"):2===c&&p.setWorkTimeList(),o=null,clearTimeout(o),p.formBtn=!1}),1e3)})).catch((function(){n.proxy.$loadinngEnd(),p.formBtn=!1}))},triggerDelTime:function(){var e=p.formateDelTimer();e&&e.length&&oe["a"].confirm({title:"确认",message:"确定删除当前时间吗?"}).then((function(){p.saveBatchCustomScene(e,2)})).catch((function(){}))}});return Object(c["nextTick"])((function(){})),Object(c["watch"])(e,(function(e){p.workkArr=e.workkArr,p.projectId=e.projectId})),Object(c["onMounted"])((function(){p.setWorkTimeList()})),Object(U["a"])({},Object(c["toRefs"])(p))}}),ke=(n("877d"),n("6b0d")),Ie=n.n(ke);const Se=Ie()(Te,[["render",ce],["__scopeId","data-v-07d7ca74"]]);var we=Se,Ce={class:"contact-content"},ye=Object(c["createElementVNode"])("div",{class:"title"},"联系我们",-1),xe={class:"contact"},Ne={class:"code-box"},De=["src"],Ee=Object(c["createElementVNode"])("div",{class:"title"},"客户微信二维码",-1),Ve={class:"phone-box"},Be=["src"],Ae={class:"title"},Le=Object(c["createElementVNode"])("div",{class:"concat-text"},"客户电话联系方式",-1),We=Object(c["createTextVNode"])("我知道了");function Me(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("buttons"),l=Object(c["resolveComponent"])("van-dialog");return Object(c["openBlock"])(),Object(c["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(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",Ce,[ye,Object(c["createElementVNode"])("div",xe,[Object(c["createElementVNode"])("div",Ne,[Object(c["createElementVNode"])("img",{src:e.imgUrl+"&key="+e.contantDetail.wechatQrCode,alt:""},null,8,De),Ee]),Object(c["createElementVNode"])("div",Ve,[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","phone-icon.svg"),alt:""},null,8,Be),Object(c["createElementVNode"])("div",Ae,Object(c["toDisplayString"])(e.contantDetail.phone),1),Le])]),Object(c["createVNode"])(i,{class:"dailog-btn",onClick:e.closeDailog},{default:Object(c["withCtx"])((function(){return[We]})),_:1},8,["onClick"])])]})),_:1},8,["show"])}var Fe=n("543e"),_e=(n("ac1e"),n("e7e5"),Object(je["r"])()),Ue=Object(c["defineComponent"])({props:{isShowContact:{type:Boolean,default:function(){return!1}}},components:Object(R["a"])({VanLoading:Fe["b"]},oe["a"].Component.name,oe["a"].Component),setup:function(e,t){var n={},o=Object(c["getCurrentInstance"])(),a=Object(c["reactive"])({parseImgUrl:je["w"],contantDetail:n,userInfo:_e,imgUrl:o.proxy.$imgUrl,isShowContact:e.isShowContact,closeDailog:function(){t.emit("closeDailog")},queryCustomerservice:function(){var e={criteria:{projectId:a.userInfo.projectId}};Object(he["E"])(e).then((function(e){var t,n=e,c=null!==(t=null===n||void 0===n?void 0:n.content)&&void 0!==t?t:[];a.contantDetail=c[0]}))}});return Object(c["watch"])(e,(function(e){a.isShowContact=e.isShowContact}),{deep:!1,immediate:!0}),Object(c["onMounted"])((function(){a.queryCustomerservice()})),Object(U["a"])({},Object(c["toRefs"])(a))}});n("9f85");const qe=Ie()(Ue,[["render",Me]]);var Pe=qe,Re=function(e){return Object(c["pushScopeId"])("data-v-25a3190f"),e=e(),Object(c["popScopeId"])(),e},He={class:"scene-config"},ze={class:"time-text"},Je=["src"],Ye=Re((function(){return Object(c["createElementVNode"])("div",{class:"del-text"},[Object(c["createElementVNode"])("span",null,"我要"),Object(c["createElementVNode"])("span",null,"离开")],-1)}));function Xe(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("leave-dailog");return Object(c["openBlock"])(),Object(c["createElementBlock"])(c["Fragment"],null,[Object(c["createElementVNode"])("div",He,[Object(c["createElementVNode"])("div",{class:Object(c["normalizeClass"])(["time-box",e.timerText.classColor])},[Object(c["createElementVNode"])("div",ze,[Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.timerText.text),1),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.timerText.timer),1)]),Object(c["createElementVNode"])("div",{class:Object(c["normalizeClass"])(["time-btn",e.timerText.showDel?"time-btn-small":""]),onClick:t[0]||(t[0]=function(){return e.triggerWork&&e.triggerWork.apply(e,arguments)})},[Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.timerText.btnText),1)],2)],2),e.timerText.showDel?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{key:0,class:"time-del",onClick:t[1]||(t[1]=function(){return e.myLeaving&&e.myLeaving.apply(e,arguments)})},[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","goOffWork.svg"),alt:""},null,8,Je),Ye])):Object(c["createCommentVNode"])("",!0)]),e.isShowLeaveDailog?(Object(c["openBlock"])(),Object(c["createBlock"])(i,{key:0,isShowLeaveDailog:e.isShowLeaveDailog,onCloseDailog:e.closeLeavDailog},null,8,["isShowLeaveDailog","onCloseDailog"])):Object(c["createCommentVNode"])("",!0)],64)}var Ge=n("6c02"),Ke=n("0613"),$e=function(e){return Object(c["pushScopeId"])("data-v-10ea159b"),e=e(),Object(c["popScopeId"])(),e},Qe={class:"air-dialog-content"},Ze={class:"dialog-top"},et=["src"],tt=$e((function(){return Object(c["createElementVNode"])("div",{class:"leave-title"},"工作辛苦了!",-1)})),nt={class:"leave-popup-body"},ct={key:1,class:"text-status"},ot={key:2,class:"text-status grey"},at=$e((function(){return Object(c["createElementVNode"])("span",null,"隐藏",-1)})),rt=[at];function it(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("van-icon"),l=Object(c["resolveComponent"])("van-dialog");return Object(c["openBlock"])(),Object(c["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(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",Qe,[Object(c["createElementVNode"])("div",Ze,[e.leaveDetail.img?(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:0,class:"img-yellow",src:e.parseImgUrl("page-officehome",e.leaveDetail.img),alt:""},null,8,et)):Object(c["createCommentVNode"])("",!0)]),tt,Object(c["createElementVNode"])("div",nt,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.leaveDetail.textObj,(function(e,t){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:"body-item",key:t},["ok"===e.status?(Object(c["openBlock"])(),Object(c["createBlock"])(i,{key:0,name:"passed",style:{color:"#07c160","margin-right":"8px"}})):Object(c["createCommentVNode"])("",!0),"go"===e.status?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",ct)):Object(c["createCommentVNode"])("",!0),"grey"===e.status?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",ot)):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.text),1)])})),128))]),Object(c["createElementVNode"])("div",{class:"dialog-btns",onClick:t[0]||(t[0]=function(){return e.closeDailog&&e.closeDailog.apply(e,arguments)})},rt)])]})),_:1},8,["show"])}var lt=Object(c["defineComponent"])({props:{isShowLeaveDailog:{type:Boolean,default:function(){return!1}}},components:Object(R["a"])({VanLoading:Fe["b"]},oe["a"].Component.name,oe["a"].Component),setup:function(e,t){var n=Object(c["reactive"])({parseImgUrl:je["w"],isShowLeaveDailog:e.isShowLeaveDailog,leaveDetail:{textObj:[{text:"已为您取消当前的预约时间",status:"ok"},{text:"系统将自动调整设备状态",status:"ok"},{text:"感谢您的预约使用",status:"ok"}]},closeDailog:function(){t.emit("closeDailog")}});return Object(c["watch"])(e,(function(e){n.isShowLeaveDailog=e.isShowLeaveDailog}),{deep:!1,immediate:!0}),Object(c["onMounted"])((function(){})),Object(U["a"])({},Object(c["toRefs"])(n))}});n("1196");const st=Ie()(lt,[["render",it],["__scopeId","data-v-10ea159b"]]);var ut=st,dt=Object(c["defineComponent"])({props:{scenarioArr:{type:Array,default:function(){return[]}},workkArr:{type:Array,default:function(){return[]}}},components:{LeaveDailog:ut},setup:function(e,t){Object(c["getCurrentInstance"])();var n=Object(Ge["d"])(),o={text:"",timer:"",btnText:"",showDel:!1,classColor:"grey"},a=(Object(Ke["b"])(),[]),r=[],i=Object(c["reactive"])({parseImgUrl:je["w"],leaveBtnFlag:!1,scenarioArr:e.scenarioArr,workkArr:e.workkArr,forcedOverTimeFlag:!1,onSubmit:function(e){n.push({path:"/choice-project"})},triggerWork:function(){t.emit("triggerWork")},timerText:o,text:"",formateTimeContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=i.workkArr,a="";if(1===c){if(24e4===n){Object(je["b"])(o[e].date);var l=o[e].cusStartTime,s=o[e].cusEndTime;"000000"===l&&(a=o[e].week,n=s),r.map((function(t){("000000"===t.startTime||n===t.startTime)&&(a=o[e].week,n=t.endTime),n===l&&(a=o[e].week,n=s)}))}if(a){i.text=a;var u=e+1;u<o.length-1&&i.formateTimeContinuous(u,t,n,1)}}else o[e].cusStartTime,o[e].cusEndTime},beforeWorkTime:function(e,t){for(var n=!0,c=0;c<e.length;c++)e[c].startTime<t&&(n=!1);return n},afterWorkTime:function(e,t){for(var n=!0,c=0;c<e.length;c++)e[c].endTime>t&&(n=!1);return n},checkWorkTime:function(e,t){var n={type:0,startTime:0,endTime:0};if(i.beforeWorkTime(e,t))n.type=1;else if(i.afterWorkTime(e,t))n.type=2;else{for(var c=!0,o=0;o<e.length;o++)if(t>=e[o].startTime&&t<=e[o].endTime){n.startTime=e[o].startTime,n.endTime=e[o].endTime,n.type=3,c=!1;break}c&&(n.type=4)}return n},delTimeArr:a,customSceneList:r,formateWorkTime:function(){for(var e=i.workkArr,n=Object(je["a"])("YYYY-MM-DD"),c=function(c){var o,a,r=Object(je["b"])(e[c].date),l=e[c].cusStartTime,s=e[c].cusEndTime,u=null!==(o=null===(a=e[c])||void 0===a?void 0:a.customSceneList)&&void 0!==o?o:[],d=Object(je["m"])();if(r===n){i.customSceneList=u;var m="",p="";if(l&&s||u.length)if(l&&s&&!u.length)d>=l&&d<=s?(i.timerText.text="工作时间",i.timerText.timer=Object(je["d"])(l)+"~"+Object(je["d"])(s),i.timerText.classColor="yellow",i.timerText.btnText="预约延时",i.timerText.showDel=!1,i.forcedOverTimeFlag=!1):(i.timerText.text="请选择工作时间段",i.timerText.timer="将自动开启办公服务",i.timerText.classColor="grey",i.timerText.btnText="预约时间",i.timerText.showDel=!1,i.forcedOverTimeFlag=!0);else if(l&&s&&d>=l&&d<=s)m=l,p=s,u.map((function(e){p===e.startTime&&(p=e.endTime)})),i.timerText.text="工作时间",i.timerText.timer=Object(je["d"])(m)+"~"+Object(je["d"])(p),i.timerText.classColor="yellow",i.timerText.btnText="预约延时",i.timerText.showDel=!1,i.forcedOverTimeFlag=!1;else{var f=i.checkWorkTime(u,d);3===f.type?(m=f.startTime,p=f.endTime,u.map((function(e){var t=p;m===e.startTime&&e.endTime,t===e.startTime&&(p=e.endTime)})),l&&s&&d<l&&(p===l&&(p=s),u.map((function(e){p===e.startTime&&(p=e.endTime)}))),i.timerText.text="工作时间",i.timerText.timer=Object(je["d"])(m)+"~"+Object(je["d"])(p),i.timerText.classColor="yellow",i.timerText.btnText="预约延时",i.timerText.showDel=!0,i.forcedOverTimeFlag=!1):(u.map((function(e){if(d<e.startTime){e.startTime<m?(m=e.startTime,p=e.endTime):p===e.startTime&&(p=e.endTime)}})),m&&p?(i.timerText.text="已预约~(今日)",i.timerText.timer=Object(je["d"])(m)+"~"+Object(je["d"])(p),i.timerText.classColor="grey",i.timerText.btnText="预约时间",i.timerText.showDel=!1,i.forcedOverTimeFlag=!0):(i.timerText.text="请选择工作时间段",i.timerText.timer="将自动开启办公服务",i.timerText.classColor="grey",i.timerText.btnText="预约时间",i.timerText.showDel=!1,i.forcedOverTimeFlag=!0))}else i.timerText.text="请选择工作时间段",i.timerText.timer="将自动开启办公服务",i.timerText.classColor="grey",i.timerText.btnText="预约时间",i.timerText.showDel=!1,i.forcedOverTimeFlag=!0;t.emit("setForceOverTimeFlag",i.forcedOverTimeFlag)}},o=0;o<e.length;o++)c(o)},timeJoin:function(e,t){var n=0,c=0,o=i.checkWorkTime(e,t);3===o.type?(n=o.startTime,c=o.endTime,e.map((function(e){var t=c;n===e.startTime&&e.endTime,t===e.startTime&&(c=e.endTime)})),i.timerText.text="工作时间",i.timerText.timer=Object(je["d"])(n)+"~"+Object(je["d"])(c),i.timerText.classColor="yellow",i.timerText.btnText="预约延时",i.timerText.showDel=!0,i.forcedOverTimeFlag=!1):(e.map((function(e){if(t<e.startTime){e.startTime<n?(n=e.startTime,c=e.endTime):c===e.startTime&&(c=e.endTime)}})),n&&c?(i.timerText.text="已预约~(今日)",i.timerText.timer=Object(je["d"])(n)+"~"+Object(je["d"])(c),i.timerText.classColor="grey",i.timerText.btnText="预约时间",i.timerText.showDel=!1,i.forcedOverTimeFlag=!0):(i.timerText.text="请选择工作时间段",i.timerText.timer="将自动开启办公服务",i.timerText.classColor="grey",i.timerText.btnText="预约时间",i.timerText.showDel=!1,i.forcedOverTimeFlag=!0))},formatDataDel:function(){i.delTimeArr=[];var e=i.customSceneList,t=Object(je["m"])(),n=0,c=0,o=i.checkWorkTime(e,t);3===o.type&&(n=o.startTime,c=o.endTime,e.map((function(e){var t=c;n===e.startTime&&c===e.endTime&&(e.type=1,i.delTimeArr.push(e)),t===e.startTime&&(c=e.endTime,e.type=1,i.delTimeArr.push(e))})))},myLeaving:function(){i.formatDataDel(),i.leaveBtnFlag=!0,i.saveBatchCustomScene()},saveBatchCustomScene:function(){i.openLeavDailog(),Object(he["H"])(i.delTimeArr).then((function(e){i.leaveBtnFlag=!1})).catch((function(){i.leaveBtnFlag=!1}))},isShowLeaveDailog:!1,openLeavDailog:function(){i.isShowLeaveDailog=!0},closeLeavDailog:function(){i.isShowLeaveDailog=!1}});return Object(c["watch"])(e,(function(e){i.scenarioArr=e.scenarioArr,i.workkArr=e.workkArr,i.workkArr&&i.workkArr.length&&i.formateWorkTime()}),{deep:!1,immediate:!0}),Object(U["a"])({},Object(c["toRefs"])(i))}});n("5ea2");const mt=Ie()(dt,[["render",Xe],["__scopeId","data-v-25a3190f"]]);var pt=mt,ft={class:"scene-config"},bt=["onClick"],gt=["src"];function vt(e,t,n,o,a,r){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",ft,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.scenarioArr,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{key:"scene"+n,class:Object(c["normalizeClass"])(["scene-item",t.sceneType===e.activeType?"scene-active":""]),onClick:function(n){return e.handleScene(t)},style:Object(c["normalizeStyle"])({flex:e.scenarioArr.length&&2==e.scenarioArr.length&&t.sceneType===e.activeType?2:1})},[Object(c["createElementVNode"])("img",{src:t.img,alt:""},null,8,gt),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(t.sceneName),1)],14,bt)})),128))])}var Ot=Object(c["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(Ge["d"])(),o=(Object(Ke["b"])(),{DISCUSSING:Object(je["w"])("ipdImages","taolun.svg"),PROJECTING:Object(je["w"])("ipdImages","touying.svg"),ADJOURNMENT:Object(je["w"])("ipdImages","sanhui.svg")}),a=Object(c["reactive"])({parseImgUrl:je["w"],scenarioArr:e.scenarioArr,scenarioImgArr:o,activeType:"DISCUSSING",onSubmit:function(e){n.push({path:"/choice-project"})},formatScenarioImg:function(){a.scenarioArr.map((function(e){e.img=a.scenarioImgArr[e.sceneType]}))},handleScene:function(n){a.activeType=n.sceneType;var c=Object(je["r"])(),o={spaceId:e.spaceId,projectId:e.projectId,type:n.sceneType,pubname:c.pubname};n.loading=!0,n.lodingText="正在切换至",t.emit("setHeadScene",n),Object(he["L"])(o).then((function(e){var c=e;"success"===c.result&&(n.loading=!1,n.lodingText="切换至",t.emit("setHeadScene",n))})).catch((function(){n.loading=!1,n.lodingText="",t.emit("setHeadScene",n)}))}});return Object(c["watch"])(e,(function(e){a.scenarioArr=e.scenarioArr,a.formatScenarioImg(),a.activeType=e.activeType}),{deep:!1,immediate:!0}),Object(c["onMounted"])((function(){})),Object(U["a"])({},Object(c["toRefs"])(a))}});n("9350");const jt=Ie()(Ot,[["render",vt],["__scopeId","data-v-bd81473e"]]);var ht=jt,Tt=n("0500"),kt=function(e){return Object(c["pushScopeId"])("data-v-0c0f4fb6"),e=e(),Object(c["popScopeId"])(),e},It={class:"header-content"},St={class:"weather"},wt=["src"],Ct={class:"weather-text"},yt={class:"pr5"},xt=kt((function(){return Object(c["createElementVNode"])("span",null,"/",-1)})),Nt=kt((function(){return Object(c["createElementVNode"])("span",{class:"pr5"},"PM2.5",-1)})),Dt={class:"pr5"};function Et(e,t,n,o,a,r){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",It,[Object(c["createElementVNode"])("div",St,[Object(c["withDirectives"])(Object(c["createElementVNode"])("img",{src:e.outWeather.imgname,class:"weather-icon",alt:""},null,8,wt),[[c["vShow"],e.outWeather.imgname]]),Object(c["createElementVNode"])("div",Ct,[Object(c["createElementVNode"])("p",null,[Object(c["createElementVNode"])("span",yt,Object(c["toDisplayString"])(e.outWeather.temperature?e.outWeather.temperature:"--")+"℃",1),xt,Nt,Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.outWeather.pm25?e.outWeather.pm25:"--"),1)]),Object(c["createElementVNode"])("p",null,[Object(c["createElementVNode"])("span",Dt,Object(c["toDisplayString"])(e.outWeather.text?e.outWeather.text:"--"),1),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.outWeather.quality?e.outWeather.quality:"--"),1)])])]),Object(c["createElementVNode"])("div",{class:"set-space-btn",onClick:t[0]||(t[0]=function(){return e.setPermanentSpace&&e.setPermanentSpace.apply(e,arguments)})}," 设置常驻空间 ")])}var Vt=n("ad06"),Bt=(n("c3a6"),Object(c["defineComponent"])({props:{outWeather:{type:Object,default:function(){return{}}}},components:{VanIcon:Vt["b"]},setup:function(){var e=Object(Ge["d"])(),t=Object(c["reactive"])({goBack:function(){window.history.go(-1)},setPermanentSpace:function(){e.push({path:"/mySpace"})}});return Object(U["a"])({},Object(c["toRefs"])(t))}}));n("67fc");const At=Ie()(Bt,[["render",Et],["__scopeId","data-v-0c0f4fb6"]]);var Lt=At,Wt=n("3ba9"),Mt=function(e){return Object(c["pushScopeId"])("data-v-7769650f"),e=e(),Object(c["popScopeId"])(),e},Ft={class:"scenario"},_t=Mt((function(){return Object(c["createElementVNode"])("div",{class:"title"},"切换场景",-1)})),Ut={class:"scenario-box"},qt=["onClick"],Pt=["src"];function Rt(e,t,n,o,a,r){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Ft,[_t,Object(c["createElementVNode"])("div",Ut,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.popList,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:Object(c["normalizeClass"])(["scenario-item",t.code===e.activeIndex?"active":""]),onClick:function(c){return e.handleScene(t,n)},key:n},[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome",t.img),alt:""},null,8,Pt),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(t.name),1)],10,qt)})),128))])])}var Ht=n("d399"),zt=Object(c["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},spaceId:{type:String,default:function(){return""}},popList:{type:Array,default:function(){return[]}},vanPopupIndex:{type:String,default:function(){return""}}},setup:function(e,t){var n={},o=Object(c["reactive"])({parseImgUrl:je["w"],showSecenDetailDalig:!1,sceneDetail:n,activeIndex:e.vanPopupIndex,loadingStart:function(){Ht["a"].loading({duration:0,forbidClick:!0,message:"正在切换..."})},loadinngEnd:function(){Ht["a"].clear()},handleScene:function(n,c){for(var a=e.popList,r=n.name,i=0;i<a.length;i++){var l=a[i];r===l.name&&(o.sceneDetail=JSON.parse(JSON.stringify(l)),o.sceneDetail.textObj=[],l.textObj.map((function(e,t){setTimeout((function(){o.sceneDetail.textObj.push(e)}),150*(t+1))})))}o.loadingStart(),o.activeIndex=o.sceneDetail.code,o.showSecenDetailDalig=!0;var s=Object(je["r"])(),u={spaceId:e.spaceId,projectId:e.projectId,type:o.sceneDetail.code,pubname:s.pubname};Object(he["L"])(u).then((function(e){o.loadinngEnd(),t.emit("setHeadScene",o.sceneDetail.name,o.sceneDetail)})).catch((function(){o.loadinngEnd(),t.emit("setHeadScene",o.sceneDetail.name,o.sceneDetail)}))}});return Object(c["watch"])(e,(function(e){o.activeIndex=e.vanPopupIndex})),Object(U["a"])({},Object(c["toRefs"])(o))}});n("3eb9");const Jt=Ie()(zt,[["render",Rt],["__scopeId","data-v-7769650f"]]);var Yt=Jt,Xt=function(e){return Object(c["pushScopeId"])("data-v-248548e4"),e=e(),Object(c["popScopeId"])(),e},Gt={class:"air"},Kt={class:"air-top"},$t={class:"air-desc"},Qt=Xt((function(){return Object(c["createElementVNode"])("p",{class:"air-title"},"空调",-1)})),Zt={class:"air-temperature"},en=Xt((function(){return Object(c["createElementVNode"])("sup",null,"℃",-1)})),tn={key:0,class:"air-status"},nn={key:1,class:"air-loading"},cn=["src"],on={class:"air-right"},an=["src"],rn={key:0,class:"air-control"},ln=Xt((function(){return Object(c["createElementVNode"])("div",{class:"control-title"},"温度调节",-1)})),sn={class:"btn-box"},un=["src"],dn=["src"],mn={key:1,class:"air-control"},pn=Xt((function(){return Object(c["createElementVNode"])("div",{class:"control-title"},"风量调节",-1)})),fn={class:"btn-box"},bn=["src"],gn=["src"],vn={class:"air-dialog-content"},On={class:"dialog-top"},jn=["src"],hn={class:"dialog-text"},Tn={key:0,class:"air-body-item-num"},kn={class:"air-temp-num"},In={key:0,class:"air-temp-num"},Sn={key:1,class:"air-temp-num-load"},wn=["src"],Cn={key:1,class:"air-notice"},yn={key:2,class:"air-temp-load"},xn=Xt((function(){return Object(c["createElementVNode"])("span",null,"确定",-1)})),Nn=[xn];function Dn(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("van-loading"),l=Object(c["resolveComponent"])("Switch"),s=Object(c["resolveComponent"])("van-dialog");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Gt,[Object(c["createElementVNode"])("div",Kt,[Object(c["createElementVNode"])("div",$t,[Qt,Object(c["createElementVNode"])("p",Zt,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.airData.tempSet?e.airData.tempSet:"--")+" ",1),en]),e.hasAir?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",tn,Object(c["toDisplayString"])(e.airData.isOpen?"空调已开启":"空调已关闭"),1)):Object(c["createCommentVNode"])("",!0),e.airData.isOpen?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",nn,[1==e.airData.icon||2==e.airData.icon||3==e.airData.icon?(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:0,src:e.airRunImg,alt:""},null,8,cn)):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.airData.spaceStatus),1)])):Object(c["createCommentVNode"])("",!0)]),Object(c["createElementVNode"])("div",on,[e.airData.airImg?(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:0,src:e.airData.airImg,alt:""},null,8,an)):(Object(c["openBlock"])(),Object(c["createBlock"])(i,{key:1,style:{"padding-top":"20px"}})),e.hasAir?(Object(c["openBlock"])(),Object(c["createBlock"])(l,{key:2,class:"switch-btn",loading:e.loadingAir||e.firstLoadingAir,disabled:!e.userIsControl||e.loadingAir||e.firstLoadingAir,"inactive-color":"rgba(196, 196, 196, 0.4)",onClick:e.airChange,"model-value":e.airData.isOpen},null,8,["loading","disabled","onClick","model-value"])):Object(c["createCommentVNode"])("",!0)])]),e.userIsControl&&e.airData.isOpen?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",rn,[ln,Object(c["createElementVNode"])("div",sn,[Object(c["createElementVNode"])("div",{class:"control-btn mr20",onClick:t[0]||(t[0]=Object(c["withModifiers"])((function(t){return e.changeAir(4,"temp","toCold")}),["stop"]))},[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("envmonitor","arrow-top.png"),alt:""},null,8,un)]),Object(c["createElementVNode"])("div",{class:"control-btn",onClick:t[1]||(t[1]=Object(c["withModifiers"])((function(t){return e.changeAir(2,"temp","toWarm")}),["stop"]))},[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("envmonitor","arrow-down.png"),alt:""},null,8,dn)])])])):Object(c["createCommentVNode"])("",!0),e.userIsControl&&e.airData.isOpen&&e.showAirVolumeBtn?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",mn,[pn,Object(c["createElementVNode"])("div",fn,[Object(c["createElementVNode"])("div",{class:"control-btn mr20",onClick:t[2]||(t[2]=Object(c["withModifiers"])((function(t){return e.changeAir(5,"wind","toWindLow")}),["stop"]))},[Object(c["createElementVNode"])("img",{class:"temp-img",src:e.parseImgUrl("envmonitor","fengshan.png"),alt:""},null,8,bn)]),Object(c["createElementVNode"])("div",{class:"control-btn",onClick:t[3]||(t[3]=Object(c["withModifiers"])((function(t){return e.changeAir(6,"wind","toWindUp")}),["stop"]))},[Object(c["createElementVNode"])("img",{class:"temp-img",src:e.parseImgUrl("envmonitor","wendu.png"),alt:""},null,8,gn)])])])):Object(c["createCommentVNode"])("",!0),Object(c["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(c["withCtx"])((function(){return[Object(c["createElementVNode"])("div",vn,[Object(c["createElementVNode"])("div",On,[Object(c["createElementVNode"])("img",{class:Object(c["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(c["createElementVNode"])("div",hn,["toCold"===e.airSetText.toWhere||"toWarm"===e.airSetText.toWhere?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Tn,[Object(c["createElementVNode"])("div",kn,Object(c["toDisplayString"])(e.temperature),1),Object(c["createElementVNode"])("div",{class:Object(c["normalizeClass"])(["air-temp-num",{"arrow-cooling":"toCold"==e.airSetText.toWhere,"arrow-warn":"toWarm"==e.airSetText.toWhere}])}," → ",2),e.airSetText.designTemperature?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",In,Object(c["toDisplayString"])(e.airSetText.designTemperature),1)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Sn,[Object(c["createElementVNode"])("img",{style:{"padding-top":"4px",height:"20px",width:"20px"},src:e.parseImgUrl("page-officehome","loading.svg")},null,8,wn)]))])):Object(c["createCommentVNode"])("",!0),e.airSetText.notice?(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",Cn,[Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.airSetText.notice),1)])):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",yn,[Object(c["createVNode"])(i,{type:"spinner"})]))]),Object(c["createElementVNode"])("div",{class:"dialog-btns",onClick:t[4]||(t[4]=Object(c["withModifiers"])((function(){return e.closeDialog&&e.closeDialog.apply(e,arguments)}),["stop"]))},Nn)])]})),_:1},8,["show"])])}const[En,Vn]=Object(re["a"])("switch"),Bn={size:ie["f"],loading:Boolean,disabled:Boolean,modelValue:ie["h"],activeColor:String,inactiveColor:String,activeValue:{type:ie["h"],default:!0},inactiveValue:{type:ie["h"],default:!1}};var An=Object(c["defineComponent"])({name:En,props:Bn,emits:["change","update:modelValue"],setup(e,{emit:t}){const n=()=>e.modelValue===e.activeValue,o=()=>{if(!e.disabled&&!e.loading){const c=n()?e.inactiveValue:e.activeValue;t("update:modelValue",c),t("change",c)}},a=()=>{if(e.loading){const t=n()?e.activeColor:e.inactiveColor;return Object(c["createVNode"])(Fe["a"],{class:Vn("loading"),color:t},null)}};return Object(ue["h"])(()=>e.modelValue),()=>{const{size:t,loading:r,disabled:i,activeColor:l,inactiveColor:s}=e,u=n(),d={fontSize:Object(le["b"])(t),backgroundColor:u?l:s};return Object(c["createVNode"])("div",{role:"switch",class:Vn({on:u,loading:r,disabled:i}),style:d,tabindex:i?void 0:0,"aria-checked":u,onClick:o},[Object(c["createVNode"])("div",{class:Vn("node")},[a()])])}}});const Ln=Object(ae["a"])(An);var Wn,Mn=Ln,Fn=(n("e3b3"),n("d9d2"),Object(c["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:(Wn={Switch:Mn},Object(R["a"])(Wn,oe["a"].Component.name,oe["a"].Component),Object(R["a"])(Wn,"Loading",Fe["b"]),Wn),setup:function(e,t){var n=e,o={avg:"--",icon:1,spaceStatus:"",notice:"",mode:0,tempSet:0,isOpen:!1},a=null,r=null,i=!1,l=Object(c["reactive"])({loadingAir:!1,temperature:e.temperature,userIsControl:e.userIsControl,forceOverTimeFlag:e.forceOverTimeFlag,firstLoadingAir:!0,domAirOpeen:i,feedbackTimer:a,parseImgUrl:je["w"],airData:o,modeName:"",showAirVolumeBtn:!1,showDialog:!1,airTimer:r,airSetText:{notice:"",nowImg:"",toWhere:"",designTemperature:0},formateModel:function(e){l.modeName=e?1===e?"制冷":2===e?"制热":3===e?"通风":4===e?"除湿":"":""},getEquipmentListHttp:function(){var t={spaceId:e.spaceId};l.showAirVolumeBtn=!1;var n=!0;Object(he["j"])(t).then((function(e){var t=e,c=t?t.data:[];if(c&&c.length){for(var o=0;o<c.length;o++){var a=c[o];if("ACATVI"===a.equipmentCategory){l.showAirVolumeBtn=!1,n=!1;break}}n&&(l.showAirVolumeBtn=!0)}}))},getAirInfoToTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;l.airTimer&&clearTimeout(l.airTimer),l.airTimer=setTimeout((function(){l.getAirInfo()}),e)},getFeedbackTimer:function(e,t){clearTimeout(l.airTimer),l.airTimer=null,l.feedbackTimer=setTimeout((function(){l.getAirInfo("feedback",e,t,!1)}),3e3)},closeLoading:function(){var e=0,t=setInterval((function(){(e>30||l.domAirOpeen===l.airData.isOpen)&&(l.loadingAir=!1,clearInterval(t)),e++}),1e3)},getAirInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a={projectId:n.projectId,objectId:n.spaceId};"feedback"===e&&(a.id=o),Object(he["k"])(a).then((function(n){var a=n;"feedback"!==e&&a&&(l.airData=a,l.formateModel(l.airData.mode),t.emit("updateAirTemp",l.airData.tempSet),!l.airData.icon||7!==l.airData.icon&&8!==l.airData.icon?(l.airData.isOpen=!0,l.airData.airImg=Object(je["w"])("page-officehome","openair.png")):(l.airData.isOpen=!1,l.airData.airImg=Object(je["w"])("page-officehome","air_close.png"))),"feedback"===e?a.notice?(l.airSetText.notice=a.notice,l.feedbackTimer&&(clearTimeout(l.feedbackTimer),l.getAirInfoToTimer())):l.getFeedbackTimer(c,o):l.getAirInfoToTimer(),l.firstLoadingAir=!1})).catch((function(){l.getAirInfoToTimer(),l.firstLoadingAir=!1,l.airData.airImg=Object(je["w"])("page-officehome","air_close.png")}))},airChange:function(){l.userIsControl?l.loadingAir?Object(Ht["a"])("指令正在下发中,勿重复操作!"):l.airComfir():Object(Ht["a"])("您没有当前空间的控制权限!")},airComfir:function(){var e=l.airData.isOpen?"要关闭空调吗?":"要开启空调吗?",n=l.airData.isOpen?"关闭":"开启";oe["a"].confirm({cancelButtonText:"取消",confirmButtonText:n,confirmButtonColor:"$elActiveColor",message:e}).then((function(){var e=!l.airData.isOpen;if(l.forceOverTimeFlag&&e)t.emit("triggerWork");else{var n=e?12:10;l.domAirOpeen=e;var c="";c=12==n?"openAir":"closeAir",l.loadingAir=!0,l.closeLoading(),l.changeAir(n,"sw",c)}})).catch((function(){}))},closeScenarioAir:function(){l.changeAir(10,"sw","closeAir")},updatAirStatus:function(e){"sw"===e&&l.getAirInfo("","","",!1)},updateAirText:function(e,t){"sw"!==e&&(l.airSetText.designTemperature=t.designTemperature,l.airSetText.toWhere=t.toWhere,"toCold"==l.airSetText.toWhere?l.airSetText.nowImg="dialog_cooling.svg":"toWarm"==l.airSetText.toWhere?l.airSetText.nowImg="dialog_warmUp.svg":l.airSetText.nowImg="icon_wind.svg")},showAirConditioning:function(e,t){if("sw"!==e){l.showDialog=!0;var n={toWhere:t,designTemperature:0};l.updateAirText(e,n)}},closeDialog:function(){l.feedbackTimer&&(clearInterval(l.feedbackTimer),l.feedbackTimer=null),l.getAirInfoToTimer(),l.showDialog=!1},changeAir:function(e,t,c){l.airSetText.notice="";var o={projectId:n.projectId,objectId:n.spaceId,valueType:1,itemId:e};l.showAirConditioning(t,c),Object(he["b"])(o).then((function(e){var n=e,o={toWhere:c,designTemperature:n.designTemperature};l.updateAirText(t,o),"sw"!==t&&(n.notice?l.airSetText.notice=n.notice:l.getFeedbackTimer(t,n.id))})).catch((function(){l.loadingAir=!1}))}});Object(c["watch"])(e,(function(t){t.spaceId&&l.getAirInfoToTimer(0),l.temperature=e.temperature,l.userIsControl=t.userIsControl,l.forceOverTimeFlag=t.forceOverTimeFlag})),Object(c["onBeforeUnmount"])((function(){l.airTimer&&(clearTimeout(l.airTimer),l.airTimer=null),l.feedbackTimer&&(clearTimeout(l.feedbackTimer),l.feedbackTimer=null)})),Object(c["onMounted"])((function(){l.firstLoadingAir=!0,l.getAirInfo(),l.getEquipmentListHttp()}));var s=Object(c["computed"])((function(){var e="";switch(l.airData.icon){case 1:e=Object(je["w"])("page-officehome","temp-keep.png");break;case 2:e=Object(je["w"])("page-officehome","temp_cold.svg");break;case 3:e=Object(je["w"])("page-officehome","temp_sun.png");break;default:e="";break}return e}));return Object(U["a"])({airRunImg:s},Object(c["toRefs"])(l))}}));n("8262"),n("6b3e");const _n=Ie()(Fn,[["render",Dn],["__scopeId","data-v-248548e4"]]);var Un=_n,qn=function(e){return Object(c["pushScopeId"])("data-v-0e4ba0da"),e=e(),Object(c["popScopeId"])(),e},Pn={key:0,class:"light"},Rn={class:"light-top"},Hn={class:"light-desc"},zn={class:"light-title"},Jn=qn((function(){return Object(c["createElementVNode"])("span",null,"显示全部",-1)})),Yn={class:"light-right"},Xn=["src"],Gn={class:"control-title"};function Kn(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("van-icon"),l=Object(c["resolveComponent"])("Switch");return e.lampList&&e.lampList.length?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Pn,[Object(c["createElementVNode"])("div",Rn,[Object(c["createElementVNode"])("div",Hn,[Object(c["createElementVNode"])("p",zn,Object(c["toDisplayString"])(e.isShowChildLight?"光照":e.lampList[0].localName),1),Object(c["createElementVNode"])("p",{class:Object(c["normalizeClass"])((e.isShowChildLight,"light-status"))},Object(c["toDisplayString"])(e.lampSw?"照明已开启":"照明已关闭"),3),e.isShowChildLight?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{key:0,class:"show-all",onClick:t[0]||(t[0]=Object(c["withModifiers"])((function(){return e.showAll&&e.showAll.apply(e,arguments)}),["stop"]))},[Object(c["createVNode"])(i,{name:e.lightIcon,class:"light-icon"},null,8,["name"]),Jn])):Object(c["createCommentVNode"])("",!0)]),Object(c["createElementVNode"])("div",Yn,[Object(c["createElementVNode"])("img",{src:e.lightImg,alt:""},null,8,Xn),e.showFlag?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createBlock"])(l,{key:0,disabled:!e.userIsControl,modelValue:e.lampSw,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.lampSw=t}),onClick:t[2]||(t[2]=function(t){return e.eqChange("allLamp","",0)}),"inactive-color":"rgba(196, 196, 196, 0.4)",class:"switch-btn"},null,8,["disabled","modelValue"]))])]),e.showFlag&&e.isShowChildLight?(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],{key:0},Object(c["renderList"])(e.lampList,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:"light-control",key:t.id},[Object(c["createElementVNode"])("div",Gn,Object(c["toDisplayString"])(t.localName),1),Object(c["createVNode"])(l,{"active-color":"$elActiveColor",disabled:!e.userIsControl,modelValue:t.switch,"onUpdate:modelValue":function(e){return t.switch=e},onClick:function(c){return e.eqChange("main",t,n)},"inactive-color":"rgba(196, 196, 196, 0.2)",class:"switch-btn"},null,8,["disabled","modelValue","onUpdate:modelValue","onClick"])])})),128)):Object(c["createCommentVNode"])("",!0)])):Object(c["createCommentVNode"])("",!0)}n("4de4");var $n=Object(c["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},spaceId:{type:String,default:function(){return""}},userIsControl:{type:Boolean,default:function(){return!1}},forceOverTimeFlag:{type:Boolean,default:function(){return!1}}},components:{Switch:Mn},setup:function(e,t){var n=[],o=null,a=null,r=[],i=[],l=Object(c["reactive"])({userIsControl:e.userIsControl,forceOverTimeFlag:e.forceOverTimeFlag,setStatus:!1,lightParams:i,allowSvg:"down_Arrow.svg",timeOut:a,lightIcon:"arrow-down",showFlag:!1,loadingLight:!1,initData:r,lampList:n,lightsStatusTimer:o,startCheckLightsTime:0,lightImg:Object(je["w"])("page-officehome","lamp_close_v2.png"),lampSw:!1,showAll:function(){l.showFlag=!l.showFlag,l.lightIcon="arrow-down"},getLampList:function(){Object(he["m"])({spaceId:e.spaceId}).then((function(e){var t=e;if(!l.setStatus&&t&&"success"==t.result){for(var n,c=null!==(n=null===t||void 0===t?void 0:t.content)&&void 0!==n?n:[],o=!1,a=0;a<c.length;a++)c[a].type="lamp",c[a].imgOpen=Object(je["w"])("page-officehome","lampch_open.png"),c[a].imgClose=Object(je["w"])("page-officehome","lampch_close.png"),c[a].switch=!!c[a].runStatus,c[a].runStatus&&(o=!0),c[a].loading=!1;l.initData=JSON.parse(JSON.stringify(c)),l.lampSw=o,l.lampList=c,l.lightImg=l.lampSw?Object(je["w"])("page-officehome","lamp_open_v2.png"):Object(je["w"])("page-officehome","lamp_close_v2.png")}l.startLightsStatusTimer()})).catch((function(){l.startLightsStatusTimer()}))},eqChange:function(e,n,c){if(l.userIsControl)if("allLamp"===e){if(l.forceOverTimeFlag&&l.lampSw)return void t.emit("triggerWork");l.loadingLight=!0;var o=l.lampSw;l.setStatus=!0,l.updateAllLampStatus(o),l.setLamp(e,"",o,0)}else{if(l.forceOverTimeFlag&&n.switch)return void t.emit("triggerWork");n.loading=!0;var a=n.switch,r=n.id;l.setStatus=!0,l.updateLampStatus(n,a),l.setLamp(e,r,a,c)}else Object(Ht["a"])("您没有当前空间的控制权限!")},setLamp:function(e,t,n,c){var o=[];if("allLamp"===e){for(var a=0;a<l.initData.length;a++)l.initData[a].switch=n;o=l.initData}else o=[{id:t,switch:n}];l.lightParams=o,Object(he["K"])(o).then((function(e){var t=e;setTimeout((function(){l.setStatus=!1}),1e3),"success"===t.result||l.initLampLoading()})).catch((function(){setTimeout((function(){l.setStatus=!1}),1e3)}))},initLampLoading:function(){l.loadingLight=!1,l.lampList.map((function(e){e.loading=!1}))},updateAllLampStatus:function(e){l.lampSw=e;for(var t=0;t<l.lampList.length;t++)l.lampList[t].switch=e},updateLampStatus:function(e,t){e.switch=t},getTimeLampStatus:function(e,t,n,c,o){if(e["success"]&&e["success"].length&&("allLamp"===t?l.updateAllLampLoading(e["success"]):l.updateLampLoading(o),l.getLampList()),e["processing"]&&e["processing"].length){var a=l.lightParams,r=e["processing"],i=[];r.map((function(e){for(var t={id:e.id,orderSeqNum:e.orderSeqNum},n=0;n<a.length;n++)if(e.id===a[n].id){t.switch=a[n].switch;break}i.push(t)})),l.checkChangeLightStatusSuccess(i,t,n,c,o)}e["error"]&&e["error"].length&&("allLamp"===t?l.updateAllLampLoading(e["error"]):l.updateLampLoading(o))},judgeChangeResponeseSuccess:function(e){for(var t,n=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:[],c=[],o=[],a=[],r=0;r<n.length;r++){var i=n[r];(i.result="success")?200===i.state&&"success"===i.exeResult?o.push(i):200===i.state&&"processing:rcvd"===i.exeResult||202===i.state&&!i.exeResult?c.push(i):a.push(i):a.push(i)}var l={success:o,processing:c,error:a};return l},updateAllLampLoading:function(e){for(var t=function(t){"lamp"==l.lampList[t].type&&e.map((function(e){l.lampList[t].id===e.id&&(l.lampList[t].loading=!1)}))},n=0;n<l.lampList.length;n++)t(n);var c=l.lampList.filter((function(e){return e.loading}));0===c.length&&(l.loadingLight=!1)},updateLampLoading:function(e){l.lampList[e].loading=!1},checkChangeLightStatusSuccess:function(e,t,n,c,o){Object(he["z"])(e).then((function(e){var a=e,r=l.judgeChangeResponeseSuccess(a);l.getTimeLampStatus(r,t,n,c,o)}))},startLightsStatusTimer:function(){l.lightsStatusTimer&&(window.clearTimeout(l.lightsStatusTimer),l.lightsStatusTimer=null),l.lightsStatusTimer=window.setTimeout((function(){l.getLampList()}),2e3)}}),s=Object(c["computed"])((function(){return l.lampList.length&&l.lampList.length>1}));return Object(c["watch"])(e,(function(e){e.spaceId&&l.startLightsStatusTimer(),l.userIsControl=e.userIsControl,l.forceOverTimeFlag=e.forceOverTimeFlag}),{deep:!1,immediate:!0}),Object(c["onBeforeUnmount"])((function(){l.lightsStatusTimer&&(window.clearTimeout(l.lightsStatusTimer),l.lightsStatusTimer=null)})),Object(c["onMounted"])((function(){l.getLampList()})),Object(U["a"])({isShowChildLight:s},Object(c["toRefs"])(l))}});n("c032"),n("2d4b");const Qn=Ie()($n,[["render",Kn],["__scopeId","data-v-0e4ba0da"]]);var Zn=Qn,ec=function(e){return Object(c["pushScopeId"])("data-v-36c637d2"),e=e(),Object(c["popScopeId"])(),e},tc={key:0,class:"curtain"},nc={class:"curtain-top"},cc={class:"curtain-desc"},oc={class:"curtain-title"},ac={class:"curtain-status"},rc={class:"curtain-tip"},ic=ec((function(){return Object(c["createElementVNode"])("span",null,"显示全部",-1)})),lc={class:"curtain-right"},sc=["src"],uc={key:0,class:"curtain-control"},dc={key:0,class:"timer-text"},mc=["src"],pc={key:0,class:"timer-text"},fc=["src"],bc={class:"child-title"},gc={class:"curtain-control"},vc=["onClick"],Oc={key:0,class:"timer-text"},jc=["src"],hc=["onClick"],Tc={key:0,class:"timer-text"},kc=["src"];function Ic(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("van-icon");return e.curtainData&&e.curtainData.length?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",tc,[Object(c["createElementVNode"])("div",nc,[Object(c["createElementVNode"])("div",cc,[Object(c["createElementVNode"])("p",oc,Object(c["toDisplayString"])(e.curtainData.length&&1==e.curtainData.length?e.curtainData[0].name:"窗帘"),1),Object(c["createElementVNode"])("p",ac,[Object(c["createElementVNode"])("span",rc,Object(c["toDisplayString"])(e.countText),1)]),e.isShowChildLight?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{key:0,class:"show-all",onClick:t[0]||(t[0]=function(){return e.showAll&&e.showAll.apply(e,arguments)})},[Object(c["createVNode"])(i,{name:e.lightIcon,class:"light-icon"},null,8,["name"]),ic])):Object(c["createCommentVNode"])("",!0)]),Object(c["createElementVNode"])("div",lc,[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("page-officehome","curtain-img.svg"),alt:""},null,8,sc),e.showFlag?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",uc,[Object(c["createElementVNode"])("div",{class:Object(c["normalizeClass"])(["control-item mr10",{"box-active":e.curtainClose&&e.count,"control-item-disabled":!e.userIsControl}]),onClick:t[1]||(t[1]=function(t){return e.handleTotal("EquipOffSet")})},[e.curtainClose&&e.count?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",dc,Object(c["toDisplayString"])(e.count),1)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:1,src:e.parseImgUrl("page-officehome","curtain-close.png"),alt:""},null,8,mc))],2),Object(c["createElementVNode"])("div",{class:Object(c["normalizeClass"])(["control-item",{"box-active":e.curtainOpen&&e.count,"control-item-disabled":!e.userIsControl}]),onClick:t[2]||(t[2]=function(t){return e.handleTotal("EquipOnSet")})},[e.curtainOpen&&e.count?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",pc,Object(c["toDisplayString"])(e.count),1)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:1,src:e.parseImgUrl("page-officehome","curtain-open.png"),alt:""},null,8,fc))],2)]))])]),e.showFlag?(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],{key:0},Object(c["renderList"])(e.curtainData,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:"child-curtain",key:t.id},[Object(c["createElementVNode"])("div",bc,Object(c["toDisplayString"])(t.name),1),Object(c["createElementVNode"])("div",gc,[Object(c["createElementVNode"])("div",{class:Object(c["normalizeClass"])(["control-item mr10",{"box-active":t.curtainClose&&e.count,"control-item-disabled":!e.userIsControl}]),onClick:function(c){return e.handleChild("EquipOffSet",t.id,n)}},[t.curtainClose&&e.count?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",Oc,Object(c["toDisplayString"])(e.count),1)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:1,src:e.parseImgUrl("page-officehome","curtain-close.png"),alt:""},null,8,jc))],10,vc),Object(c["createElementVNode"])("div",{class:Object(c["normalizeClass"])(["control-item",{"box-active":t.curtainOpen&&e.count,"control-item-disabled":!e.userIsControl}]),onClick:function(c){return e.handleChild("EquipOnSet",t.id,n)}},[t.curtainOpen&&e.count?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",Tc,Object(c["toDisplayString"])(e.count),1)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:1,src:e.parseImgUrl("page-officehome","curtain-open.png"),alt:""},null,8,kc))],10,hc)])])})),128)):Object(c["createCommentVNode"])("",!0)])):Object(c["createCommentVNode"])("",!0)}var Sc=Object(c["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},spaceId:{type:String,default:function(){return""}},userIsControl:{type:Boolean,default:function(){return!1}}},setup:function(e){var t=[],n=null,o=e.projectId,a=Object(c["reactive"])({curtainData:t,userIsControl:e.userIsControl,lightIcon:"arrow-down",showFlag:!1,projectId:o,countText:"",count:0,curtainOpen:!1,curtainClose:!1,parseImgUrl:je["w"],timer:n,getEqpGroup:function(){var t={criteria:{projectId:e.projectId,spaceId:e.spaceId,type:0},orders:[{column:"sortNum",asc:!0}]};Object(he["p"])(t).then((function(e){var t=e;a.curtainData=t.count?t.content:[];for(var n=0;n<a.curtainData.length;n++){var c=a.curtainData[n];c.childDownFlag=!1,c.childUpFlag=!1,c.childCount=2,c.childCountText=""}}))},showAll:function(){a.showFlag=!a.showFlag,a.showFlag?a.lightIcon="arrow-up":a.lightIcon="arrow-down"},checkCount:function(){return a.count>0},handleTotal:function(e){if(a.userIsControl){var t=a.checkCount();if(!t){a.changeStatus(e);var n=JSON.parse(JSON.stringify(a.curtainData)),c=a.setParams(n,e);a.setSwitchStatus(e),Object(he["J"])(c).then((function(e){}))}}else Object(Ht["a"])("您没有当前空间的控制权限!")},handleChild:function(e,t,n){if(a.userIsControl){var c=a.checkCount();if(!c){var o=a.curtainData[n],r={projectId:a.projectId,objectId:t,equipmentCategory:"CFSSES",infoCode:e,value:1},i=[];i.push(r),a.changeStatus(e,o),a.setSwitchStatus(e,o),Object(he["J"])(i).then((function(e){}))}}else Object(Ht["a"])("您没有当前空间的控制权限!")},clearCurtain:function(){a.curtainData.map((function(e){e.curtainClose=!1,e.curtainOpen=!1,a.curtainClose=!1,a.curtainOpen=!1}))},changeStatus:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;a.clearCurtain(),"EquipOffSet"===e?t?t.curtainClose=!0:a.curtainClose=!0:t?t.curtainOpen=!0:a.curtainOpen=!0},setSwitchStatus:function(e){a.count=2,a.countText="指令下发中",a.timer=setInterval((function(){0===a.count&&(a.countText="",clearInterval(a.timer),a.clearCurtain()),1===a.count&&(a.countText="再次点击停止窗帘"),a.count>0?a.count--:a.count=0}),1e3)},setParams:function(e,t){for(var n=[],c=0;c<e.length;c++){var o={objectId:e[c].id,equipmentCategory:"CFSSES",infoCode:t,value:1};n.push(o)}return n}}),r=Object(c["computed"])((function(){return a.curtainData.length&&a.curtainData.length>1}));return Object(c["watch"])(e,(function(e){e.spaceId&&(a.getEqpGroup(),a.userIsControl=e.userIsControl)})),Object(c["onMounted"])((function(){a.getEqpGroup()})),Object(U["a"])({isShowChildLight:r},Object(c["toRefs"])(a))}});n("e115");const wc=Ie()(Sc,[["render",Ic],["__scopeId","data-v-36c637d2"]]);var Cc=wc,yc=function(e){return Object(c["pushScopeId"])("data-v-18f3164f"),e=e(),Object(c["popScopeId"])(),e},xc=yc((function(){return Object(c["createElementVNode"])("div",{class:"top"},[Object(c["createElementVNode"])("span",null,"选择工作结束时间")],-1)})),Nc={class:"btns"};function Dc(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("van-picker");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",null,[xc,(Object(c["openBlock"])(),Object(c["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(c["createElementVNode"])("div",Nc,[Object(c["createElementVNode"])("span",{onClick:t[0]||(t[0]=function(){return e.triggerComfirm&&e.triggerComfirm.apply(e,arguments)}),class:"btn btn_com"},"确定")])])}n("ddb0");var Ec=n("f253"),Vc=(n("a526"),Object(c["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:Ec["b"]},setup:function(e,t){var n=Object(c["ref"])(null),o=[{values:["今天","明天"]},{values:[]}],a=[],r=[],i=Object(c["reactive"])({columns:o,loading:!1,defaultIndex:0,account_type_value:"0+3",checkValues:r,timeList:a,tempVal:"",onChange:function(e){e[0]!==i.tempVal&&(i.loading=!0,i.tempVal=e[0]),"今天"===e[0]?i.formatColumns(0):i.formatColumns(1)},setDefaultTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;i.defaultIndex=e;var c=i.columns[1].values;c.map((function(e,n){t===e&&n})),n.value.setColumnValue(e,t);t||c[0]},formatColumns:function(t){var n=[];if(0===t){var c=Object(je["g"])(),o=0,a=0;if(e.cusStartTime&&c+2<e.cusStartTime)o=c+1,a=e.cusStartTime;else if(e.cusStartTime&&c+2>=e.cusStartTime)c>e.cusEndTime?(o=c+1,a=24):(o=e.cusEndTime+1,a=24);else{if(e.cusStartTime)return;o=c+1,a=24}for(var r=o;r<a+1;r++){var l={label:"".concat(r,":00"),value:r};n.push(l)}}else for(var s=1;s<e.nextCusStartTime;s++){var u=s;u<10&&(u="0"+s);var d={label:"".concat(u,":00"),value:Number(u)};n.push(d)}i.timeList=n;for(var m=[],p=0;p<i.timeList.length;p++)m.push(i.timeList[p].label);i.columns[1].values=m,setTimeout((function(){i.loading=!1}),1e3)},triggerComfirm:function(){var e=n.value.getValues();i.checkValues=[e[0],e[1]],i.checkValues[0]&&i.checkValues[1]?i.setWorkOverTime():Object(Ht["a"])("请选择时间")},setWorkOverTime:function(){var n=Object(je["a"])();"明天"===i.checkValues[0]&&(n=Object(je["q"])());var c=i.checkValues[1];c=c.replace(":","");var o={projectId:e.projectId,objectId:e.spaceId,endDate:n,endTime:c+"00",type:2};Object(he["a"])(o).then((function(e){var n=e;n.result,t.emit("setWorkTime")})).catch((function(){t.emit("setWorkTime")}))},init:function(){var t=e.workInfo.text,n=e.workInfo.textTime;"明天"===t?(i.formatColumns(1),i.setDefaultTime(1,n)):(i.formatColumns(0),i.setDefaultTime(0,n))}});return Object(c["onMounted"])((function(){i.init()})),Object(U["a"])({picker:n},Object(c["toRefs"])(i))}}));n("0970");const Bc=Ie()(Vc,[["render",Dc],["__scopeId","data-v-18f3164f"]]);var Ac=Bc,Lc={class:"nav"},Wc={class:"nav-left"},Mc=["onClick"],Fc=["src"],_c=["src"],Uc={class:"nav-right"},qc=["onClick"],Pc=["src"],Rc=["src"];function Hc(e,t,n,o,a,r){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Lc,[Object(c["createElementVNode"])("div",Wc,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.navData,(function(t,n){return Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:Object(c["normalizeClass"])(["nav-item",e.activeCode===t.code?"nav-active":""]),onClick:function(c){return e.checkNav(t,n)},key:"nav"+n},[e.activeCode===t.code?(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:0,src:t.activeImg,alt:""},null,8,Fc)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:1,src:t.img,alt:""},null,8,_c))],10,Mc)),[[c["vShow"],n<3&&t.noShow]])})),128))]),Object(c["createElementVNode"])("div",Uc,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.navData,(function(t,n){return Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:Object(c["normalizeClass"])(["nav-item",e.activeCode===t.code?"nav-active":""]),onClick:function(c){return e.checkNav(t,n)},key:"nav"+n},[e.activeCode===t.code?(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:0,src:t.activeImg,alt:""},null,8,Pc)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:1,src:t.img,alt:""},null,8,Rc))],10,qc)),[[c["vShow"],n>=3&&t.noShow]])})),128))])])}var zc=Object(c["defineComponent"])({props:{navList:{type:Array,default:function(){return[]}}},setup:function(e,t){Object(Ge["d"])();var n=[],o=Object(c["reactive"])({activeCode:"air",navData:n,setNavValue:function(e){o.navData=e},checkNav:function(e,n){o.activeCode=e.code,t.emit("changeNav",e)},setActiveCode:function(e){o.activeCode=e}});return Object(c["watch"])(e.navList,(function(e,t){o.setNavValue(e)})),Object(c["onMounted"])((function(){o.setNavValue(e.navList)})),Object(U["a"])({},Object(c["toRefs"])(o))}});n("7c22");const Jc=Ie()(zc,[["render",Hc],["__scopeId","data-v-1f8e6930"]]);var Yc=Jc,Xc={class:"scene-dailog"},Gc={class:"title"},Kc={class:"dailog-content"},$c=["src"],Qc={class:"status-text1"},Zc=Object(c["createTextVNode"])(" 切换至 "),eo=Object(c["createTextVNode"])(" 场景 "),to=Object(c["createTextVNode"])("切换中..."),no={key:1,class:"status-text2"},co={key:0},oo=Object(c["createTextVNode"])("我知道了");function ao(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("van-loading"),l=Object(c["resolveComponent"])("buttons");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",Xc,[Object(c["createElementVNode"])("div",Gc,Object(c["toDisplayString"])(e.secenaroStatus.localName),1),Object(c["createElementVNode"])("div",Kc,[Object(c["createElementVNode"])("img",{src:e.parseImgUrl("ipdImages","taolun-big.svg")},null,8,$c),Object(c["createElementVNode"])("span",Qc,[Zc,Object(c["createElementVNode"])("i",null,Object(c["toDisplayString"])(e.secenaroStatus.sceneName),1),eo]),e.secenaroStatus.loading?(Object(c["openBlock"])(),Object(c["createBlock"])(i,{key:0,class:"status-text2"},{default:Object(c["withCtx"])((function(){return[to]})),_:1})):Object(c["createCommentVNode"])("",!0),e.secenaroStatus.loading?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",no,[e.secenaroStatus.lodingText?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",co," 已为您切换至适宜讨论的环境")):Object(c["createCommentVNode"])("",!0)]))]),Object(c["createVNode"])(l,{class:"dailog-btn",onClick:e.closeDailog},{default:Object(c["withCtx"])((function(){return[oo]})),_:1},8,["onClick"])])}var ro=Object(c["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},scenarioArr:{type:Array,default:function(){return[]}},activeType:{type:String,default:function(){return""}},secenaroStatus:{type:Object,default:function(){}}},components:{VanLoading:Fe["b"]},setup:function(e,t){var n=Object(c["reactive"])({parseImgUrl:je["w"],secenaroStatus:e.secenaroStatus,closeDailog:function(){t.emit("closeDailog")}});return Object(c["watch"])(e,(function(e){n.secenaroStatus=e.secenaroStatus}),{deep:!1,immediate:!0}),Object(c["onMounted"])((function(){})),Object(U["a"])({},Object(c["toRefs"])(n))}});n("af80");const io=Ie()(ro,[["render",ao],["__scopeId","data-v-49ec3afc"]]);var lo=io,so=n("cda6"),uo={class:"map-home map-home-pading"},mo={class:"map-top"};function po(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("map-box"),l=Object(c["resolveComponent"])("space-box");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",uo,[Object(c["createElementVNode"])("div",mo,[Object(c["createElementVNode"])("span",{class:Object(c["normalizeClass"])(1==e.type?"span-active":""),onClick:t[0]||(t[0]=function(t){return e.checkMapType(1)})},"列表",2),Object(c["createElementVNode"])("span",{class:Object(c["normalizeClass"])(2==e.type?"span-active":""),onClick:t[1]||(t[1]=function(t){return e.checkMapType(2)})},"地图",2)]),2===e.type?(Object(c["openBlock"])(),Object(c["createBlock"])(i,{key:0,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(c["createCommentVNode"])("",!0),1===e.type?(Object(c["openBlock"])(),Object(c["createBlock"])(l,{key:1,spaceData:e.spaceData,spaceInfo:e.spaceInfo,onChangeSpace:e.changeSpace},null,8,["spaceData","spaceInfo","onChangeSpace"])):Object(c["createCommentVNode"])("",!0)])}var fo={class:"space-home"},bo={class:"com-search"},go={class:"space-box"},vo=["onClick"];function Oo(e,t,n,o,a,r){var i=Object(c["resolveComponent"])("van-search");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",fo,[Object(c["createElementVNode"])("div",bo,[Object(c["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(c["createElementVNode"])("div",go,[e.spaceData&&e.spaceData.length?(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],{key:0},Object(c["renderList"])(e.spaceData,(function(t,n){return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{class:Object(c["normalizeClass"])(["space-item",e.activeSpace.spaceId==t.spaceId?"space-active-item":""]),key:"spaceItem"+n,onClick:function(c){return e.changeSpace(t,n)}},[Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(t.spaceName),1)],10,vo)})),128)):Object(c["createCommentVNode"])("",!0)])])}var jo=n("d961"),ho=(n("5852"),Object(c["defineComponent"])({props:{spaceData:{type:Array,default:function(){return[]}},spaceInfo:{type:Object,default:function(){}}},components:{vanSearch:jo["a"]},setup:function(e,t){Object(Ge["d"])();var n=Object(je["r"])(),o=(Object(Ke["b"])(),[]),a=Object(c["reactive"])({userInfo:n,spaceData:o,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(he["G"])(e).then((function(e){var t,n=e;"success"===n.result?a.spaceData=null!==(t=null===n||void 0===n?void 0:n.content)&&void 0!==t?t:[]:a.spaceData=[]}))},onSearch:function(){a.queryWorkSpace()},onCancel:function(){}});return Object(c["onMounted"])((function(){})),Object(c["watch"])(e,(function(e){a.spaceData=e.spaceData,a.activeSpace=e.spaceInfo}),{deep:!1,immediate:!0}),Object(U["a"])({},Object(c["toRefs"])(a))}}));n("4d9d");const To=Ie()(ho,[["render",Oo],["__scopeId","data-v-713ed5e2"]]);var ko=To,Io=n("772a"),So=(n("38d5"),n("565f")),wo=(n("be7f"),n("34e9")),Co=(n("0653"),n("b650")),yo=(n("66b9"),Object(c["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:Io["a"],vanField:So["b"],CellGroup:wo["a"],vanButton:Co["b"],SpaceBox:ko,MapBox:Tt["a"]},setup:function(e,t){Object(Ge["d"])();var n=null,o=(Object(Ke["b"])(),Object(c["reactive"])({type:1,spaceData:e.spaceData,showMap:n,changeSpace:function(e){t.emit("changeSpace",e,1)},buildingId:e.buildingId,floorId:e.floorId,spaceInfo:e.spaceInfo,checkMapType:function(e){o.type=e},getMapInfo:function(){var t={projectId:e.projectId,floorId:o.floorId};Object(he["n"])(t).then((function(e){var t=e;if("success"===t.result){var n,c=null!==(n=null===t||void 0===t?void 0:t.data)&&void 0!==n?n:null;c&&c.spaceList&&c.spaceList.length?o.showMap=!0:o.showMap=!1}else o.showMap=!1})).catch((function(){o.showMap=!1}))}}));return Object(c["onMounted"])((function(){o.getMapInfo()})),Object(c["watch"])(e,(function(e){o.spaceData=e.spaceData,o.buildingId=e.buildingId,o.floorId=e.floorId,o.spaceInfo=e.spaceInfo}),{deep:!1,immediate:!0}),Object(U["a"])({},Object(c["toRefs"])(o))}}));n("9020");const xo=Ie()(yo,[["render",po],["__scopeId","data-v-c18aaafc"]]);var No,Do=xo,Eo=n("e41f"),Vo=(n("8a58"),n("66d6")),Bo=n("6a79"),Ao=Object(c["defineComponent"])({components:(No={MapBox:Tt["a"],ComMap:Do,ScenarioDailog:lo,Scenario:Yt,Header:Lt,Comheader:Wt["a"],NavBar:Yc,Air:Un,Light:Zn,Curtain:Cc,TimeBox:Ac,WorkOvertime:we,WorkConfig:pt,ScenarioConfig:ht,Detail:so["default"],Contact:Pe},Object(R["a"])(No,oe["a"].Component.name,oe["a"].Component),Object(R["a"])(No,"VanPopup",Eo["b"]),Object(R["a"])(No,"VanIcon",Vt["b"]),No),setup:function(){var e=Object(Ge["d"])(),t=Object(Ge["c"])(),n=window.document,o=n.body.clientHeight,a={},r={},i={},l={hasAir:!0,hasBlowing:!1,hasLamp:!1},s=[],u={},d={},m=Ke["a"].state.user.projectId,p={},f={},b={headImg:"",headScene:"",tipText:"选择工作结束时间",tipTextSwatch:!1},g={curtain:!1,light:!1,airConditioner:!1,bodySensor:!1},v={},O=null,j={},h=Object(je["r"])(),T=null,k=[{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"}]}],I=[],S=null,w=null,C=[{id:2,name:"甲醛",num:"",level:"",bgColor:"",img:"jiaquan.svg",funcid:"HCHO",code:"jiaquan",unit:"mg/㎡"},{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:"%"}],y=[],x=[],N=[],D=[],E={},V=Object(je["a"])("YYYY.MM.DD HH:mm"),B=Object(je["k"])(),A=Object(c["reactive"])({parseImgUrl:je["w"],nowDate:V,nowWeek:B,isShowWork:!1,isShowMetting:!1,localName:"",airTemp:"",userIsControl:!0,spaceModelTimer:S,spaceTempTimer:w,userSpaceInfo:I,spaceTimer:T,workInfo:j,intervalTimer:O,roomType:"",showSpaceTip:!1,mapOpacity:0,opacityV:1,childRef:v,hideTopImg:!1,isBottom:!1,isScrool:!1,officeData:i,popList:s,popupType:"scenario",showSecenDetailDalig:!1,sceneDetail:p,showScenario:!1,projectId:m,spaceInfo:d,headerInfo:b,topbgimg:"",userInfo:h,deviceIcon:"arrow",visible:!1,outWeather:a,vanPopupIndex:"",spaceEqFlagObj:l,spaceExistenceDevice:g,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:k,isACATVA:!1,showWorkOff:!1,envlist:C,realEevList:x,navList:[{top:0,id:"airId",code:"air",name:"温度/湿度",noShow:!0,img:Object(je["w"])("page-officehome","temp.png"),activeImg:Object(je["w"])("page-officehome","temp_active.svg")},{top:0,id:"lightId",code:"lamp",name:"光照",noShow:!1,img:Object(je["w"])("page-officehome","lamp.png"),activeImg:Object(je["w"])("page-officehome","lamp_active.svg")},{top:0,id:"curtainId",code:"curtain",name:"窗帘",noShow:!1,img:Object(je["w"])("page-officehome","curtain-nav.svg"),activeImg:Object(je["w"])("page-officehome","curtain-nav-active.svg")},{top:0,id:4,code:"mySpace",name:"常驻空间",noShow:!1,activeImg:Object(je["w"])("page-officehome","mySpaceIcon.svg"),img:Object(je["w"])("page-officehome","mySpaceIcon.svg")},{top:0,id:5,code:"switchSpace",name:"我的",noShow:!0,activeImg:Object(je["w"])("page-officehome","mapIcon.png"),img:Object(je["w"])("page-officehome","mapIcon.png")}],meetingRoomSence:[{code:"DISCUSSING",name:"讨论"},{code:"PROJECTING",name:"演示"},{code:"ADJOURNMENT",name:"散会"}],nextCusStartTime:0,cusEndTime:0,cusStartTime:0,isShowContact:!1,showContact:function(){A.isShowContact=!0},closeContactDailog:function(){A.isShowContact=!1},triggerWork:function(){A.isShowWork=!0},closeWork:function(){A.isShowWork=!1},forceOverTimeFlag:!1,setForceOverTimeFlag:function(e){"开放"===A.roomType&&e?A.forceOverTimeFlag=!0:A.forceOverTimeFlag=!1},getCompanyInfo:function(){return Object(P["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(he["h"])({companyId:Vo["a"].companyKey});case 2:t=e.sent,t.data;case 4:case"end":return e.stop()}}),e)})))()},getWeather:function(){var e={openid:A.userInfo.openid,pubname:A.userInfo.pubname,projectId:Ke["a"].state.user.projectId},t=Object(je["z"])(e);Object(he["B"])(t).then((function(e){var t,n=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:{};A.outWeather=n;var c=n.text;A.getWeatherIcon(c),A.getnowTime(c)}))},getnowTime:function(e){var t=Object(je["g"])();e.indexOf("霾")>-1?A.topbgimg=Object(je["w"])("weather","office_smog.jpg"):A.topbgimg=t>=6&&t<19?Object(je["w"])("weather","office_bright.jpg"):Object(je["w"])("weather","office_night.jpg")},getWeatherIcon:function(e){e&&e.indexOf("晴")>-1?A.outWeather.imgname=Object(je["w"])("weather","sun.png"):e&&e.indexOf("雨")>-1?A.outWeather.imgname=Object(je["w"])("weather","rain.png"):e&&e.indexOf("阴")>-1||e.indexOf("云")>-1?A.outWeather.imgname=Object(je["w"])("weather","cloudy.png"):e&&e.indexOf("霾")>-1?A.outWeather.imgname=Object(je["w"])("weather","mai.png"):e&&e.indexOf("雾")>-1?A.outWeather.imgname=Object(je["w"])("weather","fog.png"):e&&e.indexOf("风")>-1?A.outWeather.imgname=Object(je["w"])("weather","wind.png"):e&&e.indexOf("雷")>-1?A.outWeather.imgname=Object(je["w"])("weather","thunder.png"):A.outWeather.imgname=Object(je["w"])("weather","sun.png")},checkSpaceType:function(e){var t=Object(Bo["b"])(e);"个人"===t?(A.roomType="个人",A.headerInfo.headImg=Object(je["w"])("page-officehome","office_person_2.png"),A.headerInfo.headScene="工作",A.popList=A.listOffice):"会议室"===t?(A.roomType="会议室",A.popList=JSON.parse(JSON.stringify(A.listSen)),A.headerInfo.headImg=Object(je["w"])("page-officehome","office_normal_2.png"),A.getPageMeetingSceneHttp()):"开放"===t?(A.roomType="开放",A.headerInfo.headImg=Object(je["w"])("page-officehome","office_publi_2.png")):(A.roomType="其它",A.headerInfo.headImg=Object(je["w"])("page-officehome","office_publi_2.png")),"会议室"!==t&&A.timerSpaceInfo()},checkUserSpace:function(){for(var e=!1,t=0;t<A.userSpaceInfo.length;t++)if(A.spaceInfo.spaceId===A.userSpaceInfo[t].sp_id){e=!0;break}A.userIsControl=e},getUserControlAuth:function(){Object(he["A"])().then((function(e){var t=e;"success"===t.result?A.userSpaceInfo=t.data:A.userSpaceInfo=[],A.checkUserSpace()})).catch((function(){A.userSpaceInfo=[],A.checkUserSpace()}))},getSpaceInfo:function(){var e={criteria:{spaceId:A.spaceInfo.spaceId,projectId:A.userInfo.projectId},pubname:A.userInfo.pubname,openid:A.userInfo.openid};Object(he["v"])(e).then((function(e){var t,n=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:[];A.officeData=n[0]?n[0]:{},A.officeData.localName&&(A.localName=A.officeData.localName),A.officeData.temperature&&(A.officeData.temperature=1*A.officeData.temperature.toFixed(1)),A.checkSpaceType(A.officeData.roomFuncType),A.formatSpaceInfo(n),A.loadinngEnd()})).catch((function(){A.loadinngEnd()}))},getSpaceModeTimer:function(){A.spaceModelTimer=setTimeout((function(){A.getSpaceMode(),clearTimeout(A.spaceModelTimer),A.spaceModelTimer=null}),1e3)},getSpaceMode:function(){Object(he["x"])().then((function(e){A.getSpaceModeTimer()})).catch((function(){A.getSpaceModeTimer()}))},getSpaceTempTimer:function(){A.spaceTempTimer=setTimeout((function(){clearTimeout(A.spaceTempTimer),A.spaceTempTimer=null,A.getSpaceTemp()}))},getSpaceTemp:function(){Object(he["y"])().then((function(e){A.getSpaceTempTimer()})).catch((function(){A.getSpaceTempTimer()}))},setEnvBg:function(e,t){var n="";return"humidity"===e?n="干燥"===t||"潮湿"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0) 0%, #CD0B00 100%)":"":"hcho"===e?n="超标"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0) 0%, #CD0B00 100%)":"":"co2"===e?n="略高"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.5) 0%, #CD0B00 100%)":"超标"===t?"linear-gradient(180deg, rgba(205, 11, 0, 1) 0%, #CD0B00 100%)":"":"pm25"===e&&(n="良"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.2) 0%, #CD0B00 100%)":"轻度污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.4) 0%, #CD0B00 100%)":"中度污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.6) 0%, #CD0B00 100%)":"重度污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 0.8) 0%, #CD0B00 100%)":"严重污染"===t?"linear-gradient(180deg, rgba(205, 11, 0, 1) 0%, #CD0B00 100%)":""),n},checkLevel:function(e,t){var n={humidity:{range:[30,70],text:["干燥","健康","潮湿"]},co2:{range:[800,1e3,1500],text:["健康","达标","略高","超标"]},pm25:{range:[35,75,115,150,250],text:["健康","良","轻度污染","中度污染","重度污染","严重污染"]},hcho:{range:[.1],text:["健康","超标"]}},c=[e].concat(Object(q["a"])(n[t].range)).sort((function(e,t){return e-t})),o=c.findIndex((function(t){return t===e})),a=n[t].text[o],r=A.setEnvBg(t,a);return{level:o,levelTxt:a,bgColor:r}},setPageheight:function(){Object(c["nextTick"])((function(){n.getElementById("envBox").style.height=n.getElementById("envBox").offsetHeight+"px"}))},formatSpaceInfo:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0;t<e.length;t++){var n=e[t];if(n.co2||0==n.co2){var c=A.checkLevel(n.co2,"co2");A.envlist[1].level=c.levelTxt,A.envlist[1].bgColor=c.bgColor,A.envlist[1].num=n.co2}else A.envlist[1].level="--",A.envlist[1].num="--",A.envlist[1].bgColor="";if(n.pm25||0===n.pm25){var o=A.checkLevel(n.pm25,"pm25");A.envlist[2].level=o.levelTxt,A.envlist[2].bgColor=o.bgColor,A.envlist[2].num=n.pm25}else A.envlist[2].level="--",A.envlist[2].num="--",A.envlist[2].bgColor="";if(n.hcho||0==n.hcho){var a=A.checkLevel(n.hcho,"hcho");A.envlist[0].level=a.levelTxt,A.envlist[0].bgColor=a.bgColor,A.envlist[0].num=n.hcho.toFixed(2)}else A.envlist[0].level="--",A.envlist[0].num="--",A.envlist[0].bgColor="";if(n.humidity||0==n.humidity){var r=A.checkLevel(n.humidity,"humidity");A.envlist[3].level=r.levelTxt,A.envlist[3].bgColor=r.bgColor,A.envlist[3].num=n.humidity.toFixed(0)}else A.envlist[3].level="--",A.envlist[3].num="--",A.envlist[3].bgColor=""}},activeType:"",getPageMeetingSceneHttp:function(){var e={spaceId:A.spaceInfo.spaceId};Object(he["o"])(e).then((function(e){var t,n=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:"";"OFFWORK"===n&&(n="ADJOURNMENT"),A.activeType=n,A.timerSpaceInfo()})).catch((function(){A.timerSpaceInfo()}))},secenaroStatus:r,setHeadScene:function(e){A.isShowMetting=!0,A.secenaroStatus={localName:A.officeData.localName,loading:e.loading,lodingText:e.lodingText,sceneName:e.sceneName}},closeDailog:function(){A.isShowMetting=!1},isShowDetail:!1,detailQuery:u,handleDetail:function(e){A.isShowDetail=!0,A.detailQuery.funcid=e.funcid,A.detailQuery.spaceId=A.spaceInfo.spaceId},updateAirTemp:function(e){A.airTemp=e,A.setHeadSceneAirTemp()},setHeadSceneAirTemp:function(){if(A.sceneDetail&&A.sceneDetail.textObj&&A.sceneDetail.textObj.length&&A.airTemp&&("DISCUSSING"==A.sceneDetail.code||"PROJECTING"==A.sceneDetail.code))for(var e=0;e<A.sceneDetail.textObj.length;e++){var t=A.sceneDetail.textObj;"air"===t.type&&(t.text=t.text+",目标温度"+A.airTemp)}},setWorkTime:function(){A.showScenario=!1,A.setTime()},handlePreClose:function(){var e=Object(je["a"])(),t=Object(je["g"])();t<10&&(t="0".concat(t));var n={projectId:A.projectId,objectId:A.spaceInfo.spaceId,endDate:e,endTime:t+"0000",type:3};Object(he["a"])(n).then((function(e){var t=e;"success"==t.result&&A.changeLampStatus()}))},changeLampStatus:function(){A.showWorkOff=!1,A.headerInfo.tipText="选择工作结束时间",A.headerInfo.tipTextSwatch=!0},getEquipments:function(){var e={spaceId:A.spaceInfo.spaceId};A.spaceExistenceDevice={curtain:!1,light:!1,airConditioner:!1,bodySensor:!1};var t=Object(je["z"])(e);Object(he["u"])(t).then((function(e){var t=e;if("success"===t.result){for(var n,c=null!==(n=null===t||void 0===t?void 0:t.data)&&void 0!==n?n:[],o=0;o<c.length;o++)A.spaceExistenceDevice[c[o]]=!0;A.spaceExistenceDevice.light?A.navList[1].noShow=!0:A.navList[1].noShow=!1,A.spaceExistenceDevice.curtain?A.navList[2].noShow=!0:A.navList[2].noShow=!1}}))},hourMiChange:function(e){var t=e.toString(),n="",c=t.length>2?t.split(".")[1].length:t;return 1===c?(t=t.replace(".","")+"0",n=t.slice(0,2)+":"+t.slice(2)):2===c?(t=t.replace(".",""),n=t.slice(0,2)+":"+t.slice(2)):n=t+":00",n},getSetTimeHttp:function(){var e={spaceId:A.spaceInfo.spaceId};Object(he["t"])(e).then((function(e){var t,n=e,c=null!==(t=null===n||void 0===n?void 0:n.content)&&void 0!==t?t:{};A.nextCusStartTime=c.nextCusStartTime?Math.floor(Number(c.nextCusStartTime/1e4)):9;var o=Object(je["a"])(""),a="",r=Object(je["g"])(),i=0,l=0,s=0;if(A.showWorkOff=!1,c.endDate&&o===c.endDate&&(s=Number(c.endTime/1e4),a=""),c.endDate&&o!==c.endDate&&(s=Number(c.endTime/1e4),a="明天"),c.nextCusEndTime||c.cusStartTime||!c.endDate)A.headerInfo.tipText="选择工作结束时间",A.headerInfo.tipTextSwatch=!0,A.workInfo.textTime="",A.workInfo.text="";else{var u=a?s+24:s;r<u?(A.headerInfo.tipText="".concat(a).concat(A.hourMiChange(s)),A.headerInfo.tipTextSwatch=!1,A.showWorkOff=!0,A.workInfo.textTime=A.hourMiChange(s),A.workInfo.text=a||"今天"):(A.headerInfo.tipText="选择工作结束时间",A.headerInfo.tipTextSwatch=!0,A.workInfo.textTime="",A.workInfo.text="")}if(!c.cusEndTime)return A.cusStartTime=0,void(A.cusEndTime=0);if(c.cusEndTime&&(l=c.cusStartTime?Number(c.cusStartTime/1e4):0,i=c.cusEndTime?Number(c.cusEndTime/1e4):0,A.cusStartTime=Math.floor(l),A.cusEndTime=Math.floor(i)),r>=l&&r<i&&!s)A.headerInfo.tipText="".concat(a).concat(A.hourMiChange(i)),A.headerInfo.tipTextSwatch=!1;else if(r>=l&&r<i&&s){var d=(a?s+24:s)>r?s:i;A.headerInfo.tipText="".concat(a).concat(A.hourMiChange(d)),A.headerInfo.tipTextSwatch=!1,A.workInfo.textTime=A.hourMiChange(d),A.workInfo.text=a||"今天"}else r>=i&&s&&(a?s+24:s)>=r?(i=s,A.headerInfo.tipText="".concat(a).concat(A.hourMiChange(i)),A.headerInfo.tipTextSwatch=!1,A.showWorkOff=!0,A.workInfo.textTime=A.hourMiChange(i),A.workInfo.text=a||"今天"):(A.headerInfo.tipTextSwatch=!0,A.headerInfo.tipText="选择工作结束时间",A.workInfo.textTime="",A.workInfo.text="")}))},setTime:function(){A.getSetTimeHttp()},handlePopup:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scenario";A.userIsControl?(A.showScenario=!A.showScenario,A.showScenario?A.deviceIcon="arrow-down":A.deviceIcon="arrow",A.popupType=e):Object(Ht["a"])("您没有当前空间的控制权限!")},triggerCheckSpace:function(){var e=n.getElementById("envContent"),t=n.getElementById("houseDes"),c=t.offsetHeight;A.opacityV=0,A.mapOpacity=1,e.scrollTop=0;var a=0,r=setInterval((function(){a+=15,a<o-c?e.style.top=a+"px":(e.style.top=o-c+"px",clearInterval(r))}),10);A.hideTopImg=!0,A.isBottom=!0},loadingStart:function(){Ht["a"].loading({duration:0,forbidClick:!0,message:"加载中..."})},loadinngEnd:function(){Ht["a"].clear()},clearTimerSpaceInfo:function(){A.spaceTimer&&(clearTimeout(A.spaceTimer),A.spaceTimer=null)},timerSpaceInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3;A.clearTimerSpaceInfo(),A.spaceTimer=setTimeout((function(){A.getSpaceInfo()}),e)},isWork:!1,isMetting:!1,checkIsSpaceScene:function(){A.scenarioArr.map((function(e){"OVERTIME"===e.sceneType&&(A.isWork=!0)}))},scenarioArr:y,querySpaceSceneConfig:function(){var e={spaceId:A.spaceInfo.spaceId},t=Object(je["z"])(e);Object(he["F"])(t).then((function(e){var t,n=e,c=null!==(t=null===n||void 0===n?void 0:n.data)&&void 0!==t?t:[];A.scenarioArr=c,A.checkIsSpaceScene()}))},workkArr:N,secenTimer:E,queryCustomAndScenceTimer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;A.secenTimer&&(clearTimeout(A.secenTimer),A.secenTimer=null),A.secenTimer=setTimeout((function(){A.queryCustomAndScence()}),e)},queryCustomAndScence:function(){var e={spaceId:A.spaceInfo.spaceId},t=Object(je["z"])(e);Object(he["D"])(t).then((function(e){var t,n=null!==(t=null===e||void 0===e?void 0:e.data)&&void 0!==t?t:[];A.workkArr=n;for(var c=0;c<A.workkArr.length;c++){var o,a,r=null!==(o=null===(a=A.workkArr[c])||void 0===a?void 0:a.customSceneList)&&void 0!==o?o:[];r=r.sort(A.compare)}A.queryCustomAndScenceTimer(5e3)}))},compare:function(e,t){var n=e.startTime,c=t.startTime;return n<c?-1:n>c?1:0},formateWorkTime:function(){},init:function(){A.querySpaceSceneConfig(),A.queryCustomAndScenceTimer(0),A.timerSpaceInfo(0),A.getEquipments(),A.setTime()},updatePageUrl:function(){var e=window.history,t=window.location.origin+window.location.pathname;e.replaceState("","",t)},setTimerCloseTip:function(){var e=0;A.intervalTimer=setInterval((function(){e++,e>2&&(A.showSpaceTip=!1,clearInterval(A.intervalTimer),A.updatePageUrl())}),1e3)},spaceData:D,floorId:"",buildingId:"",queryWorkSpace:function(){var e={criteria:{projectId:A.userInfo.projectId,spaceName:"",macAddress:A.userInfo.mac},orders:[{column:"isMajorSpace",asc:!1}]};Object(he["G"])(e).then((function(e){var t,n=e;"success"===n.result?A.spaceData=null!==(t=null===n||void 0===n?void 0:n.content)&&void 0!==t?t:[]:A.spaceData=[];A.spaceData.map((function(e){e.isMajorSpace?(e.active=!0,A.spaceInfo=e):e.active=!1}))}))},resetSpaceStatus:function(){A.spaceData.map((function(e){e.active=!1}))},isShowMap:!1,defaultSpace:d,moreSpace:function(){A.isShowMap=!0,A.defaultSpace=A.spaceInfo},elChangeExForArray:function(e){for(var t=1,n=0,c=0;c<A.spaceData.length;c++)if(e.spaceId===A.spaceData[c].spaceId&&(A.spaceData[c].active=!0,c>2)){n=c;break}if(n){var o=A.spaceData[t];A.spaceData[t]=A.spaceData[n],A.spaceData[n]=o}},changeSpace:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;A.clearTimerSpaceInfo(),A.resetSpaceStatus(),A.roomType="",A.isWork=!1,A.spaceInfo=e,A.init(),1===t&&(A.defaultSpace=e,A.elChangeExForArray(e)),e.active=!0},timeOutEvent:f,gtouchstart:function(){return A.timeOutEvent=setTimeout((function(){A.longPress()}),500),!1},showDeleteButton:function(){return clearTimeout(A.timeOutEvent),A.timeOutEvent,!1},gtouchmove:function(){clearTimeout(this.timeOutEvent),A.timeOutEvent=0},longPress:function(){A.timeOutEvent=0,e.push({name:"choiceSpace",query:{id:A.projectId}})}});return Object(c["nextTick"])((function(){})),Object(c["onBeforeUnmount"])((function(){A.clearTimerSpaceInfo()})),Object(c["onMounted"])((function(){var e=t.query.spaceId;A.spaceInfo={spaceId:e},A.defaultSpace={spaceId:e},A.getWeather(),A.init(),A.queryWorkSpace()})),Object(U["a"])({},Object(c["toRefs"])(A))}});n("900d"),n("55e0");const Lo=Ie()(Ao,[["render",_],["__scopeId","data-v-23036dfc"]]);t["default"]=Lo},8262:function(e,t,n){"use strict";n("e042")},"877d":function(e,t,n){"use strict";n("69bc")},"88a2":function(e,t,n){},"900d":function(e,t,n){"use strict";n("0445")},9020:function(e,t,n){"use strict";n("067d")},9350:function(e,t,n){"use strict";n("a32e")},9617:function(e,t,n){},"998b":function(e,t,n){},"9f85":function(e,t,n){"use strict";n("5e28")},a32e:function(e,t,n){},a526:function(e,t,n){},af80:function(e,t,n){"use strict";n("c19a")},b601:function(e,t,n){},be7f:function(e,t,n){"use strict";n("68ef"),n("cb51"),n("3743"),n("1a04"),n("1146")},c032:function(e,t,n){"use strict";n("998b")},c19a:function(e,t,n){},c740:function(e,t,n){"use strict";var c=n("23e7"),o=n("b727").findIndex,a=n("44d2"),r=n("ae40"),i="findIndex",l=!0,s=r(i);i in[]&&Array(1)[i]((function(){l=!1})),c({target:"Array",proto:!0,forced:l||!s},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a(i)},d3fb:function(e,t,n){"use strict";n.d(t,"a",(function(){return D})),n.d(t,"b",(function(){return x}));var c=n("7a23"),o=n("fe7e"),a=n("f691"),r=n("f344"),i=n("8405"),l=n("b1d2"),s=n("4a89"),u=n("f465"),d=n("4eda"),m=n("543e"),p=n("8da3");function f(e){if(!Object(p["b"])(e))return e;if(Array.isArray(e))return e.map(e=>f(e));if(Object(p["f"])(e)){const t={};return Object.keys(e).forEach(n=>{t[n]=f(e[n])}),t}return e}var b=n("cdd8");const g=200,v=300,O=15,[j,h]=Object(o["a"])("picker-column");function T(e){const{transform:t}=window.getComputedStyle(e),n=t.slice(7,t.length-1).split(", ")[5];return Number(n)}const k=Symbol(j),I=e=>Object(p["f"])(e)&&e.disabled;var S=Object(c["defineComponent"])({name:j,props:{textKey:Object(a["d"])(String),readonly:Boolean,allowHtml:Boolean,className:a["h"],itemHeight:Object(a["d"])(Number),defaultIndex:Object(a["b"])(0),swipeDuration:Object(a["d"])(a["f"]),initialOptions:Object(a["a"])(),visibleItemCount:Object(a["d"])(a["f"])},emits:["change"],setup(e,{emit:t,slots:n}){let o,a,r,l,m;const j=Object(c["ref"])(),S=Object(c["reactive"])({index:e.defaultIndex,offset:0,duration:0,options:f(e.initialOptions)}),w=Object(b["a"])(),C=()=>S.options.length,y=()=>e.itemHeight*(+e.visibleItemCount-1)/2,x=e=>{e=Object(i["d"])(e,0,C());for(let t=e;t<C();t++)if(!I(S.options[t]))return t;for(let t=e-1;t>=0;t--)if(!I(S.options[t]))return t},N=(n,c)=>{n=x(n)||0;const a=-n*e.itemHeight,r=()=>{n!==S.index&&(S.index=n,c&&t("change",n))};o&&a!==S.offset?m=r:r(),S.offset=a},D=t=>{JSON.stringify(t)!==JSON.stringify(S.options)&&(S.options=f(t),N(e.defaultIndex))},E=t=>{o||e.readonly||(m=null,S.duration=g,N(t,!0))},V=t=>Object(p["f"])(t)&&e.textKey in t?t[e.textKey]:t,B=t=>Object(i["d"])(Math.round(-t/e.itemHeight),0,C()-1),A=(t,n)=>{const c=Math.abs(t/n);t=S.offset+c/.003*(t<0?-1:1);const o=B(t);S.duration=+e.swipeDuration,N(o,!0)},L=()=>{o=!1,S.duration=0,m&&(m(),m=null)},W=t=>{if(!e.readonly){if(w.start(t),o){const e=T(j.value);S.offset=Math.min(0,e-y()),a=S.offset}else a=S.offset;S.duration=0,r=Date.now(),l=a,m=null}},M=t=>{if(e.readonly)return;w.move(t),w.isVertical()&&(o=!0,Object(s["e"])(t,!0)),S.offset=Object(i["d"])(a+w.deltaY.value,-C()*e.itemHeight,e.itemHeight);const n=Date.now();n-r>v&&(r=n,l=S.offset)},F=()=>{if(e.readonly)return;const t=S.offset-l,n=Date.now()-r,c=n<v&&Math.abs(t)>O;if(c)return void A(t,n);const a=B(S.offset);S.duration=g,N(a,!0),setTimeout(()=>{o=!1},0)},_=()=>{const t={height:e.itemHeight+"px"};return S.options.map((o,a)=>{const r=V(o),i=I(o),l={role:"button",style:t,tabindex:i?-1:0,class:h("item",{disabled:i,selected:a===S.index}),onClick:()=>E(a)},s={class:"van-ellipsis",[e.allowHtml?"innerHTML":"textContent"]:r};return Object(c["createVNode"])("li",l,[n.option?n.option(o):Object(c["createVNode"])("div",s,null)])})},U=e=>{const{options:t}=S;for(let n=0;n<t.length;n++)if(V(t[n])===e)return N(n)},q=()=>S.options[S.index];return N(S.index),Object(u["k"])(k),Object(d["a"])({state:S,setIndex:N,getValue:q,setValue:U,setOptions:D,stopMomentum:L}),Object(c["watch"])(()=>e.initialOptions,D),Object(c["watch"])(()=>e.defaultIndex,e=>N(e)),()=>Object(c["createVNode"])("div",{class:[h(),e.className],onTouchstart:W,onTouchmove:M,onTouchend:F,onTouchcancel:F},[Object(c["createVNode"])("ul",{ref:j,style:{transform:`translate3d(0, ${S.offset+y()}px, 0)`,transitionDuration:S.duration+"ms",transitionProperty:S.duration?"all":"none"},class:h("wrapper"),onTransitionend:L},[_()])])}});const[w,C,y]=Object(o["a"])("picker"),x={title:String,loading:Boolean,readonly:Boolean,allowHtml:Boolean,itemHeight:Object(a["c"])(44),showToolbar:a["g"],swipeDuration:Object(a["c"])(1e3),visibleItemCount:Object(a["c"])(6),cancelButtonText:String,confirmButtonText:String},N=Object(r["a"])({},x,{columns:Object(a["a"])(),valueKey:String,defaultIndex:Object(a["c"])(0),toolbarPosition:Object(a["e"])("top"),columnsFieldNames:Object});var D=Object(c["defineComponent"])({name:w,props:N,emits:["confirm","cancel","change"],setup(e,{emit:t,slots:n}){const o=Object(c["ref"])(!1),a=Object(c["ref"])([]),{text:p,values:f,children:b}=Object(r["a"])({text:e.valueKey||"text",values:"values",children:"children"},e.columnsFieldNames),{children:g,linkChildren:v}=Object(u["f"])(k);v();const O=Object(c["computed"])(()=>Object(i["j"])(e.itemHeight)),j=Object(c["computed"])(()=>{const t=e.columns[0];if("object"===typeof t){if(b in t)return"cascade";if(f in t)return"object"}return"plain"}),h=()=>{var t;const n=[];let c={[b]:e.columns};while(c&&c[b]){const o=c[b];let a=null!=(t=c.defaultIndex)?t:+e.defaultIndex;while(o[a]&&o[a].disabled){if(!(a<o.length-1)){a=0;break}a++}n.push({[f]:c[b],className:c.className,defaultIndex:a}),c=o[a]}a.value=n},T=()=>{const{columns:t}=e;"plain"===j.value?a.value=[{[f]:t}]:"cascade"===j.value?h():a.value=t,o.value=a.value.some(e=>e[f]&&0!==e[f].length)},I=()=>g.map(e=>e.state.index),w=(e,t)=>{const n=g[e];n&&(n.setOptions(t),o.value=!0)},x=t=>{let n={[b]:e.columns};const c=I();for(let e=0;e<=t;e++)n=n[b][c[e]];while(n&&n[b])t++,w(t,n[b]),n=n[b][n.defaultIndex||0]},N=e=>g[e],D=e=>{const t=N(e);if(t)return t.getValue()},E=(e,t)=>{const n=N(e);n&&(n.setValue(t),"cascade"===j.value&&x(e))},V=e=>{const t=N(e);if(t)return t.state.index},B=(e,t)=>{const n=N(e);n&&(n.setIndex(t),"cascade"===j.value&&x(e))},A=e=>{const t=N(e);if(t)return t.state.options},L=()=>g.map(e=>e.getValue()),W=e=>{e.forEach((e,t)=>{E(t,e)})},M=e=>{e.forEach((e,t)=>{B(t,e)})},F=e=>{"plain"===j.value?t(e,D(0),V(0)):t(e,L(),I())},_=e=>{"cascade"===j.value&&x(e),"plain"===j.value?t("change",D(0),V(0)):t("change",L(),e)},U=()=>{g.forEach(e=>e.stopMomentum()),F("confirm")},q=()=>F("cancel"),P=()=>n.title?n.title():e.title?Object(c["createVNode"])("div",{class:[C("title"),"van-ellipsis"]},[e.title]):void 0,R=()=>{const t=e.cancelButtonText||y("cancel");return Object(c["createVNode"])("button",{type:"button",class:[C("cancel"),l["g"]],onClick:q},[n.cancel?n.cancel():t])},H=()=>{const t=e.confirmButtonText||y("confirm");return Object(c["createVNode"])("button",{type:"button",class:[C("confirm"),l["g"]],onClick:U},[n.confirm?n.confirm():t])},z=()=>{if(e.showToolbar){const e=n.toolbar||n.default;return Object(c["createVNode"])("div",{class:C("toolbar")},[e?e():[R(),P(),H()]])}},J=()=>a.value.map((t,o)=>{var a;return Object(c["createVNode"])(S,{textKey:p,readonly:e.readonly,allowHtml:e.allowHtml,className:t.className,itemHeight:O.value,defaultIndex:null!=(a=t.defaultIndex)?a:+e.defaultIndex,swipeDuration:e.swipeDuration,initialOptions:t[f],visibleItemCount:e.visibleItemCount,onChange:()=>_(o)},{option:n.option})}),Y=e=>{if(o.value){const t={height:O.value+"px"},n={backgroundSize:`100% ${(e-O.value)/2}px`};return[Object(c["createVNode"])("div",{class:C("mask"),style:n},null),Object(c["createVNode"])("div",{class:[l["e"],C("frame")],style:t},null)]}},X=()=>{const t=O.value*+e.visibleItemCount,n={height:t+"px"};return Object(c["createVNode"])("div",{class:C("columns"),style:n,onTouchmove:s["e"]},[J(),Y(t)])};return Object(c["watch"])(()=>e.columns,T,{immediate:!0}),Object(d["a"])({confirm:U,getValues:L,setValues:W,getIndexes:I,setIndexes:M,getColumnIndex:V,setColumnIndex:B,getColumnValue:D,setColumnValue:E,getColumnValues:A,setColumnValues:w}),()=>{var t,o;return Object(c["createVNode"])("div",{class:C()},["top"===e.toolbarPosition?z():null,e.loading?Object(c["createVNode"])(m["a"],{class:C("loading")},null):null,null==(t=n["columns-top"])?void 0:t.call(n),X(),null==(o=n["columns-bottom"])?void 0:o.call(n),"bottom"===e.toolbarPosition?z():null])}}})},d9d2:function(e,t,n){},e042:function(e,t,n){},e115:function(e,t,n){"use strict";n("88a2")},e335:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},e3c7:function(e,t,n){},eaf7:function(e,t,n){},f253:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));var c=n("c199"),o=n("d3fb");const a=Object(c["a"])(o["a"]);var r=a}}]);
- //# sourceMappingURL=chunk-6bff15bd.a9f23421.js.map
|