webpackJsonp([93],{xzNW:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("E4LH"),n={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(t){this.$store.commit("common/updateMenuActiveName",t)}},mainTabs:{get:function(){for(var t=0;t<this.$store.state.common.mainTabs.length;t++){var e=this.$t(this.$store.state.common.mainTabs[t].name),s=this.$t(this.$store.state.common.mainTabs[t].title);"spec-tspecdevgl"===e.substr(0,15)&&s.indexOf("-")<0?this.$store.state.common.mainTabs[t].mainTabsTitle=this.$t("锅炉")+"-"+s:"spec-tspecdevylrq"===e.substr(0,17)&&s.indexOf("-")<0?this.$store.state.common.mainTabs[t].mainTabsTitle=this.$t("压力容器")+"-"+s:"spec-tspecdevylgd"===e.substr(0,17)&&s.indexOf("-")<0?this.$store.state.common.mainTabs[t].mainTabsTitle=this.$t("压力管道")+"-"+s:"spec-tspecdevdzsb"===e.substr(0,17)&&s.indexOf("-")<0?this.$store.state.common.mainTabs[t].mainTabsTitle=this.$t("吊装设备")+"-"+s:"spec-tspecdevcc"===e.substr(0,15)&&s.indexOf("-")<0?this.$store.state.common.mainTabs[t].mainTabsTitle=this.$t("叉车")+"-"+s:"spec-tspecdevdt"===e.substr(0,15)&&s.indexOf("-")<0?this.$store.state.common.mainTabs[t].mainTabsTitle=this.$t("电梯")+"-"+s:this.$store.state.common.mainTabs[t].mainTabsTitle=this.$t(this.$store.state.common.mainTabs[t].title)}return this.$store.state.common.mainTabs},set:function(t){this.$store.commit("common/updateMainTabs",t)}},mainTabsActiveName:{get:function(){return this.$store.state.common.mainTabsActiveName},set:function(t){this.$store.commit("common/updateMainTabsActiveName",t)}},siteContentViewHeight:function(){var t=this.documentClientHeight-50-30-2;return this.$route.meta.isTab?(t-=40,Object(a.c)(this.$route.meta.iframeUrl)?{height:t+"px"}:{minHeight:t+"px"}):{minHeight:t+"px"}}},methods:{selectedTabHandle:function(t){(t=this.mainTabs.filter(function(e){return e.name===t.name})).length>=1&&this.$router.push({name:t[0].name,query:t[0].query,params:t[0].params})},removeTabHandle:function(t){var e=this;if(this.mainTabs=this.mainTabs.filter(function(e){return e.name!==t}),this.mainTabs.length>=1){if(t===this.mainTabsActiveName){var s=this.mainTabs[this.mainTabs.length-1];this.$router.push({name:s.name,query:s.query,params:s.params},function(){e.mainTabsActiveName=e.$route.name})}}else this.menuActiveName="",this.$router.push({name:"home"})},tabsCloseCurrentHandle:function(){this.removeTabHandle(this.mainTabsActiveName)},tabsCloseOtherHandle:function(){var t=this;this.mainTabs=this.mainTabs.filter(function(e){return e.name===t.mainTabsActiveName})},tabsCloseAllHandle:function(){this.mainTabs=[],this.menuActiveName="",this.$router.push({name:"home"})},tabsRefreshCurrentHandle:function(){var t=this,e=this.$route;this.removeTabHandle(e.name),this.$nextTick(function(){t.$router.push({name:e.name,query:e.query,params:e.params})})}}},i={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("main",{staticClass:"site-content",class:{"site-content--tabs":t.$route.meta.isTab}},[t.$route.meta.isTab?s("el-tabs",{attrs:{closable:!0},on:{"tab-click":t.selectedTabHandle,"tab-remove":t.removeTabHandle},model:{value:t.mainTabsActiveName,callback:function(e){t.mainTabsActiveName=e},expression:"mainTabsActiveName"}},[s("el-dropdown",{staticClass:"site-tabs__tools",attrs:{"show-timeout":0}},[s("i",{staticClass:"el-icon-arrow-down el-icon--right"}),t._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[s("el-dropdown-item",{nativeOn:{click:function(e){return t.tabsCloseCurrentHandle(e)}}},[t._v(t._s(t.$t("closeCurrent")))]),t._v(" "),s("el-dropdown-item",{nativeOn:{click:function(e){return t.tabsCloseOtherHandle(e)}}},[t._v(t._s(t.$t("closeOther")))]),t._v(" "),s("el-dropdown-item",{nativeOn:{click:function(e){return t.tabsCloseAllHandle(e)}}},[t._v(t._s(t.$t("closeAll")))]),t._v(" "),s("el-dropdown-item",{nativeOn:{click:function(e){t.refresh()}}},[t._v(t._s(t.$t("refreshCurrent")))])],1)],1),t._v(" "),t._l(t.mainTabs,function(e){return s("el-tab-pane",{key:e.name,attrs:{label:e.mainTabsTitle,name:e.name}},[s("el-card",{attrs:{"body-style":t.siteContentViewHeight}},["iframe"===e.type?s("iframe",{attrs:{src:e.iframeUrl,width:"100%",height:"100%",frameborder:"0",scrolling:"yes"}}):s("keep-alive",[e.name===t.mainTabsActiveName?s("router-view"):t._e()],1)],1)],1)})],2):s("el-card",{attrs:{"body-style":t.siteContentViewHeight}},[s("keep-alive",[s("router-view")],1)],1)],1)},staticRenderFns:[]},o=s("VU/8")(n,i,!1,null,null,null);e.default=o.exports}});