(self["webpackChunkerp"]=self["webpackChunkerp"]||[]).push([[509],{8509:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-container",[n("el-container",[n("el-aside",{class:e.show?"width":"width1"},[n("el-menu",{attrs:{router:"","background-color":"#282c34","text-color":"#fff","default-active":e.$route.path,"default-openeds":e.openeds}},e._l(e.menu,(function(t){return n("div",{key:t.id},[t.children?n("el-submenu",{attrs:{index:t.code}},[n("template",{slot:"title"},[n("span",[e._v(e._s(t.name))])]),e._l(t.children,(function(t){return n("el-menu-item",{key:t.id,attrs:{index:t.code}},[e._v(e._s(t.name)+" ")])}))],2):n("el-menu-item",{attrs:{index:t.code}},[n("span",[e._v(e._s(t.name))])])],1)})),0)],1),n("el-main",[n("div",{staticClass:"head"},[n("ul",[n("li",[n("div",{staticClass:"add",on:{click:e.add}},[e.show?n("i",{staticClass:"el-icon-s-unfold"}):n("i",{staticClass:"el-icon-s-fold"})]),n("div",{staticClass:"right"},[n("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},e._l(e.titie,(function(t,r){return n("el-breadcrumb-item",{key:r},[e._v(e._s(t.name)+" ")])})),1)],1)]),n("li",[n("div",{staticStyle:{"margin-right":"10px"}},[e._v(e._s(e.usernmae))]),n("div",{staticClass:"token",on:{click:e.hanleLogout}},[e._v("登出")])])])]),n("div",{staticClass:"box-card"},[n("router-view")],1)])],1)],1)],1)},s=[],i=n(3695),a=n(8430);function o(){return(0,a.Z)({url:"/api/menus",method:"get"})}var u={mounted(){o().then((e=>{this.menu=e.data.data})),this.usernmae=localStorage.getItem("userName")},data(){return{menu:[],show:!0,levelData:[],titie:[],head:"",onindex:0,openeds:["GOODS_MANAGE"],usernmae:""}},watch:{$route:{handler:function(e){this.titie=e.matched,this.head=e.name,this.levelData.push({name:e.name,path:e.path});const t=[],n={};for(var r=0;r<this.levelData.length;r++)n[this.levelData[r].name]||(t.push(this.levelData[r]),n[this.levelData[r].name]=!0);this.levelData=t},deep:!0,immediate:!0}},methods:{next(){this.hanletop()},hanletop(){document.getElementById("bottom").scrollIntoView({behavior:"smooth"})},hanlebottom(){document.getElementById("top").scrollIntoView({behavior:"smooth"})},hanleLogout(){(0,i.gy)(),this.$router.push({path:"/Login"})},handlerclick(e){this.$route.path!==e&&this.$router.push({path:e})},add(){this.show=!this.show},hanblDelete(e,t){var n=this.levelData[e].name;if(this.onindex=e,this.levelData.splice(this.onindex,1),t===this.head){var r,s;for(let e=0;e<this.levelData.length;e++)r=this.levelData[e].path,s=this.levelData[e].name;this.levelData.length&&s!==n&&this.$router.push({path:r})}}}},l=u,c=n(1001),d=(0,c.Z)(l,r,s,!1,null,"00d7c456",null),m=d.exports},4865:function(e,t,n){var r,s;
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
 * @license MIT */(function(i,a){r=a,s="function"===typeof r?r.call(t,n,t,e):r,void 0===s||(e.exports=s)})(0,(function(){var e={version:"0.2.0"},t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function n(e,t,n){return e<t?t:e>n?n:e}function r(e){return 100*(-1+e)}function s(e,n,s){var i;return i="translate3d"===t.positionUsing?{transform:"translate3d("+r(e)+"%,0,0)"}:"translate"===t.positionUsing?{transform:"translate("+r(e)+"%,0)"}:{"margin-left":r(e)+"%"},i.transition="all "+n+"ms "+s,i}e.configure=function(e){var n,r;for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var o=e.isStarted();r=n(r,t.minimum,1),e.status=1===r?null:r;var u=e.render(!o),l=u.querySelector(t.barSelector),c=t.speed,d=t.easing;return u.offsetWidth,i((function(n){""===t.positionUsing&&(t.positionUsing=e.getPositioningCSS()),a(l,s(r,c,d)),1===r?(a(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){a(u,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){e.remove(),n()}),c)}),c)):setTimeout(n,c)})),this},e.isStarted=function(){return"number"===typeof e.status},e.start=function(){e.status||e.set(0);var n=function(){setTimeout((function(){e.status&&(e.trickle(),n())}),t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return t||e.status?e.inc(.3+.5*Math.random()).set(1):this},e.inc=function(t){var r=e.status;return r?("number"!==typeof t&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var t=0,n=0;e.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&e.start(),t++,n++,r.always((function(){n--,0===n?(t=0,e.done()):e.set((t-n)/t)})),this):this}}(),e.render=function(n){if(e.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var s=document.createElement("div");s.id="nprogress",s.innerHTML=t.template;var i,o=s.querySelector(t.barSelector),l=n?"-100":r(e.status||0),c=document.querySelector(t.parent);return a(o,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),t.showSpinner||(i=s.querySelector(t.spinnerSelector),i&&d(i)),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(s),s},e.remove=function(){l(document.documentElement,"nprogress-busy"),l(document.querySelector(t.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),a=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;var r,s=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);while(s--)if(r=e[s]+i,r in n)return r;return t}function s(e){return e=n(e),t[e]||(t[e]=r(e))}function i(e,t,n){t=s(t),e.style[t]=n}return function(e,t){var n,r,s=arguments;if(2==s.length)for(n in t)r=t[n],void 0!==r&&t.hasOwnProperty(n)&&i(e,n,r);else i(e,s[1],s[2])}}();function o(e,t){var n="string"==typeof e?e:c(e);return n.indexOf(" "+t+" ")>=0}function u(e,t){var n=c(e),r=n+t;o(n,t)||(e.className=r.substring(1))}function l(e,t){var n,r=c(e);o(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function c(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e}))},3695:function(e,t,n){"use strict";n.d(t,{LP:function(){return s},gy:function(){return i}});const r="admin_token";function s(){return localStorage.getItem("token")}function i(){return localStorage.removeItem(r)}},8430:function(e,t,n){"use strict";var r=n(9669),s=n.n(r),i=n(3695),a=n(4865),o=n.n(a),u=n(4720),l=s().create({timeout:36e4});l.interceptors.request.use((e=>(e.headers.Authorization="Bearer "+(0,i.LP)(),o().start(),e)),(e=>Promise.reject(e))),l.interceptors.response.use((e=>{o().done();const t=e.status;if(200===t||201===t)return e}),(e=>(o().done(),400===e.response.status&&(0,u.Message)({message:e.response.data.errorMessage,type:"error"}),500===e.response.status&&(0,u.Message)({message:e.response.data.message,type:"error"}),Promise.reject(e)))),t.Z=l}}]);
//# sourceMappingURL=509.4d4b16e9.js.map