后台管理前后端完全分离版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
9.1 KiB

4 years ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e7b2d2a4"],{"0196":function(t,e,r){"use strict";r("c5a6")},"1e4b":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-container",{staticClass:"home-container"},[r("el-header",[r("div",[r("img",{attrs:{src:"",alt:""}}),r("span")]),r("el-button",{attrs:{type:"info"},on:{click:t.logout}},[t._v("退出")])],1),r("el-container",[r("el-aside",{attrs:{width:t.isCollapse?"64px":"200px"}},[r("div",{staticClass:"toggle-button",on:{click:t.toggleCollapse}},[t._v("|||")]),r("el-menu",{attrs:{"background-color":"#333744","text-color":"#fff","active-text-color":"#409EFF","unique-opened":"",collapse:t.isCollapse,"collapse-transition":!1,router:"","default-active":t.activePath}},t._l(t.menulist,(function(e){return r("el-submenu",{key:e.id,attrs:{index:e.id+""}},[r("template",{slot:"title"},[r("i",{class:t.iconsObj[e.id]}),r("span",[t._v(t._s(e.authName))])]),t._l(e.children,(function(e){return r("el-menu-item",{key:e.id,attrs:{index:"/"+e.path},on:{click:function(r){return t.saveNavState("/"+e.path)}}},[r("template",{slot:"title"},[r("i",{staticClass:"el-icon-menu"}),r("span",[t._v(t._s(e.authName))])])],2)}))],2)})),1)],1),r("el-main",[r("router-view")],1)],1)],1)},o=[],i=r("febe"),a=(r("e186"),{data:function(){return{menulist:[],iconsObj:{125:"iconfont icon-user",103:"iconfont icon-tijikongjian",101:"iconfont icon-shangpin",102:"iconfont icon-danju",145:"iconfont icon-baobiao"},isCollapse:!1,activePath:""}},created:function(){this.getMenuList(),this.activePath=window.sessionStorage.getItem("activePath")},methods:{logout:function(){window.sessionStorage.clear(),this.$router.push("/login")},getMenuList:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$http.get("menus");case 2:if(r=e.sent,n=r.data,200===n.meta.status){e.next=6;break}return e.abrupt("return",t.$message.error(n.meta.msg));case 6:t.menulist=n.data,console.log(n);case 8:case"end":return e.stop()}}),e)})))()},toggleCollapse:function(){this.isCollapse=!this.isCollapse},saveNavState:function(t){window.sessionStorage.setItem("activePath",t),this.activePath=t}}}),c=a,u=(r("0196"),r("cba8")),s=Object(u["a"])(c,n,o,!1,null,"5bd69acc",null);e["default"]=s.exports},c5a6:function(t,e,r){},e186:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(F){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=k(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(F){return{type:"throw",arg:F}}}t.wrap=s;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",d={};function g(){}function y(){}function m(){}var w={};u(w,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(S([])));x&&x!==r&&n.call(x,i)&&(w=x);var L=m.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,h=s.value;return h&&"object"===typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(h).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;function i(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}this._invoke=i}function k(t,e,r){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return C()}r.method=o,r.arg=i;while(1){var a=r.deleg