(function(e){function t(t){for(var r,a,i=t[0],u=t[1],d=t[2],s=0,f=[];s0&&void 0!==arguments[0]?arguments[0]:{timeout:""},t={baseURL:O.host,headers:{token:Object(g["d"])(),"sso-token":Object(g["d"])(),"X-Forwarded-Token":Object(g["d"])()}};e.timeout&&(t.timeout=e.timeout);var n=new f["c"](t);return n.httpClient.interceptors.request.use((function(e){var t=Object(v["r"])(),n=Object(v["z"])(t),r=e.url;return-1!=r.indexOf("?")?e.url=e.url+"&"+n:e.url=e.url+"?"+n,e}),(function(e){})),n.httpClient.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)})),n},S=function(e,t){return E().httpClient.post(e,t).then((function(e){var t=JSON.parse(JSON.stringify(e.data));return e.status>=200&&e.status<300?Promise.resolve(t):Promise.reject(t)})).catch(function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.reject(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"accessToken",t=location.search,n=new Object;if(-1!=t.indexOf("?"))for(var r=t.substr(1),a=r.split("&"),c=0;c=3&&(!i||i>=3)?3:m>=2&&(!i||i>=2)?2:1:1,u=1/i}if(a.setAttribute("data-dpr",i),!c)if(c=r.createElement("meta"),c.setAttribute("name","viewport"),c.setAttribute("content","initial-scale="+u+", maximum-scale="+u+", minimum-scale="+u+", user-scalable=no"),a.firstElementChild)a.firstElementChild.appendChild(c);else{var p=r.createElement("div");p.appendChild(c),r.write(p.innerHTML)}function O(){var t=a.getBoundingClientRect().width;t/i>1366&&(t=1366*i);var n=t/10;a.style.fontSize=n+"px",d.rem=e.rem=n}e.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout(O,300)}),!1),e.addEventListener("pageshow",(function(e){e.persisted&&(clearTimeout(n),n=setTimeout(O,300))}),!1),"complete"===r.readyState?r.body.style.fontSize=12*i+"px":r.addEventListener("DOMContentLoaded",(function(e){r.body.style.fontSize=12*i+"px"}),!1),O(),d.dpr=e.dpr=i,d.refreshRem=O,d.rem2px=function(e){var t=parseFloat(e)*this.rem;return"string"===typeof e&&e.match(/rem$/)&&(t+="px"),t},d.px2rem=function(e){var t=parseFloat(e)/this.rem;return"string"===typeof e&&e.match(/px$/)&&(t+="rem"),t}}(window,window["lib"]||(window["lib"]={}))},"7ef2":function(e,t,n){"use strict";n("3098")},"93da":function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e["SET_AIR"]="SET_AIR",e["SET_LIGHT"]="SET_LIGHT"}(r||(r={}))},a873:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e["SET_TOKEN"]="SET_TOKEN",e["SET_USER_NAME"]="SET_USER_NAME",e["SET_USER_ID"]="SET_USER_ID",e["SET_USER_PHONE"]="SET_USER_PHONE",e["SET_PROJECT_ID"]="SET_PROJECT_ID",e["SET_COMPANY_ID"]="SET_COMPANY_ID",e["SET_REMOTECONTROL"]="SET_REMOTECONTROL",e["SET_USER_MAC"]="SET_USER_MAC"}(r||(r={}))},afbc:function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"a",(function(){return O})),n.d(t,"d",(function(){return v}));n("d3b7");var r=n("6c02"),a=function(){return n.e("chunk-6f47ecfb").then(n.bind(null,"7abe"))},c=function(){return Promise.all([n.e("chunk-056e1da2"),n.e("chunk-c71b77a0"),n.e("chunk-5d2f98d0"),n.e("chunk-68f9fdb2"),n.e("chunk-782a66de")]).then(n.bind(null,"7f3f"))},o=function(){return Promise.all([n.e("chunk-c71b77a0"),n.e("chunk-68f9fdb2"),n.e("chunk-2d0c1282")]).then(n.bind(null,"cda6"))},i=function(){return n.e("chunk-11b0dfc6").then(n.bind(null,"a89b"))},u=function(){return Promise.all([n.e("chunk-c71b77a0"),n.e("chunk-7f684f10")]).then(n.bind(null,"f299"))},d=function(){return n.e("chunk-c761207a").then(n.bind(null,"44dd"))},s=function(){return n.e("chunk-dcd3755c").then(n.bind(null,"c676"))},f=function(){return n.e("chunk-8c8fb174").then(n.bind(null,"f093"))},l=function(){return n.e("chunk-6c680e0e").then(n.bind(null,"161f"))},b=function(){return n.e("chunk-016ba2f5").then(n.bind(null,"116c"))},h=function(){return Promise.all([n.e("chunk-056e1da2"),n.e("chunk-5d2f98d0"),n.e("chunk-2e62b616")]).then(n.bind(null,"09de"))},m=function(){return n.e("chunk-1b78b177").then(n.bind(null,"2804"))},p=[{path:"/",redirect:"/home"},{path:"/home",component:a,name:"home",meta:{title:"首页",hideHeader:!0}},{path:"/envmonitor",component:c,name:"envmonitor",meta:{title:"环境控制",hideHeader:!0}},{path:"/envmonitor-detail",component:o,name:"envmonitorDetail",meta:{title:"环境详情",color:"#fff",hideHeader:!0}},{path:"/user-portrait",component:i,name:"userPortrait",meta:{title:"节能评分",color:"#FFE823",hideHeader:!0}},{path:"/energy-savig",component:u,name:"energySavig",meta:{title:"我的节能",color:"#ECEFF4",hideHeader:!0}},{path:"/energy-detail",component:d,name:"energyDetail",meta:{title:"我的节能详情 ",color:"#E5E5E5",hideHeader:!0}},{path:"/today-energy-detail",component:s,name:"todayEnergyDetail",meta:{title:"今天新增 ",color:"#E5E5E5",hideHeader:!0}},{path:"/energy-rank",component:f,name:"energyRank",meta:{title:"节能排名 ",color:"#E5E5E5",hideHeader:!0}},{path:"/integral-desc",component:l,name:"integralDesc",meta:{title:"积分说明 ",color:"#E5E5E5",hideHeader:!0}},{path:"/record",component:b,name:"Record",meta:{title:"调节记录 ",color:"#E5E5E5",hideHeader:!0}},{path:"/mySpace",component:h,name:"mySpace",meta:{title:"切换空间",color:"#f7f8fa",hideHeader:!0}},{path:"/choice-project",component:function(){return Promise.all([n.e("chunk-056e1da2"),n.e("chunk-84a1a18e")]).then(n.bind(null,"6e1d"))},name:"choiceProject",meta:{title:"选择所属公司名称",color:"#fff",hideHeader:!1}},{path:"/choice-space",component:function(){return Promise.all([n.e("chunk-056e1da2"),n.e("chunk-48791802")]).then(n.bind(null,"bd1a"))},name:"choiceSpace",meta:{title:"选择办公空间",color:"#F5F5F5",hideHeader:!1}},{path:"/set-main-space",component:m,name:"setMainSpace",meta:{title:"设置主空间",title1:"左滑动可删除空间",color:"#F5F5F5",hideHeader:!1}}],O=[],g=Object(r["a"])({history:Object(r["b"])("/sgipad/"),routes:p});function v(){var e=g;g.matcher=e.matcher}t["c"]=g},b20f:function(e,t,n){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},cd49:function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var r=n("7a23"),a={class:"home"};function c(e,t,n,c,o,i){var u=Object(r["resolveComponent"])("Header"),d=Object(r["resolveComponent"])("router-view");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",a,[e.route.meta&&!e.route.meta.hideHeader?(Object(r["openBlock"])(),Object(r["createBlock"])(u,{key:0,color:e.route.meta.color},null,8,["color"])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(e.route.meta.hideHeader?"":"ptheader"),style:Object(r["normalizeStyle"])({background:e.route.meta.color})},null,6),(Object(r["openBlock"])(),Object(r["createBlock"])(d,{key:e.route.fullPath}))])}var o=n("5530"),i=n("3ba9"),u=n("6c02"),d=Object(r["defineComponent"])({components:{Header:i["a"]},setup:function(){var e=Object(u["c"])(),t=Object(r["reactive"])({route:e,transitionName:"slide-right",showHeader:!1});return Object(r["nextTick"])((function(){var e=window.document;e.addEventListener("touchstart",(function(e){e.touches.length>1&&e.preventDefault()})),e.addEventListener("gesturestart",(function(e){e.preventDefault()}))})),Object(r["onMounted"])((function(){})),Object(o["a"])({},Object(r["toRefs"])(t))}}),s=(n("35de"),n("6b0d")),f=n.n(s);const l=f()(d,[["render",c],["__scopeId","data-v-58418e4c"]]);var b=l,h=n("afbc"),m=n("0613"),p=(n("758b"),n("b20f"),n("d399")),O=(n("e7e5"),n("ad06")),g=(n("c3a6"),n("0b33")),v=(n("da3c"),n("5e46")),E=(n("bda7"),n("543e")),S=(n("ac1e"),n("e41f")),j=(n("8a58"),n("96cf"),n("1da1")),T=n("d167"),k=n("5581"),y=n("59b9");h["c"].beforeEach(function(){var e=Object(j["a"])(regeneratorRuntime.mark((function e(t,n,r){var a,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=Object(m["b"])(),c=Object(y["a"])("mac"),c&&Object(k["f"])(c),e.next=5,a.dispatch(T["a"].ACTION_GET_USER_INFO,void 0);case 5:r();case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()),h["c"].afterEach((function(e){}));var _=Object(r["createApp"])(b),N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;p["a"].loading({duration:e,forbidClick:!0})},I=function(){p["a"].clear()};_.config.globalProperties.$imgUrl="http://api.sagacloud.cn/dp-auxiliary/image-service/common/image_get?systemId=dataPlatform",_.config.globalProperties.$toast=p["a"],_.config.globalProperties.$loadingStart=N,_.config.globalProperties.$loadinngEnd=I,_.use(p["a"]).use(O["b"]).use(v["a"]).use(g["a"]).use(E["b"]).use(S["b"]).use(m["a"]).use(h["c"]).mount("#app")},d167:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e["ACTION_LOGIN"]="ACTION_LOGIN",e["ACTION_RESET_TOKEN"]="ACTION_RESET_TOKEN",e["ACTION_GET_USER_INFO"]="ACTION_GET_USER_INFO",e["ACTION_CHANGE_ROLES"]="ACTION_CHANGE_ROLES",e["ACTION_LOGIN_OUT"]="ACTION_LOGIN_OUT",e["SET_USER_MAC"]="SET_USER_MAC"}(r||(r={}))},d257:function(e,t,n){"use strict";n.d(t,"z",(function(){return c})),n.d(t,"r",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return u})),n.d(t,"q",(function(){return d})),n.d(t,"g",(function(){return s})),n.d(t,"w",(function(){return f})),n.d(t,"e",(function(){return l})),n.d(t,"l",(function(){return b})),n.d(t,"c",(function(){return h})),n.d(t,"A",(function(){return m})),n.d(t,"n",(function(){return p})),n.d(t,"x",(function(){return v})),n.d(t,"u",(function(){return E})),n.d(t,"o",(function(){return S})),n.d(t,"t",(function(){return j})),n.d(t,"i",(function(){return T})),n.d(t,"y",(function(){return k})),n.d(t,"h",(function(){return y})),n.d(t,"s",(function(){return _})),n.d(t,"k",(function(){return N})),n.d(t,"f",(function(){return I})),n.d(t,"p",(function(){return M})),n.d(t,"j",(function(){return R})),n.d(t,"m",(function(){return C})),n.d(t,"d",(function(){return w})),n.d(t,"v",(function(){return D}));n("99af"),n("c975"),n("d81d"),n("b680"),n("d3b7"),n("4d63"),n("ac1f"),n("25f0"),n("466d"),n("4d90"),n("5319"),n("1276"),n("53ca");var r=n("0613"),a=n("66d6"),c=(n("a78e"),function(e){var t="";for(var n in e)-1!==e[n]&&(t+=n+"="+e[n]+"&");return t=t.substring(0,t.length-1),t}),o=function(){var e=r["a"].state.user,t={openid:e.openid,userId:e.userId,mac:e.mac,pubname:a["a"].pubname,projectId:e.projectId};return e.userName&&(t.userName=e.userName),e.userPhone&&(t.userPhone=e.userPhone),t},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"YYYYMMDD",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=t||new Date,r=n.getFullYear(),a=n.getMonth()+1<10?"0"+(n.getMonth()+1):n.getMonth()+1,c=n.getDate()<10?"0"+n.getDate():n.getDate(),o=n.getHours()<10?"0"+n.getHours():n.getHours(),i=n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes();return"YYYY年MM月DD日"===e?r+"年"+a+"月"+c+"日":"YYYY.MM"===e?r+"."+a:"YYYYMM"===e?r+""+a:"YYYY-MM-DD"===e?r+"-"+a+"-"+c:"YYYY.MM.DD HH:mm"===e?r+"."+a+"."+c+" "+o+":"+i:r+""+a+c},u=function(e){return e?e.replace(/^(\d{4})(\d{2})(\d{2})$/,"$1-$2-$3"):""},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=new Date;t.setTime(t.getTime()+864e5);var n=t.getFullYear(),r=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,a=t.getDate()<10?"0"+t.getDate():t.getDate();return n+e+r+e+a};function s(){return(new Date).getHours()}function f(e,t){return t?"".concat("/sgipad/","images/").concat(e,"/").concat(t):""}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new Date;t.setFullYear(t.getFullYear()+e);var n=t.getFullYear(),r=t.getMonth()+1;return new Date(n+"/"+r)}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=new Date,n=t.getFullYear(),r=t.getMonth();return 0===r&&(r=12,n-=1),r<10&&(r="0"+r),"YYYY.MM"===e?n+"."+r:"YYYY年MM月"===e?n+"年"+r+"月":n+""+r}var h=function(e){var t=e?new Date(e):new Date,n=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,r=t.getDate()<10?"0"+t.getDate():t.getDate(),a=t.getFullYear(),c=t.getHours()<10?"0"+t.getHours():t.getHours(),o=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes();return[a+"年"+n+"月",n+"月"+r+"日",c+":"+o]},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t){var n=JSON.stringify(t);sessionStorage.setItem(e,n)}},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(e){var t=sessionStorage.getItem(e);if(t)return JSON.parse(t)}return""},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t)if(t instanceof Object){var n=JSON.stringify(t);localStorage.setItem(e,n)}else localStorage.setItem(e,t)},g=function(e){if(e){var t=localStorage.getItem(e);return t?JSON.parse(t):""}return""},v=function(e){O(a["a"].storageSpaceInfoKey,e)},E=function(e,t,n){var r=g(a["a"].storageSpaceKey)?g(a["a"].storageSpaceKey):{},c="".concat(e,",").concat(t);r[c]=n,O(a["a"].storageSpaceKey,r)},S=function(){var e=g(a["a"].storageSpaceKey);return e},j=function(e,t){var n=g(a["a"].storageFloorKey)?g(a["a"].storageFloorKey):{};n[e]=t,O(a["a"].storageFloorKey,n)},T=function(){var e=g(a["a"].storageFloorKey);return e},k=function(e){var t=g(a["a"].historySearchSpaceKey),n=!1;t=t||[],t.map((function(t){t.id===e.id&&(n=!0)})),n||t.push(e),O(a["a"].historySearchSpaceKey,t)},y=function(){return g(a["a"].historySearchSpaceKey)?g(a["a"].historySearchSpaceKey):[]},_=function(e){var t=new Array("周日","周一","周二","周三","周四","周五","周六"),n=t[e];return n},N=function(){var e=new Date,t=e.getDay(),n=_(t);return n},I=function(e){return e.getDate()<10?"0"+e.getDate():e.getDate()},M=function(){for(var e=new Array,t=0;t<=24;t++){var n="00";n=t<10?"0"+t:t,e.push(n+":00"),t<24&&e.push(n+":30")}return e},R=function(){var e=new Date,t=e.getHours(),n=e.getMinutes(),r=e.getHours();return n<30?(t+=":00",r*=2):(t+=":30",r=2*r+1),[t,r]},C=function(){var e=new Date,t=e.getHours(),n=e.getMinutes();return t<10&&(t="0"+t),n<10&&(n="0"+n),t+""+n+"00"},w=function(e){return e?(e/1e4).toFixed(2):""},D=function(e,t,n){return n+""+Math.round(Math.random()*(t-e)+e)}}}); //# sourceMappingURL=app.25f1ea91.js.map