chunk-6391f8a1.edb5dd3f.js 38 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6391f8a1"],{"0500":function(e,t,c){"use strict";var o=c("7a23"),n={id:"map",style:{width:"100%",height:"100%"}},a={class:"space-main",id:"spaceMain"},l=["id","onClick"],i=["src"],r=["src"],s={key:0,style:{"font-size":"12px"}},d={class:"map-toolbar"},u=["src"],p={class:"text-hidden"},f={class:"text-hidden"},g=["onClick"],m=["onClick"],b={style:{width:"100%",height:"100%"}};function h(e,t,c,h,v,O){var j=Object(o["resolveComponent"])("van-popup"),S=Object(o["resolveComponent"])("space-search");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",n,[Object(o["createElementVNode"])("div",a,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.mapData.spaceList,(function(t,c){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"space-box",style:Object(o["normalizeStyle"])({width:t.width+"px",height:t.height+"px",top:t.top+"px",left:t.left+"px"}),key:"map"+c},[Object(o["createElementVNode"])("div",{class:Object(o["normalizeClass"])(["space",[t.canClick?"":"click-disable",e.selectArea.spaceId===t.spaceId?t.disabled?"select-disable":"select":"",e.isSetSpace?"use-select":"",t.disabled?"space-disable-box":"space-box-bg"]]),id:"space"+t.id,onClick:Object(o["withModifiers"])((function(c){return e.checkSpace(t)}),["stop"]),style:Object(o["normalizeStyle"])({backgroundColor:t.backgroundColor?t.backgroundColor:""})},[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",{class:Object(o["normalizeClass"])(["device",e.selectArea.spaceId===t.spaceId?"select-device":""])},[e.selectArea.spaceId!==t.spaceId&&t.icon?(Object(o["openBlock"])(),Object(o["createElementBlock"])("img",{key:0,src:t.icon},null,8,i)):(Object(o["openBlock"])(),Object(o["createElementBlock"])("img",{key:1,src:t.selectIcon,class:"select-icon",alt:""},null,8,r)),t.localName?(Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:2},[t.height>80&&12*t.localName.length<t.width||e.selectArea.spaceId===t.spaceId?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",s,Object(o["toDisplayString"])(t.localName),1)):Object(o["createCommentVNode"])("",!0)],64)):Object(o["createCommentVNode"])("",!0)],2),[[o["vShow"],t.width*e.displacement.scale>24&&t.height*e.displacement.scale>24]])],14,l)],4)})),128))]),Object(o["createElementVNode"])("div",d,[Object(o["createElementVNode"])("img",{src:e.parseImgUrl("map-icon","icon-search-big.svg"),onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(){return e.goSearch&&e.goSearch.apply(e,arguments)}),["stop"])),class:"icon-search",alt:""},null,8,u),Object(o["createElementVNode"])("div",{class:"toolbar-item",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(){return e.checkFloor&&e.checkFloor.apply(e,arguments)}),["stop"]))},[Object(o["createElementVNode"])("span",p,Object(o["toDisplayString"])(e.floorItem.localName),1)]),Object(o["createElementVNode"])("div",{class:"toolbar-item",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(){return e.checkBuilding&&e.checkBuilding.apply(e,arguments)}),["stop"]))},[Object(o["createElementVNode"])("span",f,Object(o["toDisplayString"])(e.buildingItem.localName),1)])]),Object(o["createVNode"])(j,{show:e.showBuilding,"onUpdate:show":t[3]||(t[3]=function(t){return e.showBuilding=t}),teleport:"body",class:"buiding-box",style:{width:"40%",height:"100%",padding:"20px"},position:"right"},{default:Object(o["withCtx"])((function(){return[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.buildingData,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["buiding-item",e.buildingItem.buildingId===t.id?"active":""]),key:t.id,onClick:Object(o["withModifiers"])((function(c){return e.comfirmBuilding(t)}),["stop"])},Object(o["toDisplayString"])(t.localName),11,g)})),128))]})),_:1},8,["show"]),Object(o["createVNode"])(j,{show:e.showFloor,"onUpdate:show":t[4]||(t[4]=function(t){return e.showFloor=t}),teleport:"body",class:"buiding-box",style:{width:"40%",height:"100%",padding:"20px"},position:"right"},{default:Object(o["withCtx"])((function(){return[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.floorData,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["buiding-item",e.floorItem.id===t.id?"active":""]),key:t.id,onClick:Object(o["withModifiers"])((function(c){return e.comfirmFloor(t)}),["stop"])},Object(o["toDisplayString"])(t.localName),11,m)})),128))]})),_:1},8,["show"]),Object(o["createVNode"])(j,{show:e.showSearch,"onUpdate:show":t[5]||(t[5]=function(t){return e.showSearch=t}),teleport:"body",class:"buiding-box",style:{width:"100%",height:"100%"},position:"right"},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",b,[Object(o["createVNode"])(S,{onCloseSearch:e.closeSearch},null,8,["onCloseSearch"])])]})),_:1},8,["show"])])}c("99af"),c("d81d"),c("4057");var v=c("5530"),O=c("d257"),j=c("d399"),S=(c("e7e5"),c("2241")),I=(c("e17f"),c("459d")),y=function(e){return Object(o["pushScopeId"])("data-v-44b481c8"),e=e(),Object(o["popScopeId"])(),e},k={class:"ignore_com-top"},C={class:"page-search content-box ptheader"},w={action:"/"},B={class:"search-box"},N={class:"top"},D=y((function(){return Object(o["createElementVNode"])("div",null,"最近查找",-1)})),E=["onClick"],x=["src"],M=["onClick"],V=["src"],F={style:{width:"100%",height:"100%"}};function L(e,t,c,n,a,l){var i=Object(o["resolveComponent"])("VanIcon"),r=Object(o["resolveComponent"])("van-search"),s=Object(o["resolveComponent"])("space-metting"),d=Object(o["resolveComponent"])("van-popup");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",k,[Object(o["createElementVNode"])("div",{class:"header-return",onClick:t[0]||(t[0]=function(){return e.goBack&&e.goBack.apply(e,arguments)})},[Object(o["createVNode"])(i,{name:"arrow-left"})])]),Object(o["createElementVNode"])("div",C,[Object(o["createElementVNode"])("form",w,[Object(o["createVNode"])(r,{modelValue:e.spaceName,"onUpdate:modelValue":[t[1]||(t[1]=function(t){return e.spaceName=t}),e.onSearch],onFocus:e.clearHistorySearch,onBlur:e.getHistorySearch,onClear:e.onCancel,placeholder:"输入地点"},null,8,["modelValue","onUpdate:modelValue","onFocus","onBlur","onClear"])]),Object(o["createElementVNode"])("div",B,[Object(o["createElementVNode"])("div",N,[D,Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("span",{onClick:t[2]||(t[2]=function(){return e.goMetting&&e.goMetting.apply(e,arguments)})},"查看所有会议室")])]),e.searchData&&e.searchData.length?(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:0},Object(o["renderList"])(e.searchData,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"space-item",onClick:function(c){return e.triggerSearchSpace(t)}},[Object(o["createElementVNode"])("img",{src:e.parseImgUrl("search-icon","icon_location.svg"),alt:""},null,8,x),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(t.localName),1)],8,E)})),256)):(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:1},Object(o["renderList"])(e.historySearchData,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"space-item",onClick:function(c){return e.triggerSearchSpace(t)}},[Object(o["createElementVNode"])("img",{src:e.parseImgUrl("search-icon","icon_location.svg"),alt:""},null,8,V),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(t.localName),1)],8,M)})),256))])]),Object(o["createVNode"])(d,{show:e.showMetting,"onUpdate:show":t[3]||(t[3]=function(t){return e.showMetting=t}),teleport:"body",class:"buiding-box",style:{width:"100%",height:"100%"},position:"right"},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",F,[Object(o["createVNode"])(s,{onCloseMetting:e.closeMetting},null,8,["onCloseMetting"])])]})),_:1},8,["show"])],64)}var H=c("d961"),T=(c("5852"),c("6c02")),A=c("0613"),X={class:"ignore_com-top"},Y={class:"page-search content-box ptheader"},q={class:"search-box"},P=["onClick"],W=["src"];function z(e,t,c,n,a,l){var i=Object(o["resolveComponent"])("VanIcon");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",X,[Object(o["createElementVNode"])("div",{class:"header-return",onClick:t[0]||(t[0]=function(){return e.goBack&&e.goBack.apply(e,arguments)})},[Object(o["createVNode"])(i,{name:"arrow-left"})])]),Object(o["createElementVNode"])("div",Y,[Object(o["createElementVNode"])("div",q,[Object(o["createElementVNode"])("div",null,[e.searchData&&e.searchData.length?(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:0},Object(o["renderList"])(e.searchData,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"space-item",onClick:function(c){return e.triggerSearchSpace(t)}},[Object(o["createElementVNode"])("img",{src:e.parseImgUrl("search-icon","icon_meetingroom.svg"),alt:""},null,8,W),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(t.localName),1)],8,P)})),256)):Object(o["createCommentVNode"])("",!0)])])])],64)}var U=Object(o["defineComponent"])({emits:["closeMetting"],props:{projectId:{type:String,default:function(){return""}}},components:{VanSearch:H["a"]},setup:function(e,t){var c="",n=A["a"].state.user,a=[],l=Object(o["reactive"])({parseImgUrl:O["w"],spaceName:c,userInfo:n,searchData:a,goBack:function(){t.emit("closeMetting",null)},triggerSearchSpace:function(e){t.emit("closeMetting",e)},getSpaceLike:function(){var e={criteria:{projectId:n.projectId,localName:{$like:"%".concat(l.spaceName,"%")}}};Object(I["w"])(e).then((function(e){var t,c=e;"success"===c.result?l.searchData=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:[]:l.searchData=[]}))}});return Object(o["onBeforeMount"])((function(){l.getSpaceLike()})),Object(v["a"])({},Object(o["toRefs"])(l))}}),_=(c("b3aa"),c("e4cb"),c("6b0d")),R=c.n(_);const J=R()(U,[["render",z],["__scopeId","data-v-1406cd06"]]);var $=J,K=Object(o["defineComponent"])({emits:["closeSearch"],props:{projectId:{type:String,default:function(){return""}}},components:{VanSearch:H["a"],SpaceMetting:$},setup:function(e,t){Object(T["d"])();var c=A["a"].state.user,n="",a=[],l=[],i=Object(o["reactive"])({parseImgUrl:O["w"],showMetting:!1,spaceName:n,userInfo:c,searchData:a,historySearchData:l,goBack:function(){t.emit("closeSearch",null)},closeMetting:function(e){i.showMetting=!1,t.emit("closeSearch",e)},onSearch:function(){i.spaceName&&i.getSpaceLike()},onCancel:function(){i.searchData=[],i.getHistorySearch()},clearHistorySearch:function(){i.historySearchData=[]},getHistorySearch:function(){i.historySearchData=Object(O["h"])()},triggerSearchSpace:function(e){Object(O["y"])(e),t.emit("closeSearch",e)},getSpaceLike:function(){var e={criteria:{projectId:c.projectId,localName:{$like:"%".concat(i.spaceName,"%")}}};Object(I["w"])(e).then((function(e){var t,c=e;"success"===c.result?i.searchData=null!==(t=null===e||void 0===e?void 0:e.content)&&void 0!==t?t:[]:i.searchData=[]}))},goMetting:function(){i.showMetting=!0}});return Object(o["onMounted"])((function(){i.historySearchData=Object(O["h"])()})),Object(v["a"])({},Object(o["toRefs"])(i))}});c("3dfb"),c("fcad");const G=R()(K,[["render",L],["__scopeId","data-v-44b481c8"]]);var Q=G,Z=c("6a79"),ee=Object(o["defineComponent"])({props:{projectId:{type:String,default:function(){return""}},spaceData:{type:Array,default:function(){return[]}},spaceInfo:{type:Object,default:function(){}},isSetSpace:{type:Boolean,default:function(){return!1}},floorId:{type:String,default:function(){return""}},buildingId:{type:String,default:function(){return""}}},components:{SpaceSearch:Q},setup:function(e,t){Object(T["d"])();var c={},n=window.document,a={screenWidth:n.body.clientWidth,screenHeight:n.body.clientHeight},l=.8,i={scale:1,pageX:0,pageX2:0,originScale:0,moveable:!1},r=[],s=[],d={},u={},p={},f=null,g=Object(o["reactive"])({parseImgUrl:O["w"],spaceInfo:f,isSetSpace:e.isSetSpace,widthMapScale:1,tempScale:.8,comMapScale:l,heightScale:1,showSearch:!1,isSetSearchSpace:!1,showBuilding:!1,showFloor:!1,buildingItem:{buildingId:"",localName:""},floorData:s,floorItem:d,buildingData:r,mapData:c,copyMapDaata:c,selectArea:u,displacement:i,screenInfo:a,transformData:p,clearPreStyle:function(){var e=n.querySelector("#map");e.scrollLeft=0,e.scrollTop=0;var t=n.querySelector("#spaceMain");g.displacement.scale=1,t&&(t.style.left="0px",t.style.top="0px")},swipe:function(e,t){var c=!1,o=0,n=0,a=0,l=0,i=0,r=0,s=function(){},d={swipeLeft:s,swipeRight:s,swipeDown:s,swipeUp:s,drag:s};Object.assign(d,t),e.addEventListener("touchstart",(function(t){o=t.touches[0].pageX,n=t.touches[0].pageY,i=o-e.offsetLeft,r=n-e.offsetTop}),{passive:!0}),e.addEventListener("touchmove",(function(t){if(!g.displacement.moveable&&(c=!0,a=t.touches[0].pageX,l=t.touches[0].pageY,t.mation={startX:o,startY:n,moveX:a,moveY:l,disX:i,disY:r},d.drag.call(e,t),c)){var s=Math.abs(a-o),u=Math.abs(l-n);s>u?a-o>0?d.swipeRight.call(e,t):d.swipeLeft.call(e,t):l-o>0?d.swipeDown.call(e,t):d.swipeUp.call(e,t)}}),{passive:!0}),e.addEventListener("touchend",(function(e){c=!1}))},mapScroll:function(){var e=n.querySelector("#spaceMain"),t=n.querySelector("#houseDes"),c=t?t.offsetHeight:0;g.swipe(e,{swipeLeft:function(t){if(!g.displacement.moveable)if(e.offsetWidth<g.screenInfo.screenWidth);else{var c=e.offsetWidth-Math.abs(t.touches[0].pageX-t.mation.disX);c<g.screenInfo.screenWidth?e.style.left=-(e.offsetWidth-g.screenInfo.screenWidth)+"px":e.style.left=t.touches[0].pageX-t.mation.disX+"px"}},swipeRight:function(t){if(!g.displacement.moveable){if(e.offsetWidth<g.screenInfo.screenWidth)return;t.touches[0].pageX-t.mation.disX>0?e.style.left="0px":e.style.left=t.touches[0].pageX-t.mation.disX+"px"}},swipeDown:function(t){if(!g.displacement.moveable){var o=g.screenInfo.screenHeight-c-20,n=e.offsetHeight;n<o||t.touches[0].pageY-t.mation.disY>0?e.style.top="0px":e.style.top=t.touches[0].pageY-t.mation.disY+"px"}},swipeUp:function(t){if(!g.displacement.moveable){var c=n.querySelector("#houseDes"),o=c?c.offsetHeight:0,a=g.screenInfo.screenHeight-o-20,l=e.offsetHeight,i=t.touches[0].pageY-t.mation.disY;l<a?e.style.top="0px":l-Math.abs(i)<a/2?e.style.top=-(l-a/2)+"px":e.style.top=t.touches[0].pageY-t.mation.disY+"px"}},drag:function(e){}})},closeSearch:function(e){if(g.showSearch=!1,e){g.isSetSearchSpace=!0,g.loadingStart();var t={buildingId:e.buildingId,buildingName:"",floorId:e.floorId,floorName:"",spaceId:e.id};g.init(t)}else g.isSetSearchSpace=!1},goSearch:function(){g.showSearch=!0},setSelectSpacePosition:function(e){setTimeout((function(){g.setScrollLeft(e),g.scrollTop(e)}))},setScrollLeft:function(e){var t=n.querySelector("#spaceMain"),c=0;e.left+e.width>=g.screenInfo.screenWidth/2?(c=e.left-g.screenInfo.screenWidth/2+e.width/2,c=~c):c=0,c>0&&(c=0),Math.abs(c)>t.offsetWidth-g.screenInfo.screenWidth&&(c=-(t.offsetWidth-g.screenInfo.screenWidth)),t.style.left=c+"px"},scrollTop:function(e){n.querySelector("#map");var t=n.querySelector("#spaceMain"),c=n.querySelector("#houseDes"),o=c?c.offsetHeight:0,a=0;a=e.top+e.width>(g.screenInfo.screenHeight-o-20)/2?e.top-(g.screenInfo.screenHeight-o)/2+e.height/2:0,a=~a,a>0&&(a=0),t.style.top=a+"px"},checkSpace:function(e){e.disabled?Object(j["a"])("改空间和平板没绑定,暂不支持查看"):(g.isSetSearchSpace=!1,e&&e.canClick?(g.setSelectSpacePosition(e),g.selectArea=e,g.selectArea.buildingId=g.buildingItem.buildingId,g.setLocalSpaceInfo(),t.emit("changeSpace",g.selectArea)):Object(j["a"])("不可选区域"))},comfirSetSpace:function(c){c.spaceId===e.spaceInfo.spaceId?S["a"].confirm({title:"取消常驻空间",confirmButtonColor:"#000000",cancelButtonColor:"#4D5262",message:"\n 是否取消常驻空间设置 ? "}).then((function(){t.emit("delPermanentSpace")})).catch((function(){})):S["a"].confirm({title:"设置常驻空间",confirmButtonColor:"#000000",cancelButtonColor:"#4D5262",message:"是否将常驻空间设置为".concat(c.localName,"?")}).then((function(){g.selectArea=c,t.emit("changeSpaceId",g.selectArea.spaceId)})).catch((function(){}))},setLocalSpaceInfo:function(){Object(O["u"])(g.buildingItem.buildingId,g.floorItem.id,g.selectArea.spaceId);var e={buildingId:g.buildingItem.buildingId,buildingName:g.buildingItem.localName,floorId:g.floorItem.id,floorName:g.floorItem.localName,spaceId:g.selectArea.spaceId};Object(O["x"])(e)},getDistance:function(e,t){return Math.hypot(t.x-e.x,t.y-e.y)},formateMapData:function(){var t=e.spaceData,c=g.mapData;if(c){var o;g.setSpaceScale(),g.setTempScale(),c.width<3e3&&(g.comMapScale=.8),c.width=c.width*g.comMapScale,c.height=c.height*g.comMapScale;for(var n=null!==(o=null===c||void 0===c?void 0:c.spaceList)&&void 0!==o?o:[],a=0;a<n.length;a++){var l=n[a];l.width=l.width*g.comMapScale,l.height=l.height*g.comMapScale,l.top=l.top*g.comMapScale,l.left=l.left*g.comMapScale;for(var i=!0,r=0;r<t.length;r++)if(l.spaceId===t[r].spaceId){i=!1;break}i&&(l.disabled=!0),g.setSpaceIcon(l)}g.copyMapDaata=JSON.parse(JSON.stringify(c))}},setSpaceScale:function(){var e=g.mapData;if(e){var t,c=null!==(t=null===e||void 0===e?void 0:e.spaceList)&&void 0!==t?t:[],o=Math.min.apply(null,c.map((function(e){return e.height}))),n=Math.min.apply(null,c.map((function(e){return e.width}))),a=o<n?o:n;a=a||30,g.comMapScale=30/a}},setTempScale:function(){g.tempScale=.4;var e=g.mapData;if(e){var t=g.mapData.width,c=g.mapData.height;if(t>c){var o=Math.ceil(t/g.screenInfo.screenWidth);g.tempScale=o<10?.4:o<20?.3:.25}else{var n=Math.ceil(c/g.screenInfo.screenHeight);g.tempScale=n<10?.4:n<20?.3:.25}}},setMapBoxStyle:function(){var e=n.querySelector("#spaceMain");g.mapData&&g.mapData.width&&(e.style.width=g.mapData.width+"px",e.style.height=g.mapData.height+"px")},setSpaceIcon:function(e){if(e.canClick){var t=Object(Z["a"])(e.roomFuncType);e.icon=Z["c"][t].icon,e.selectIcon=Z["c"][t].selectIcon,e.backgroundColor=Z["c"][t].backgroundColor,e.bg=Z["c"][t].bg,e.icon=Object(O["w"])("map-new-icon",e.icon),e.selectIcon=Object(O["w"])("map-new-icon",e.selectIcon)}else e.icon=""},midpoint:function(e,t,c,o){return[e+(c-e)/2,t+(o-t)/2]},updateMapStyle:function(){var e=JSON.parse(JSON.stringify(g.copyMapDaata));if(e){var t;e.width=e.width*g.displacement.scale,e.height=e.height*g.displacement.scale;for(var c=null!==(t=null===e||void 0===e?void 0:e.spaceList)&&void 0!==t?t:[],o=0;o<c.length;o++){var n=c[o];n.width=n.width*g.displacement.scale,n.height=n.height*g.displacement.scale,n.top=n.top*g.displacement.scale,n.left=n.left*g.displacement.scale}g.mapData=e,g.setMapBoxStyle()}},updateMapPositon:function(e,t){var c=g.displacement.scaleCenter[0]-g.displacement.scaleCenter[0]*g.displacement.scale,o=g.displacement.scaleCenter[1]-g.displacement.scaleCenter[1]*g.displacement.scale;e>0&&g.displacement.scale<1&&(c>0&&(c=~c),o>0&&(o=~o));var n=g.displacement.top*g.displacement.scale+o,a=g.displacement.left*g.displacement.scale+c;t.offsetWidth<g.screenInfo.screenWidth&&(a=0),t.style.left=a>0?"0px":a+"px",t.offsetHeight<g.screenInfo.screenHeight?t.style.top=0:t.style.top=n>0?0:n+"px"},mapScale:function(){var e=n.querySelector("#spaceMain");e.addEventListener("touchstart",(function(t){var c=t.touches,o=c[0],n=c[1];if(g.displacement.pageX=o.pageX,g.displacement.pageY=o.pageY,g.displacement.moveable=!0,g.displacement.originScale=g.displacement.scale||1,n){g.displacement.pageX2=n.pageX,g.displacement.pageY2=n.pageY;var a=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left),l=isNaN(parseInt(e.style.top))?0:parseInt(e.style.top);g.displacement.center=g.midpoint(o.pageX,o.pageY,n.pageX,n.pageY),g.displacement.left=a/g.displacement.scale,g.displacement.top=l/g.displacement.scale,g.displacement.scaleCenter=[g.displacement.center[0]/g.displacement.scale,g.displacement.center[1]/g.displacement.scale],g.displacement.scaleTranslateProportion=[g.displacement.scaleCenter[0]/(e.offsetWidth/g.displacement.scale),g.displacement.scaleCenter[1]/(e.offsetHeight/g.displacement.scale)],g.displacement.oldSize=[e.offsetWidth/g.displacement.scale,e.offsetHeight/g.displacement.scale]}else g.displacement.moveable=!1}),{passive:!0}),e.addEventListener("touchmove",(function(t){if(g.displacement.moveable){var c=t.touches,o=c[0],n=c[1];if(n){g.displacement.pageX2||(g.displacement.pageX2=n.pageX),g.displacement.pageY2||(g.displacement.pageY2=n.pageY);var a=g.getDistance({x:o.pageX,y:o.pageY},{x:n.pageX,y:n.pageY})/g.getDistance({x:g.displacement.pageX,y:g.displacement.pageY},{x:g.displacement.pageX2,y:g.displacement.pageY2}),l=g.displacement.originScale*a;l<g.tempScale&&(l=g.tempScale),l>1.5&&(l=1.5);var i=l-g.displacement.scale;g.displacement.scale=l,0!==i&&(g.updateMapPositon(i,e),g.updateMapStyle())}}}),{passive:!0}),e.addEventListener("touchend",(function(){g.displacement.moveable=!0}))},getBuildingList:function(){var t={criteria:{projectId:e.projectId},orders:[{asc:!0,column:"localId"}]};Object(I["f"])(t).then((function(e){var t=e;if("success"===t.result){var c,o=null!==(c=null===t||void 0===t?void 0:t.content)&&void 0!==c?c:[];g.buildingData=o,g.setBuildingName()}}))},checkBuilding:function(){g.showBuilding=!0},checkFloor:function(){g.showFloor=!0},comfirmFloor:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];g.floorItem=e,g.showFloor=!1,g.loadingStart(),g.getMapInfo(t),Object(O["t"])(g.buildingItem.buildingId,g.floorItem.id)},comfirmBuilding:function(e){g.showBuilding=!1,g.buildingItem.buildingId=e.id,g.buildingItem.localName=e.localName,g.loadingStart(),g.getFloorList()},loadingStart:function(){j["a"].loading({duration:0,forbidClick:!0,message:"加载中..."})},loadinngEnd:function(){j["a"].clear()},getFloorList:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(g.buildingItem.buildingId){var c={criteria:{projectId:e.projectId,buildingId:g.buildingItem.buildingId},orders:[{asc:!0,column:"localId"}]};Object(I["l"])(c).then((function(e){var c,o=e;"success"===e.result?(g.floorData=null!==(c=null===o||void 0===o?void 0:o.content)&&void 0!==c?c:[],g.setFloorName()):g.floorData=[];t&&g.floorData.length&&(g.getHistorySelectFloor(),g.getMapInfo()),g.loadinngEnd()})).catch((function(){g.loadinngEnd()}))}},getMapInfo:function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c={projectId:e.projectId,floorId:g.floorItem.id};Object(I["n"])(c).then((function(e){var c=e;if("success"===c.result){var n;if(g.mapData=null!==(n=null===c||void 0===c?void 0:c.data)&&void 0!==n?n:null,g.clearPreStyle(),g.formateMapData(),t){var a=g.getFirstSelectSpace(t);a&&(g.selectArea=a)}g.setSelectSpacePosition(g.selectArea),Object(o["nextTick"])((function(){g.setMapBoxStyle(),g.mapScale(),g.mapScroll()}))}})).catch((function(){g.loadinngEnd()}))},getHistorySelectFloor:function(){var e=Object(O["i"])(),t=!1,c=e[g.buildingItem.buildingId];g.floorData.map((function(e){e.id===c&&(t=!0,g.floorItem=e)})),t||(g.floorItem=g.floorData[0])},getHistorySpace:function(){var e=g.mapData,t=Object(O["o"])();if(e){var c,o=!1,n=null!==(c=null===e||void 0===e?void 0:e.spaceList)&&void 0!==c?c:[],a="".concat(g.buildingItem.buildingId,",").concat(g.floorItem.id),l=t[a];if(l&&n.map((function(e){l===e.spaceId&&(g.selectArea=e,o=!0)})),!o)for(var i=0;i<n.length;i++)if(n[i].canClick){g.selectArea=n[i];break}}},getFirstSelectSpace:function(e){var t=null,c=g.mapData;if(c&&e)for(var o,n=null!==(o=null===c||void 0===c?void 0:c.spaceList)&&void 0!==o?o:[],a=0;a<n.length;a++)if(n[a].spaceId===e.spaceId){t=n[a];break}return t},setDefaultSpace:function(e){e&&(g.buildingItem.buildingId=e.buildingId,g.buildingItem.localName=e.buildingName?e.buildingName:"",g.floorItem={id:e.floorId,localName:e.floorName?e.floorName:""})},init:function(e){e&&g.setDefaultSpace(e),g.getBuildingList(),g.getFloorList(!1),g.getMapInfo(!1,e)},setBuildingName:function(){g.buildingItem.buildingId?g.buildingData.map((function(e){e.id===g.buildingItem.buildingId&&(g.buildingItem.localName=e.localName)})):g.buildingItem={buildingId:g.buildingData[0].id,localName:g.buildingData[0].localName}},setFloorName:function(){g.floorItem.id?g.floorData.map((function(e){e.id===g.floorItem.id&&(g.floorItem.localName=e.localName)})):g.floorItem=g.floorData[0]}});return Object(o["watch"])(e,(function(e){}),{deep:!1,immediate:!0}),Object(o["onMounted"])((function(){g.spaceInfo=e.spaceInfo,g.buildingItem.buildingId=e.buildingId,g.floorItem.id=e.floorId,g.spaceInfo.buildingId=e.buildingId,g.spaceInfo.floorId=e.floorId,g.selectArea.spaceId=e.spaceInfo.spaceId,g.init(g.spaceInfo)})),Object(v["a"])({},Object(o["toRefs"])(g))}});c("120e");const te=R()(ee,[["render",h],["__scopeId","data-v-3457f2c9"]]);t["a"]=te},"120e":function(e,t,c){"use strict";c("4949")},1703:function(e,t,c){},2241:function(e,t,c){"use strict";c.d(t,"a",(function(){return X}));var o=c("7a23"),n=c("f344"),a=c("c199"),l=c("1da4"),i=c("fe7e"),r=c("f691"),s=c("7e3e"),d=c("8da3"),u=c("b1d2"),p=c("8405"),f=c("f827"),g=c("e41f"),m=c("b650"),b=c("f465");const[h,v]=Object(i["a"])("action-bar"),O=Symbol(h),j={safeAreaInsetBottom:r["g"]};var S=Object(o["defineComponent"])({name:h,props:j,setup(e,{slots:t}){const{linkChildren:c}=Object(b["f"])(O);return c(),()=>{var c;return Object(o["createVNode"])("div",{class:[v(),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[null==(c=t.default)?void 0:c.call(t)])}}});const I=Object(a["a"])(S);var y=c("4eda"),k=c("b070");const[C,w]=Object(i["a"])("action-bar-button"),B=Object(n["a"])({},k["b"],{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean});var N=Object(o["defineComponent"])({name:C,props:B,setup(e,{slots:t}){const c=Object(k["c"])(),{parent:n,index:a}=Object(b["k"])(O),l=Object(o["computed"])(()=>{if(n){const e=n.children[a.value-1];return!(e&&"isButton"in e)}}),i=Object(o["computed"])(()=>{if(n){const e=n.children[a.value+1];return!(e&&"isButton"in e)}});return Object(y["a"])({isButton:!0}),()=>{const{type:n,icon:a,text:r,color:s,loading:d,disabled:u}=e;return Object(o["createVNode"])(m["a"],{class:w([n,{last:i.value,first:l.value}]),size:"large",type:n,icon:a,color:s,loading:d,disabled:u,onClick:c},{default:()=>[t.default?t.default():r]})}}});const D=Object(a["a"])(N);const[E,x,M]=Object(i["a"])("dialog"),V=Object(n["a"])({},f["b"],{title:String,theme:String,width:r["f"],message:[String,Function],callback:Function,allowHtml:Boolean,className:r["h"],transition:Object(r["e"])("van-dialog-bounce"),messageAlign:String,closeOnPopstate:r["g"],showCancelButton:Boolean,cancelButtonText:String,cancelButtonColor:String,confirmButtonText:String,confirmButtonColor:String,showConfirmButton:r["g"],closeOnClickOverlay:Boolean}),F=[...f["a"],"transition","closeOnPopstate"];var L=Object(o["defineComponent"])({name:E,props:V,emits:["confirm","cancel","keydown","update:show"],setup(e,{emit:t,slots:c}){const a=Object(o["ref"])(),l=Object(o["reactive"])({confirm:!1,cancel:!1}),i=e=>t("update:show",e),r=t=>{var c;i(!1),null==(c=e.callback)||c.call(e,t)},f=c=>()=>{e.show&&(t(c),e.beforeClose?(l[c]=!0,Object(s["a"])(e.beforeClose,{args:[c],done(){r(c),l[c]=!1},canceled(){l[c]=!1}})):r(c))},b=f("cancel"),h=f("confirm"),v=Object(o["withKeys"])(c=>{var o,l;if(c.target!==(null==(l=null==(o=a.value)?void 0:o.popupRef)?void 0:l.value))return;const i={Enter:e.showConfirmButton?h:n["d"],Escape:e.showCancelButton?b:n["d"]};i[c.key](),t("keydown",c)},["enter","esc"]),O=()=>{const t=c.title?c.title():e.title;if(t)return Object(o["createVNode"])("div",{class:x("header",{isolated:!e.message&&!c.default})},[t])},j=t=>{const{message:c,allowHtml:n,messageAlign:a}=e,l=x("message",{"has-title":t,[a]:a}),i=Object(d["c"])(c)?c():c;return n&&"string"===typeof i?Object(o["createVNode"])("div",{class:l,innerHTML:i},null):Object(o["createVNode"])("div",{class:l},[i])},S=()=>{if(c.default)return Object(o["createVNode"])("div",{class:x("content")},[c.default()]);const{title:t,message:n,allowHtml:a}=e;if(n){const e=!(!t&&!c.title);return Object(o["createVNode"])("div",{key:a?1:0,class:x("content",{isolated:!e})},[j(e)])}},y=()=>Object(o["createVNode"])("div",{class:[u["c"],x("footer")]},[e.showCancelButton&&Object(o["createVNode"])(m["a"],{size:"large",text:e.cancelButtonText||M("cancel"),class:x("cancel"),style:{color:e.cancelButtonColor},loading:l.cancel,onClick:b},null),e.showConfirmButton&&Object(o["createVNode"])(m["a"],{size:"large",text:e.confirmButtonText||M("confirm"),class:[x("confirm"),{[u["a"]]:e.showCancelButton}],style:{color:e.confirmButtonColor},loading:l.confirm,onClick:h},null)]),k=()=>Object(o["createVNode"])(I,{class:x("footer")},{default:()=>[e.showCancelButton&&Object(o["createVNode"])(D,{type:"warning",text:e.cancelButtonText||M("cancel"),class:x("cancel"),color:e.cancelButtonColor,loading:l.cancel,onClick:b},null),e.showConfirmButton&&Object(o["createVNode"])(D,{type:"danger",text:e.confirmButtonText||M("confirm"),class:x("confirm"),color:e.confirmButtonColor,loading:l.confirm,onClick:h},null)]}),C=()=>c.footer?c.footer():"round-button"===e.theme?k():y();return()=>{const{width:t,title:c,theme:l,message:r,className:s}=e;return Object(o["createVNode"])(g["a"],Object(o["mergeProps"])({ref:a,role:"dialog",class:[x([l]),s],style:{width:Object(p["b"])(t)},tabindex:0,"aria-labelledby":c||r,onKeydown:v,"onUpdate:show":i},Object(n["e"])(e,F)),{default:()=>[O(),S(),C()]})}}});let H;function T(){const e={setup(){const{state:e,toggle:t}=Object(l["b"])();return()=>Object(o["createVNode"])(L,Object(o["mergeProps"])(e,{"onUpdate:show":t}),null)}};({instance:H}=Object(l["a"])(e))}function A(e){return n["c"]?new Promise((t,c)=>{H||T(),H.open(Object(n["a"])({},A.currentOptions,e,{callback:e=>{("confirm"===e?t:c)(e)}}))}):Promise.resolve()}A.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},A.currentOptions=Object(n["a"])({},A.defaultOptions),A.alert=A,A.confirm=e=>A(Object(n["a"])({showCancelButton:!0},e)),A.close=()=>{H&&H.toggle(!1)},A.setDefaultOptions=e=>{Object(n["a"])(A.currentOptions,e)},A.resetDefaultOptions=()=>{A.currentOptions=Object(n["a"])({},A.defaultOptions)},A.Component=Object(a["a"])(L),A.install=e=>{e.use(A.Component),e.config.globalProperties.$dialog=A};var X=A},"2fcb":function(e,t,c){},"36e1":function(e,t,c){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"3dfb":function(e,t,c){"use strict";c("7a89")},4057:function(e,t,c){var o=c("23e7"),n=Math.hypot,a=Math.abs,l=Math.sqrt,i=!!n&&n(1/0,NaN)!==1/0;o({target:"Math",stat:!0,forced:i},{hypot:function(e,t){var c,o,n=0,i=0,r=arguments.length,s=0;while(i<r)c=a(arguments[i++]),s<c?(o=s/c,n=n*o*o+1,s=c):c>0?(o=c/s,n+=o*o):n+=c;return s===1/0?1/0:s*l(n)}})},4949:function(e,t,c){},"6a79":function(e,t,c){"use strict";c.d(t,"c",(function(){return o})),c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));var o={"公共区域":{backgroundColor:"#DFE3ED",icon:"storeroom.svg",selectIcon:"storeroomselected.svg"},"卫生间":{backgroundColor:"#fff",selectIcon:"toiletSelect.svg",icon:"toilet.svg"},"走廊":{icon:"passage.svg",backgroundColor:"#fff",selectIcon:"passageselected.svg"},"母婴室":{backgroundColor:"#fff",icon:"baby.svg",selectIcon:"babyselected.svg"},"电梯厅":{icon:"elevator.svg",selectIcon:"elevatoSelect.svg",backgroundColor:"#DFE3ED"},"楼梯间":{backgroundColor:"#DFE3ED",icon:"stairsx.svg",selectIcon:"stairsxselected.svg"},"打印":{backgroundColor:"#DFE3ED",icon:"print.svg",selectIcon:"printselected.svg"},"休闲活动区":{icon:"coffee.svg",backgroundColor:"#DFE3ED",selectIcon:"coffeeselected.svg"},"普通办公区":{icon:"dev.svg",selectIcon:"devselected.svg",backgroundColor:"#DFE3ED",circleColor:"#7FBEFA"},"办公室":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"officeroom.svg",selectIcon:"officeroomselected.svg"},"会议室":{backgroundColor:"#fff",circleColor:"#F2918E",icon:"mroom.svg",selectIcon:"mroomSelect.svg"},"多功能厅":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"vector.svg",selectIcon:"vectorSelect.svg"},"接待室":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"jiedaiqu.svg",selectIcon:"jiedaiquSelect.svg"},"门厅":{backgroundColor:"#DFE3ED",circleColor:"#7582B0",icon:"jiedaiqu.svg",selectIcon:"jiedaiquSelect.svg"},"档案库":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"chucang.svg",selectIcon:"chucangshiSelect.svg"},"更衣室":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"gengyishi.svg",selectIcon:"gengyishiSelect.svg"},"厨房":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"chufang.svg",selectIcon:"chufangSelect.svg"},"餐饮区":{backgroundColor:"#DFE3ED",circleColor:"#7582B0",icon:"canyin.svg",selectIcon:"canyinSelect.svg"},"设备间":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"deviceroom.svg",selectIcon:"deviceroomselected.svg"},"健身房":{backgroundColor:"#DFE3ED",circleColor:"#7582B0",icon:"jianshenfang.svg",selectIcon:"jianshenfangSelect.svg"},"体育管":{backgroundColor:"#DFE3ED",circleColor:"#7582B0",icon:"tiyuguan.svg",selectIcon:"tiyuguanSelect.svg"},"游泳馆":{backgroundColor:"#DFE3ED",circleColor:"#7582B0",icon:"youyong.svg",selectIcon:"youyongSelect.svg"},"图书馆":{backgroundColor:"#DFE3ED",circleColor:"#7582B0",icon:"tushuguan.svg",selectIcon:"tushuguanSelect.svg"},"活动区":{backgroundColor:"#DFE3ED",circleColor:"#7582B0",icon:"huodongqu.svg",selectIcon:"huodongquSelect.svg"},"实验室":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"shiyanqu.svg",selectIcon:"shiyanquSelect.svg"},"值班室":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"zhibanshi.svg",selectIcon:"zhibanshiSelect.svg"},"收费室":{backgroundColor:"#fff",circleColor:"#7582B0",icon:"finance.svg",selectIcon:"financeselected.svg"},"护士站":{backgroundColor:"#DFE3ED",circleColor:"#7582B0",icon:"nurse.svg",selectIcon:"nurseSelect.svg"}},n=function(e){var t="公共区域";return t="100"===e||"1A0"===e||"0"===e||"443"===e||"453"===e?"公共区域":"111"===e?"卫生间":"113"===e?"母婴室":"120"===e?"走廊":"130"===e?"电梯厅":"140"===e?"楼梯间":"170"===e||"600"===e||"223"===e||"930"===e?"休闲活动区":"300"===e||"313"===e||"314"===e||"315"===e||"330"===e?"普通办公区":"312"===e||"311"===e||"310"===e?"办公室":"310"===e||"321"===e||"322"===e||"320"===e?"会议室":"490"===e||"323"===e||"931"===e?"多功能厅":"331"===e?"接待室":"160"===e?"门厅":"333"===e||"250"===e||"253"===e?"档案库":"112"===e?"更衣室":"220"===e||"221"===e?"餐饮区":"430"===e||"410"===e||"400"===e||"4B0"===e||"441"===e||"442"===e||"451"===e||"452"===e||"461"===e||"462"===e||"471"===e||"472"===e||"733"===e||"440"===e||"450"===e?"厨房":"252"===e||"246"===e||"1B5"===e||"234"===e||"231"===e||"230"===e||"233"===e||"232"===e||"234"===e||"235"===e||"236"===e||"237"===e||"241"===e||"242"===e||"244"===e||"245"===e||"251"===e||"254"===e||"211"===e||"212"===e||"222"===e?"设备间":"690"===e?"健身房":"932"===e||"934"===e||"933"===e||"6A0"===e?"体育管":"935"===e?"图书馆":"936"===e||"937"===e||"938"===e||"915"===e?"活动区":"921"===e||"922"===e||"923"===e||"920"===e||"926"===e||"924"===e||"925"===e||"926"===e?"实验室":"243"===e||"332"===e?"值班室":"334"===e?"收费室":"335"===e?"护士站":"公共区域",t},a=function(e){var t="其它";return t="312"===e||"311"===e||"310"===e?"个人":"320"===e||"321"===e||"322"===e||"323"===e?"会议室":"开放",t}},"7a89":function(e,t,c){},b3aa:function(e,t,c){"use strict";c("fee7")},b650:function(e,t,c){"use strict";c.d(t,"a",(function(){return h})),c.d(t,"b",(function(){return v}));var o=c("c199"),n=c("7a23"),a=c("fe7e"),l=c("f344"),i=c("f691"),r=c("4a89"),s=c("b1d2"),d=c("b070"),u=c("ad06"),p=c("543e");const[f,g]=Object(a["a"])("button"),m=Object(l["a"])({},d["b"],{tag:Object(i["e"])("button"),text:String,icon:String,type:Object(i["e"])("default"),size:Object(i["e"])("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:Object(i["e"])("button"),loadingSize:i["f"],loadingText:String,loadingType:String,iconPosition:Object(i["e"])("left")});var b=Object(n["defineComponent"])({name:f,props:m,emits:["click"],setup(e,{emit:t,slots:c}){const o=Object(d["c"])(),a=()=>c.loading?c.loading():Object(n["createVNode"])(p["a"],{size:e.loadingSize,type:e.loadingType,class:g("loading")},null),l=()=>e.loading?a():c.icon?Object(n["createVNode"])("div",{class:g("icon")},[c.icon()]):e.icon?Object(n["createVNode"])(u["a"],{name:e.icon,class:g("icon"),classPrefix:e.iconPrefix},null):void 0,i=()=>{let t;if(t=e.loading?e.loadingText:c.default?c.default():e.text,t)return Object(n["createVNode"])("span",{class:g("text")},[t])},f=()=>{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}},m=c=>{e.loading?Object(r["e"])(c):e.disabled||(t("click",c),o())};return()=>{const{tag:t,type:c,size:o,block:a,round:r,plain:d,square:u,loading:p,disabled:b,hairline:h,nativeType:v,iconPosition:O}=e,j=[g([c,o,{plain:d,block:a,round:r,square:u,loading:p,disabled:b,hairline:h}]),{[s["b"]]:h}];return Object(n["createVNode"])(t,{type:v,class:j,style:f(),disabled:b,onClick:m},{default:()=>[Object(n["createVNode"])("div",{class:g("content")},["left"===O&&l(),i(),"right"===O&&l()])]})}}});const h=Object(o["a"])(b);var v=h},bc1b:function(e,t,c){},d4ef:function(e,t,c){},d916:function(e,t,c){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},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")},e4cb:function(e,t,c){"use strict";c("36e1")},fcad:function(e,t,c){"use strict";c("d916")},fee7:function(e,t,c){}}]);
  2. //# sourceMappingURL=chunk-6391f8a1.edb5dd3f.js.map