1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-434a8406","chunk-6c149b5a"],{"0500":function(e,t,n){"use strict";var c=n("7a23"),o={id:"map",style:{width:"100%",height:"100%"}},a={class:"space-main",id:"spaceMain"},i=["id","onClick"],r=["src"],l=["src"],s={key:0,style:{"font-size":"12px"}},u={class:"map-toolbar"},d=["src"],p={class:"text-hidden"},f={class:"text-hidden"},b=["onClick"],m=["onClick"],g={style:{width:"100%",height:"100%"}};n("99af"),n("d81d"),n("4057"),n("a9e3");var h=n("5530"),v=n("d257"),j=n("d399"),O=(n("e7e5"),n("2241")),S=(n("e17f"),n("459d")),y={class:"ignore_com-top"},I={class:"page-search content-box ptheader"},C={action:"/"},k={class:"search-box"},w={class:"top"},B=function(e){return Object(c.pushScopeId)("data-v-44b481c8"),e=e(),Object(c.popScopeId)(),e}((function(){return Object(c.createElementVNode)("div",null,"最近查找",-1)})),N=["onClick"],D=["src"],E=["onClick"],x=["src"],A={style:{width:"100%",height:"100%"}},M=n("d961"),q=(n("5852"),n("6c02")),T=n("0613"),P={class:"ignore_com-top"},V={class:"page-search content-box ptheader"},F={class:"search-box"},L=["onClick"],X=["src"],R=Object(c.defineComponent)({emits:["closeMetting"],props:{projectId:{type:String,default:function(){return""}}},components:{VanSearch:M.a},setup:function(e,t){var n=T.a.state.user,o=Object(c.reactive)({parseImgUrl:v.y,spaceName:"",userInfo:n,searchData:[],goBack:function(){t.emit("closeMetting",null)},triggerSearchSpace:function(e){t.emit("closeMetting",e)},getSpaceLike:function(){var e={criteria:{projectId:n.projectId,localName:{$like:"%".concat(o.spaceName,"%")}}};Object(S.y)(e).then((function(e){"success"===e.result?o.searchData=null!=(e=null==e?void 0:e.content)?e:[]:o.searchData=[]}))}});return Object(c.onBeforeMount)((function(){o.getSpaceLike()})),Object(h.a)({},Object(c.toRefs)(o))}}),H=(n("b3aa"),n("e4cb"),n("6b0d")),Y=(H=n.n(H),R=H()(R,[["render",function(e,t,n,o,a,i){var r=Object(c.resolveComponent)("VanIcon");return Object(c.openBlock)(),Object(c.createElementBlock)(c.Fragment,null,[Object(c.createElementVNode)("div",P,[Object(c.createElementVNode)("div",{class:"header-return",onClick:t[0]||(t[0]=function(){return e.goBack&&e.goBack.apply(e,arguments)})},[Object(c.createVNode)(r,{name:"arrow-left"})])]),Object(c.createElementVNode)("div",V,[Object(c.createElementVNode)("div",F,[Object(c.createElementVNode)("div",null,[e.searchData&&e.searchData.length?(Object(c.openBlock)(!0),Object(c.createElementBlock)(c.Fragment,{key:0},Object(c.renderList)(e.searchData,(function(t){return Object(c.openBlock)(),Object(c.createElementBlock)("div",{class:"space-item",onClick:function(n){return e.triggerSearchSpace(t)}},[Object(c.createElementVNode)("img",{src:e.parseImgUrl("search-icon","icon_meetingroom.svg"),alt:""},null,8,X),Object(c.createElementVNode)("p",null,Object(c.toDisplayString)(t.localName),1)],8,L)})),256)):Object(c.createCommentVNode)("",!0)])])])],64)}],["__scopeId","data-v-1406cd06"]]),R=Object(c.defineComponent)({emits:["closeSearch"],props:{projectId:{type:String,default:function(){return""}}},components:{VanSearch:M.a,SpaceMetting:R},setup:function(e,t){Object(q.d)();var n=T.a.state.user,o=Object(c.reactive)({parseImgUrl:v.y,showMetting:!1,spaceName:"",userInfo:n,searchData:[],historySearchData:[],goBack:function(){t.emit("closeSearch",null)},closeMetting:function(e){o.showMetting=!1,t.emit("closeSearch",e)},onSearch:function(){o.spaceName&&o.getSpaceLike()},onCancel:function(){o.searchData=[],o.getHistorySearch()},clearHistorySearch:function(){o.historySearchData=[]},getHistorySearch:function(){o.historySearchData=Object(v.j)()},triggerSearchSpace:function(e){Object(v.A)(e),t.emit("closeSearch",e)},getSpaceLike:function(){var e={criteria:{projectId:n.projectId,localName:{$like:"%".concat(o.spaceName,"%")}}};Object(S.y)(e).then((function(e){"success"===e.result?o.searchData=null!=(e=null==e?void 0:e.content)?e:[]:o.searchData=[]}))},goMetting:function(){o.showMetting=!0}});return Object(c.onMounted)((function(){o.historySearchData=Object(v.j)()})),Object(h.a)({},Object(c.toRefs)(o))}}),R=(n("3dfb"),n("fcad"),H()(R,[["render",function(e,t,n,o,a,i){var r=Object(c.resolveComponent)("VanIcon"),l=Object(c.resolveComponent)("van-search"),s=Object(c.resolveComponent)("space-metting"),u=Object(c.resolveComponent)("van-popup");return Object(c.openBlock)(),Object(c.createElementBlock)(c.Fragment,null,[Object(c.createElementVNode)("div",y,[Object(c.createElementVNode)("div",{class:"header-return",onClick:t[0]||(t[0]=function(){return e.goBack&&e.goBack.apply(e,arguments)})},[Object(c.createVNode)(r,{name:"arrow-left"})])]),Object(c.createElementVNode)("div",I,[Object(c.createElementVNode)("form",C,[Object(c.createVNode)(l,{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(c.createElementVNode)("div",k,[Object(c.createElementVNode)("div",w,[B,Object(c.createElementVNode)("div",null,[Object(c.createElementVNode)("span",{onClick:t[2]||(t[2]=function(){return e.goMetting&&e.goMetting.apply(e,arguments)})},"查看所有会议室")])]),e.searchData&&e.searchData.length?(Object(c.openBlock)(!0),Object(c.createElementBlock)(c.Fragment,{key:0},Object(c.renderList)(e.searchData,(function(t){return Object(c.openBlock)(),Object(c.createElementBlock)("div",{class:"space-item",onClick:function(n){return e.triggerSearchSpace(t)}},[Object(c.createElementVNode)("img",{src:e.parseImgUrl("search-icon","icon_location.svg"),alt:""},null,8,D),Object(c.createElementVNode)("p",null,Object(c.toDisplayString)(t.localName),1)],8,N)})),256)):(Object(c.openBlock)(!0),Object(c.createElementBlock)(c.Fragment,{key:1},Object(c.renderList)(e.historySearchData,(function(t){return Object(c.openBlock)(),Object(c.createElementBlock)("div",{class:"space-item",onClick:function(n){return e.triggerSearchSpace(t)}},[Object(c.createElementVNode)("img",{src:e.parseImgUrl("search-icon","icon_location.svg"),alt:""},null,8,x),Object(c.createElementVNode)("p",null,Object(c.toDisplayString)(t.localName),1)],8,E)})),256))])]),Object(c.createVNode)(u,{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(c.withCtx)((function(){return[Object(c.createElementVNode)("div",A,[Object(c.createVNode)(s,{onCloseMetting:e.closeMetting},null,8,["onCloseMetting"])])]})),_:1},8,["show"])],64)}],["__scopeId","data-v-44b481c8"]])),{id:"myCanvas",class:"canvas-dom"});n("cb29"),n("d3b7"),n("3ca3"),n("ddb0");var W=n("6a79");M=Object(c.defineComponent)({props:{mapData:{type:Object,default:function(){}}},components:{VanSearch:M.a},setup:function(e,t){var o=Object(c.reactive)({mapData:e.mapData,iconData:[],parseImgUrl:v.y,canvasImageArr:{},ctx:{},setSpaceIcon:function(e){var t;e.canClick?(t=Object(W.a)(e.roomFuncType),e.icon=W.c[t].icon,e.selectIcon=W.c[t].selectIcon,e.backgroundColor=W.c[t].backgroundColor,e.bg=W.c[t].bg,e.icon=Object(v.y)("map-new-icon",e.icon),e.selectIcon=Object(v.y)("map-new-icon",e.selectIcon)):e.icon=""},scaleCanvas:function(e){o.mapData=e,document.querySelectorAll(".load-icon"),o.canvasImageArr={},o.initCanvas(1)},initCanvas:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=document.querySelector("#myCanvas"),c=t.getContext("2d");o.ctx=c,o.drawDpiBegin(t,c,o.mapData.width,o.mapData.height,e),(o.mapData&&o.mapData.spaceList||[]).map((function(t){var a,i,r,l;t.canClick?(l=t.circlePointArr,c.beginPath(),c.fillStyle=t.fillColor,a=[],i=[],t.pointArr.map((function(e,t){e.left=e.left,e.top=e.top,0==t?c.moveTo(e.left,e.top):c.lineTo(e.left,e.top),a.push(e.left),i.push(e.top)})),c.fill(),c.closePath(),c.beginPath(),l&&l.length&&(c.fillStyle=t.fillColor,c.lineTo(l[3].left,l[3].top),c.bezierCurveTo(l[2].left,l[2].top,l[1].left,l[1].top,l[0].left,l[0].top)),c.fill(),c.closePath(),o.MaxAndMin(a)[1],o.MaxAndMin(a)[0],o.MaxAndMin(i)[1],o.MaxAndMin(i)[0],c.beginPath(),c.font="12px serif",c.textAlign="center",c.fillStyle="#fff"===t.fillColor?"#000":"#8995BA",t.localName&&t.localName.length,c.fillText(t.localName,t.logoPointArr[0].left,t.logoPointArr[0].top,50),t.icon&&o.addIcon(t,1,{left:t.logoPointArr[0].left-25+15,top:+t.logoPointArr[0].top+5}),c.closePath()):(c.beginPath(),(r=new Image).src=n("2b48"),0==e?r.onload=function(){t.pointArr.map((function(e,t){0===t?c.moveTo(e.left,e.top):c.lineTo(e.left,e.top)}));var e=c.createPattern(r,"repeat");c.fillStyle=e,c.fill(),c.closePath(),c.lineWidth=2,c.strokeStyle="#DFE3ED",c.stroke()}:(t.pointArr.map((function(e,t){0===t?c.moveTo(e.left,e.top):c.lineTo(e.left,e.top)})),l=c.createPattern(r,"repeat"),c.fillStyle=l,c.fill(),c.closePath(),c.lineWidth=2,c.strokeStyle="#DFE3ED",c.stroke()))})),o.drawIcon(c,e),o.drawDpiEnd(t,c)},MaxAndMin:function(e){return[Math.min.apply(null,e),Math.max.apply(null,e)]},bindEvent:function(){document.querySelector("#myCanvas").addEventListener("click",o.detect)},drawDpiBegin:function(e,t,n,c){t.save(),t.clearRect(0,0,n,c);var o=window.devicePixelRatio;e.setAttribute("width",n*o),e.setAttribute("height",c*o),e.style.width=n+"px",e.style.height=c+"px",t.scale(o,o)},drawDpiEnd:function(e,t){t.restore()},detect:function(e){for(var n=document.querySelector("#myCanvas"),c=e.clientX-n.getBoundingClientRect().left,a=e.clientY-n.getBoundingClientRect().top,i=o.mapData&&o.mapData.spaceList||[],r=0;r<i.length;r++){var l=i[r],s=l.devicePointArr,u=l.pointArr,d=!1;if(s.map((function(e,t){c>=e.left&&c<=e.left+20&&a>=e.top&&a<e.top+20&&(d=!0)})),d)break;if(s={x:c,y:a},u.map((function(e){e.x=e.left,e.y=e.top})),o.queryPtInPolygon(s,u)){t.emit("checkSpace",l);break}}},queryPtInPolygon:function(e,t){for(var n=e,c={x:1e12,y:e.y},o=0,a=0;a<t.length-1;a++)1==i(n,c,t[a],t[a+1])&&o++;return 1==i(n,c,t[t.length-1],t[0])&&o++,o%2!=0;function i(e,t,n,c){var o={x:e.x-n.x,y:e.y-n.y},a={x:t.x-n.x,y:t.y-n.y},i=r(o,l={x:c.x-n.x,y:c.y-n.y})*r(a,l),l=(o={x:n.x-e.x,y:n.y-e.y},a={x:c.x-e.x,y:c.y-e.y},{x:t.x-e.x,y:t.y-e.y});return i<=0&&r(o,l)*r(a,l)<=0}function r(e,t){return e.x*t.y-e.y*t.x}},loadAllImages:function(e){return Promise.all(function(e){for(var t=[],n=0,c=e.length;n<c;n++)t.push(function(e){var t=new Image;return t.src=e,t.setAttribute("crossOrigin","Anonymous"),new Promise((function(e,n){t.onload=function(){e(t)}}))}(e[n]));return t}(e))},addIcon:function(e,t,n){t=e.spaceId+""+t,o.canvasImageArr[t]?o.canvasImageArr[t].iconPerstion=n:(e={url:e.icon,iconPerstion:n},o.canvasImageArr[t]=e)},drawIcon:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,c=o.canvasImageArr,a=[],i=[];for(t in c){var r=c[t];a.push(r.url),i.push(r.iconPerstion)}0==n?o.loadAllImages(a).then((function(t){(o.iconData=t).map((function(t,n){n=i[n],n.width=25,n.height=15,e.drawImage(t,n.left,n.top,n.width,n.height)}))})):o.iconData.map((function(t,n){n=i[n],n.width=25,n.height=15,e.drawImage(t,n.left,n.top,n.width,n.height)}))},init:function(e){o.mapData=e,o.initCanvas(),o.bindEvent()}});return Object(c.onMounted)((function(){})),Object(h.a)({},Object(c.toRefs)(o))}}),n("8c22"),M=H()(M,[["render",function(e,t,n,o,a,i){return Object(c.openBlock)(),Object(c.createElementBlock)("canvas",Y)}],["__scopeId","data-v-74cb39ba"]]),R=Object(c.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""}},mapType:{type:Number,default:function(){return 1}}},components:{SpaceSearch:R,CanvasBox:M},setup:function(e,t){Object(q.d)();var n={},o=window.document,a={screenWidth:o.body.clientWidth,screenHeight:o.body.clientHeight},i=Object(c.ref)(null),r=Object(c.reactive)({parseImgUrl:v.y,mapType:e.mapType,spaceInfo:null,isSetSpace:e.isSetSpace,widthMapScale:1,tempScale:.8,comMapScale:.8,heightScale:1,showSearch:!1,isSetSearchSpace:!1,showBuilding:!1,showFloor:!1,buildingItem:{buildingId:"",localName:""},floorData:[],floorItem:{},buildingData:[],mapData:n,copyMapDaata:n,selectArea:{},displacement:{scale:1,pageX:0,pageX2:0,originScale:0,moveable:!1},screenInfo:a,transformData:{},clearPreStyle:function(){var e=o.querySelector("#map");e.scrollLeft=0,e.scrollTop=0,e=o.querySelector("#spaceMain");r.displacement.scale=1,e&&(e.style.left="0px",e.style.top="0px")},swipe:function(e,t){function n(){}var c,o,a=!1,i=0,l=0,s=0,u=0,d={swipeLeft:n,swipeRight:n,swipeDown:n,swipeUp:n,drag:n};Object.assign(d,t),e.addEventListener("touchstart",(function(t){i=t.touches[0].pageX,l=t.touches[0].pageY,s=i-e.offsetLeft,u=l-e.offsetTop}),{passive:!0}),e.addEventListener("touchmove",(function(t){var n;r.displacement.moveable||(a=!0,c=t.touches[0].pageX,o=t.touches[0].pageY,t.mation={startX:i,startY:l,moveX:c,moveY:o,disX:s,disY:u},d.drag.call(e,t),a&&(n=Math.abs(c-i),(Math.abs(o-l)<n?0<c-i?d.swipeRight:d.swipeLeft:0<o-i?d.swipeDown:d.swipeUp).call(e,t)))}),{passive:!0}),e.addEventListener("touchend",(function(e){a=!1}))},mapScroll:function(){var e=o.querySelector("#spaceMain"),t=o.querySelector("#houseDes"),n=t?t.offsetHeight:0;r.swipe(e,{swipeLeft:function(t){r.displacement.moveable||e.offsetWidth<r.screenInfo.screenWidth||(e.offsetWidth-Math.abs(t.touches[0].pageX-t.mation.disX)<r.screenInfo.screenWidth?e.style.left=-(e.offsetWidth-r.screenInfo.screenWidth)+"px":e.style.left=t.touches[0].pageX-t.mation.disX+"px")},swipeRight:function(t){r.displacement.moveable||e.offsetWidth<r.screenInfo.screenWidth||(0<t.touches[0].pageX-t.mation.disX?e.style.left="0px":e.style.left=t.touches[0].pageX-t.mation.disX+"px")},swipeDown:function(t){var c;r.displacement.moveable||(c=r.screenInfo.screenHeight-n-20,e.offsetHeight<c||0<t.touches[0].pageY-t.mation.disY?e.style.top="0px":e.style.top=t.touches[0].pageY-t.mation.disY+"px")},swipeUp:function(t){var n,c,a;r.displacement.moveable||(n=(n=o.querySelector("#houseDes"))?n.offsetHeight:0,n=r.screenInfo.screenHeight-n-20,c=e.offsetHeight,a=t.touches[0].pageY-t.mation.disY,c<n?e.style.top="0px":c-Math.abs(a)<n/2?e.style.top=-(c-n/2)+"px":e.style.top=t.touches[0].pageY-t.mation.disY+"px")},drag:function(e){}})},closeSearch:function(e){r.showSearch=!1,e?(r.isSetSearchSpace=!0,r.loadingStart(),e={buildingId:e.buildingId,buildingName:"",floorId:e.floorId,floorName:"",spaceId:e.id},r.init(e)):r.isSetSearchSpace=!1},goSearch:function(){r.showSearch=!0},setSelectSpacePosition:function(e){setTimeout((function(){r.setScrollLeft(e),r.scrollTop(e)}))},setScrollLeft:function(e){var t=o.querySelector("#spaceMain"),n=0;0<(n=e.left+e.width>=r.screenInfo.screenWidth/2?~(n=e.left-r.screenInfo.screenWidth/2+e.width/2):0)&&(n=0),Math.abs(n)>t.offsetWidth-r.screenInfo.screenWidth&&(n=-(t.offsetWidth-r.screenInfo.screenWidth)),t.style.left=n+"px"},scrollTop:function(e){o.querySelector("#map");var t=o.querySelector("#spaceMain"),n=o.querySelector("#houseDes"),c=(n=n?n.offsetHeight:0,0);c=e.top+e.width>(r.screenInfo.screenHeight-n-20)/2?e.top-(r.screenInfo.screenHeight-n)/2+e.height/2:0;t.style.top=(c=0<(c=~c)?0:c)+"px"},checkSpace:function(e){e.disabled?Object(j.a)("该空间和平板没绑定,暂不支持查看"):(r.isSetSearchSpace=!1,e&&e.canClick?(1==r.mapType&&r.setSelectSpacePosition(e),r.selectArea=e,r.selectArea.buildingId=r.buildingItem.buildingId,r.setLocalSpaceInfo(),t.emit("changeSpace",r.selectArea)):Object(j.a)("不可选区域"))},comfirSetSpace:function(n){(n.spaceId===e.spaceInfo.spaceId?O.a.confirm({title:"取消常驻空间",confirmButtonColor:"#000000",cancelButtonColor:"#4D5262",message:"\n 是否取消常驻空间设置 ? "}).then((function(){t.emit("delPermanentSpace")})):O.a.confirm({title:"设置常驻空间",confirmButtonColor:"#000000",cancelButtonColor:"#4D5262",message:"是否将常驻空间设置为".concat(n.localName,"?")}).then((function(){r.selectArea=n,t.emit("changeSpaceId",r.selectArea.spaceId)}))).catch((function(){}))},setLocalSpaceInfo:function(){Object(v.w)(r.buildingItem.buildingId,r.floorItem.id,r.selectArea.spaceId);var e={buildingId:r.buildingItem.buildingId,buildingName:r.buildingItem.localName,floorId:r.floorItem.id,floorName:r.floorItem.localName,spaceId:r.selectArea.spaceId};Object(v.z)(e)},getDistance:function(e,t){return Math.hypot(t.x-e.x,t.y-e.y)},formateMapData:function(){var t=e.spaceData,n=r.mapData;if(n){r.setSpaceScale(),r.setTempScale(),n.width<3e3&&(r.comMapScale=.8),"Pj1101020007"==e.projectId&&(r.comMapScale=1.5),n.width=n.width*r.comMapScale,n.height=n.height*r.comMapScale;for(var c,o=null!=(c=null==n?void 0:n.spaceList)?c:[],a=0;a<o.length;a++){for(var i=o[a],l=(i.width=i.width*r.comMapScale,i.height=i.height*r.comMapScale,i.top=i.top*r.comMapScale,i.rotate=+i.rotate+"deg","Pj1101020007"==e.projectId?i.left=(i.left-120)*r.comMapScale:i.left=i.left*r.comMapScale,i.borderRadius=i.borderRadius?JSON.parse(i.borderRadius):"",!0),s=0;s<t.length;s++)if(i.spaceId===t[s].spaceId){l=!1;break}l&&(i.disabled=!0),r.setSpaceIcon(i)}r.copyMapDaata=JSON.parse(JSON.stringify(n))}},formateSpecialMapData:function(){var e=r.mapData;e&&(e.width=e.width*r.comMapScale,e.height=e.height*r.comMapScale,(e.spaceList||[]).map((function(e){var t=e.remark;t&&(t=JSON.parse(t),e.roomFuncType="300",e.fillColor="#fff",e.canClick=t.canClick,e.localName=t.localName,e.pointArr=t.pointArr,e.logoPointArr=t.logoPointArr,e.circlePointArr=t.circlePointArr,e.detailPointArr=t.detailPointArr,e.devicePointArr=t.devicePointArr,r.setSpaceIcon(e),e.pointArr.map((function(e){e.left=e.left*r.comMapScale,e.top=e.top*r.comMapScale})),e.logoPointArr.map((function(e){e.left=e.left*r.comMapScale,e.top=(+e.top-15)*r.comMapScale})),e.circlePointArr.map((function(e){e.left=e.left*r.comMapScale,e.top=e.top*r.comMapScale})))})),r.copyMapDaata=JSON.parse(JSON.stringify(e)))},formateSpecialMapScale:function(e){var t=JSON.parse(JSON.stringify(r.copyMapDaata));t&&(t.width=t.width*e,t.height=t.height*e,(t.spaceList||[]).map((function(t){t.pointArr.map((function(t){t.left=t.left*e,t.top=t.top*e})),t.logoPointArr.map((function(t){t.left=t.left*e,t.top=t.top*e})),t.circlePointArr.map((function(t){t.left=t.left*e,t.top=t.top*e}))})),r.mapData=t)},setSpaceScale:function(){var e,t=r.mapData;t&&(t=null!=(t=null==t?void 0:t.spaceList)?t:[],e=(e=(e=Math.min.apply(null,t.map((function(e){return e.height}))))<(t=Math.min.apply(null,t.map((function(e){return e.width}))))?e:t)||30,r.comMapScale=30/e)},setTempScale:function(){var e,t;r.tempScale=.4,r.mapData&&(t=r.mapData.width,(e=r.mapData.height)<t?(t=Math.ceil(t/r.screenInfo.screenWidth),r.tempScale=t<10?.4:t<20?.3:.25):(t=Math.ceil(e/r.screenInfo.screenHeight),r.tempScale=t<10?.4:t<20?.3:.25))},setMapBoxStyle:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=o.querySelector("#spaceMain");r.mapData&&r.mapData.width&&(t.style.width=r.mapData.width+"px",t.style.height=r.mapData.height+"px"),2==r.mapType&&(0==e?i.value.init(r.mapData):i.value.scaleCanvas(r.mapData))},setSpaceIcon:function(e){var t;e.canClick?(t=Object(W.a)(e.roomFuncType),e.icon=W.c[t].icon,e.selectIcon=W.c[t].selectIcon,e.backgroundColor=W.c[t].backgroundColor,e.bg=W.c[t].bg,e.icon=Object(v.y)("map-new-icon",e.icon),e.selectIcon=Object(v.y)("map-new-icon",e.selectIcon)):e.icon=""},midpoint:function(e,t,n,c){return[e+(n-e)/2,t+(c-t)/2]},updateMapStyle:function(){if(1==r.mapType){var e=JSON.parse(JSON.stringify(r.copyMapDaata));if(e){var t,n=null!=(t=null==e?void 0:e.spaceList)?t:[];e.width=e.width*r.displacement.scale,e.height=e.height*r.displacement.scale;for(var c=0;c<n.length;c++){var o=n[c];o.width=o.width*r.displacement.scale,o.height=o.height*r.displacement.scale,o.top=o.top*r.displacement.scale,o.left=o.left*r.displacement.scale}r.mapData=e}}else r.formateSpecialMapScale(r.displacement.scale);r.setMapBoxStyle(1)},updateMapPositon:function(e,t){var n=r.displacement.scaleCenter[0]-r.displacement.scaleCenter[0]*r.displacement.scale,c=r.displacement.scaleCenter[1]-r.displacement.scaleCenter[1]*r.displacement.scale;0<e&&r.displacement.scale<1&&(0<n&&(n=~n),0<c&&(c=~c)),e=r.displacement.top*r.displacement.scale+c,c=r.displacement.left*r.displacement.scale+n;t.offsetWidth<r.screenInfo.screenWidth&&(c=0),t.style.left=0<c?"0px":c+"px",t.offsetHeight<r.screenInfo.screenHeight?t.style.top=0:t.style.top=0<e?0:e+"px"},mapScale:function(){var e=o.querySelector("#spaceMain");e.addEventListener("touchstart",(function(t){t=t.touches;var n,c,o=t[0];t=t[1];r.displacement.pageX=o.pageX,r.displacement.pageY=o.pageY,r.displacement.moveable=!0,r.displacement.originScale=r.displacement.scale||1,t?(r.displacement.pageX2=t.pageX,r.displacement.pageY2=t.pageY,n=isNaN(parseInt(e.style.left))?0:parseInt(e.style.left),c=isNaN(parseInt(e.style.top))?0:parseInt(e.style.top),r.displacement.center=r.midpoint(o.pageX,o.pageY,t.pageX,t.pageY),r.displacement.left=n/r.displacement.scale,r.displacement.top=c/r.displacement.scale,r.displacement.scaleCenter=[r.displacement.center[0]/r.displacement.scale,r.displacement.center[1]/r.displacement.scale],r.displacement.scaleTranslateProportion=[r.displacement.scaleCenter[0]/(e.offsetWidth/r.displacement.scale),r.displacement.scaleCenter[1]/(e.offsetHeight/r.displacement.scale)],r.displacement.oldSize=[e.offsetWidth/r.displacement.scale,e.offsetHeight/r.displacement.scale]):r.displacement.moveable=!1}),{passive:!0}),e.addEventListener("touchmove",(function(t){var n;r.displacement.moveable&&(n=(t=t.touches)[0],(t=t[1])&&(r.displacement.pageX2||(r.displacement.pageX2=t.pageX),r.displacement.pageY2||(r.displacement.pageY2=t.pageY),n=r.getDistance({x:n.pageX,y:n.pageY},{x:t.pageX,y:t.pageY})/r.getDistance({x:r.displacement.pageX,y:r.displacement.pageY},{x:r.displacement.pageX2,y:r.displacement.pageY2}),n=(t=1.5<(t=(t=r.displacement.originScale*n)<r.tempScale?r.tempScale:t)?1.5:t)-r.displacement.scale,r.displacement.scale=t,0!=n&&(r.updateMapPositon(n,e),r.updateMapStyle())))}),{passive:!0}),e.addEventListener("touchend",(function(){r.displacement.moveable=!0}))},getBuildingList:function(){var t={criteria:{projectId:e.projectId},orders:[{asc:!0,column:"localId"}]};Object(S.g)(t).then((function(e){"success"===e.result&&(e=null!=(e=null==e?void 0:e.content)?e:[],r.buildingData=e,r.setBuildingName())}))},checkBuilding:function(){r.showBuilding=!0},checkFloor:function(){r.showFloor=!0},comfirmFloor:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];"4555556"==e?(r.floorItem={id:"4555556"},r.mapType=2):(r.floorItem=e,r.mapType=1),r.showFloor=!1,r.loadingStart(),r.getMapInfo(t),Object(v.v)(r.buildingItem.buildingId,r.floorItem.id)},comfirmBuilding:function(e){r.showBuilding=!1,r.buildingItem.buildingId=e.id,r.buildingItem.localName=e.localName,r.loadingStart(),r.getFloorList()},loadingStart:function(){j.a.loading({duration:0,forbidClick:!0,message:"加载中..."})},loadinngEnd:function(){j.a.clear()},getFloorList:function(){var t,n=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];r.buildingItem.buildingId&&(t={criteria:{projectId:e.projectId,buildingId:r.buildingItem.buildingId},orders:[{asc:!0,column:"localId"}]},Object(S.m)(t).then((function(e){var t=e;"success"===e.result?(r.floorData=null!=(e=null==t?void 0:t.content)?e:[],r.setFloorName()):r.floorData=[],n&&r.floorData.length&&(r.getHistorySelectFloor(),r.getMapInfo()),r.loadinngEnd()})).catch((function(){r.loadinngEnd()})))},getMapInfo:function(){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n={projectId:e.projectId,floorId:r.floorItem.id};Object(S.o)(n).then((function(e){"success"===e.result&&(r.mapData=null!=(e=null==e?void 0:e.data)?e:null,r.clearPreStyle(),2===r.mapType?r.formateSpecialMapData():r.formateMapData(),t&&(e=r.getFirstSelectSpace(t))&&(r.selectArea=e),r.setSelectSpacePosition(r.selectArea),Object(c.nextTick)((function(){r.setMapBoxStyle(),r.mapScale(),r.mapScroll()})))})).catch((function(){r.loadinngEnd()}))},getHistorySelectFloor:function(){var e=Object(v.k)(),t=!1,n=e[r.buildingItem.buildingId];r.floorData.map((function(e){e.id===n&&(t=!0,r.floorItem=e)})),t||(r.floorItem=r.floorData[0])},getHistorySpace:function(){var e=r.mapData,t=Object(v.q)();if(e){var n=!1,c=null!=(e=null==e?void 0:e.spaceList)?e:[],o=t["".concat(r.buildingItem.buildingId,",").concat(r.floorItem.id)];if(o&&c.map((function(e){o===e.spaceId&&(r.selectArea=e,n=!0)})),!n)for(var a=0;a<c.length;a++)if(c[a].canClick){r.selectArea=c[a];break}}},getFirstSelectSpace:function(e){var t=null,n=r.mapData;if(n&&e)for(var c=null!=(n=null==n?void 0:n.spaceList)?n:[],o=0;o<c.length;o++)if(c[o].spaceId===e.spaceId){t=c[o];break}return t},setDefaultSpace:function(e){e&&(r.buildingItem.buildingId=e.buildingId,r.buildingItem.localName=e.buildingName||"",r.floorItem={id:e.floorId,localName:e.floorName||""})},init:function(e){e&&r.setDefaultSpace(e),r.getBuildingList(),r.getFloorList(!1),r.getMapInfo(!1,e)},setBuildingName:function(){r.buildingItem.buildingId?r.buildingData.map((function(e){e.id===r.buildingItem.buildingId&&(r.buildingItem.localName=e.localName)})):r.buildingItem={buildingId:r.buildingData[0].id,localName:r.buildingData[0].localName}},setFloorName:function(){r.floorItem.id?r.floorData.map((function(e){e.id===r.floorItem.id&&(r.floorItem.localName=e.localName)})):r.floorItem=r.floorData[0]}});return Object(c.watch)(e,(function(e){}),{deep:!1,immediate:!0}),Object(c.onMounted)((function(){r.spaceInfo=e.spaceInfo,r.buildingItem.buildingId=e.buildingId,r.floorItem.id=e.floorId,r.spaceInfo.buildingId=e.buildingId,r.spaceInfo.floorId=e.floorId,r.selectArea.spaceId=e.spaceInfo.spaceId,r.init(r.spaceInfo)})),Object(h.a)({canvasRef:i},Object(c.toRefs)(r))}});n("e108"),t.a=H()(R,[["render",function(e,t,n,h,v,j){var O=Object(c.resolveComponent)("canvas-box"),S=Object(c.resolveComponent)("van-popup"),y=Object(c.resolveComponent)("space-search");return Object(c.openBlock)(),Object(c.createElementBlock)("div",o,[Object(c.createElementVNode)("div",a,[1==e.mapType?(Object(c.openBlock)(!0),Object(c.createElementBlock)(c.Fragment,{key:0},Object(c.renderList)(e.mapData.spaceList,(function(t,n){return Object(c.openBlock)(),Object(c.createElementBlock)("div",{class:"space-box",style:Object(c.normalizeStyle)({width:t.width+"px",height:t.height+"px",top:t.top+"px",left:t.left+"px",transform:"rotate("+t.rotate+")",borderRadius:t.borderRadius[0]+"px "+t.borderRadius[1]+"px "+t.borderRadius[2]+"px "+t.borderRadius[3]+"px"}),key:"map"+n},[Object(c.createElementVNode)("div",{class:Object(c.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(c.withModifiers)((function(n){return e.checkSpace(t)}),["stop"]),style:Object(c.normalizeStyle)({backgroundColor:t.backgroundColor||""})},[Object(c.withDirectives)(Object(c.createElementVNode)("div",{class:Object(c.normalizeClass)(["device",e.selectArea.spaceId===t.spaceId?"select-device":""])},[e.selectArea.spaceId!==t.spaceId&&t.icon?(Object(c.openBlock)(),Object(c.createElementBlock)("img",{key:0,src:t.icon},null,8,r)):(Object(c.openBlock)(),Object(c.createElementBlock)("img",{key:1,src:t.selectIcon,class:"select-icon",alt:""},null,8,l)),t.localName?(Object(c.openBlock)(),Object(c.createElementBlock)(c.Fragment,{key:2},[80<t.height&&12*t.localName.length<t.width||e.selectArea.spaceId===t.spaceId?(Object(c.openBlock)(),Object(c.createElementBlock)("span",s,Object(c.toDisplayString)(t.localName),1)):Object(c.createCommentVNode)("",!0)],64)):Object(c.createCommentVNode)("",!0)],2),[[c.vShow,24<t.width*e.displacement.scale&&24<t.height*e.displacement.scale]])],14,i)],4)})),128)):(Object(c.openBlock)(),Object(c.createBlock)(O,{key:1,class:"canvasBox",ref:"canvasRef",mapData:e.mapData,onCheckSpace:e.checkSpace},null,8,["mapData","onCheckSpace"]))]),Object(c.createElementVNode)("div",u,[Object(c.createElementVNode)("img",{src:e.parseImgUrl("map-icon","icon-search-big.svg"),onClick:t[0]||(t[0]=Object(c.withModifiers)((function(){return e.goSearch&&e.goSearch.apply(e,arguments)}),["stop"])),class:"icon-search",alt:""},null,8,d),Object(c.createElementVNode)("div",{class:"toolbar-item",onClick:t[1]||(t[1]=Object(c.withModifiers)((function(){return e.checkFloor&&e.checkFloor.apply(e,arguments)}),["stop"]))},[Object(c.createElementVNode)("span",p,Object(c.toDisplayString)(e.floorItem.localName),1)]),Object(c.createElementVNode)("div",{class:"toolbar-item",onClick:t[2]||(t[2]=Object(c.withModifiers)((function(){return e.checkBuilding&&e.checkBuilding.apply(e,arguments)}),["stop"]))},[Object(c.createElementVNode)("span",f,Object(c.toDisplayString)(e.buildingItem.localName),1)])]),Object(c.createVNode)(S,{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(c.withCtx)((function(){return[(Object(c.openBlock)(!0),Object(c.createElementBlock)(c.Fragment,null,Object(c.renderList)(e.buildingData,(function(t){return Object(c.openBlock)(),Object(c.createElementBlock)("div",{class:Object(c.normalizeClass)(["buiding-item",e.buildingItem.buildingId===t.id?"active":""]),key:t.id+"X",onClick:Object(c.withModifiers)((function(n){return e.comfirmBuilding(t)}),["stop"])},Object(c.toDisplayString)(t.localName),11,b)})),128))]})),_:1},8,["show"]),Object(c.createVNode)(S,{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(c.withCtx)((function(){return[(Object(c.openBlock)(!0),Object(c.createElementBlock)(c.Fragment,null,Object(c.renderList)(e.floorData,(function(t){return Object(c.openBlock)(),Object(c.createElementBlock)("div",{class:Object(c.normalizeClass)(["buiding-item",e.floorItem.id===t.id?"active":""]),key:t.id,onClick:Object(c.withModifiers)((function(n){return e.comfirmFloor(t)}),["stop"])},Object(c.toDisplayString)(t.localName),11,m)})),128))]})),_:1},8,["show"]),Object(c.createVNode)(S,{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(c.withCtx)((function(){return[Object(c.createElementVNode)("div",g,[Object(c.createVNode)(y,{onCloseSearch:e.closeSearch},null,8,["onCloseSearch"])])]})),_:1},8,["show"])])}],["__scopeId","data-v-4cb6d436"]])},1703:function(e,t,n){},2241:function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));var c=n("7a23"),o=n("f344"),a=(t=n("c199"),n("1da4")),i=n("fe7e"),r=n("f691"),l=n("7e3e"),s=n("8da3"),u=n("b1d2"),d=n("8405"),p=n("f827"),f=n("e41f"),b=n("b650"),m=n("f465");const[g,h]=Object(i.a)("action-bar"),v=Symbol(g);var j={safeAreaInsetBottom:r.g};j=Object(c.defineComponent)({name:g,props:j,setup(e,{slots:t}){const n=Object(m.f)(v)["linkChildren"];return n(),()=>{var n;return Object(c.createVNode)("div",{class:[h(),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[null==(n=t.default)?void 0:n.call(t)])}}});const O=Object(t.a)(j);var S=n("4eda"),y=n("b070");const[I,C]=Object(i.a)("action-bar-button");j=Object(o.a)({},y.b,{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean}),n=Object(c.defineComponent)({name:I,props:j,setup(e,{slots:t}){const n=Object(y.c)(),{parent:o,index:a}=Object(m.k)(v),i=Object(c.computed)(()=>{var e;if(o)return!((e=o.children[a.value-1])&&"isButton"in e)}),r=Object(c.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(c.createVNode)(b.a,{class:C([o,{last:r.value,first:i.value}]),size:"large",type:o,icon:a,color:s,loading:u,disabled:d,onClick:n},{default:()=>[t.default?t.default():l]})}}});const k=Object(t.a)(n),[w,B,N]=Object(i.a)("dialog");j=Object(o.a)({},p.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});const D=[...p.a,"transition","closeOnPopstate"];var E=Object(c.defineComponent)({name:w,props:j,emits:["confirm","cancel","keydown","update:show"],setup(e,{emit:t,slots:n}){const a=Object(c.ref)(),i=Object(c.reactive)({confirm:!1,cancel:!1}),r=e=>t("update:show",e),p=t=>{var n;r(!1),null!=(n=e.callback)&&n.call(e,t)};var m=n=>()=>{e.show&&(t(n),e.beforeClose?(i[n]=!0,Object(l.a)(e.beforeClose,{args:[n],done(){p(n),i[n]=!1},canceled(){i[n]=!1}})):p(n))};const g=m("cancel"),h=m("confirm"),v=Object(c.withKeys)(n=>{var c;if(n.target===(null==(c=null==(c=a.value)?void 0:c.popupRef)?void 0:c.value)){const c={Enter:e.showConfirmButton?h:o.d,Escape:e.showCancelButton?g:o.d};c[n.key](),t("keydown",n)}},["enter","esc"]),j=()=>{if(n.default)return Object(c.createVNode)("div",{class:B("content")},[n.default()]);var{title:t,message:o,allowHtml:a}=e;return o?(o=!(!t&&!n.title),Object(c.createVNode)("div",{key:a?1:0,class:B("content",{isolated:!o})},[(t=>{const{message:n,allowHtml:o,messageAlign:a}=e;t=B("message",{"has-title":t,[a]:a});var i=Object(s.c)(n)?n():n;return o&&"string"==typeof i?Object(c.createVNode)("div",{class:t,innerHTML:i},null):Object(c.createVNode)("div",{class:t},[i])})(o)])):void 0},S=()=>n.footer?n.footer():"round-button"===e.theme?Object(c.createVNode)(O,{class:B("footer")},{default:()=>[e.showCancelButton&&Object(c.createVNode)(k,{type:"warning",text:e.cancelButtonText||N("cancel"),class:B("cancel"),color:e.cancelButtonColor,loading:i.cancel,onClick:g},null),e.showConfirmButton&&Object(c.createVNode)(k,{type:"danger",text:e.confirmButtonText||N("confirm"),class:B("confirm"),color:e.confirmButtonColor,loading:i.confirm,onClick:h},null)]}):Object(c.createVNode)("div",{class:[u.c,B("footer")]},[e.showCancelButton&&Object(c.createVNode)(b.a,{size:"large",text:e.cancelButtonText||N("cancel"),class:B("cancel"),style:{color:e.cancelButtonColor},loading:i.cancel,onClick:g},null),e.showConfirmButton&&Object(c.createVNode)(b.a,{size:"large",text:e.confirmButtonText||N("confirm"),class:[B("confirm"),{[u.a]:e.showCancelButton}],style:{color:e.confirmButtonColor},loading:i.confirm,onClick:h},null)]);return()=>{var{width:t,title:i,theme:l,message:s,className:u}=e;return Object(c.createVNode)(f.a,Object(c.mergeProps)({ref:a,role:"dialog",class:[B([l]),u],style:{width:Object(d.b)(t)},tabindex:0,"aria-labelledby":i||s,onKeydown:v,"onUpdate:show":r},Object(o.e)(e,D)),{default:()=>[(()=>{var t=n.title?n.title():e.title;if(t)return Object(c.createVNode)("div",{class:B("header",{isolated:!e.message&&!n.default})},[t])})(),j(),S()]})}}});let x;function A(e){return o.c?new Promise((t,n)=>{var i;x||(i={setup(){const{state:e,toggle:t}=Object(a.b)();return()=>Object(c.createVNode)(E,Object(c.mergeProps)(e,{"onUpdate:show":t}),null)}},({instance:x}=Object(a.a)(i))),x.open(Object(o.a)({},A.currentOptions,e,{callback:e=>{("confirm"===e?t:n)(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(o.a)({},A.defaultOptions),(A.alert=A).confirm=e=>A(Object(o.a)({showCancelButton:!0},e)),A.close=()=>{x&&x.toggle(!1)},A.setDefaultOptions=e=>{Object(o.a)(A.currentOptions,e)},A.resetDefaultOptions=()=>{A.currentOptions=Object(o.a)({},A.defaultOptions)},A.Component=Object(t.a)(E),A.install=e=>{e.use(A.Component),e.config.globalProperties.$dialog=A};var M=A},"2b48":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA3SURBVHgBzcmxDQAgCAVRPxO5ipM6ko0xxkYnQKUHaq654iEZ9bUzMSo8ZLpFxTFPk4dAycXfA1ISQWorFT5NAAAAAElFTkSuQmCC"},"2fcb":function(e,t,n){},"36e1":function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},"3dfb":function(e,t,n){"use strict";n("7a89")},4057:function(e,t,n){n=n("23e7");var c=Math.hypot,o=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,forced:!!c&&c(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,c,i=0,r=0,l=arguments.length,s=0;r<l;)s<(n=o(arguments[r++]))?(i=i*(c=s/n)*c+1,s=n):i+=0<n?(c=n/s)*c:n;return s===1/0?1/0:s*a(i)}})},"459d":function(e,t,n){"use strict";n.d(t,"i",(function(){return i})),n.d(t,"D",(function(){return r})),n.d(t,"x",(function(){return l})),n.d(t,"p",(function(){return s})),n.d(t,"k",(function(){return u})),n.d(t,"l",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"n",(function(){return f})),n.d(t,"S",(function(){return b})),n.d(t,"B",(function(){return m})),n.d(t,"q",(function(){return g})),n.d(t,"T",(function(){return h})),n.d(t,"a",(function(){return v})),n.d(t,"h",(function(){return j})),n.d(t,"g",(function(){return O})),n.d(t,"m",(function(){return S})),n.d(t,"o",(function(){return y})),n.d(t,"w",(function(){return I})),n.d(t,"y",(function(){return C})),n.d(t,"G",(function(){return k})),n.d(t,"u",(function(){return w})),n.d(t,"d",(function(){return B})),n.d(t,"C",(function(){return N})),n.d(t,"z",(function(){return D})),n.d(t,"A",(function(){return E})),n.d(t,"M",(function(){return x})),n.d(t,"H",(function(){return A})),n.d(t,"O",(function(){return M})),n.d(t,"j",(function(){return q})),n.d(t,"t",(function(){return T})),n.d(t,"Q",(function(){return P})),n.d(t,"E",(function(){return V})),n.d(t,"e",(function(){return F})),n.d(t,"N",(function(){return L})),n.d(t,"c",(function(){return X})),n.d(t,"I",(function(){return R})),n.d(t,"s",(function(){return H})),n.d(t,"r",(function(){return Y})),n.d(t,"L",(function(){return W})),n.d(t,"R",(function(){return U})),n.d(t,"P",(function(){return G})),n.d(t,"v",(function(){return _})),n.d(t,"K",(function(){return z})),n.d(t,"F",(function(){return J})),n.d(t,"f",(function(){return Q})),n.d(t,"J",(function(){return K})),n("99af");var c=n("59b9"),o=n("ba72"),a=n("2de2"),i=function(e){return Object(c.b)().request("/api/company/config/".concat(e.companyId),o.b.GET,void 0,o.a.json)},r=function(e){return Object(c.b)().request("".concat(a.c,"weather/getCurrent?").concat(e),o.b.GET,void 0,o.a.json)},l=function(e){return Object(c.b)().request("".concat(a.b,"space/property"),o.b.POST,e,o.a.json)},s=function(e){return Object(c.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(c.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(c.b)().request("".concat(a.b,"custom/feedback/documents"),o.b.POST,e,o.a.json)},p=function(e){return Object(c.b)().request("".concat(a.b,"custom/feedbackCreate/v2"),o.b.POST,e,o.a.json)},f=function(e){return Object(c.b)({timeout:15e4}).request("".concat(a.b,"light/status/query?spaceId=").concat(e.spaceId),o.b.GET,void 0,o.a.json)},b=function(e){return Object(c.c)("".concat(a.b,"light/onoff/set"),e)},m=function(e){return Object(c.c)("".concat(a.b,"light/onoff/setSatus"),e)},g=function(e){return Object(c.b)().request("".concat(a.b,"object/objectDataEqpGroup/query"),o.b.POST,e,o.a.json)},h=function(e){return Object(c.b)().request("".concat(a.b,"meeting/room/scene/switchover"),o.b.POST,e,o.a.json)},v=function(e){return Object(c.b)().request("".concat(a.b,"customScene/create"),o.b.POST,e,o.a.json)},j=function(e){return Object(c.b)().request("".concat(a.b,"/spaceAdjust/queryPropertyData?").concat(e),o.b.GET,void 0,o.a.json)},O=function(e){return Object(c.b)().request("".concat(a.c,"object/building/query"),o.b.POST,e,o.a.json)},S=function(e){return Object(c.b)().request("".concat(a.c,"object/floor/query"),o.b.POST,e,o.a.json)},y=function(e){return Object(c.b)().request("".concat(a.d,"map/queryMapInfo"),o.b.POST,e,o.a.json)},I=function(e){return Object(c.b)().request("".concat(a.c,"object/equipment/querySpaceEquipType?").concat(e),o.b.GET,void 0,o.a.json)},C=function(e){return Object(c.b)().request("".concat(a.c,"object/space/query"),o.b.POST,e,o.a.json)},k=function(e){return Object(c.b)().request("".concat(a.d,"permanentSpace/save"),o.b.POST,e,o.a.json)},w=function(){return Object(c.b)().request("".concat(a.d,"permanentSpace/query"),o.b.GET,void 0,o.a.json)},B=function(e){return Object(c.b)().request("".concat(a.d,"permanentSpace/delete?").concat(e))},N=function(){return Object(c.b)().request("".concat(a.d,"permanentSpace/queryZJ"),o.b.GET,void 0,o.a.json)},D=function(){return Object(c.b)().request("".concat(a.c,"object/equipment/querySpaceModeSet"),o.b.GET,void 0,o.a.json)},E=function(){return Object(c.b)().request("".concat(a.c,"object/equipment/querySpaceTempSet"),o.b.GET,void 0,o.a.json)},x=function(e){return Object(c.b)().request("".concat(a.d,"scene/querySpaceSceneConfig?").concat(e),o.b.GET,void 0,o.a.json)},A=function(e){return Object(c.b)().request("".concat(a.b,"customScene/queryCustomAndScence?").concat(e),o.b.GET,void 0,o.a.json)},M=function(e){return Object(c.c)("".concat(a.b,"customScene/saveBatchCustomScene"),e)},q=function(e){return Object(c.b)().request("".concat(a.d,"padSpace/getDefaultLocation?").concat(e),o.b.GET,void 0,o.a.json)},T=function(e){return Object(c.b)().request("".concat(a.d,"padSpace/getPadSpaceList?").concat(e),o.b.GET,void 0,o.a.json)},P=function(e){return Object(c.b)().request("".concat(a.d,"padSpace/saveWorkSpace"),o.b.POST,e,o.a.json)},V=function(e){return Object(c.b)().request("".concat(a.d,"padSpace/insertWorkSpace"),o.b.POST,e,o.a.json)},F=function(e){return Object(c.b)().request("".concat(a.d,"padSpace/deleteWorkSpace"),o.b.POST,e,o.a.json)},L=function(e){return Object(c.b)().request("".concat(a.d,"padSpace/queryWorkSpace"),o.b.POST,e,o.a.json)},X=function(e){return Object(c.b)().request("".concat(a.d,"padSpace/queryWorkSpace"),o.b.POST,e,o.a.json)},R=function(e){return Object(c.b)().request("".concat(a.e,"wechat-service-duoduoenv/duoduoenv/customerservice/query"),o.b.POST,e,o.a.json)},H=function(e){return Object(c.b)().request("".concat(a.d,"padLogin/getPadQrCodeStatus?").concat(e),o.b.GET,void 0,o.a.json)},Y=function(e){return Object(c.b)().request("".concat(a.d,"padImage/queryImageByFuncType?").concat(e),o.b.GET,void 0,o.a.json)},W=function(e){return Object(c.b)().request("".concat(a.b,"ctrl/querySpaceConditioners?").concat(e),o.b.GET,void 0,o.a.json)},U=function(e){return Object(c.c)("".concat(a.b,"ctrl/set"),e)},G=function(e){return Object(c.b)().request("".concat(a.d,"/map/saveMapPointInfo"),o.b.POST,e,o.a.json)},_=function(e){return Object(c.b)().request("".concat(a.a,"equipmentRun/queryEquipmentRunConfig?").concat(e),o.b.GET,void 0,o.a.json)},z=function(e){return Object(c.b)().request("".concat(a.b,"ctrl/querySapceFloorHeating?").concat(e),o.b.GET,void 0,o.a.json)},J=function(e){return Object(c.c)("".concat(a.d,"padSpace/insertWorkSpaceBatch"),e)},Q=function(e){return Object(c.c)("".concat(a.d,"padSpace/deleteWorkSpaceBatch"),e)},K=function(e){return Object(c.b)().request("".concat(a.b,"ctrl/queryEquipmentStatusInfo?").concat(e),o.b.GET,void 0,o.a.json)}},5899:function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(e,t,n){function c(e){return function(t){return t=String(o(t)),1&e&&(t=t.replace(a,"")),2&e?t.replace(i,""):t}}var o=n("1d80"),a=(n="["+n("5899")+"]",RegExp("^"+n+n+"*")),i=RegExp(n+n+"*$");e.exports={start:c(1),end:c(2),trim:c(3)}},"5ac8":function(e,t,n){},"5c09":function(e,t,n){},"6a79":function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var c={"公共区域":{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:"officeroom.svg",selectIcon:"officeroomselected.svg",backgroundColor:"#fff",circleColor:"#7582B0"},"办公室":{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"}},o=function(e){return"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?"护士站":"公共区域"},a=function(e){return"312"===e||"311"===e||"310"===e?"个人":"320"===e||"321"===e||"322"===e||"323"===e?"会议室":"开放"}},"7a89":function(e,t,n){},"81d5":function(e,t,n){"use strict";var c=n("7b0b"),o=n("23cb"),a=n("50c4");e.exports=function(e){for(var t=c(this),n=a(t.length),i=arguments.length,r=o(1<i?arguments[1]:void 0,n),l=(i=2<i?arguments[2]:void 0,void 0===i?n:o(i,n));r<l;)t[r++]=e;return t}},"8c22":function(e,t,n){"use strict";n("5ac8")},a9e3:function(e,t,n){"use strict";function c(e){var t,n,c,o,a,i,r,l=d(e,!1);if("string"==typeof l&&2<l.length)if(43===(e=(l=h(l)).charCodeAt(0))||45===e){if(88===(t=l.charCodeAt(2))||120===t)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:n=2,c=49;break;case 79:case 111:n=8,c=55;break;default:return+l}for(a=(o=l.slice(2)).length,i=0;i<a;i++)if((r=o.charCodeAt(i))<48||c<r)return NaN;return parseInt(o,n)}return+l}var o=n("83ab"),a=n("da84"),i=n("94ca"),r=n("6eeb"),l=n("5135"),s=n("c6b6"),u=n("7156"),d=n("c04e"),p=n("d039"),f=n("7c73"),b=n("241c").f,m=n("06cf").f,g=n("9bf2").f,h=n("58a8").trim,v="Number",j=a[v],O=j.prototype,S=s(f(O))==v;if(i(v,!j(" 0o1")||!j("0b1")||j("+0x1"))){for(var y,I=function(e){e=arguments.length<1?0:e;var t=this;return t instanceof I&&(S?p((function(){O.valueOf.call(t)})):s(t)!=v)?u(new j(c(e)),t,I):c(e)},C=o?b(j):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),k=0;C.length>k;k++)l(j,y=C[k])&&!l(I,y)&&g(I,y,m(j,y));(I.prototype=O).constructor=I,r(a,v,I)}},b3aa:function(e,t,n){"use strict";n("fee7")},b650:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return m}));t=n("c199");var c=n("7a23"),o=n("fe7e"),a=n("f344"),i=n("f691"),r=n("4a89"),l=n("b1d2"),s=n("b070"),u=n("ad06"),d=n("543e");const[p,f]=Object(o.a)("button");n=Object(a.a)({},s.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")}),o=Object(c.defineComponent)({name:p,props:n,emits:["click"],setup(e,{emit:t,slots:n}){const o=Object(s.c)(),a=()=>e.loading?n.loading?n.loading():Object(c.createVNode)(d.a,{size:e.loadingSize,type:e.loadingType,class:f("loading")},null):n.icon?Object(c.createVNode)("div",{class:f("icon")},[n.icon()]):e.icon?Object(c.createVNode)(u.a,{name:e.icon,class:f("icon"),classPrefix:e.iconPrefix},null):void 0,i=n=>{e.loading?Object(r.e)(n):e.disabled||(t("click",n),o())};return()=>{const{tag:t,type:o,size:r,block:s,round:u,plain:d,square:p,loading:b,disabled:m,hairline:g,nativeType:h,iconPosition:v}=e;var j=[f([o,r,{plain:d,block:s,round:u,square:p,loading:b,disabled:m,hairline:g}]),{[l.b]:g}];return Object(c.createVNode)(t,{type:h,class:j,style:(()=>{const{color:t,plain:n}=e;if(t){const e={color:n?t:"white"};return n||(e.background=t),t.includes("gradient")?e.border=0:e.borderColor=t,e}})(),disabled:m,onClick:i},{default:()=>[Object(c.createVNode)("div",{class:f("content")},["left"===v&&a(),(()=>{let t;if(t=e.loading?e.loadingText:n.default?n.default():e.text)return Object(c.createVNode)("span",{class:f("text")},[t])})(),"right"===v&&a()])]})}}});const b=Object(t.a)(o);var m=b},bc1b:function(e,t,n){},cb29:function(e,t,n){var c=n("23e7"),o=n("81d5");n=n("44d2");c({target:"Array",proto:!0},{fill:o}),n("fill")},d4ef:function(e,t,n){},d916:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},e108:function(e,t,n){"use strict";n("5c09")},e17f:function(e,t,n){"use strict";n("68ef"),n("d4ef"),n("cb51"),n("3743"),n("e3b3"),n("bc1b"),n("1703"),n("a71a"),n("4d75"),n("2fcb")},e4cb:function(e,t,n){"use strict";n("36e1")},fcad:function(e,t,n){"use strict";n("d916")},fee7:function(e,t,n){}}]);
|