2626
2727 <el-popover trigger =" hover" content =" 服务信息" >
2828 <template #reference >
29- <el-button @click.stop =" infoServe(item.key)" type =" primary" circle ><i class =" iconfont icon-info" ></i ></el-button >
29+ <el-button @click.stop =" infoServe(item.key,item.name )" type =" primary" circle ><i class =" iconfont icon-info" ></i ></el-button >
3030 </template >
3131 </el-popover >
3232
@@ -49,16 +49,19 @@ import { ElButton,ElMenu, ElRow, ElIcon,ElPopover, ElSubMenu,ElDialog,ElInput,El
4949import {NewShell } from ' @/utils/terminal.js'
5050import SubMenu from " @/components/index/SubMenu.vue"
5151import {getConnList ,delConn } from " @/api/base.js"
52- import {openDb , serInfo } from " @/api/index.js"
52+ import {openDb } from " @/api/index.js"
5353import { useStore } from ' vuex'
54+ import { useRouter } from ' vue-router'
55+
5456
5557export default {
5658 name: " MenuSection" ,
57- setup (props , context ){
59+ setup (){
5860
5961 let connMenu = ref (null );
6062
6163 const store = useStore ()
64+ const router = useRouter ()
6265
6366 const connetions = computed (() => store .state .connList );
6467
@@ -96,10 +99,16 @@ export default{
9699
97100 };
98101
99- const infoServe = function (connec_id ){
100- serInfo ({key: connec_id}).then ((res )=> {
101- context .emit (" info" ,res .data .name ,res .data .info );
102- })
102+ const infoServe = function (sk ,name ){
103+ store .commit (" setTagsItem" , {
104+ title: name+ " -监控" ,
105+ name: " grmmonitor" ,
106+ content: " " ,
107+ view: true
108+ });
109+ store .commit (" setCurrentTag" , " grmmonitor" );
110+
111+ router .push ({name: ' monitor' , params: { sk }})
103112 };
104113
105114 const delServe = function (connec_id ){
0 commit comments