4 lines
8.3 KiB
JavaScript
Vendored
4 lines
8.3 KiB
JavaScript
Vendored
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-523f00ab"],{"0a5a":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));const r="admin_token";function i(){return localStorage.getItem("token")}function a(){return localStorage.removeItem(r)}},"1e4b":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",[e("el-container",[e("el-container",[e("el-aside",{class:t.show?"width":"width1"},[e("el-menu",{attrs:{router:"","background-color":"#282c34","text-color":"#fff","default-active":t.$route.path}},t._l(t.menu,(function(n){return e("div",{key:n.id},[n.children?e("el-submenu",{attrs:{index:n.code}},[e("template",{slot:"title"},[e("span",[t._v(t._s(n.name))])]),t._l(n.children,(function(n){return e("el-menu-item",{key:n.id,attrs:{index:n.code}},[t._v(t._s(n.name))])}))],2):e("el-menu-item",{attrs:{index:n.code}},[e("span",[t._v(t._s(n.name))])])],1)})),0)],1),e("el-main",[e("div",{staticClass:"head"},[e("ul",[e("li",[e("div",{staticClass:"add",on:{click:t.add}},[t.show?e("i",{staticClass:"el-icon-s-unfold"}):e("i",{staticClass:"el-icon-s-fold"})]),e("div",{staticClass:"right"},[e("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},t._l(t.titie,(function(n,r){return e("el-breadcrumb-item",{key:r},[t._v(t._s(n.name))])})),1)],1)]),e("li",[e("div",{staticClass:"token",on:{click:t.hanleLogout}},[t._v("退出")])])])]),t.levelData.length?e("div",{staticClass:"table"},[e("ul",[e("li",[e("i",{staticClass:"el-icon-arrow-left",on:{click:t.hanlebottom}})]),e("li",[t.levelData.length?e("div",{staticClass:"Navigation",attrs:{id:"Navigation"}},[e("div",{attrs:{id:"top"}}),t._l(t.levelData,(function(n,r){return e("div",{key:r,staticClass:"tab"},[e("span",{class:t.head===n.name?"red":"",on:{click:function(e){return t.handlerclick(n.path)}}},[t._v(t._s(n.name))]),e("div",{staticClass:"closure",class:t.head===n.name?"red_1":"",on:{click:function(e){return t.hanblDelete(r,n.name)}}},[e("i",{staticClass:"el-icon-close"})])])})),e("div",{attrs:{id:"bottom"}})],2):t._e()]),e("li",[e("i",{staticClass:"el-icon-arrow-right",on:{click:t.hanletop}})])])]):t._e(),e("div",{staticClass:"box-card"},[e("router-view")],1)])],1)],1)],1)},i=[],a=n("0a5a"),s=n("adb5");function o(){return Object(s["a"])({url:"/api/menus",method:"get"})}var l={mounted(){o().then(t=>{this.menu=t.data.data})},data(){return{menu:[],show:!1,levelData:[],titie:[],head:"",onindex:0,openeds:["1"]}},watch:{$route:{handler:function(t){console.log("0.0",t),this.titie=t.matched,this.head=t.name,this.levelData.push({name:t.name,path:t.path});const e=[],n={};for(var r=0;r<this.levelData.length;r++)n[this.levelData[r].name]||(e.push(this.levelData[r]),n[this.levelData[r].name]=!0);this.levelData=e,console.log("table构造",this.levelData)},deep:!0,immediate:!0}},methods:{next(){this.hanletop()},hanletop(){document.getElementById("bottom").scrollIntoView({behavior:"smooth"})},hanlebottom(){document.getElementById("top").scrollIntoView({behavior:"smooth"})},hanleLogout(){Object(a["b"])(),this.$router.push({path:"/Login"})},handlerclick(t){this.$route.path!==t&&this.$router.push({path:t})},add(){this.show=!this.show},hanblDelete(t,e){var n=this.levelData[t].name;if(this.onindex=t,this.levelData.splice(this.onindex,1),e===this.head){var r,i;for(let t=0;t<this.levelData.length;t++)r=this.levelData[t].path,i=this.levelData[t].name;this.levelData.length&&i!==n&&this.$router.push({path:r})}}}},c=l,u=(n("5605"),n("0b56")),d=Object(u["a"])(c,r,i,!1,null,"4b4d39ce",null);e["default"]=d.exports},3756:function(t,e,n){},"38bc":function(t,e,n){var r,i;
|
|
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
* @license MIT */(function(a,s){r=s,i="function"===typeof r?r.call(e,n,e,t):r,void 0===i||(t.exports=i)})(0,(function(){var t={version:"0.2.0"},e=t.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(t,e,n){return t<e?e:t>n?n:t}function r(t){return 100*(-1+t)}function i(t,n,i){var a;return a="translate3d"===e.positionUsing?{transform:"translate3d("+r(t)+"%,0,0)"}:"translate"===e.positionUsing?{transform:"translate("+r(t)+"%,0)"}:{"margin-left":r(t)+"%"},a.transition="all "+n+"ms "+i,a}t.configure=function(t){var n,r;for(n in t)r=t[n],void 0!==r&&t.hasOwnProperty(n)&&(e[n]=r);return this},t.status=null,t.set=function(r){var o=t.isStarted();r=n(r,e.minimum,1),t.status=1===r?null:r;var l=t.render(!o),c=l.querySelector(e.barSelector),u=e.speed,d=e.easing;return l.offsetWidth,a((function(n){""===e.positionUsing&&(e.positionUsing=t.getPositioningCSS()),s(c,i(r,u,d)),1===r?(s(l,{transition:"none",opacity:1}),l.offsetWidth,setTimeout((function(){s(l,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){t.remove(),n()}),u)}),u)):setTimeout(n,u)})),this},t.isStarted=function(){return"number"===typeof t.status},t.start=function(){t.status||t.set(0);var n=function(){setTimeout((function(){t.status&&(t.trickle(),n())}),e.trickleSpeed)};return e.trickle&&n(),this},t.done=function(e){return e||t.status?t.inc(.3+.5*Math.random()).set(1):this},t.inc=function(e){var r=t.status;return r?("number"!==typeof e&&(e=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+e,0,.994),t.set(r)):t.start()},t.trickle=function(){return t.inc(Math.random()*e.trickleRate)},function(){var e=0,n=0;t.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&t.start(),e++,n++,r.always((function(){n--,0===n?(e=0,t.done()):t.set((e-n)/e)})),this):this}}(),t.render=function(n){if(t.isRendered())return document.getElementById("nprogress");l(document.documentElement,"nprogress-busy");var i=document.createElement("div");i.id="nprogress",i.innerHTML=e.template;var a,o=i.querySelector(e.barSelector),c=n?"-100":r(t.status||0),u=document.querySelector(e.parent);return s(o,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),e.showSpinner||(a=i.querySelector(e.spinnerSelector),a&&d(a)),u!=document.body&&l(u,"nprogress-custom-parent"),u.appendChild(i),i},t.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(e.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&d(t)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var a=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),s=function(){var t=["Webkit","O","Moz","ms"],e={};function n(t){return t.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()}))}function r(e){var n=document.body.style;if(e in n)return e;var r,i=t.length,a=e.charAt(0).toUpperCase()+e.slice(1);while(i--)if(r=t[i]+a,r in n)return r;return e}function i(t){return t=n(t),e[t]||(e[t]=r(t))}function a(t,e,n){e=i(e),t.style[e]=n}return function(t,e){var n,r,i=arguments;if(2==i.length)for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&a(t,n,r);else a(t,i[1],i[2])}}();function o(t,e){var n="string"==typeof t?t:u(t);return n.indexOf(" "+e+" ")>=0}function l(t,e){var n=u(t),r=n+e;o(n,e)||(t.className=r.substring(1))}function c(t,e){var n,r=u(t);o(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function u(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function d(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return t}))},5605:function(t,e,n){"use strict";n("3756")},"70e7":function(t,e,n){},adb5:function(t,e,n){"use strict";var r=n("4ff3"),i=n.n(r),a=n("0a5a"),s=n("38bc"),o=n.n(s),l=(n("70e7"),n("5422")),c=(n("a18c"),i.a.create({timeout:1e4}));c.interceptors.request.use(t=>(t.headers.Authorization="Bearer "+Object(a["a"])(),o.a.start(),t),t=>(console.log(t,"222222"),Promise.reject(t))),c.interceptors.response.use(t=>{o.a.done();const e=t.status;if(200===e||201===e)return t;Object(l["Message"])({message:"Error",type:"error"})},t=>(Object(l["Message"])({message:t,type:"error"}),console.log(t,"44444"),Promise.reject(t))),e["a"]=c}}]);
|
|
//# sourceMappingURL=chunk-523f00ab.fdfb73f2.js.map
|