1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["app"],{0:function(e,t,i){e.exports=i("56d7")},"028b":function(e,t,i){"use strict";i("3f4d")},"186a":function(e,t,i){"use strict";i("9df4")},"1bd7":function(e,t,i){},"29bb":function(e,t,i){},"3f4d":function(e,t,i){},"56d7":function(e,t,i){"use strict";i.r(t);i("e260"),i("e6cf"),i("cca6"),i("a79d");var n=i("2b0e"),a=(i("b20f"),function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"app"}},[i("router-view")],1)}),s=[],o={name:"App",mounted:function(){var e=document.createElement("script");e.src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js",e.language="JavaScript",document.body.appendChild(e)}},r=o,c=i("2877"),l=Object(c["a"])(r,a,s,!1,null,null,null),u=l.exports,d=(i("d3b7"),i("3ca3"),i("ddb0"),i("8c4f")),f=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-wrapper"},[i("app-main")],1)},h=[],p=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"navbar"},[i("hamburger",{staticClass:"hamburger-container",attrs:{"is-active":e.sidebar.opened},on:{toggleClick:e.toggleSideBar}}),i("breadcrumb",{staticClass:"breadcrumb-container"}),i("div",{staticClass:"right-menu"},[i("div",{staticClass:"xl-form",staticStyle:{"padding-right":"20px"}},[i("span",{staticClass:"scoped-op",on:{click:e.cashUpdate}},[e._v("更新缓存")]),i("span",{staticClass:"scoped-op2",on:{click:e.openPwdPopup}},[e._v("修改密码")]),i("span",{staticClass:"scoped-user"},[e._v(e._s(e.sysUser.nickname))]),i("el-button",{staticClass:"xl-form-btn t4 xs",attrs:{icon:"el-icon-user"},on:{click:e.logout}},[e._v("退出")])],1)]),i("pwd-edit",{attrs:{isShow:e.isPwdShow},on:{close:e.closePwdPopup}})],1)},m=[],v=i("1da1"),b=i("5530"),w=(i("96cf"),i("2f62")),g=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-breadcrumb",{staticClass:"app-breadcrumb",attrs:{separator:"/"}},[i("transition-group",{attrs:{name:"breadcrumb"}},e._l(e.levelList,(function(t,n){return i("el-breadcrumb-item",{key:t.path},["noRedirect"===t.redirect||n==e.levelList.length-1?i("span",{staticClass:"no-redirect"},[e._v(e._s(t.meta.title))]):i("a",{on:{click:function(i){return i.preventDefault(),e.handleLink(t)}}},[e._v(e._s(t.meta.title))])])})),1)],1)},_=[],S=(i("4de4"),i("99af"),i("b0c0"),i("498a"),i("bd11")),V=i.n(S),E={data:function(){return{levelList:null}},watch:{$route:function(){this.getBreadcrumb()}},created:function(){this.getBreadcrumb()},methods:{getBreadcrumb:function(){var e=this.$route.matched.filter((function(e){return e.meta&&e.meta.title})),t=e[0];this.isDashboard(t)||(e=[{path:"/dashboard",meta:{title:"首页"}}].concat(e)),this.levelList=e.filter((function(e){return e.meta&&e.meta.title&&!1!==e.meta.breadcrumb}))},isDashboard:function(e){var t=e&&e.name;return!!t&&t.trim().toLocaleLowerCase()==="Dashboard".toLocaleLowerCase()},pathCompile:function(e){var t=this.$route.params,i=V.a.compile(e);return i(t)},handleLink:function(e){var t=e.redirect,i=e.path;t?this.$router.push(t):this.$router.push(this.pathCompile(i))}}},O=E,C=(i("976b"),Object(c["a"])(O,g,_,!1,null,"33d79dae",null)),T=C.exports,D=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticStyle:{padding:"0 15px"},on:{click:e.toggleClick}},[i("svg",{staticClass:"hamburger",class:{"is-active":e.isActive},attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64"}},[i("path",{attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"}})])])},$=[],x={name:"Hamburger",props:{isActive:{type:Boolean,default:!1}},methods:{toggleClick:function(){this.$emit("toggleClick")}}},y=x,A=(i("186a"),Object(c["a"])(y,D,$,!1,null,"49e15297",null)),k=A.exports,L=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{"show-close":!1,"close-on-click-modal":!1,visible:e.isShow,title:"修改密码",fullscreen:!1,width:"400px","custom-class":"xl-dialog",center:""},on:{"update:visible":function(t){e.isShow=t}}},[i("base-form",{ref:"ruleForm",staticClass:"lib-edit",attrs:{data:e.formData,"is-inline":!1,"label-width":"110px"}},[i("div",{staticStyle:{"padding-top":"20px"},attrs:{slot:"footer"},slot:"footer"},[i("el-button",{staticClass:"xl-form-btn t2",on:{click:e.close}},[e._v("关 闭")]),i("el-button",{staticClass:"xl-form-btn t1",on:{click:function(t){return e.close("confirm")}}},[e._v("确定")])],1)])],1)],1)},I=[],j={components:{},props:{isShow:Boolean},data:function(){return{formData:[],loading:!0,cObj:{},isShowMap:!1}},watch:{isShow:function(e){e&&(this.formData=[{label:"旧密码",key:"old_pwd"},{label:"新密码",key:"new_pwd"},{label:"确认新密码",key:"repeat_new_pwd"}])}},methods:{close:function(e){var t=this;"confirm"===e?this.$refs["ruleForm"].$refs["baseForm"].validate((function(e){if(e){var i=t.$refs.ruleForm.baseForm,n=Object(b["a"])({},i);t.$api.base.admchangepwd(n).then((function(e){t.$msg("修改成功~")})),t.$emit("close",n)}})):this.$emit("close")}}},P=j,M=Object(c["a"])(P,L,I,!1,null,"3db9a052",null),B=M.exports,H={components:{Breadcrumb:T,Hamburger:k,PwdEdit:B},computed:Object(b["a"])({},Object(w["b"])(["sidebar","avatar","sysUser"])),data:function(){return{isPwdShow:!1}},methods:{closePwdPopup:function(){this.isPwdShow=!1},openPwdPopup:function(){this.isPwdShow=!0},cashUpdate:function(){var e=this;this.$store.dispatch("user/getDict").then((function(){e.$store.dispatch("user/getMenu").then((function(){window.setTimeout((function(){e.$router.go(0)}),100)}))}))},toggleSideBar:function(){this.$store.dispatch("app/toggleSideBar")},logout:function(){var e=this;return Object(v["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$msg("退出登录?","confirm",(function(){window.sessionStorage.clear(),window.localStorage.clear(),e.$router.go(0)}));case 1:case"end":return t.stop()}}),t)})))()}}},W=H,N=(i("6401"),Object(c["a"])(W,p,m,!1,null,"72934ad2",null)),R=(N.exports,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{class:{"has-logo":e.showLogo}},[e.showLogo?i("logo",{attrs:{collapse:e.isCollapse}}):e._e(),i("el-scrollbar",{attrs:{"wrap-class":"scrollbar-wrapper"}},[i("el-menu",{attrs:{"default-active":e.activeMenu,collapse:e.isCollapse,"background-color":e.variables.menuBg,"text-color":e.variables.menuText,"unique-opened":!1,"active-text-color":e.variables.menuActiveText,"collapse-transition":!1,mode:"vertical"}},e._l(e.curRoute,(function(e){return i("sidebar-item",{key:e.path,attrs:{item:e,"base-path":e.path}})})),1)],1)],1)}),U=[],G=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"sidebar-logo-container",class:{collapse:e.collapse}},[i("transition",{attrs:{name:"sidebarLogoFade"}},[e.collapse?i("router-link",{key:"collapse",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?i("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):i("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])]):i("router-link",{key:"expand",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?i("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):e._e(),i("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])])],1)],1)},J=[],z={name:"SidebarLogo",props:{collapse:{type:Boolean,required:!0}},data:function(){return{title:"洪楼管理系统",logo:i("cf05")}}},q=z,F=(i("8ec7"),Object(c["a"])(q,G,J,!1,null,"2234084e",null)),Y=F.exports,K=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.item.hidden?e._e():i("div",[!e.hasOneShowingChild(e.item.children,e.item)||e.onlyOneChild.children&&!e.onlyOneChild.noShowingChildren||e.item.alwaysShow?i("el-submenu",{ref:"subMenu",attrs:{index:e.resolvePath(e.item.path),"popper-append-to-body":""}},[i("template",{slot:"title"},[e.item.meta?i("item",{attrs:{icon:e.item.meta&&e.item.meta.icon,title:e.item.meta.title}}):e._e()],1),e._l(e.item.children,(function(t){return i("sidebar-item",{key:t.path,staticClass:"nest-menu",attrs:{"is-nest":!0,item:t,"base-path":e.resolvePath(t.path)}})}))],2):[e.onlyOneChild.meta?i("app-link",{attrs:{to:e.resolvePath(e.onlyOneChild.path)}},[i("el-menu-item",{class:{"submenu-title-noDropdown":!e.isNest},attrs:{index:e.resolvePath(e.onlyOneChild.path)}},[i("item",{attrs:{icon:e.onlyOneChild.meta.icon||e.item.meta&&e.item.meta.icon,title:e.onlyOneChild.meta.title}})],1)],1):e._e()]],2)},X=[],Q=i("df7c"),Z=i.n(Q);function ee(e){return/^(https?:|mailto:|tel:)/.test(e)}i("caad"),i("2532");var te,ie,ne={name:"MenuItem",functional:!0,props:{icon:{type:String,default:""},title:{type:String,default:""}},render:function(e,t){var i=t.props,n=i.icon,a=i.title,s=[];return n&&(n.includes("el-icon")?s.push(e("i",{class:[n,"sub-el-icon"]})):s.push(e("svg-icon",{attrs:{"icon-class":n}}))),a&&s.push(e("span",{slot:"title"},[a])),s}},ae=ne,se=(i("bf4f"),Object(c["a"])(ae,te,ie,!1,null,"18eeea00",null)),oe=se.exports,re=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i(e.type,e._b({tag:"component"},"component",e.linkProps(e.to),!1),[e._t("default")],2)},ce=[],le={props:{to:{type:String,required:!0}},computed:{isExternal:function(){return ee(this.to)},type:function(){return this.isExternal?"a":"router-link"}},methods:{linkProps:function(e){return this.isExternal?{href:e,target:"_blank",rel:"noopener"}:{to:e}}}},ue=le,de=Object(c["a"])(ue,re,ce,!1,null,null,null),fe=de.exports,he={computed:{device:function(){return this.$store.state.app.device}},mounted:function(){this.fixBugIniOS()},methods:{fixBugIniOS:function(){var e=this,t=this.$refs.subMenu;if(t){var i=t.handleMouseleave;t.handleMouseleave=function(t){"mobile"!==e.device&&i(t)}}}}},pe={name:"SidebarItem",components:{Item:oe,AppLink:fe},mixins:[he],props:{item:{type:Object,required:!0},isNest:{type:Boolean,default:!1},basePath:{type:String,default:""}},data:function(){return this.onlyOneChild=null,{}},methods:{hasOneShowingChild:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0,n=t.filter((function(t){return!t.hidden&&(e.onlyOneChild=t,!0)}));return 1===n.length||0===n.length&&(this.onlyOneChild=Object(b["a"])(Object(b["a"])({},i),{},{path:"",noShowingChildren:!0}),!0)},resolvePath:function(e){return ee(e)?e:ee(this.basePath)?this.basePath:Z.a.resolve(this.basePath,e)}}},me=pe,ve=Object(c["a"])(me,K,X,!1,null,null,null),be=ve.exports,we=i("cf1e"),ge=i.n(we),_e={components:{SidebarItem:be,Logo:Y},computed:Object(b["a"])(Object(b["a"])({},Object(w["b"])(["sidebar"])),{},{curRoute:function(){return Wt},activeMenu:function(){var e=this.$route,t=e.meta,i=e.path;return t.activeMenu?t.activeMenu:i},showLogo:function(){return this.$store.state.settings.sidebarLogo},variables:function(){return ge.a},isCollapse:function(){return!this.sidebar.opened}})},Se=_e,Ve=Object(c["a"])(Se,R,U,!1,null,null,null),Ee=(Ve.exports,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("section",{staticClass:"app-main"},[i("router-view",{key:e.key})],1)}),Oe=[],Ce={name:"AppMain",computed:{key:function(){return this.$route.path}}},Te=Ce,De=(i("9f3c"),i("028b"),Object(c["a"])(Te,Ee,Oe,!1,null,"5a608bab",null)),$e=De.exports,xe=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"tags-view-container",attrs:{id:"tags-view-container"}},[i("scroll-pane",{ref:"scrollPane",staticClass:"tags-view-wrapper",on:{scroll:e.handleScroll}},e._l(e.visitedViews,(function(t){return i("router-link",{key:t.path,ref:"tag",refInFor:!0,staticClass:"tags-view-item",class:e.isActive(t)?"active":"",attrs:{to:{path:t.path,query:t.query,fullPath:t.fullPath},tag:"span"},nativeOn:{mouseup:function(i){if("button"in i&&1!==i.button)return null;!e.isAffix(t)&&e.closeSelectedTag(t)},contextmenu:function(i){return i.preventDefault(),e.openMenu(t,i)}}},[e._v(" "+e._s(t.title)+" "),e.isAffix(t)?e._e():i("span",{staticClass:"el-icon-close",on:{click:function(i){return i.preventDefault(),i.stopPropagation(),e.closeSelectedTag(t)}}})])})),1),i("ul",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"contextmenu",style:{left:e.left+"px",top:e.top+"px"}},[i("li",{on:{click:function(t){return e.refreshSelectedTag(e.selectedTag)}}},[e._v("刷新")]),e.isAffix(e.selectedTag)?e._e():i("li",{on:{click:function(t){return e.closeSelectedTag(e.selectedTag)}}},[e._v("关闭")]),i("li",{on:{click:e.closeOthersTags}},[e._v("关闭其它")]),i("li",{on:{click:function(t){return e.closeAllTags(e.selectedTag)}}},[e._v("关闭所有")])])],1)},ye=[],Ae=i("b85c"),ke=i("2909"),Le=(i("159b"),i("5319"),i("ac1f"),i("fb6a"),function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-scrollbar",{ref:"scrollContainer",staticClass:"scroll-container",attrs:{vertical:!1},nativeOn:{wheel:function(t){return t.preventDefault(),e.handleScroll(t)}}},[e._t("default")],2)}),Ie=[],je=(i("c740"),4),Pe={name:"ScrollPane",data:function(){return{left:0}},computed:{scrollWrapper:function(){return this.$refs.scrollContainer.$refs.wrap}},mounted:function(){this.scrollWrapper.addEventListener("scroll",this.emitScroll,!0)},beforeDestroy:function(){this.scrollWrapper.removeEventListener("scroll",this.emitScroll)},methods:{handleScroll:function(e){var t=e.wheelDelta||40*-e.deltaY,i=this.scrollWrapper;i.scrollLeft=i.scrollLeft+t/4},emitScroll:function(){this.$emit("scroll")},moveToTarget:function(e){var t=this.$refs.scrollContainer.$el,i=t.offsetWidth,n=this.scrollWrapper,a=this.$parent.$refs.tag,s=null,o=null;if(a.length>0&&(s=a[0],o=a[a.length-1]),s===e)n.scrollLeft=0;else if(o===e)n.scrollLeft=n.scrollWidth-i;else{var r=a.findIndex((function(t){return t===e})),c=a[r-1],l=a[r+1],u=l.$el.offsetLeft+l.$el.offsetWidth+je,d=c.$el.offsetLeft-je;u>n.scrollLeft+i?n.scrollLeft=u-i:d<n.scrollLeft&&(n.scrollLeft=d)}}}},Me=Pe,Be=(i("797e"),Object(c["a"])(Me,Le,Ie,!1,null,"225b8bcd",null)),He=Be.exports,We={components:{ScrollPane:He},data:function(){return{visible:!1,top:0,left:0,selectedTag:{},affixTags:[]}},computed:{visitedViews:function(){return this.$store.state.tagsView.visitedViews},routes:function(){return this.$store.state.permission.routes}},watch:{$route:function(){this.addTags(),this.moveToCurrentTag()},visible:function(e){e?document.body.addEventListener("click",this.closeMenu):document.body.removeEventListener("click",this.closeMenu)}},mounted:function(){this.initTags(),this.addTags()},methods:{isActive:function(e){return e.path===this.$route.path},isAffix:function(e){return e.meta&&e.meta.affix},filterAffixTags:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=[];return e.forEach((function(e){if(e.meta&&e.meta.affix){var a=Z.a.resolve(i,e.path);n.push({fullPath:a,path:a,name:e.name,meta:Object(b["a"])({},e.meta)})}if(e.children){var s=t.filterAffixTags(e.children,e.path);s.length>=1&&(n=[].concat(Object(ke["a"])(n),Object(ke["a"])(s)))}})),n},initTags:function(){var e,t=this.affixTags=this.filterAffixTags(this.routes),i=Object(Ae["a"])(t);try{for(i.s();!(e=i.n()).done;){var n=e.value;n.name&&this.$store.dispatch("tagsView/addVisitedView",n)}}catch(a){i.e(a)}finally{i.f()}},addTags:function(){var e=this.$route.name;return e&&this.$store.dispatch("tagsView/addView",this.$route),!1},moveToCurrentTag:function(){var e=this,t=this.$refs.tag;this.$nextTick((function(){var i,n=Object(Ae["a"])(t);try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.to.path===e.$route.path){e.$refs.scrollPane.moveToTarget(a),a.to.fullPath!==e.$route.fullPath&&e.$store.dispatch("tagsView/updateVisitedView",e.$route);break}}}catch(s){n.e(s)}finally{n.f()}}))},refreshSelectedTag:function(e){var t=this;this.$store.dispatch("tagsView/delCachedView",e).then((function(){var i=e.fullPath;t.$nextTick((function(){t.$router.replace({path:"/redirect"+i})}))}))},closeSelectedTag:function(e){var t=this;this.$store.dispatch("tagsView/delView",e).then((function(i){var n=i.visitedViews;t.isActive(e)&&t.toLastView(n,e)}))},closeOthersTags:function(){var e=this;this.$router.push(this.selectedTag),this.$store.dispatch("tagsView/delOthersViews",this.selectedTag).then((function(){e.moveToCurrentTag()}))},closeAllTags:function(e){var t=this;this.$store.dispatch("tagsView/delAllViews").then((function(i){var n=i.visitedViews;t.affixTags.some((function(t){return t.path===e.path}))||t.toLastView(n,e)}))},toLastView:function(e,t){var i=e.slice(-1)[0];i?this.$router.push(i.fullPath):"Dashboard"===t.name?this.$router.replace({path:"/redirect"+t.fullPath}):this.$router.push("/")},openMenu:function(e,t){var i=105,n=this.$el.getBoundingClientRect().left,a=this.$el.offsetWidth,s=a-i,o=t.clientX-n+15;this.left=o>s?s:o,this.top=t.clientY,this.visible=!0,this.selectedTag=e},closeMenu:function(){this.visible=!1},handleScroll:function(){this.closeMenu()}}},Ne=We,Re=(i("9301"),i("cfaa"),Object(c["a"])(Ne,xe,ye,!1,null,"d71ddd6e",null)),Ue=(Re.exports,{visitedViews:function(e){return e.tagsView.visitedViews},cachedViews:function(e){return e.tagsView.cachedViews},sidebar:function(e){return e.app.sidebar},device:function(e){return e.app.device},token:function(e){return e.user.token},sysDomain:function(e){return e.user.sysDomain},sysUser:function(e){return e.user.sysUser},menuData:function(e){return e.user.menuData}}),Ge=Ue,Je=i("a78e"),ze=i.n(Je),qe={sidebar:{opened:!ze.a.get("sidebarStatus")||!!+ze.a.get("sidebarStatus"),withoutAnimation:!1},device:"desktop"},Fe={TOGGLE_SIDEBAR:function(e){e.sidebar.opened=!e.sidebar.opened,e.sidebar.withoutAnimation=!1,e.sidebar.opened?ze.a.set("sidebarStatus",1):ze.a.set("sidebarStatus",0)},CLOSE_SIDEBAR:function(e,t){ze.a.set("sidebarStatus",0),e.sidebar.opened=!1,e.sidebar.withoutAnimation=t},TOGGLE_DEVICE:function(e,t){e.device=t}},Ye={toggleSideBar:function(e){var t=e.commit;t("TOGGLE_SIDEBAR")},closeSideBar:function(e,t){var i=e.commit,n=t.withoutAnimation;i("CLOSE_SIDEBAR",n)},toggleDevice:function(e,t){var i=e.commit;i("TOGGLE_DEVICE",t)}},Ke={namespaced:!0,state:qe,mutations:Fe,actions:Ye},Xe=i("3835"),Qe=(i("a434"),{visitedViews:[],cachedViews:[]}),Ze={ADD_VISITED_VIEW:function(e,t){if(!e.visitedViews.some((function(e){return e.path===t.path}))){var i=window.localStorage.getItem("ant_curMenuObj"),n=i?JSON.parse(i):{};e.visitedViews.push(Object.assign({},t,{title:t.meta.title||"no-name",curMenuObj:n}))}},ADD_CACHED_VIEW:function(e,t){e.cachedViews.includes(t.name)||t.meta.noCache||e.cachedViews.push(t.name)},DEL_VISITED_VIEW:function(e,t){var i,n=Object(Ae["a"])(e.visitedViews.entries());try{for(n.s();!(i=n.n()).done;){var a=Object(Xe["a"])(i.value,2),s=a[0],o=a[1];if(o.path===t.path){e.visitedViews.splice(s,1);break}}}catch(r){n.e(r)}finally{n.f()}},DEL_CACHED_VIEW:function(e,t){var i=e.cachedViews.indexOf(t.name);i>-1&&e.cachedViews.splice(i,1)},DEL_OTHERS_VISITED_VIEWS:function(e,t){e.visitedViews=e.visitedViews.filter((function(e){return e.meta.affix||e.path===t.path}))},DEL_OTHERS_CACHED_VIEWS:function(e,t){var i=e.cachedViews.indexOf(t.name);e.cachedViews=i>-1?e.cachedViews.slice(i,i+1):[]},DEL_ALL_VISITED_VIEWS:function(e){var t=e.visitedViews.filter((function(e){return e.meta.affix}));e.visitedViews=t},DEL_ALL_CACHED_VIEWS:function(e){e.cachedViews=[]},UPDATE_VISITED_VIEW:function(e,t){var i,n=Object(Ae["a"])(e.visitedViews);try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.path===t.path){a=Object.assign(a,t);break}}}catch(s){n.e(s)}finally{n.f()}}},et={addView:function(e,t){var i=e.dispatch;i("addVisitedView",t),i("addCachedView",t)},addVisitedView:function(e,t){var i=e.commit;i("ADD_VISITED_VIEW",t)},addCachedView:function(e,t){var i=e.commit;i("ADD_CACHED_VIEW",t)},delView:function(e,t){var i=e.dispatch,n=e.state;return new Promise((function(e){i("delVisitedView",t),i("delCachedView",t),e({visitedViews:Object(ke["a"])(n.visitedViews),cachedViews:Object(ke["a"])(n.cachedViews)})}))},delVisitedView:function(e,t){var i=e.commit,n=e.state;return new Promise((function(e){i("DEL_VISITED_VIEW",t),e(Object(ke["a"])(n.visitedViews))}))},delCachedView:function(e,t){var i=e.commit,n=e.state;return new Promise((function(e){i("DEL_CACHED_VIEW",t),e(Object(ke["a"])(n.cachedViews))}))},delOthersViews:function(e,t){var i=e.dispatch,n=e.state;return new Promise((function(e){i("delOthersVisitedViews",t),i("delOthersCachedViews",t),e({visitedViews:Object(ke["a"])(n.visitedViews),cachedViews:Object(ke["a"])(n.cachedViews)})}))},delOthersVisitedViews:function(e,t){var i=e.commit,n=e.state;return new Promise((function(e){i("DEL_OTHERS_VISITED_VIEWS",t),e(Object(ke["a"])(n.visitedViews))}))},delOthersCachedViews:function(e,t){var i=e.commit,n=e.state;return new Promise((function(e){i("DEL_OTHERS_CACHED_VIEWS",t),e(Object(ke["a"])(n.cachedViews))}))},delAllViews:function(e,t){var i=e.dispatch,n=e.state;return new Promise((function(e){i("delAllVisitedViews",t),i("delAllCachedViews",t),e({visitedViews:Object(ke["a"])(n.visitedViews),cachedViews:Object(ke["a"])(n.cachedViews)})}))},delAllVisitedViews:function(e){var t=e.commit,i=e.state;return new Promise((function(e){t("DEL_ALL_VISITED_VIEWS"),e(Object(ke["a"])(i.visitedViews))}))},delAllCachedViews:function(e){var t=e.commit,i=e.state;return new Promise((function(e){t("DEL_ALL_CACHED_VIEWS"),e(Object(ke["a"])(i.cachedViews))}))},updateVisitedView:function(e,t){var i=e.commit;i("UPDATE_VISITED_VIEW",t)}},tt={namespaced:!0,state:Qe,mutations:Ze,actions:et};var it={routes:[],addRoutes:[]},nt={SET_ROUTES:function(e,t){e.addRoutes=t,e.routes=Wt.concat(t)}},at={},st={namespaced:!0,state:it,mutations:nt,actions:at},ot=i("83d6"),rt=i.n(ot),ct=rt.a.showSettings,lt=rt.a.tagsView,ut=rt.a.fixedHeader,dt=rt.a.sidebarLogo,ft={showSettings:ct,fixedHeader:ut,tagsView:lt,sidebarLogo:dt},ht={CHANGE_SETTING:function(e,t){var i=t.key,n=t.value;e.hasOwnProperty(i)&&(e[i]=n)}},pt={changeSetting:function(e,t){var i=e.commit;i("CHANGE_SETTING",t)}},mt={namespaced:!0,state:ft,mutations:ht,actions:pt},vt=(i("d81d"),"fp_token");function bt(){return window.sessionStorage.getItem(vt)}function wt(e){return window.sessionStorage.setItem(vt,e)}function gt(){return window.sessionStorage.getItem("fp_dictData")?JSON.parse(window.sessionStorage.getItem("fp_dictData")):{}}function _t(e){return window.sessionStorage.setItem("fp_dictData",JSON.stringify(e))}function St(){return window.sessionStorage.getItem("fp_user")?JSON.parse(window.sessionStorage.getItem("fp_user")):{}}function Vt(e){return window.sessionStorage.setItem("fp_user",JSON.stringify(e))}function Et(){return window.sessionStorage.getItem("fp_menu")?JSON.parse(window.sessionStorage.getItem("fp_menu")):[]}function Ot(e){return window.sessionStorage.setItem("fp_menu",JSON.stringify(e))}var Ct=function(){return{token:bt(),sysDomain:St().domain,sysUser:St(),dictData:gt(),menuData:Et()}},Tt=Ct(),Dt={RESET_STATE:function(e){Object.assign(e,Ct())},SET_TOKEN:function(e,t){e.token=t},SYS_DOMAIN:function(e,t){e.sysDomain=t},SYS_USER:function(e,t){e.sysUser=t},DICT_DATA:function(e,t){e.dictData=t},MENU_DATA:function(e,t){e.menuData=t}},$t={login:function(e,t){var i=e.commit,a=e.dispatch,s=t.username,o=t.password;return new Promise((function(e,t){n["default"].$api.base.admLogin({username:s.trim(),password:o}).then((function(t){t.token?(wt(t.token),i("SET_TOKEN",t.token),i("SYS_USER",t.data),Vt(t.data),i("SYS_DOMAIN",t.data.domain),a("getDict"),a("getMenu"),e()):console.log("未找到token")})).catch((function(e){t(e)}))}))},getMenu:function(e){var t=e.commit;return new Promise((function(e,i){n["default"].$api.base.admmenulist().then((function(i){Ot(i),t("MENU_DATA",i),e()})).catch((function(e){i(e)}))}))},getDict:function(e){var t=e.commit;return new Promise((function(e,i){n["default"].$api.base.admdicttree().then((function(i){var a=i||{},s={};for(var o in a){var r=a[o].map((function(e){return Object(b["a"])(Object(b["a"])({},e),{},{key:e.dict_label,val:e.dict_value})}));s[o]=r}_t(s),n["default"].$dictData=n["default"].prototype.$dictData=s,t("DICT_DATA",s),e()})).catch((function(e){i(e)}))}))}},xt={namespaced:!0,state:Tt,mutations:Dt,actions:$t};n["default"].use(w["a"]);var yt=new w["a"].Store({modules:{app:Ke,permission:st,tagsView:tt,settings:mt,user:xt},getters:Ge}),At=yt,kt=document,Lt=kt.body,It=992,jt={watch:{$route:function(e){"mobile"===this.device&&this.sidebar.opened&&At.dispatch("app/closeSideBar",{withoutAnimation:!1})}},beforeMount:function(){window.addEventListener("resize",this.$_resizeHandler)},beforeDestroy:function(){window.removeEventListener("resize",this.$_resizeHandler)},mounted:function(){var e=this.$_isMobile();e&&(At.dispatch("app/toggleDevice","mobile"),At.dispatch("app/closeSideBar",{withoutAnimation:!0}))},methods:{$_isMobile:function(){var e=Lt.getBoundingClientRect();return e.width-1<It},$_resizeHandler:function(){if(!document.hidden){var e=this.$_isMobile();At.dispatch("app/toggleDevice",e?"mobile":"desktop"),e&&At.dispatch("app/closeSideBar",{withoutAnimation:!0})}}}},Pt={name:"Layout",components:{AppMain:$e},mixins:[jt],computed:{},methods:{}},Mt=Pt,Bt=(i("8e2c"),Object(c["a"])(Mt,f,h,!1,null,"5c770396",null)),Ht=Bt.exports;n["default"].use(d["a"]);var Wt=[{path:"/404",component:function(){return i.e("chunk-fbe8f3f6").then(i.bind(null,"8cdb"))},hidden:!0},{path:"/map/dtl",component:function(){return i.e("chunk-d8539716").then(i.bind(null,"f3ae"))},hidden:!0},{path:"/",component:Ht,redirect:"/dashboard",children:[{path:"dashboard",name:"Dashboard",component:function(){return i.e("chunk-2d0e5357").then(i.bind(null,"9406"))},meta:{title:"首页",icon:"dashboard",affix:!0}}]},{path:"*",redirect:"/404",hidden:!0}],Nt=function(){return new d["a"]({mode:"history",scrollBehavior:function(){return{y:0}},routes:Wt})},Rt=Nt();var Ut=Rt,Gt=i("bc3a"),Jt=i.n(Gt),zt=i("4328"),qt=i.n(zt),Ft=(i("ed08"),null),Yt="https://api.honglouplus.com";window.sessionStorage.getItem("testUrl");var Kt=Jt.a.create({baseURL:Yt,timeout:6e4});function Xt(e,t,i,n){var a=window.sessionStorage.getItem("fp_token"),s=Object.assign({token:a},t);i&&(s[i]=i);var o=e.toLowerCase();return Kt({url:o,data:s,method:n||"post"})}function Qt(e,t,i,n){var a=Object.assign({},t);return i&&(a[i]=i),Kt({url:e,data:a,method:n||"post"})}Kt.interceptors.request.use((function(e){return"json"===e.CT&&(e.headers["Content-Type"]="application/json;charset=UTF-8"),e.data.loading,"post"===e.method&&"json"!==e.CT&&(e.data=qt.a.stringify(e.data)),e}),(function(e){return console.log(e),Promise.reject(e)})),Kt.interceptors.response.use((function(e){var t=e.data;return Ft&&Ft.close(),0!==t.errno?405===t.errno||404===t.errno?(window.sessionStorage.clear(),window.localStorage.clear(),void(Ft&&Ft.close())):(alert(t.errmsg),Promise.reject(new Error(t.errmsg||"Error"))):t.token?t:t.data||t}),(function(e){var t=JSON.parse(JSON.stringify(e)).response||{},i=t.data||{};return Ft&&Ft.close(),alert(i.errmsg),Promise.reject(e)}));var Zt={apiareainfolist:function(e){return Qt("https://api.honglouplus.com/api/area/info/list",e,"loading")},admmapcoordinall:function(e){return Xt("/adm/map/coordin/all",e)},admmapcoordindetail:function(e){return Xt("/adm/map/coordin/detail",e)}},ei={base:Zt},ti=i("8f9b"),ii=i.n(ti);n["default"].$api=n["default"].prototype.$api=ei,n["default"].use(ii.a),ii.a.initAMapApiLoader({key:"8343df94cab859af3bd36362029a4e19",plugin:["AMap.MouseTool","AMap.Scale","AMap.OverView","AMap.ToolBar","AMap.MapType","AMap.PlaceSearch","AMap.Geolocation","AMap.Geocoder","AMap.TileLayer"],v:"1.4.15",uiVersion:"1.0"}),n["default"].config.productionTip=!1,new n["default"]({el:"#app",router:Ut,render:function(e){return e(u)}})},5809:function(e,t,i){},6401:function(e,t,i){"use strict";i("5809")},6683:function(e,t,i){},"797e":function(e,t,i){"use strict";i("d64a")},"83d6":function(e,t){e.exports={title:"洪楼Plus",fixedHeader:!1,tagsView:!0,sidebarLogo:!0}},"8e2c":function(e,t,i){"use strict";i("1bd7")},"8ec7":function(e,t,i){"use strict";i("c564")},9301:function(e,t,i){"use strict";i("b7dd")},"976b":function(e,t,i){"use strict";i("29bb")},9874:function(e,t,i){},"9df4":function(e,t,i){},"9f3c":function(e,t,i){"use strict";i("6683")},b20f:function(e,t,i){},b7dd:function(e,t,i){},bf4f:function(e,t,i){"use strict";i("9874")},c564:function(e,t,i){},cf05:function(e,t,i){e.exports=i.p+"static/img/logo.42b28b1e.png"},cf1e:function(e,t,i){e.exports={menuText:"#bfcbd9",menuActiveText:"#409eff",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},cfaa:function(e,t,i){"use strict";i("e1eb")},d64a:function(e,t,i){},e1eb:function(e,t,i){},ed08:function(e,t,i){"use strict";i("53ca"),i("5319"),i("ac1f"),i("4d63"),i("25f0"),i("d3b7"),i("4d90"),i("1276"),i("159b"),i("99af")}},[[0,"runtime","chunk-libs"]]]);
|