webpackJsonp([50],{xzNW:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n("E4LH"),i={inject:["refresh"],data:function(){return{}},computed:{documentClientHeight:{get:function(){return this.$store.state.common.documentClientHeight}},menuActiveName:{get:function(){return this.$store.state.common.menuActiveName},set:function(e){this.$store.commit("common/updateMenuActiveName",e)}},mainTabs:{get:function(){return this.$store.state.common.mainTabs},set:function(e){this.$store.commit("common/updateMainTabs",e)}},mainTabsActiveName:{get:function(){return this.$store.state.common.mainTabsActiveName},set:function(e){this.$store.commit("common/updateMainTabsActiveName",e)}},siteContentViewHeight:function(){var e=this.documentClientHeight-50-30-2;return this.$route.meta.isTab?(e-=40,Object(a.a)(this.$route.meta.iframeUrl)?{height:e+"px"}:{minHeight:e+"px"}):{minHeight:e+"px"}}},methods:{selectedTabHandle:function(e){(e=this.mainTabs.filter(function(t){return t.name===e.name})).length>=1&&this.$router.push({name:e[0].name,query:e[0].query,params:e[0].params})},removeTabHandle:function(e){var t=this;if(this.mainTabs=this.mainTabs.filter(function(t){return t.name!==e}),this.mainTabs.length>=1){if(e===this.mainTabsActiveName){var n=this.mainTabs[this.mainTabs.length-1];this.$router.push({name:n.name,query:n.query,params:n.params},function(){t.mainTabsActiveName=t.$route.name})}}else this.menuActiveName="",this.$router.push({name:"home"})},tabsCloseCurrentHandle:function(){this.removeTabHandle(this.mainTabsActiveName)},tabsCloseOtherHandle:function(){var e=this;this.mainTabs=this.mainTabs.filter(function(t){return t.name===e.mainTabsActiveName})},tabsCloseAllHandle:function(){this.mainTabs=[],this.menuActiveName="",this.$router.push({name:"home"})},tabsRefreshCurrentHandle:function(){var e=this,t=this.$route;this.removeTabHandle(t.name),this.$nextTick(function(){e.$router.push({name:t.name,query:t.query,params:t.params})})}}},s={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("main",{staticClass:"site-content",class:{"site-content--tabs":e.$route.meta.isTab}},[e.$route.meta.isTab?n("el-tabs",{attrs:{closable:!0},on:{"tab-click":e.selectedTabHandle,"tab-remove":e.removeTabHandle},model:{value:e.mainTabsActiveName,callback:function(t){e.mainTabsActiveName=t},expression:"mainTabsActiveName"}},[n("el-dropdown",{staticClass:"site-tabs__tools",attrs:{"show-timeout":0}},[n("i",{staticClass:"el-icon-arrow-down el-icon--right"}),e._v(" "),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("el-dropdown-item",{nativeOn:{click:function(t){return e.tabsCloseCurrentHandle(t)}}},[e._v("关闭当前标签页")]),e._v(" "),n("el-dropdown-item",{nativeOn:{click:function(t){return e.tabsCloseOtherHandle(t)}}},[e._v("关闭其它标签页")]),e._v(" "),n("el-dropdown-item",{nativeOn:{click:function(t){return e.tabsCloseAllHandle(t)}}},[e._v("关闭全部标签页")]),e._v(" "),n("el-dropdown-item",{nativeOn:{click:function(t){e.refresh()}}},[e._v("刷新当前标签页")])],1)],1),e._v(" "),e._l(e.mainTabs,function(t){return n("el-tab-pane",{key:t.name,attrs:{label:t.title,name:t.name}},[n("el-card",{attrs:{"body-style":e.siteContentViewHeight}},["iframe"===t.type?n("iframe",{attrs:{src:t.iframeUrl,width:"100%",height:"100%",frameborder:"0",scrolling:"yes"}}):n("keep-alive",[t.name===e.mainTabsActiveName?n("router-view"):e._e()],1)],1)],1)})],2):n("el-card",{attrs:{"body-style":e.siteContentViewHeight}},[n("keep-alive",[n("router-view")],1)],1)],1)},staticRenderFns:[]},r=n("VU/8")(i,s,!1,null,null,null);t.default=r.exports}});