1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-13878cc1"],{"0a6e":function(e,t,c){},1703:function(e,t,c){},2241:function(e,t,c){"use strict";c.d(t,"a",(function(){return w}));var n=c("7a23"),o=c("f344"),a=(t=c("c199"),c("1da4")),r=c("fe7e"),i=c("f691"),l=c("7e3e"),s=c("8da3"),u=c("b1d2"),d=c("8405"),b=c("f827"),p=c("e41f"),f=c("b650"),m=c("f465");const[j,O]=Object(r.a)("action-bar"),h=Symbol(j);var g={safeAreaInsetBottom:i.g};g=Object(n.defineComponent)({name:j,props:g,setup(e,{slots:t}){const c=Object(m.f)(h)["linkChildren"];return c(),()=>{var c;return Object(n.createVNode)("div",{class:[O(),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[null==(c=t.default)?void 0:c.call(t)])}}});const v=Object(t.a)(g);var S=c("4eda"),k=c("b070");const[y,I]=Object(r.a)("action-bar-button");g=Object(o.a)({},k.b,{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean}),c=Object(n.defineComponent)({name:y,props:g,setup(e,{slots:t}){const c=Object(k.c)(),{parent:o,index:a}=Object(m.k)(h),r=Object(n.computed)(()=>{var e;if(o)return!((e=o.children[a.value-1])&&"isButton"in e)}),i=Object(n.computed)(()=>{var e;if(o)return!((e=o.children[a.value+1])&&"isButton"in e)});return Object(S.a)({isButton:!0}),()=>{const{type:o,icon:a,text:l,color:s,loading:u,disabled:d}=e;return Object(n.createVNode)(f.a,{class:I([o,{last:i.value,first:r.value}]),size:"large",type:o,icon:a,color:s,loading:u,disabled:d,onClick:c},{default:()=>[t.default?t.default():l]})}}});const N=Object(t.a)(c),[C,V,T]=Object(r.a)("dialog");g=Object(o.a)({},b.b,{title:String,theme:String,width:i.f,message:[String,Function],callback:Function,allowHtml:Boolean,className:i.h,transition:Object(i.e)("van-dialog-bounce"),messageAlign:String,closeOnPopstate:i.g,showCancelButton:Boolean,cancelButtonText:String,cancelButtonColor:String,confirmButtonText:String,confirmButtonColor:String,showConfirmButton:i.g,closeOnClickOverlay:Boolean});const x=[...b.a,"transition","closeOnPopstate"];var B=Object(n.defineComponent)({name:C,props:g,emits:["confirm","cancel","keydown","update:show"],setup(e,{emit:t,slots:c}){const a=Object(n.ref)(),r=Object(n.reactive)({confirm:!1,cancel:!1}),i=e=>t("update:show",e),b=t=>{var c;i(!1),null!=(c=e.callback)&&c.call(e,t)};var m=c=>()=>{e.show&&(t(c),e.beforeClose?(r[c]=!0,Object(l.a)(e.beforeClose,{args:[c],done(){b(c),r[c]=!1},canceled(){r[c]=!1}})):b(c))};const j=m("cancel"),O=m("confirm"),h=Object(n.withKeys)(c=>{var n;if(c.target===(null==(n=null==(n=a.value)?void 0:n.popupRef)?void 0:n.value)){const n={Enter:e.showConfirmButton?O:o.d,Escape:e.showCancelButton?j:o.d};n[c.key](),t("keydown",c)}},["enter","esc"]),g=()=>{if(c.default)return Object(n.createVNode)("div",{class:V("content")},[c.default()]);var{title:t,message:o,allowHtml:a}=e;return o?(o=!(!t&&!c.title),Object(n.createVNode)("div",{key:a?1:0,class:V("content",{isolated:!o})},[(t=>{const{message:c,allowHtml:o,messageAlign:a}=e;t=V("message",{"has-title":t,[a]:a});var r=Object(s.c)(c)?c():c;return o&&"string"==typeof r?Object(n.createVNode)("div",{class:t,innerHTML:r},null):Object(n.createVNode)("div",{class:t},[r])})(o)])):void 0},S=()=>c.footer?c.footer():"round-button"===e.theme?Object(n.createVNode)(v,{class:V("footer")},{default:()=>[e.showCancelButton&&Object(n.createVNode)(N,{type:"warning",text:e.cancelButtonText||T("cancel"),class:V("cancel"),color:e.cancelButtonColor,loading:r.cancel,onClick:j},null),e.showConfirmButton&&Object(n.createVNode)(N,{type:"danger",text:e.confirmButtonText||T("confirm"),class:V("confirm"),color:e.confirmButtonColor,loading:r.confirm,onClick:O},null)]}):Object(n.createVNode)("div",{class:[u.c,V("footer")]},[e.showCancelButton&&Object(n.createVNode)(f.a,{size:"large",text:e.cancelButtonText||T("cancel"),class:V("cancel"),style:{color:e.cancelButtonColor},loading:r.cancel,onClick:j},null),e.showConfirmButton&&Object(n.createVNode)(f.a,{size:"large",text:e.confirmButtonText||T("confirm"),class:[V("confirm"),{[u.a]:e.showCancelButton}],style:{color:e.confirmButtonColor},loading:r.confirm,onClick:O},null)]);return()=>{var{width:t,title:r,theme:l,message:s,className:u}=e;return Object(n.createVNode)(p.a,Object(n.mergeProps)({ref:a,role:"dialog",class:[V([l]),u],style:{width:Object(d.b)(t)},tabindex:0,"aria-labelledby":r||s,onKeydown:h,"onUpdate:show":i},Object(o.e)(e,x)),{default:()=>[(()=>{var t=c.title?c.title():e.title;if(t)return Object(n.createVNode)("div",{class:V("header",{isolated:!e.message&&!c.default})},[t])})(),g(),S()]})}}});let P;function q(e){return o.c?new Promise((t,c)=>{var r;P||(r={setup(){const{state:e,toggle:t}=Object(a.b)();return()=>Object(n.createVNode)(B,Object(n.mergeProps)(e,{"onUpdate:show":t}),null)}},({instance:P}=Object(a.a)(r))),P.open(Object(o.a)({},q.currentOptions,e,{callback:e=>{("confirm"===e?t:c)(e)}}))}):Promise.resolve()}q.defaultOptions={title:"",width:"",theme:null,message:"",overlay:!0,callback:null,teleport:"body",className:"",allowHtml:!1,lockScroll:!0,transition:void 0,beforeClose:null,overlayClass:"",overlayStyle:void 0,messageAlign:"",cancelButtonText:"",cancelButtonColor:null,confirmButtonText:"",confirmButtonColor:null,showConfirmButton:!0,showCancelButton:!1,closeOnPopstate:!0,closeOnClickOverlay:!1},q.currentOptions=Object(o.a)({},q.defaultOptions),(q.alert=q).confirm=e=>q(Object(o.a)({showCancelButton:!0},e)),q.close=()=>{P&&P.toggle(!1)},q.setDefaultOptions=e=>{Object(o.a)(q.currentOptions,e)},q.resetDefaultOptions=()=>{q.currentOptions=Object(o.a)({},q.defaultOptions)},q.Component=Object(t.a)(B),q.install=e=>{e.use(q.Component),e.config.globalProperties.$dialog=q};var w=q},2381:function(e,t,c){},"2de2":function(e,t,c){"use strict";c.d(t,"d",(function(){return n})),c.d(t,"c",(function(){return o})),c.d(t,"b",(function(){return a})),c.d(t,"e",(function(){return r})),c.d(t,"a",(function(){return i}));var n="/duoduo-service/setup-service/",o="/duoduo-service/object-service/",a="/duoduo-service/duoduoenv-service/",r="/duoduo-service/",i="/duoduo-service/custom-service/"},"2fcb":function(e,t,c){},4476:function(e,t,c){"use strict";c("4983")},"459d":function(e,t,c){"use strict";c.d(t,"i",(function(){return r})),c.d(t,"D",(function(){return i})),c.d(t,"x",(function(){return l})),c.d(t,"p",(function(){return s})),c.d(t,"k",(function(){return u})),c.d(t,"l",(function(){return d})),c.d(t,"b",(function(){return b})),c.d(t,"n",(function(){return p})),c.d(t,"S",(function(){return f})),c.d(t,"B",(function(){return m})),c.d(t,"q",(function(){return j})),c.d(t,"T",(function(){return O})),c.d(t,"a",(function(){return h})),c.d(t,"h",(function(){return g})),c.d(t,"g",(function(){return v})),c.d(t,"m",(function(){return S})),c.d(t,"o",(function(){return k})),c.d(t,"w",(function(){return y})),c.d(t,"y",(function(){return I})),c.d(t,"G",(function(){return N})),c.d(t,"u",(function(){return C})),c.d(t,"d",(function(){return V})),c.d(t,"C",(function(){return T})),c.d(t,"z",(function(){return x})),c.d(t,"A",(function(){return B})),c.d(t,"M",(function(){return P})),c.d(t,"H",(function(){return q})),c.d(t,"O",(function(){return w})),c.d(t,"j",(function(){return E})),c.d(t,"t",(function(){return D})),c.d(t,"Q",(function(){return A})),c.d(t,"E",(function(){return G})),c.d(t,"e",(function(){return F})),c.d(t,"N",(function(){return W})),c.d(t,"c",(function(){return L})),c.d(t,"I",(function(){return z})),c.d(t,"s",(function(){return U})),c.d(t,"r",(function(){return M})),c.d(t,"L",(function(){return $})),c.d(t,"R",(function(){return H})),c.d(t,"P",(function(){return J})),c.d(t,"v",(function(){return R})),c.d(t,"K",(function(){return _})),c.d(t,"F",(function(){return K})),c.d(t,"f",(function(){return Q})),c.d(t,"J",(function(){return Z})),c("99af");var n=c("59b9"),o=c("ba72"),a=c("2de2"),r=function(e){return Object(n.b)().request("/api/company/config/".concat(e.companyId),o.b.GET,void 0,o.a.json)},i=function(e){return Object(n.b)().request("".concat(a.c,"weather/getCurrent?").concat(e),o.b.GET,void 0,o.a.json)},l=function(e){return Object(n.b)().request("".concat(a.b,"space/property"),o.b.POST,e,o.a.json)},s=function(e){return Object(n.b)().request("".concat(a.b,"meeting/room/scene/getMeetingScene/V2?spaceId=").concat(e.spaceId),o.b.GET,void 0,o.a.json)},u=function(e){return Object(n.b)().request("".concat(a.b,"object/equipment/findForServe?spaceId=").concat(e.spaceId),o.b.POST,void 0,o.a.json)},d=function(e){return Object(n.b)().request("".concat(a.b,"custom/feedback/documents"),o.b.POST,e,o.a.json)},b=function(e){return Object(n.b)().request("".concat(a.b,"custom/feedbackCreate/v2"),o.b.POST,e,o.a.json)},p=function(e){return Object(n.b)({timeout:15e4}).request("".concat(a.b,"light/status/query?spaceId=").concat(e.spaceId),o.b.GET,void 0,o.a.json)},f=function(e){return Object(n.c)("".concat(a.b,"light/onoff/set"),e)},m=function(e){return Object(n.c)("".concat(a.b,"light/onoff/setSatus"),e)},j=function(e){return Object(n.b)().request("".concat(a.b,"object/objectDataEqpGroup/query"),o.b.POST,e,o.a.json)},O=function(e){return Object(n.b)().request("".concat(a.b,"meeting/room/scene/switchover"),o.b.POST,e,o.a.json)},h=function(e){return Object(n.b)().request("".concat(a.b,"customScene/create"),o.b.POST,e,o.a.json)},g=function(e){return Object(n.b)().request("".concat(a.b,"/spaceAdjust/queryPropertyData?").concat(e),o.b.GET,void 0,o.a.json)},v=function(e){return Object(n.b)().request("".concat(a.c,"object/building/query"),o.b.POST,e,o.a.json)},S=function(e){return Object(n.b)().request("".concat(a.c,"object/floor/query"),o.b.POST,e,o.a.json)},k=function(e){return Object(n.b)().request("".concat(a.d,"map/queryMapInfo"),o.b.POST,e,o.a.json)},y=function(e){return Object(n.b)().request("".concat(a.c,"object/equipment/querySpaceEquipType?").concat(e),o.b.GET,void 0,o.a.json)},I=function(e){return Object(n.b)().request("".concat(a.c,"object/space/query"),o.b.POST,e,o.a.json)},N=function(e){return Object(n.b)().request("".concat(a.d,"permanentSpace/save"),o.b.POST,e,o.a.json)},C=function(){return Object(n.b)().request("".concat(a.d,"permanentSpace/query"),o.b.GET,void 0,o.a.json)},V=function(e){return Object(n.b)().request("".concat(a.d,"permanentSpace/delete?").concat(e))},T=function(){return Object(n.b)().request("".concat(a.d,"permanentSpace/queryZJ"),o.b.GET,void 0,o.a.json)},x=function(){return Object(n.b)().request("".concat(a.c,"object/equipment/querySpaceModeSet"),o.b.GET,void 0,o.a.json)},B=function(){return Object(n.b)().request("".concat(a.c,"object/equipment/querySpaceTempSet"),o.b.GET,void 0,o.a.json)},P=function(e){return Object(n.b)().request("".concat(a.d,"scene/querySpaceSceneConfig?").concat(e),o.b.GET,void 0,o.a.json)},q=function(e){return Object(n.b)().request("".concat(a.b,"customScene/queryCustomAndScence?").concat(e),o.b.GET,void 0,o.a.json)},w=function(e){return Object(n.c)("".concat(a.b,"customScene/saveBatchCustomScene"),e)},E=function(e){return Object(n.b)().request("".concat(a.d,"padSpace/getDefaultLocation?").concat(e),o.b.GET,void 0,o.a.json)},D=function(e){return Object(n.b)().request("".concat(a.d,"padSpace/getPadSpaceList?").concat(e),o.b.GET,void 0,o.a.json)},A=function(e){return Object(n.b)().request("".concat(a.d,"padSpace/saveWorkSpace"),o.b.POST,e,o.a.json)},G=function(e){return Object(n.b)().request("".concat(a.d,"padSpace/insertWorkSpace"),o.b.POST,e,o.a.json)},F=function(e){return Object(n.b)().request("".concat(a.d,"padSpace/deleteWorkSpace"),o.b.POST,e,o.a.json)},W=function(e){return Object(n.b)().request("".concat(a.d,"padSpace/queryWorkSpace"),o.b.POST,e,o.a.json)},L=function(e){return Object(n.b)().request("".concat(a.d,"padSpace/queryWorkSpace"),o.b.POST,e,o.a.json)},z=function(e){return Object(n.b)().request("".concat(a.e,"wechat-service-duoduoenv/duoduoenv/customerservice/query"),o.b.POST,e,o.a.json)},U=function(e){return Object(n.b)().request("".concat(a.d,"padLogin/getPadQrCodeStatus?").concat(e),o.b.GET,void 0,o.a.json)},M=function(e){return Object(n.b)().request("".concat(a.d,"padImage/queryImageByFuncType?").concat(e),o.b.GET,void 0,o.a.json)},$=function(e){return Object(n.b)().request("".concat(a.b,"ctrl/querySpaceConditioners?").concat(e),o.b.GET,void 0,o.a.json)},H=function(e){return Object(n.c)("".concat(a.b,"ctrl/set"),e)},J=function(e){return Object(n.b)().request("".concat(a.d,"/map/saveMapPointInfo"),o.b.POST,e,o.a.json)},R=function(e){return Object(n.b)().request("".concat(a.a,"equipmentRun/queryEquipmentRunConfig?").concat(e),o.b.GET,void 0,o.a.json)},_=function(e){return Object(n.b)().request("".concat(a.b,"ctrl/querySapceFloorHeating?").concat(e),o.b.GET,void 0,o.a.json)},K=function(e){return Object(n.c)("".concat(a.d,"padSpace/insertWorkSpaceBatch"),e)},Q=function(e){return Object(n.c)("".concat(a.d,"padSpace/deleteWorkSpaceBatch"),e)},Z=function(e){return Object(n.b)().request("".concat(a.b,"ctrl/queryEquipmentStatusInfo?").concat(e),o.b.GET,void 0,o.a.json)}},4983:function(e,t,c){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"4a22":function(e,t,c){},"563f":function(e,t,c){},"81c0":function(e,t,c){},ac50:function(e,t,c){"use strict";c("563f")},b0c0:function(e,t,c){var n=c("83ab"),o=(c=c("9bf2").f,Function.prototype),a=o.toString,r=/^\s*function ([^ (]*)/;!n||"name"in o||c(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(r)[1]}catch(e){return""}}})},b650:function(e,t,c){"use strict";c.d(t,"a",(function(){return f})),c.d(t,"b",(function(){return m}));t=c("c199");var n=c("7a23"),o=c("fe7e"),a=c("f344"),r=c("f691"),i=c("4a89"),l=c("b1d2"),s=c("b070"),u=c("ad06"),d=c("543e");const[b,p]=Object(o.a)("button");c=Object(a.a)({},s.b,{tag:Object(r.e)("button"),text:String,icon:String,type:Object(r.e)("default"),size:Object(r.e)("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:Object(r.e)("button"),loadingSize:r.f,loadingText:String,loadingType:String,iconPosition:Object(r.e)("left")}),o=Object(n.defineComponent)({name:b,props:c,emits:["click"],setup(e,{emit:t,slots:c}){const o=Object(s.c)(),a=()=>e.loading?c.loading?c.loading():Object(n.createVNode)(d.a,{size:e.loadingSize,type:e.loadingType,class:p("loading")},null):c.icon?Object(n.createVNode)("div",{class:p("icon")},[c.icon()]):e.icon?Object(n.createVNode)(u.a,{name:e.icon,class:p("icon"),classPrefix:e.iconPrefix},null):void 0,r=c=>{e.loading?Object(i.e)(c):e.disabled||(t("click",c),o())};return()=>{const{tag:t,type:o,size:i,block:s,round:u,plain:d,square:b,loading:f,disabled:m,hairline:j,nativeType:O,iconPosition:h}=e;var g=[p([o,i,{plain:d,block:s,round:u,square:b,loading:f,disabled:m,hairline:j}]),{[l.b]:j}];return Object(n.createVNode)(t,{type:O,class:g,style:(()=>{const{color:t,plain:c}=e;if(t){const e={color:c?t:"white"};return c||(e.background=t),t.includes("gradient")?e.border=0:e.borderColor=t,e}})(),disabled:m,onClick:r},{default:()=>[Object(n.createVNode)("div",{class:p("content")},["left"===h&&a(),(()=>{let t;if(t=e.loading?e.loadingText:c.default?c.default():e.text)return Object(n.createVNode)("span",{class:p("text")},[t])})(),"right"===h&&a()])]})}}});const f=Object(t.a)(o);var m=f},bc1b:function(e,t,c){},bd1a:function(e,t,c){"use strict";function n(e){return Object(o.pushScopeId)("data-v-58b1a4a4"),e=e(),Object(o.popScopeId)(),e}c.r(t),c("b0c0");var o=c("7a23"),a={class:"choice-space"},r={class:"search"},i=n((function(){return Object(o.createElementVNode)("span",{class:"title"},"位置:",-1)})),l={class:"title"},s={class:"search-space"},u={class:"com-select"},d={class:"search-icon"},b=["src"],p={class:"space-content"},f=["id"],m={class:"space-item"},j={class:"item-text"},O={key:1,class:"no-data",height:"100%",width:"100%"},h=["src"],g=n((function(){return Object(o.createElementVNode)("span",null,"暂无数据",-1)})),v={key:0,class:"next-btn-box"},S={class:"check-all"},k=n((function(){return Object(o.createElementVNode)("span",null,"全选",-1)})),y={class:"space-type"},I=["onClick"];c("4de4"),c("d81d");var N=c("5530"),C=c("6c02"),V=c("d961"),T=(c("5852"),c("c199")),x=c("fe7e"),B=c("f691"),P=c("8405"),q=c("ad06"),w=c("f465");const[E,D]=Object(x.a)("sidebar"),A=Symbol(E);var G={modelValue:Object(B.c)(0)};G=Object(o.defineComponent)({name:E,props:G,emits:["change","update:modelValue"],setup(e,{emit:t,slots:c}){const n=Object(w.f)(A)["linkChildren"],a=()=>+e.modelValue;return n({getActive:a,setActive:e=>{e!==a()&&(t("update:modelValue",e),t("change",e))}}),()=>{var e;return Object(o.createVNode)("div",{role:"tablist",class:D()},[null==(e=c.default)?void 0:e.call(c)])}}});const F=Object(T.a)(G);var W=c("f344"),L=c("b070"),z=c("471a");const[U,M]=Object(x.a)("sidebar-item");G=Object(W.a)({},L.b,{dot:Boolean,title:String,badge:B.f,disabled:Boolean,badgeProps:Object}),G=Object(o.defineComponent)({name:U,props:G,emits:["click"],setup(e,{emit:t,slots:c}){const n=Object(L.c)(),{parent:a,index:r}=Object(w.k)(A);if(a){const i=()=>{e.disabled||(t("click",r.value),a.setActive(r.value),n())};return()=>{const{dot:t,badge:n,title:l,disabled:s}=e;var u=r.value===a.getActive();return Object(o.createVNode)("div",{role:"tab",class:M({select:u,disabled:s}),tabindex:s?void 0:0,"aria-selected":u,onClick:i},[Object(o.createVNode)(z.a,Object(o.mergeProps)({dot:t,class:M("text"),content:n},e.badgeProps),{default:()=>[c.title?c.title():l]})])}}}});const $=Object(T.a)(G),[H,J]=Object(x.a)("tree-select");G={max:Object(B.c)(1/0),items:Object(B.a)(),height:Object(B.c)(300),selectedIcon:Object(B.e)("success"),mainActiveIndex:Object(B.c)(0),activeId:{type:[Number,String,Array],default:0}},G=Object(o.defineComponent)({name:H,props:G,emits:["click-nav","click-item","update:activeId","update:mainActiveIndex"],setup(e,{emit:t,slots:c}){const n=t=>Array.isArray(e.activeId)?e.activeId.includes(t):e.activeId===t,a=c=>Object(o.createVNode)("div",{key:c.id,class:["van-ellipsis",J("item",{active:n(c.id),disabled:c.disabled})],onClick:()=>{if(!c.disabled){let o;var n;Array.isArray(e.activeId)?-1!==(n=(o=e.activeId.slice()).indexOf(c.id))?o.splice(n,1):o.length<e.max&&o.push(c.id):o=c.id,t("update:activeId",o),t("click-item",c)}}},[c.text,n(c.id)&&Object(o.createVNode)(q.a,{name:e.selectedIcon,class:J("selected")},null)]),r=e=>{t("update:mainActiveIndex",e)},i=e=>t("click-nav",e);return()=>Object(o.createVNode)("div",{class:J(),style:{height:Object(P.b)(e.height)}},[(()=>{const t=e.items.map(e=>Object(o.createVNode)($,{dot:e.dot,title:e.text,badge:e.badge,class:[J("nav-item"),e.className],disabled:e.disabled,onClick:i},null));return Object(o.createVNode)(F,{class:J("nav"),modelValue:e.mainActiveIndex,onChange:r},{default:()=>[t]})})(),Object(o.createVNode)("div",{class:J("content")},[(()=>{if(c.content)return c.content();const t=e.items[+e.mainActiveIndex]||{};return t.children?t.children.map(a):void 0})()])])}}),G=Object(T.a)(G);var R=(c("68ef"),c("cb51"),c("3743"),c("d8ac"),c("81c0"),c("4a22"),c("e41f")),_=(c("8a58"),c("4eda"));const[K,Q]=Object(x.a)("checkbox-group");var Z={max:B.f,disabled:Boolean,iconSize:B.f,direction:String,modelValue:Object(B.a)(),checkedColor:String};const X=Symbol(K);Object(o.defineComponent)({name:K,props:Z,emits:["change","update:modelValue"],setup(e,{emit:t,slots:c}){const{children:n,linkChildren:a}=Object(w.f)(X),r=e=>t("update:modelValue",e);return Object(o.watch)(()=>e.modelValue,e=>t("change",e)),Object(_.a)({toggleAll:(e={})=>{const{checked:t,skipDisabled:c}=e="boolean"==typeof e?{checked:e}:e,o=n.filter(e=>!!e.props.bindGroup&&(e.props.disabled&&c?e.checked.value:null!=t?t:!e.checked.value));e=o.map(e=>e.name),r(e)}}),Object(w.h)(()=>e.modelValue),a({props:e,updateValue:r}),()=>{var t;return Object(o.createVNode)("div",{class:Q([e.direction])},[null==(t=c.default)?void 0:t.call(c)])}}});Z={name:B.h,shape:Object(B.e)("round"),disabled:Boolean,iconSize:B.f,modelValue:B.h,checkedColor:String,labelPosition:String,labelDisabled:Boolean};var Y=Object(o.defineComponent)({props:Object(W.a)({},Z,{bem:Object(B.d)(Function),role:String,parent:Object,checked:Boolean,bindGroup:B.g}),emits:["click","toggle"],setup(e,{emit:t,slots:c}){const n=Object(o.ref)(),a=t=>{if(e.parent&&e.bindGroup)return e.parent.props[t]},r=Object(o.computed)(()=>a("disabled")||e.disabled),i=Object(o.computed)(()=>a("direction")),l=Object(o.computed)(()=>{var t=e.checkedColor||a("checkedColor");if(t&&e.checked&&!r.value)return{borderColor:t,backgroundColor:t}}),s=c=>{var o=c["target"];const a=n.value;o=a===o||(null==a?void 0:a.contains(o)),r.value||!o&&e.labelDisabled||t("toggle"),t("click",c)},u=()=>{const{bem:t,shape:i,checked:s}=e;var u=e.iconSize||a("iconSize");return Object(o.createVNode)("div",{ref:n,class:t("icon",[i,{disabled:r.value,checked:s}]),style:{fontSize:Object(P.b)(u)}},[c.icon?c.icon({checked:s,disabled:r.value}):Object(o.createVNode)(q.a,{name:"success",style:l.value},null)])},d=()=>{if(c.default)return Object(o.createVNode)("span",{class:e.bem("label",[e.labelPosition,{disabled:r.value}])},[c.default()])};return()=>{var t="left"===e.labelPosition?[d(),u()]:[u(),d()];return Object(o.createVNode)("div",{role:e.role,class:e.bem([{disabled:r.value,"label-disabled":e.labelDisabled},i.value]),tabindex:r.value?void 0:0,"aria-checked":e.checked,onClick:s},[t])}}});const[ee,te]=Object(x.a)("checkbox");x=Object(W.a)({},Z,{bindGroup:B.g}),Z=Object(o.defineComponent)({name:ee,props:x,emits:["change","update:modelValue"],setup(e,{emit:t,slots:c}){const n=Object(w.k)(X)["parent"],a=Object(o.computed)(()=>n&&e.bindGroup?-1!==n.props.modelValue.indexOf(e.name):!!e.modelValue),r=(c=!a.value)=>{if(n&&e.bindGroup){var o=c,r=e["name"];const{max:t,modelValue:a}=n.props,i=a.slice();o?t&&i.length>=t||i.includes(r)||(i.push(r),e.bindGroup&&n.updateValue(i)):-1!==(o=i.indexOf(r))&&(i.splice(o,1),e.bindGroup&&n.updateValue(i))}else t("update:modelValue",c)};return Object(o.watch)(()=>e.modelValue,e=>t("change",e)),Object(_.a)({toggle:r,props:e,checked:a}),Object(w.h)(()=>e.modelValue),()=>Object(o.createVNode)(Y,Object(o.mergeProps)({bem:te,role:"checkbox",parent:n,checked:a.value,onToggle:r},e),Object(W.e)(c,["default","icon"]))}}),B=Object(T.a)(Z);var ce=(c("0a6e"),c("2381"),c("2241")),ne=(c("e17f"),c("d399")),oe=(c("e7e5"),c("d257")),ae=c("0613"),re=c("a873"),ie=c("459d");x=Object(o.defineComponent)({components:{vanSearch:V.a,VanPopup:R.b,VanTreeSelect:G,VanCheckbox:B},setup:function(){var e=Object(o.getCurrentInstance)(),t=Object(C.c)(),c=Object(C.d)(),n=Object(oe.t)(),a={type:"",name:"全部空间"},r=Object(o.reactive)({parseImgUrl:oe.y,showSpace:!0,userInfo:n,activeIndex:0,spaceType:a,searchSpaceName:"",checked:!1,positionArr:[],checkPositon:{buildingName:""},route:t,option1:[{text:"全部商ddddd品",value:0},{text:"新款商ddd品",value:1},{text:"活动商ddd品",value:2}],option2:[{text:"默认排序",value:"a"},{text:"好评排ddd序",value:"b"},{text:"销量排序",value:"c"}],value1:0,value2:"a",transitionName:"slide-right",showHeader:!1,showSpaceType:!1,show:!1,spaceTypeArr:[{type:"",name:"全部空间"},{type:0,name:"个人办公室"},{type:1,name:"开放办公区"},{type:2,name:"会议室"},{type:99,name:"其它"}],showPounp:function(){r.show=!r.show},setAllStausFlag:!1,checkallStatus:!1,addWorkSpaceBatch:function(t){Object(ie.F)(t).then((function(t){r.setAllStausFlag=!1,e.proxy.$loadinngEnd()})).catch((function(){r.setAllStausFlag=!1,e.proxy.$loadinngEnd()}))},delWorkSpaceBatch:function(t){Object(ie.f)(t).then((function(t){r.setAllStausFlag=!1,e.proxy.$loadinngEnd()})).catch((function(){r.setAllStausFlag=!1,e.proxy.$loadinngEnd()}))},setCheckallStatus:function(){var e=!0;r.spaceData.map((function(t){t.checked||(e=!1)})),r.checkallStatus=!!e},checkAll:function(){var t=[];r.spaceData.map((function(e){var c={spaceId:e.spaceId,isMajorSpace:e.isMajorSpace||0,macAddress:r.userInfo.mac};r.checkallStatus&&(e.checked=!0),t.push(c)})),r.setAllStausFlag=!0,r.checkallStatus?(e.proxy.$loadingStart(0),r.addWorkSpaceBatch(t)):ce.a.confirm({title:"确认",confirmButtonColor:"#000000",cancelButtonColor:"#4D5262",message:"确定取消所有工作空间吗?"}).then((function(){r.spaceData.map((function(e){e.checked=!1})),e.proxy.$loadingStart(0),r.delWorkSpaceBatch(t)})).catch((function(){r.setCheckallStatus(),r.setAllStausFlag=!1}))},showSpaceTypePounp:function(){r.showSpaceType=!r.showSpaceType},checkSpaceType:function(e){r.spaceType=e,r.showSpaceType=!1,r.searchSpace()},buildingData:[],buildingItem:{},getBuildingList:function(){var e={criteria:{projectId:r.userInfo.projectId}};Object(ie.g)(e).then((function(e){"success"===e.result?(e=null!=(e=null==e?void 0:e.content)?e:[],r.buildingData=e,r.setBbuildingName(),r.getFloorList()):r.buildingData=[]}))},setBbuildingName:function(){r.buildingData.map((function(e,t){e.id===r.checkPositon.buildingId&&(r.checkPositon.buildingName=e.localName,r.activeIndex=t)}))},formateBuildingData:function(){r.positionArr=[];for(var e=0;e<r.buildingData.length;e++){var t={text:r.buildingData[e].localName,id:r.buildingData[e].id,children:[]};r.buildingData[e].id===r.checkPositon.buildingId&&(r.activeIndex=e,r.floorData.map((function(e){e.text=e.localName,e.id===r.checkPositon.floorId&&(r.checkPositon.floorName=e.localName)})),r.checkPositon.buildingName=r.buildingData[e].localName,t.children=r.floorData),r.positionArr.push(t)}},floorData:[],getFloorList:function(){var e;r.checkPositon.buildingId&&(e={criteria:{projectId:r.userInfo.projectId,buildingId:r.checkPositon.buildingId},orders:[{asc:!0,column:"localId"}]},Object(ie.m)(e).then((function(e){var t=e;"success"===e.result?r.floorData=null!=(e=null==t?void 0:t.content)?e:[]:r.floorData=[],r.formateBuildingData(),r.getPadSpaceList()})).catch((function(){})))},defaultSpaceData:{},getDefaultLocation:function(){var e={macAddress:r.userInfo.mac,spaceId:r.spaceId};e=Object(oe.B)(e);Object(ie.j)(e).then((function(e){r.defaultSpaceData=null!=(e=null==e?void 0:e.data)?e:{},r.checkPositon.buildingId=r.defaultSpaceData.buildingId,r.setCheckPersiton(),r.getBuildingList()}))},setCheckPersiton:function(){r.checkPositon.buildingId=r.defaultSpaceData.buildingId,r.checkPositon.floorId=r.defaultSpaceData.floorId},formataWorkData:function(){var e=r.spaceData.filter((function(e){return e.checked}));return r.copySpaceData.map((function(t){for(var c=0;c<e.length;c++)t.spaceId===e[c].spaceId&&(t.checked=e[c].checked)})),r.copySpaceData.filter((function(e){return e.checked}))},goNext:function(){r.setAllStausFlag?Object(ne.a)("正在设置工作空间,请等loding结束后再操作下一步!"):(e.proxy.$loadingStart(0),r.querySpaceList())},updateWorkSpace:function(e){e.checked?r.insertWorkSpace(e):r.deleteWorkSpace(e)},insertWorkSpace:function(e){e={spaceId:e.spaceId,isMajorSpace:1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,macAddress:r.userInfo.mac},Object(ie.E)(e).then((function(e){}))},deleteWorkSpace:function(e){e={spaceId:e.spaceId,macAddress:r.userInfo.mac},Object(ie.e)(e).then((function(e){}))},querySpaceList:function(){var t={criteria:{projectId:r.userInfo.projectId,macAddress:r.userInfo.mac}};Object(ie.c)(t).then((function(t){var n=[];1<(n="success"===t.result&&null!=(t=null==t?void 0:t.content)?t:[]).length?setTimeout((function(){e.proxy.$loadinngEnd(),c.push({name:"setMainSpace"})}),1e3):1===n.length?(r.insertWorkSpace(n[0],1),e.proxy.$loadinngEnd(),c.push({name:"envmonitor",query:{spaceId:n[0].spaceId}})):Object(ne.a)("请选择办公空间!")})).catch((function(){e.proxy.$loadinngEnd()}))},checkBuilding:function(e){r.checkPositon.buildingId=r.positionArr[e].id,r.checkPositon.buildingName=r.positionArr[e].text,r.getFloorList()},checkFloor:function(e){r.checkPositon.floorId=e.id,r.checkPositon.floorName=e.localName,r.show=!1,Object(o.nextTick)((function(){r.setPageScroolTop()})),r.clearSearchName(),r.getPadSpaceList()},clearSearchName:function(){r.searchSpaceName="",r.spaceType=a,document.querySelector(".choice-space").scrollTop=0},spaceData:[],copySpaceData:[],nowPerstionIndex:0,getPadSpaceList:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=e||{floorId:r.checkPositon.floorId,buildingId:r.checkPositon.buildingId,macAddress:r.userInfo.mac};t=Object(oe.B)(t);Object(ie.t)(t).then((function(t){"success"===t.result?(r.spaceData=null!=(t=null==t?void 0:t.data)?t:[],r.spaceData.map((function(e,t){e.isWorkSpace?e.checked=!0:e.checked=!1,e.spaceId===r.spaceId&&(e.checked=!0)})),e||(r.copySpaceData=JSON.parse(JSON.stringify(r.spaceData)))):r.spaceData=[],r&&r.spaceData.length?r.showSpace=!0:r.showSpace=!1,r.setCheckallStatus(),Object(o.nextTick)((function(){r.setPageScroolTop()}))}))},setPageScroolTop:function(){for(var e=0,t=0;t<r.spaceData.length;t++)if(r.spaceData[t].checked){e=t;break}var c=document.querySelector("#space"+e),n=document.querySelector(".choice-space");c=c?c.offsetTop:0;120<c?c-=120:c=0,n.scrollTop=n?c:0},searchSpace:function(){var e={floorId:r.checkPositon.floorId,buildingId:r.checkPositon.buildingId,funcType:r.spaceType.type,spaceName:r.searchSpaceName,macAddress:r.userInfo.mac};r.getPadSpaceList(e)},spaceId:"",init:function(){var e=t.query.spaceId,c=(r.spaceId=e,t.query.id);ae.a.commit(re.a.SET_PROJECT_ID,c),r.getDefaultLocation(),e&&r.insertWorkSpace({spaceId:e},0)}});return Object(o.onMounted)((function(){r.init()})),Object(N.a)({},Object(o.toRefs)(r))}}),c("ac50"),c("4476"),T=c("6b0d"),Z=c.n(T);t.default=Z()(x,[["render",function(e,t,c,n,N,C){var V=Object(o.resolveComponent)("van-icon"),T=Object(o.resolveComponent)("van-search"),x=Object(o.resolveComponent)("van-checkbox"),B=Object(o.resolveComponent)("van-tree-select"),P=Object(o.resolveComponent)("van-popup");return Object(o.openBlock)(),Object(o.createElementBlock)("div",a,[Object(o.createElementVNode)("div",r,[Object(o.createElementVNode)("div",{class:"search-floor",onClick:t[0]||(t[0]=function(){return e.showPounp&&e.showPounp.apply(e,arguments)})},[i,Object(o.createElementVNode)("span",l,Object(o.toDisplayString)(e.checkPositon.buildingName)+Object(o.toDisplayString)(e.checkPositon.floorName),1),Object(o.createVNode)(V,{class:"arrow-down",name:"arrow-down"})]),Object(o.createElementVNode)("div",s,[Object(o.createElementVNode)("div",u,[Object(o.createElementVNode)("div",{class:"com-text",onClick:t[1]||(t[1]=function(){return e.showSpaceTypePounp&&e.showSpaceTypePounp.apply(e,arguments)})},[Object(o.createElementVNode)("span",null,Object(o.toDisplayString)(e.spaceType.name),1),Object(o.createVNode)(V,{class:"arrow-down",name:"arrow-down"})])]),Object(o.createVNode)(T,{class:"search-box",modelValue:e.searchSpaceName,"onUpdate:modelValue":[t[2]||(t[2]=function(t){return e.searchSpaceName=t}),e.searchSpace],placeholder:"请输入搜索关键词"},null,8,["modelValue","onUpdate:modelValue"]),Object(o.createElementVNode)("div",d,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("search-icon","search-icon.svg"),alt:""},null,8,b)])])]),Object(o.createElementVNode)("div",p,[e.showSpace?(Object(o.openBlock)(!0),Object(o.createElementBlock)(o.Fragment,{key:0},Object(o.renderList)(e.spaceData,(function(t,c){return Object(o.openBlock)(),Object(o.createElementBlock)("div",{class:"space-box",id:"space"+c,key:"space"+t.spaceId},[Object(o.createElementVNode)("div",m,[Object(o.createElementVNode)("span",j,Object(o.toDisplayString)(t.spaceName),1),Object(o.createVNode)(x,{class:"item-check",modelValue:t.checked,"onUpdate:modelValue":function(e){return t.checked=e},onClick:function(c){return e.updateWorkSpace(t)},shape:"square"},null,8,["modelValue","onUpdate:modelValue","onClick"])])],8,f)})),128)):(Object(o.openBlock)(),Object(o.createElementBlock)("div",O,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("page-officehome","empty.png"),alt:""},null,8,h),g]))]),e.spaceData&&e.spaceData.length?(Object(o.openBlock)(),Object(o.createElementBlock)("div",v,[Object(o.createElementVNode)("div",S,[Object(o.createVNode)(x,{class:"check-all-item",modelValue:e.checkallStatus,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.checkallStatus=t}),onClick:e.checkAll,shape:"square"},null,8,["modelValue","onClick"]),k]),Object(o.createElementVNode)("button",{class:Object(o.normalizeClass)(e.setAllStausFlag?"disabled-btn":""),onClick:t[4]||(t[4]=function(){return e.goNext&&e.goNext.apply(e,arguments)})}," 下一步 ",2)])):Object(o.createCommentVNode)("",!0),Object(o.createVNode)(P,{show:e.show,"onUpdate:show":t[7]||(t[7]=function(t){return e.show=t}),position:"bottom"},{default:Object(o.withCtx)((function(){return[Object(o.createVNode)(B,{onClickNav:e.checkBuilding,onClickItem:e.checkFloor,"active-id":e.checkPositon.floorId,"onUpdate:active-id":t[5]||(t[5]=function(t){return e.checkPositon.floorId=t}),"main-active-index":e.activeIndex,"onUpdate:main-active-index":t[6]||(t[6]=function(t){return e.activeIndex=t}),items:e.positionArr},null,8,["onClickNav","onClickItem","active-id","main-active-index","items"])]})),_:1},8,["show"]),Object(o.createVNode)(P,{show:e.showSpaceType,"onUpdate:show":t[8]||(t[8]=function(t){return e.showSpaceType=t}),position:"bottom"},{default:Object(o.withCtx)((function(){return[Object(o.createElementVNode)("div",y,[(Object(o.openBlock)(!0),Object(o.createElementBlock)(o.Fragment,null,Object(o.renderList)(e.spaceTypeArr,(function(t,c){return Object(o.openBlock)(),Object(o.createElementBlock)("span",{onClick:function(c){return e.checkSpaceType(t)},class:Object(o.normalizeClass)(e.spaceType.type===t.type?"active-type":""),key:"space-type-id"+c},Object(o.toDisplayString)(t.name),11,I)})),128))])]})),_:1},8,["show"])])}],["__scopeId","data-v-58b1a4a4"]])},d4ef:function(e,t,c){},d8ac:function(e,t,c){},e17f:function(e,t,c){"use strict";c("68ef"),c("d4ef"),c("cb51"),c("3743"),c("e3b3"),c("bc1b"),c("1703"),c("a71a"),c("4d75"),c("2fcb")}}]);
|