webpackJsonp([20],{V0Ja:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("P9l9"),n={name:"index",data:function(){return{requestProject:"gic-authcenter",bgHeight:window.screen.availHeight-320+"px",tabListData:[],activeSelTab:"",headerCode:""}},mounted:function(){this.init()},methods:{init:function(){this.headerCode=this.$route.query.code,this.$emit("getLinkType","authority"),this.getMenuTree()},getMenuTree:function(){var e=this;Object(i.b)("/gic-authcenter/loginuser",{requestProject:"gic-authcenter"}).then(function(t){var a=t.data;0==a.errorCode?(e.entranceList=[],(a.result.menuTree?a.result.menuTree:[]).forEach(function(t){"authcenter"==t.code&&t.nodeChildren&&t.nodeChildren.length>0&&t.nodeChildren.forEach(function(t){if(t.code==e.headerCode){var a=[];a.push(t),e.tabListData=e.getNewTabList(a),e.activeSelTab||(e.activeSelTab=e.tabListData[0].children.length>0?e.tabListData[0].children[0].tabId:e.tabListData[0].tabId)}})})):e.$message.error(a.message)}).catch(function(e){console.log(e)})},getNewTabList:function(e){var t=this;return e.forEach(function(e){1==e.isShow&&(e.tabId=e.id,e.tabName=e.menuName,e.icon=""!=e.iconUrl?e.iconUrl:"iconcaidan",e.onlyIconActive=!1,e.children=e.nodeChildren?e.nodeChildren:[],e.children.length>0&&(e.children.forEach(function(e){e.icon=""}),t.getNewTabList(e.children)))}),e},setSelectTab:function(e){this.$router.push({path:e.uri,query:{code:this.headerCode,tabId:e.tabId}})},showTab:function(e){this.activeSelTab=e}},beforeRouteLeave:function(e,t,a){var i=e;"/menuManage"==i.path&&"/roleManage"==i.path&&"/addRole"==i.path&&"/userManage"==i.path&&"/addUser"==i.path&&"/authorityList"==i.path||this.$emit("getLinkType",""),a()},components:{ywLeftAside:a("TaZW").a}},r={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"authority-wrap",style:{"min-height":this.bgHeight}},[t("div",{staticClass:"my-left-aside"},[t("yw-left-aside",{attrs:{tabListData:this.tabListData,activeSelTab:this.activeSelTab},on:{setSelectTab:this.setSelectTab}})],1),this._v(" "),t("div",{staticClass:"my-right-wrap"},[t("router-view",{on:{showTab:this.showTab}})],1)])},staticRenderFns:[]};var s=a("VU/8")(n,r,!1,function(e){a("Z4E5")},"data-v-32327f16",null);t.default=s.exports},Z4E5:function(e,t){}});
//# sourceMappingURL=20.dffacded4647c010ae5c.1558087223141.js.map