zx/public/mer/js/chunk-355f2aa6.57205aaa.js

1 line
10 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-355f2aa6"],{"123b":function(t,e,s){"use strict";s("9d97")},"5da5":function(t,e,s){"use strict";var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.clientWidth>1e3?s("el-aside",{staticClass:"layout-aside",class:t.setCollapseWidth},[t.setShowLogo&&t.menuList.length&&"columns"!==t.getThemeConfig.layout?s("Logo"):t._e(),t._v(" "),t.menuList.length&&"columns"==t.getThemeConfig.layout?s("div",{staticClass:"cat-name"},[t._v("\n "+t._s(t.adminTitle||t.catName)+"\n ")]):t._e(),t._v(" "),s("el-scrollbar",{ref:"layoutAsideRef",staticClass:"flex-auto"},[s("Vertical",{class:t.setCollapseWidth,attrs:{menuList:t.menuList}})],1)],1):s("el-drawer",{attrs:{visible:t.getThemeConfig.isCollapse,"with-header":!1,direction:"ltr",size:"180px"},on:{"update:visible":function(e){return t.$set(t.getThemeConfig,"isCollapse",e)}}},[s("el-aside",{staticClass:"layout-aside w100 h100"},[t.setShowLogo&&t.menuList.length?s("Logo"):t._e(),t._v(" "),s("el-scrollbar",{ref:"layoutAsideRef",staticClass:"flex-auto"},[s("Vertical",{attrs:{menuList:t.menuList}})],1)],1)],1)},n=[],o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("el-menu",{class:t.setColumnsAsideStyle,attrs:{router:"","background-color":"transparent","default-active":t.activePath||t.defaultActive,collapse:t.setIsCollapse,"unique-opened":t.getThemeConfig.isUniqueOpened,"collapse-transition":!0}},[t._l(t.menuList,(function(e){return[e.children&&e.children.length>0?s("el-submenu",{key:e.path,attrs:{index:e.path}},[s("template",{slot:"title"},[s("i",{staticClass:"ivu-icon",class:e.icon?"el-icon-"+e.icon:""}),t._v(" "),s("span",[t._v(t._s(e.title))])]),t._v(" "),s("SubItem",{attrs:{chil:e.children}})],2):[s("el-menu-item",{key:e.path,attrs:{index:e.path}},[s("i",{staticClass:"ivu-icon",class:e.icon?"el-icon-"+e.icon:""}),t._v(" "),s("template",{slot:"title"},[s("span",[t._v(t._s(e.title))])])],2)]]}))],2)],1)},u=[],l=s("db72"),a=s("7686"),r=s("2f62"),c={name:"navMenuVertical",components:{SubItem:a["a"]},props:{menuList:{type:Array,default:function(){return[]}}},data:function(){return{defaultActive:this.$route.path,onRoutes:""}},computed:Object(l["a"])(Object(l["a"])({},Object(r["d"])("menu",["activePath"])),{},{setColumnsAsideStyle:function(){return this.$store.state.themeConfig.themeConfig.columnsAsideStyle},getThemeConfig:function(){return this.$store.state.themeConfig.themeConfig},setIsCollapse:function(){return!(document.body.clientWidth<1e3)&&this.$store.state.themeConfig.themeConfig.isCollapse}}),watch:{$route:{handler:function(t){this.defaultActive=t.path;var e=document.body.clientWidth;e<1e3&&(this.$store.state.themeConfig.themeConfig.isCollapse=!1)},deep:!0}},created:function(){}},h=c,d=(s("123b"),s("2877")),f=Object(d["a"])(h,o,u,!1,null,"5f305c05",null),m=f.exports,C=s("6376"),g={name:"layoutAside",components:{Vertical:m,Logo:C["a"]},data:function(){return{clientWidth:"",catName:""}},watch:{},computed:{adminTitle:function(){return this.$store.state.app.adminTitle||""},menuList:function(){return console.log(this.$store.state.user.childMenuList,"this.$store.state.user.childMenuList"),this.$store.state.user.childMenuList.length>0?this.$store.state.themeConfig.themeConfig.isCollapse=!1:this.$store.state.themeConfig.themeConfig.isCollapse=!0,this.$store.state.user.childMenuList},setCollapseWidth:function(){var t=this.$store.state.themeConfig.themeConfig,e=t.layout,s=t.isCollapse,i="";return("classic"===e||"columns"===e)&&(i="layout-el-aside-br-color"),"columns"===e?s?["layout-aside-width1",i]:["layout-aside-width-default",i]:s?["layout-aside-width64",i]:["layout-aside-width-default",i]},setShowLogo:function(){var t=this.$store.state.themeConfig.themeConfig,e=t.layout,s=t.isShowLogo;return s&&"defaults"===e||s&&"columns"===e},getThemeConfig:function(){return this.$store.state.themeConfig.themeConfig}},mounted:function(){},created:function(){var t=this;this.initMenuFixed(document.body.clientWidth),this.setFilterRoutes(),this.bus.$on("layoutMobileResize",(function(e){t.initMenuFixed(e.clientWidth)})),this.bus.$on("oneCatName",(function(e){t.catName=e})),this.bus.$on("updateElScrollBar",(function(){setTimeout((function(){t.$refs.layoutAsideRef.update()}),300)})),"columns"!==this.$store.state.themeConfig.themeConfig.layout&&this.bus.$on("routesListChange",(function(){t.setFilterRoutes()}))},beforeDestroy:function(){this.bus.$off("routesListChange")},methods:{getMenus:function(){this.$store.dispatch("user/getMenus")},setFilterRoutes:function(){if("columns"===this.$store.state.themeConfig.themeConfig.layout)return!1;this.$store.commit("user/childMenuList",this.filterRoutesFun(this.$store.state.user.menuList))},filterRoutesFun:function(t){var e=this;return t.filter((function(t){return t.path})).map((function(t){return t=Object.assign({},t),t.children&&(t.children=e.filterRoutesFun(t.children)),t}))},initMenuFixed:function(t){this.clientWidth=t,this.$emit("routesListChange")}},destroyed:function(){this.bus.$off("updateElScrollBar",(function(){}))}},p=g,v=(s("d990"),Object(d["a"])(p,i,n,!1,null,"b87f1992",null));e["a"]=v.exports},"76e7":function(t,e,s){},"7c00":function(t,e,s){},"9d97":function(t,e,s){},a5a5:function(t,e,s){"use strict";s("7c00")},d990:function(t,e,s){"use strict";s("76e7")},fdcf3:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-container",{staticClass:"layout-container"},[s("ColumnsAside"),t._v(" "),s("div",{staticClass:"layout-columns-warp"},[s("Asides"),t._v(" "),s("el-container",{staticClass:"flex-center layout-backtop"},[t.isFixedHeader?s("Headers"):t._e(),t._v(" "),s("el-scrollbar",[t.isFixedHeader?t._e():s("Headers"),t._v(" "),s("Mains")],1)],1)],1),t._v(" "),s("el-backtop",{attrs:{target:".layout-backtop .el-scrollbar__wrap"}})],1)},n=[],o=s("5da5"),u=s("bb39"),l=s("3eeb"),a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"layout-columns-aside"},[s("el-scrollbar",[s("Logo"),t._v(" "),s("ul",[t._l(t.columnsAsideList,(function(e,i){return s("li",{key:i,ref:"columnsAsideOffsetTopRefs",refInFor:!0,staticClass:"layout-columns",class:{"layout-columns-active":e.k===t.liIndex},attrs:{title:e.title},on:{click:function(s){return t.onColumnsAsideMenuClick(e)}}},[s("div",{class:t.setColumnsAsidelayout},[s("i",{class:"el-icon-"+e.icon}),t._v(" "),s("div",{staticClass:"font13"},[t._v("\n "+t._s(e.title&&e.title.length>=4?e.title.substr(0,"columns-vertical"===t.setColumnsAsidelayout?4:3):e.title)+"\n ")])])])})),t._v(" "),s("div",{ref:"columnsAsideActiveRef",class:t.setColumnsAsideStyle})],2)],1)],1)},r=[],c=(s("7514"),s("db72")),h=s("74bb"),d=s("6376"),f=s("2f62"),m={name:"layoutColumnsAside",components:{Logo:d["a"]},data:function(){return{columnsAsideList:[],liIndex:0,difference:0,routeSplit:[]}},computed:Object(c["a"])({setColumnsAsideStyle:function(){return this.$store.state.themeConfig.themeConfig.columnsAsideStyle},setColumnsAsidelayout:function(){return this.$store.state.themeConfig.themeConfig.columnsAsideLayout},Layout:function(){return this.$store.state.themeConfig.themeConfig.Layout},routesList:function(){this.$store.state.user.menuList}},Object(f["d"])("menu",["activePath"])),beforeDestroy:function(){this.bus.$off("routesListChange")},mounted:function(){var t=this;this.bus.$on("routesListChange",(function(){t.setFilterRoutes()})),this.$store.dispatch("user/getMenus",{that:this}).then((function(e){t.setFilterRoutes()}))},methods:{setColumnsAsideMove:function(t){if(void 0===t)return!1;var e=this.$refs.columnsAsideOffsetTopRefs;this.liIndex=t,this.$refs.columnsAsideActiveRef.style.top="".concat(e[t].offsetTop+this.difference,"px")},onColumnsAsideMenuClick:function(t){var e=t.path;t.redirect;t.children?this.$router.push(Object(h["a"])(t.children).path):this.$router.push(e),!t.children||t.children.length<=1?this.$store.state.themeConfig.themeConfig.isCollapse=!0:t.children.length>1&&(this.$store.state.themeConfig.themeConfig.isCollapse=!1)},onColumnsAsideDown:function(t){var e=this;this.$nextTick((function(){e.setColumnsAsideMove(t)}))},setFilterRoutes:function(){if(this.$store.state.user.menuList.length<=0)return!1;this.columnsAsideList=this.filterRoutesFun(this.$store.state.user.menuList);var t=this.setSendChildren(Object(h["d"])(this.$route,this.columnsAsideList));if(!t.children)return this.bus.$emit("setSendColumnsChildren",[]),this.$store.commit("user/childMenuList",[]),this.$store.state.themeConfig.themeConfig.isCollapse=!0,!1;this.bus.$emit("oneCatName",t.item[0].title),this.onColumnsAsideDown(t.item[0].k),t.children.length>0?this.$store.state.themeConfig.themeConfig.isCollapse=!1:this.$store.state.themeConfig.themeConfig.isCollapse=!0,this.bus.$emit("setSendColumnsChildren",t.children||[]),this.$store.commit("user/childMenuList",t.children||[])},setSendChildren:function(t){var e={};return this.columnsAsideList.map((function(s,i){s["k"]=i,s.path===t&&(e["item"]=[Object(c["a"])({},s)],s.children&&(e["children"]=s.children))})),e},filterRoutesFun:function(t){var e=this;return t.filter((function(t){return t.path})).map((function(t){return t=Object.assign({},t),t.children&&(t.children=e.filterRoutesFun(t.children)),t}))},setColumnsMenuHighlight:function(t){var e=this,s=this.columnsAsideList.find((function(e){return e.path===t}));if(!s)return!1;setTimeout((function(){e.onColumnsAsideDown(s.k)}),0)}},watch:{"$store.state":{handler:function(t){if("columnsRound"===t.themeConfig.themeConfig.columnsAsideStyle?this.difference=3:this.difference=0,t.user.menuList.length===this.columnsAsideList.length)return!1},deep:!0},$route:{handler:function(t){this.setColumnsMenuHighlight(t.path);var e=Object(h["d"])(t,this.columnsAsideList),s=Object(h["e"])(this.columnsAsideList,e)[0].children,i=this.setSendChildren(e);i.item?(this.onColumnsAsideDown(i.item[0].k),this.bus.$emit("oneCatName",i.item[0].title)):this.onColumnsAsideDown(0),this.$store.commit("user/childMenuList",s||[])},deep:!0}}},C=m,g=(s("a5a5"),s("2877")),p=Object(g["a"])(C,a,r,!1,null,"d3b94d4c",null),v=p.exports,$={name:"layoutColumns",components:{Asides:o["a"],Headers:u["a"],Mains:l["default"],ColumnsAside:v},computed:{isFixedHeader:function(){return this.$store.state.themeConfig.themeConfig.isFixedHeader}}},b=$,y=Object(g["a"])(b,i,n,!1,null,null,null);e["default"]=y.exports}}]);