1 line
3.7 KiB
JavaScript
1 line
3.7 KiB
JavaScript
webpackJsonp([28],{YbVU:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s("E4LH"),i={data:function(){return{dynamicMenuRoutes:[]}},components:{},computed:{sidebarLayoutSkin:{get:function(){return this.$store.state.common.sidebarLayoutSkin}},sidebarFold:{get:function(){return this.$store.state.common.sidebarFold}},menuActiveName:{get:function(){return this.$store.state.common.menuActiveName},set:function(t){this.$store.commit("common/updateMenuActiveName",t)}},mainTabs:{get:function(){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)}}},watch:{$route:"routeHandle"},created:function(){this.dynamicMenuRoutes=JSON.parse(sessionStorage.getItem("dynamicMenuRoutes")||"[]"),this.routeHandle(this.$route)},methods:{routeHandle:function(t){if(t.meta.isTab){var e=this.mainTabs.filter(function(e){return e.name===t.name})[0];if(!e){if(t.meta.isDynamic&&!(t=this.dynamicMenuRoutes.filter(function(e){return e.name===t.name})[0]))return console.error("未能找到可用标签页!");e={menuId:t.meta.menuId||t.name,name:t.name,title:t.meta.title,type:Object(n.c)(t.meta.iframeUrl)?"iframe":"module",iframeUrl:t.meta.iframeUrl||"",params:t.params,query:t.query},this.mainTabs=this.mainTabs.concat(e)}this.menuActiveName=e.menuId+"",this.mainTabsActiveName=e.name}}}},a={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("aside",{staticClass:"site-sidebar",class:"site-sidebar--"+t.sidebarLayoutSkin},[s("div",{staticClass:"site-sidebar__inner"},[s("el-menu",{staticClass:"site-sidebar__menu",attrs:{"default-active":t.menuActiveName||"home",collapse:t.sidebarFold,collapseTransition:!1}},[s("el-menu-item",{attrs:{index:"home"},on:{click:function(e){t.$router.push({name:"home"})}}},[s("icon-svg",{staticClass:"site-sidebar__menu-icon",attrs:{name:"zonghe"}}),t._v(" "),s("span",{attrs:{slot:"title"},slot:"title"},[t._v("设备管理")])],1),t._v(" "),s("el-submenu",{attrs:{index:"agreement"}},[s("template",{slot:"title"},[s("icon-svg",{staticClass:"site-sidebar__menu-icon",attrs:{name:"config"}}),t._v(" "),s("span",{attrs:{slot:"title"},slot:"title"},[t._v("协议类型")])],1),t._v(" "),s("el-menu-item",{attrs:{index:"Melsec"},on:{click:function(e){t.$router.push({name:"Melsec"})}}},[s("icon-svg",{staticClass:"site-sidebar__menu-icon",attrs:{name:"bianji"}}),t._v(" "),s("span",{attrs:{slot:"title"},slot:"title"},[t._v("三菱Mitsubishi")])],1),t._v(" "),s("el-menu-item",{attrs:{index:"Modbus"},on:{click:function(e){t.$router.push({name:"Modbus"})}}},[s("icon-svg",{staticClass:"site-sidebar__menu-icon",attrs:{name:"bianji"}}),t._v(" "),s("span",{attrs:{slot:"title"},slot:"title"},[t._v("MODBUS")])],1),t._v(" "),s("el-menu-item",{attrs:{index:"Omron"},on:{click:function(e){t.$router.push({name:"Omron"})}}},[s("icon-svg",{staticClass:"site-sidebar__menu-icon",attrs:{name:"bianji"}}),t._v(" "),s("span",{attrs:{slot:"title"},slot:"title"},[t._v("欧姆龙HostLink")])],1),t._v(" "),s("el-menu-item",{attrs:{index:"Siemens"},on:{click:function(e){t.$router.push({name:"Siemens"})}}},[s("icon-svg",{staticClass:"site-sidebar__menu-icon",attrs:{name:"bianji"}}),t._v(" "),s("span",{attrs:{slot:"title"},slot:"title"},[t._v("西门子S7")])],1)],2),t._v(" "),s("el-menu-item",{attrs:{index:"log"},on:{click:function(e){t.$router.push({name:"log"})}}},[s("icon-svg",{staticClass:"site-sidebar__menu-icon",attrs:{name:"log"}}),t._v(" "),s("span",{attrs:{slot:"title"},slot:"title"},[t._v("日志")])],1)],1)],1)])},staticRenderFns:[]},o=s("VU/8")(i,a,!1,null,null,null);e.default=o.exports}}); |