temp: 左侧菜单重构(未完成)
This commit is contained in:
@@ -12,9 +12,6 @@ html {
|
||||
li{
|
||||
list-style-type:none ;
|
||||
}
|
||||
.content-box {
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
|
||||
.nz-icon-gear:before {
|
||||
color: #BA3939;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="header">
|
||||
<div class="logo link" @click="jumpTo('overview')"><img height="45" src="../../assets/img/logo.png"/></div>
|
||||
<div class="logo link" @click="jumpTo('overview', 'dashboards')"><img height="45" src="../../assets/img/logo.png"/></div>
|
||||
<el-menu
|
||||
class="nz-menu float-right"
|
||||
mode="horizontal"
|
||||
@@ -40,25 +40,25 @@
|
||||
</el-menu-item>
|
||||
<el-submenu index="1" popper-class="nz-submenu">
|
||||
<template slot="title">
|
||||
<div @click="jumpTo('overview')" :class ="(activeIndex == 'overview' ||activeIndex == 'panel' || activeIndex == 'explore') ? 'menu-active' :'' " >
|
||||
<div @click="jumpTo('overview', 'dashboards')" :class ="(activeIndex == 'overview' ||activeIndex == 'panel' || activeIndex == 'explore') ? 'menu-active' :'' " >
|
||||
{{$t('overall.dashboard')}}
|
||||
</div>
|
||||
</template>
|
||||
<el-menu-item index="1-0">
|
||||
<div @click="jumpTo('overview')" :class="{'menu-item-active' :activeIndex == 'overview'}" >{{$t('dashboard.overview.title')}}</div>
|
||||
<div @click="jumpTo('overview', 'dashboards')" :class="{'menu-item-active' :activeIndex == 'overview'}" >{{$t('dashboard.overview.title')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="1-1">
|
||||
<div @click="jumpTo('panel')" :class="{'menu-item-active' :activeIndex == 'panel'}" >{{$t('dashboard.panel.title')}}</div>
|
||||
<div @click="jumpTo('panel', 'dashboards')" :class="{'menu-item-active' :activeIndex == 'panel'}" >{{$t('dashboard.panel.title')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="1-2">
|
||||
<div @click="jumpTo('explore')" :class="{'menu-item-active' :activeIndex == 'explore'}">{{$t('dashboard.metricPreview.title')}}</div>
|
||||
<div @click="jumpTo('explore', 'dashboards')" :class="{'menu-item-active' :activeIndex == 'explore'}">{{$t('dashboard.metricPreview.title')}}</div>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="3" popper-class="nz-submenu">
|
||||
<template slot="title">
|
||||
<div v-if="assetData.length == 0">{{$t('overall.asset')}}</div>
|
||||
<div v-else @click="jumpTo('asset')" :class="{'menu-active' : activeIndex == 'asset'}">{{$t('overall.asset')}}</div>
|
||||
<div v-else @click="jumpTo('asset', 3)" :class="{'menu-active' : activeIndex == 'asset'}">{{$t('overall.asset')}}</div>
|
||||
</template>
|
||||
<template>
|
||||
<el-menu-item v-if="assetData.length == 0" index="3-0"><div @click="createBox({type: 6})"><i class="nz-icon nz-icon-create-square header-dropdown-add"></i> {{$t("overall.createDatacenter")}}</div></el-menu-item>
|
||||
@@ -74,7 +74,7 @@
|
||||
<el-submenu index="2" popper-class="nz-submenu">
|
||||
<template slot="title">
|
||||
<div v-if="projectData.length == 0">{{$t('overall.project')}}</div>
|
||||
<div v-else @click="jumpToProject(projectData[0], 0)" :class ="activeIndex == 'project' ? 'menu-active' :''" >{{$t('overall.project')}}</div>
|
||||
<div v-else @click="jumpToProject(projectData[0])" :class ="activeIndex == 'project' ? 'menu-active' :''" >{{$t('overall.project')}}</div>
|
||||
</template>
|
||||
<template>
|
||||
<el-menu-item v-if="projectData.length == 0" index="2-0"><div @click="createBox({type: 1})"><i class="nz-icon nz-icon-create-square header-dropdown-add"></i> {{$t("overall.createProject")}}</div></el-menu-item>
|
||||
@@ -88,44 +88,44 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-submenu>
|
||||
<el-submenu index="4-0" popper-class="nz-submenu">
|
||||
<el-submenu index="4" popper-class="nz-submenu">
|
||||
<template slot="title">
|
||||
<div @click="jumpTo('alertList')" :class ="activeIndex == 'alertList' || activeIndex == 'alertConfig' ? 'menu-active' :''">{{$t('overall.alert')}}</div>
|
||||
<div @click="jumpTo('alertList', 'alerts')" :class ="activeIndex == 'alertList' || activeIndex == 'alertConfig' ? 'menu-active' :''">{{$t('overall.alert')}}</div>
|
||||
</template>
|
||||
<el-menu-item index="4-1">
|
||||
<div @click="jumpTo('alertList')" :class ="activeIndex == 'alertList' ? 'menu-item-active' :''">{{$t('alert.message')}}</div>
|
||||
<div @click="jumpTo('alertList', 'alerts')" :class ="activeIndex == 'alertList' ? 'menu-item-active' :''">{{$t('alert.message')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="4-2">
|
||||
<div @click="jumpTo('alertConfig')" :class ="activeIndex == 'alertConfig' ? 'menu-item-active' :''">{{$t('alert.rule')}}</div>
|
||||
<div @click="jumpTo('alertConfig', 'alerts')" :class ="activeIndex == 'alertConfig' ? 'menu-item-active' :''">{{$t('alert.rule')}}</div>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
<el-submenu index="5" popper-class="nz-submenu">
|
||||
<template slot="title">
|
||||
<div @click="jumpTo('account')" :class ="activeIndex == 'account' || activeIndex == 'promServer' || activeIndex == 'dc' || activeIndex == 'model' || activeIndex == 'mib' || activeIndex == 'system' || activeIndex == 'terminallog' || activeIndex == 'operationlog' ? 'menu-active' :''">{{$t('overall.config')}}</div>
|
||||
<div @click="jumpTo('account', 'settings')" :class ="activeIndex == 'account' || activeIndex == 'promServer' || activeIndex == 'dc' || activeIndex == 'model' || activeIndex == 'mib' || activeIndex == 'system' || activeIndex == 'terminallog' || activeIndex == 'operationlog' ? 'menu-active' :''">{{$t('overall.config')}}</div>
|
||||
</template>
|
||||
<el-menu-item index="5-0">
|
||||
<div @click="jumpTo('account')" :class="{'menu-item-active' :(activeIndex == 'account' )}">{{$t('config.account.account')}}</div>
|
||||
<div @click="jumpTo('account', 'settings')" :class="{'menu-item-active' :(activeIndex == 'account' )}">{{$t('config.account.account')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5-1">
|
||||
<div @click="jumpTo('promServer')" :class="{'menu-item-active' :(activeIndex == 'promServer' )}">{{$t('config.promServer.promServerList')}}</div>
|
||||
<div @click="jumpTo('promServer', 'settings')" :class="{'menu-item-active' :(activeIndex == 'promServer' )}">{{$t('config.promServer.promServerList')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5-2">
|
||||
<div @click="jumpTo('dc')" :class="{'menu-item-active' :(activeIndex == 'dc' )}">{{$t('config.dc.dc')}}</div>
|
||||
<div @click="jumpTo('dc', 'settings')" :class="{'menu-item-active' :(activeIndex == 'dc' )}">{{$t('config.dc.dc')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5-3">
|
||||
<div @click="jumpTo('model')" :class="{'menu-item-active' :(activeIndex == 'model' )}">{{$t('config.model.model')}}</div>
|
||||
<div @click="jumpTo('model', 'settings')" :class="{'menu-item-active' :(activeIndex == 'model' )}">{{$t('config.model.model')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5-4">
|
||||
<div @click="jumpTo('mib')" :class="{'menu-item-active' :(activeIndex == 'mib' )}">{{$t('config.mib.mib')}}</div>
|
||||
<div @click="jumpTo('mib', 'settings')" :class="{'menu-item-active' :(activeIndex == 'mib' )}">{{$t('config.mib.mib')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5-5">
|
||||
<div @click="jumpTo('system')" :class="{'menu-item-active' :(activeIndex == 'system' )}">{{$t('config.system.system')}}</div>
|
||||
<div @click="jumpTo('system', 'settings')" :class="{'menu-item-active' :(activeIndex == 'system' )}">{{$t('config.system.system')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5-6">
|
||||
<div @click="jumpTo('terminallog')" :class="{'menu-item-active' :(activeIndex == 'terminallog' )}">{{$t('config.terminallog.terminallog')}}</div>
|
||||
<div @click="jumpTo('terminallog', 'settings')" :class="{'menu-item-active' :(activeIndex == 'terminallog' )}">{{$t('config.terminallog.terminallog')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5-7">
|
||||
<div @click="jumpTo('operationlog')" :class="{'menu-item-active' :(activeIndex == 'operationlog' )}">{{$t('config.operationlog.operationlog')}}</div>
|
||||
<div @click="jumpTo('operationlog', 'settings')" :class="{'menu-item-active' :(activeIndex == 'operationlog' )}">{{$t('config.operationlog.operationlog')}}</div>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
<el-submenu index="6" popper-class="nz-submenu">
|
||||
@@ -278,7 +278,11 @@
|
||||
cli(){
|
||||
this.$store.commit('openConsole');
|
||||
},
|
||||
jumpTo(data) {
|
||||
jumpTo(data, parentMenu) {
|
||||
localStorage.setItem("nz-parent-menu", parentMenu);
|
||||
localStorage.setItem("nz-menu", "/" + data);
|
||||
bus.$emit("parent-menu-change", parentMenu);
|
||||
bus.$emit("menu-change", "/" + data);
|
||||
if (data != "asset") {
|
||||
this.activeItemIndexes = [];
|
||||
this.$store.state.assetData = {selectedData: [], step: 0, type: -1};
|
||||
@@ -338,13 +342,13 @@
|
||||
jumpToAsset(asset) {
|
||||
this.activeItemIndex = asset.id;
|
||||
this.$store.commit('currentAssetChange', asset);
|
||||
this.jumpTo('asset');
|
||||
this.jumpTo('asset', "assets");
|
||||
},
|
||||
jumpToProject(p) {
|
||||
this.currentProject = p;
|
||||
this.$store.commit('currentProjectChange', p);
|
||||
this.activeItemIndex = p.id;
|
||||
this.jumpTo('project');
|
||||
this.jumpTo('project', 'projects');
|
||||
},
|
||||
getAssetData() {
|
||||
this.$get('idc', {pageSize:-1}).then(response => {
|
||||
@@ -418,6 +422,7 @@
|
||||
this.rightBox.project.show = true;
|
||||
},
|
||||
logout() {
|
||||
localStorage.setItem("nz-parent-menu", "dashboards");
|
||||
this.$get('logout');
|
||||
this.jumpTo('login');
|
||||
},
|
||||
@@ -446,9 +451,11 @@
|
||||
// 刷新后有高亮
|
||||
let activePath = this.$route.path.slice(1);
|
||||
this.activeIndex = activePath;
|
||||
bus.$on("menu-change", (menu) => {
|
||||
this.activeIndex = menu;
|
||||
|
||||
bus.$on("menu-change", menu => {
|
||||
this.activeIndex = menu.split("/")[1];
|
||||
});
|
||||
|
||||
bus.$on('login', () => {
|
||||
this.username = sessionStorage.getItem("nz-username");
|
||||
this.refreshLang();
|
||||
@@ -472,14 +479,13 @@
|
||||
},
|
||||
linkData(){
|
||||
return this.$store.getters.getLinkData;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
projectListChange(n) {
|
||||
this.getProjectList();
|
||||
},
|
||||
dcListChange(n) {
|
||||
console.info(n)
|
||||
this.getAssetData();
|
||||
},
|
||||
currentProjectChange(n, o) {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<Header ref="header"></Header>
|
||||
<div class="content-box" >
|
||||
<!--<div class="content-box" >
|
||||
<router-view/>
|
||||
</div>
|
||||
</div>-->
|
||||
<left-menu></left-menu>
|
||||
<web-ssh ref="webSsh" ></web-ssh>
|
||||
</div>
|
||||
|
||||
@@ -12,11 +13,13 @@
|
||||
<script>
|
||||
import Header from "./header";
|
||||
import webSSH from "../cli/webSSH";
|
||||
import leftMenu from "./leftMenu";
|
||||
export default {
|
||||
name: "home",
|
||||
components: {
|
||||
Header,
|
||||
'web-ssh':webSSH,
|
||||
'web-ssh': webSSH,
|
||||
'left-menu': leftMenu
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,35 +1,280 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
<div class="content-left left-slot" :class="{'left-slot-shrink':isShrink}">
|
||||
<slot name="content-left"></slot>
|
||||
<div class="content-left left-slot" :class="{'left-slot-shrink': isShrink}">
|
||||
<div class="sidebar-title too-long-split">{{menus[parentMenu].title}}</div>
|
||||
<div class="sidebar-info">
|
||||
<template v-if="parentMenu == 'projects'">
|
||||
<el-collapse v-model="currentProjectTitle" class="left-menu-bg" accordion style="padding-top: 0px;" ref="projectLeft">
|
||||
<el-collapse-item v-for="(item,index) in projectList" :key="item.name+item.id+index" :name="item.name+'-'+item.id">
|
||||
<template slot="title">
|
||||
<div class="sidebar-info-item" :class="{'sidebar-info-item-active': item.id == currentProject.id}" @click="detailProject($event, item)" :id="'project-module-'+item.id">
|
||||
<div class="sidebar-info-item-txt">
|
||||
<el-popover v-if="item.name.length > 14" trigger="hover" placement="top-start" :content="item.name" popper-class="transparent-pop">
|
||||
<span slot="reference" class="">
|
||||
{{item.name}}
|
||||
</span>
|
||||
</el-popover>
|
||||
<span v-else>{{item.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="sidebar-info sub-sidebar-info" >
|
||||
<div v-if="getProjectModule(item.id).length == 0" class="sidebar-info-item sidebar-info-item-add" @click="addModule">
|
||||
<i class="nz-icon nz-icon-create-square"></i>
|
||||
</div>
|
||||
<template v-else>
|
||||
<div v-for="module in getProjectModule(item.id)" class="sidebar-info-sub-item" :class="{'sidebar-info-item-active': module.id == currentModule.id}" @click="changeModule(item, module)" :id="'project-module-'+module.id">
|
||||
<div :id="`module-${module.id}`" class="item-tip">
|
||||
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(module.id, module.name, ready)">{{module.name}}</div>
|
||||
<span class="too-long-split" style="width: 120px;">{{module.name}}</span>
|
||||
<div v-show="module.buildIn != 1" class="hid-div side-bar-menu-edit sub-side-bar-menu-edit" @click.stop="editModule(module)" :id="'project-module-edit-'+module.id" ><i class="nz-icon nz-icon-edit"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</template>
|
||||
<template v-else-if="parentMenu == 'assets'">
|
||||
|
||||
</template>
|
||||
<template v-else>
|
||||
<div v-for="menu in menus[parentMenu].menu" class="sidebar-info-item" :class="{'sidebar-info-item-active': menu.route == active}" @click="jumpTo(menu.route)">
|
||||
{{menu.name}}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div @click="toggleStat" class="bottom-icon">
|
||||
<div class="bottom-divider"></div>
|
||||
<div style="display: inline-block;float: right;margin-right:15px;"><i style="font-size: 24px;" :class="{'nz-icon nz-icon-push-pin-line':isShrink,'nz-icon nz-icon-push-pin-fill':!isShrink}" :style="{color:!isShrink?'#EE9D3F':''}"></i></div>
|
||||
<div style="display: inline-block;float: right;margin-right:15px;"><i style="font-size: 24px;" :class="{'nz-icon nz-icon-push-pin-line': isShrink, 'nz-icon nz-icon-push-pin-fill': !isShrink}" :style="{color : !isShrink ? '#EE9D3F' : ''}"></i></div>
|
||||
</div>
|
||||
</div><div class="content-right right-slot" :class="{'right-slot-open':isShrink}">
|
||||
<slot name="content-right" ></slot>
|
||||
</div><div class="content-right right-slot" :class="{'right-slot-open': isShrink}">
|
||||
<router-view/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from "../../libs/bus";
|
||||
|
||||
export default {
|
||||
name: "leftMenu",
|
||||
props:{
|
||||
resizeFunc:{type:Function}
|
||||
props: {
|
||||
resizeFunc: Function,
|
||||
},
|
||||
data(){
|
||||
data() {
|
||||
return{
|
||||
isShrink: this.$store.state.leftMenuStat,
|
||||
isShrink: localStorage.getItem('nz-left-menu-shrink') == 'true',
|
||||
parentMenu: "dashboards",
|
||||
active: "overview",
|
||||
|
||||
projectList: [],
|
||||
moduleList: [],
|
||||
currentProjectTitle: '',
|
||||
currentProject: {id: '', name: '', remark: ''}, //endpoint弹框、module列表用来回显project
|
||||
module: {}, //编辑的module
|
||||
blankModule: {id: '', type: '', name: '', project: {}, port: '', path: '', param: '', paramObj: [], snmpParam: ''}, //空白module
|
||||
currentModule: {id: '', type: '', name: '', project: {}, port: '', path: '', param: '', paramObj: [], snmpParam: ''}, //用来回显的module
|
||||
|
||||
menus: {
|
||||
settings: {
|
||||
title: this.$t('overall.config'),
|
||||
menu: [
|
||||
{route: '/account', name: this.$t('config.account.account')},
|
||||
{route: '/promServer', name: this.$t('config.promServer.promServerList')},
|
||||
{route: '/dc', name: this.$t('config.dc.dc')},
|
||||
{route: '/model', name: this.$t('config.model.model')},
|
||||
{route: '/mib', name: this.$t('config.mib.mib')},
|
||||
{route: '/system', name: this.$t('config.system.system')},
|
||||
{route: '/terminallog', name: this.$t('config.terminallog.terminallog')},
|
||||
{route: '/operationlog', name: this.$t('config.operationlog.operationlog')},
|
||||
],
|
||||
},
|
||||
alerts: {
|
||||
title: this.$t('alert.alert'),
|
||||
menu: [
|
||||
{route: '/alertList', name: this.$t('alert.alertList')},
|
||||
{route: '/alertConfig', name: this.$t('alert.alertConfig')},
|
||||
],
|
||||
},
|
||||
dashboards: {
|
||||
title: this.$t('dashboard.title'),
|
||||
menu: [
|
||||
{route: '/overview', name: this.$t('dashboard.overview.title')},
|
||||
{route: '/panel', name: this.$t('dashboard.panel.title')},
|
||||
{route: '/explore', name: this.$t('dashboard.metricPreview.title')},
|
||||
],
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
toggleStat:function(){
|
||||
this.isShrink=!this.isShrink;
|
||||
this.$store.commit('setLeftMenuStat',this.isShrink);
|
||||
if(this.resizeFunc){
|
||||
computed: {
|
||||
route() {
|
||||
return this.$route.path;
|
||||
},
|
||||
itemTip() {
|
||||
return function(id, content, ready) {
|
||||
let className = "item-tip-show";
|
||||
this.$nextTick(() => {
|
||||
if (ready) {
|
||||
let cellDom = document.querySelector(`#module-${id}`);
|
||||
let spanDom = document.querySelector(`#module-${id}>span`);
|
||||
if (cellDom.offsetWidth - 16 <= spanDom.offsetWidth) {
|
||||
document.querySelector(`#module-${id}>.el-popover`).classList.add(className);
|
||||
} else {
|
||||
document.querySelector(`#module-${id}>.el-popover`).classList.remove(className);
|
||||
}
|
||||
}
|
||||
});
|
||||
return "";
|
||||
}
|
||||
},
|
||||
projectListChange() {
|
||||
return this.$store.state.projectListChange;
|
||||
},
|
||||
moduleListChange() {
|
||||
return this.$store.state.moduleListChange;
|
||||
},
|
||||
currentProjectChange() {
|
||||
return this.$store.state.currentProject;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
route: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(n) {
|
||||
this.active = n;
|
||||
}
|
||||
},
|
||||
projectListChange(n) {
|
||||
this.getProjectList();
|
||||
},
|
||||
moduleListChange(n) {
|
||||
this.getModuleList();
|
||||
},
|
||||
endpointListChange(n) {
|
||||
this.getEndpointTableData();
|
||||
},
|
||||
currentProjectChange: {
|
||||
immediate: true,
|
||||
handler(n, o) {
|
||||
if (n && n.id != this.currentProject.id) {
|
||||
this.currentProject = this.projectList.find(p => {
|
||||
return p.id == n.id;
|
||||
});
|
||||
if (this.currentProject && this.currentProject.id) {
|
||||
this.detailProject(null, this.currentProject);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
currentProject(n, o) {
|
||||
bus.$emit("current-project-change", n);
|
||||
},
|
||||
currentModule(n, o) {
|
||||
bus.$emit("current-module-change", n);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
Promise.all([this.getProjectList(), this.getModuleList()]).then(response => {
|
||||
let cacheParentMenu = localStorage.getItem('nz-parent-menu');
|
||||
let cacheMenu = localStorage.getItem('nz-menu');
|
||||
if (cacheParentMenu) {
|
||||
this.parentMenu = cacheParentMenu;
|
||||
} else {
|
||||
this.parentMenu = "dashboards";
|
||||
}
|
||||
if (cacheMenu) {
|
||||
this.active = cacheMenu;
|
||||
} else {
|
||||
if (this.parentMenu == 'projects') {
|
||||
this.projectList.length > 0 && (this.active = this.projectList[0].name)
|
||||
} else if (this.parentMenu == 'assets') {
|
||||
|
||||
} else {
|
||||
this.active = this.menus[this.parentMenu].menu[0].route;
|
||||
}
|
||||
}
|
||||
bus.$on("parent-menu-change", parentMenu => {
|
||||
this.parentMenu = parentMenu;
|
||||
});
|
||||
bus.$on("menu-change", menu => {
|
||||
this.active = menu;
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
toggleStat() {
|
||||
this.isShrink = !this.isShrink;
|
||||
localStorage.setItem('nz-left-menu-shrink', this.isShrink);
|
||||
if (this.resizeFunc) {
|
||||
this.resizeFunc();
|
||||
}
|
||||
},
|
||||
getProjectList() {
|
||||
return new Promise(resolve => {
|
||||
this.$get('project', {pageSize: -1}).then(response=>{
|
||||
if(response.code == 200){
|
||||
this.projectList = response.data.list;
|
||||
}
|
||||
resolve(this.projectList);
|
||||
});
|
||||
});
|
||||
},
|
||||
getProjectModule(projectId) {
|
||||
let moduleList = JSON.parse(JSON.stringify(this.moduleList));
|
||||
return moduleList.filter((item,index) => {
|
||||
return item.project.id == projectId;
|
||||
})
|
||||
},
|
||||
getModuleList() {
|
||||
return new Promise(resolve => {
|
||||
this.$get('module', { pageSize: -1, pageNo: 1}).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.moduleList = response.data.list;
|
||||
for (let i = 0; i < this.moduleList.length; i++) {
|
||||
try {
|
||||
let tempObj = JSON.parse(this.moduleList[i].param);
|
||||
this.$set(this.moduleList[i], 'paramObj', []);
|
||||
for (let k in tempObj) {
|
||||
this.moduleList[i].paramObj.push({key: k, value: tempObj[k]});
|
||||
}
|
||||
} catch (err) {}
|
||||
}
|
||||
}
|
||||
resolve(this.moduleList);
|
||||
});
|
||||
});
|
||||
},
|
||||
//左侧module列表选中切换
|
||||
changeModule(project, module) {
|
||||
this.currentModule = module;
|
||||
this.currentProject = project;
|
||||
},
|
||||
detailProject(event, project) {
|
||||
bus.$emit("project-pageType", "project");
|
||||
if(event) {
|
||||
if(project) {
|
||||
this.currentProject = project;
|
||||
}
|
||||
} else {
|
||||
this.currentProjectTitle = project.id + "";
|
||||
}
|
||||
this.currentModule = {};
|
||||
},
|
||||
|
||||
|
||||
jumpTo(route) {
|
||||
bus.$emit("menu-change", route);
|
||||
localStorage.setItem('nz-parent-menu', this.parentMenu);
|
||||
localStorage.setItem('menu-change', route);
|
||||
this.$router.push({
|
||||
path: route,
|
||||
query: {
|
||||
t: +new Date()
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -37,8 +282,8 @@
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content{
|
||||
height: 100%;
|
||||
position:relative;
|
||||
position: relative;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
.slot-content{
|
||||
height: 100%;
|
||||
|
||||
@@ -5,17 +5,6 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="config">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('alert.alert')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top" @click="jumpTo('alertList')" id="alert-jump-alertlist">
|
||||
{{$t('alert.alertList')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item sidebar-info-item-active">{{$t('alert.alertConfig')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content">
|
||||
<div class="main-list" :class="{'main-list-with-sub': bottomBox.showSubList}">
|
||||
<div class="main-modal"></div>
|
||||
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
||||
@@ -100,8 +89,6 @@
|
||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :obj="bottomBox.alertRule" :is-full-screen="bottomBox.isFullScreen" :from="'alertRule'" :target-tab.sync="bottomBox.targetTab" :detail="bottomBox.ruleDetail"
|
||||
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
||||
</transition>
|
||||
</div>
|
||||
</left-menu>
|
||||
<transition name="right-box">
|
||||
<alert-config-box v-if="rightBox.show" :alert-rule="alertRule" @close="closeRightBox" ref="alertConfigBox"></alert-config-box>
|
||||
</transition>
|
||||
|
||||
@@ -18,17 +18,6 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="list">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('alert.alert')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top sidebar-info-item-active">{{$t('alert.alertList')}}</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('alertConfig')" id="alert-jump-config">
|
||||
{{$t('alert.alertConfig')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content">
|
||||
<div class="main-list main-and-sub-transition" :class="{'main-list-with-sub': showSubList}">
|
||||
<div class="top-tools" v-show="mainResizeShow">
|
||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
||||
@@ -56,15 +45,6 @@
|
||||
</div>
|
||||
<bottom-box v-if="showSubList" :show-sub-list="showSubList" :subResizeShow="subResizeShow" :isFullScreen="isFullScreen" :from="'alertMessage'" :targetTab.sync="targetTab" :detailList="tabDetailList"
|
||||
@closeSubList="showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" :tabList="tabList"></bottom-box>
|
||||
</div>
|
||||
</left-menu>
|
||||
<!--<alert-config-box :parentAlertRule="viewRuleData" @reload="getAlertList" ref="alertConfigBox"></alert-config-box>
|
||||
<project-box :project="viewProjectData" ref="projectBox" @reload="getAlertList"></project-box>
|
||||
<module-box :module="viewModuleData" @reload="getAlertList" ref="moduleBox"></module-box>-->
|
||||
<!--<asset-edit-unit :edit-unit-show='viewAssetState' @refreshData="getAlertList" @sendStateData="tabControl"
|
||||
ref="assetEditUnit"></asset-edit-unit>-->
|
||||
<!--<asset-box :edit-unit-show='viewAssetState' @refreshData="getAlertList" @sendStateData="tabControl"
|
||||
ref="assetEditUnit"></asset-box>-->
|
||||
<element-set
|
||||
v-clickoutside="elementsetHide"
|
||||
:table-title="tableTitle"
|
||||
@@ -127,7 +107,6 @@
|
||||
import alertRuleInfo from '../../common/alert/alertRuleInfo'
|
||||
import alertLabel from '../../common/alert/alertLabel'
|
||||
import alertMessageTable from '@/components/common/alert/alertMessageTable.vue'
|
||||
var vm;
|
||||
export default {
|
||||
name: "alertList",
|
||||
components: {
|
||||
@@ -138,7 +117,6 @@
|
||||
'alertMessageTable':alertMessageTable,
|
||||
},
|
||||
data() {
|
||||
vm = this;
|
||||
return {
|
||||
loading: false,
|
||||
/*二级列表相关*/
|
||||
|
||||
@@ -5,35 +5,6 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="account">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('overall.config')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top sidebar-info-item-active">{{$t('config.account.account')}}</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('promServer')" id="account-jump-promserver">
|
||||
{{$t('config.promServer.promServerList')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('dc')" id="account-jump-dc">
|
||||
{{$t('config.dc.dc')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('model')" id="account-jump-model">
|
||||
{{$t('config.model.model')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('mib')" id="account-jump-mib">
|
||||
{{$t('config.mib.mib')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('system')" id="account-jump-system">
|
||||
{{$t('config.system.system')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('terminallog')" id="account-jump-terminallog">
|
||||
{{$t('config.terminallog.terminallog')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('operationlog')" id="account-jump-operation">
|
||||
{{$t('config.operationlog.operationlog')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content">
|
||||
<!-- 主页面 -->
|
||||
<div class="main-list" :class="{'main-list-with-sub': bottomBox.showSubList}">
|
||||
<!-- 顶部工具栏 -->
|
||||
@@ -121,8 +92,6 @@
|
||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :obj="bottomBox.user" :is-full-screen="bottomBox.isFullScreen" :from="'account'" :target-tab.sync="bottomBox.targetTab" :detail="bottomBox.userDetail"
|
||||
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
||||
</transition>
|
||||
</div>
|
||||
</left-menu>
|
||||
<transition name="right-box">
|
||||
<account-box v-if="rightBox.show" :user="user" @close="closeRightBox"></account-box>
|
||||
</transition>
|
||||
@@ -253,15 +222,6 @@
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.listResize(vm, e);
|
||||
},
|
||||
jumpTo(data, id) {
|
||||
bus.$emit("menu-change", data);
|
||||
this.$router.push({
|
||||
path: "/" + data,
|
||||
query: {
|
||||
t: +new Date()
|
||||
}
|
||||
});
|
||||
},
|
||||
convertToDetail(obj) {
|
||||
let detail = [];
|
||||
detail.push({label: this.$t("config.account.account"), value: obj.username});
|
||||
@@ -347,14 +307,6 @@
|
||||
this.getTableData();
|
||||
});
|
||||
},
|
||||
jumpTo(data, id) {
|
||||
this.$router.push({
|
||||
path: "/" + data,
|
||||
query: {
|
||||
t: +new Date()
|
||||
}
|
||||
});
|
||||
},
|
||||
esc() {
|
||||
this.rightBox.show = false;
|
||||
},
|
||||
|
||||
@@ -5,38 +5,7 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="dc" >
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('overall.config')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top" @click="jumpTo('account')" id="prom-jump-account">
|
||||
{{$t('config.account.account')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('promServer')" id="account-jump-promserver">
|
||||
{{$t('config.promServer.promServerList')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item sidebar-info-item-active" id="dc-jump-dc">
|
||||
{{$t('config.dc.dc')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('model')" id="dc-jump-model">
|
||||
{{$t('config.model.model')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('mib')" id="dc-jump-mib">
|
||||
{{$t('config.mib.mib')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('system')" id="dc-jump-system">
|
||||
{{$t('config.system.system')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('terminallog')" id="dc-jump-terminallog">
|
||||
{{$t('config.terminallog.terminallog')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('operationlog')" id="account-jump-operation">
|
||||
{{$t('config.operationlog.operationlog')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--dc table start-->
|
||||
<div slot="content-right" class="slot-content">
|
||||
<div class="main-list" :class="{'main-list-with-sub': bottomBox.showSubList}">
|
||||
<div class="main-modal"></div>
|
||||
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
||||
@@ -131,13 +100,11 @@
|
||||
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||
</div>
|
||||
</div>
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :obj="bottomBox.dc" :is-full-screen="bottomBox.isFullScreen" :from="'dc'" :target-tab.sync="bottomBox.targetTab" :detail="bottomBox.dcDetail"
|
||||
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
||||
</transition>
|
||||
</div>
|
||||
</left-menu>
|
||||
<!--dc table end-->
|
||||
<element-set
|
||||
v-if="tools.showElementSet"
|
||||
|
||||
@@ -5,35 +5,6 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="mib">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('overall.config')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top" @click="jumpTo('account')" id="mib-jump-account">
|
||||
{{$t('config.account.account')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('promServer')" id="mib-jump-prom">{{$t('config.promServer.promServerList')}}</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('dc')" id="mib-jump-dc">
|
||||
{{$t('config.dc.dc')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item " id="mib-jump-model" @click="jumpTo('model')">
|
||||
{{$t('config.model.model')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item sidebar-info-item-active" id="mib-jump-mib">
|
||||
{{$t('config.mib.mib')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('system')" id="mib-jump-system">
|
||||
{{$t('config.system.system')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('terminallog')" id="mib-jump-terminallog">
|
||||
{{$t('config.terminallog.terminallog')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('operationlog')" id="account-jump-operation">
|
||||
{{$t('config.operationlog.operationlog')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content">
|
||||
<template v-if="showTab == 'file'">
|
||||
<div class="top-tools">
|
||||
<div class="nz-tab top-tool-main-right top-tool-main-right-to-left" style="width: 300px">
|
||||
@@ -117,8 +88,6 @@
|
||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||
</template>
|
||||
<mib-browser :show-tab="showTab" v-if="showTab == 'browser'" @toFileTab="showTab = 'file'"></mib-browser>
|
||||
</div>
|
||||
</left-menu>
|
||||
<element-set
|
||||
v-if="tools.showElementSet"
|
||||
v-clickoutside="elementsetHide"
|
||||
|
||||
@@ -5,35 +5,6 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="model">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('overall.config')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top" @click="jumpTo('account')" id="model-jump-account">
|
||||
{{$t('config.account.account')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('promServer')" id="model-jump-prom">{{$t('config.promServer.promServerList')}}</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('dc')" id="model-jump-dc">
|
||||
{{$t('config.dc.dc')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item sidebar-info-item-active" id="model-jump-model">
|
||||
{{$t('config.model.model')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('mib')" id="model-jump-mib">
|
||||
{{$t('config.mib.mib')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('system')" id="model-jump-system">
|
||||
{{$t('config.system.system')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('terminallog')" id="modeel-jump-terminallog">
|
||||
{{$t('config.terminallog.terminallog')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('operationlog')" id="model-jump-operation">
|
||||
{{$t('config.operationlog.operationlog')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content">
|
||||
<div class="main-list" :class="{'main-list-with-sub': bottomBox.showSubList}">
|
||||
<div class="main-modal"></div>
|
||||
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
||||
@@ -112,8 +83,6 @@
|
||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :is-fullscreen="bottomBox.isFullScreen" from="model" :target-tab.sync="bottomBox.targetTab" :obj="bottomBox.model"
|
||||
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ref="panelBox"></bottom-box>
|
||||
</transition>
|
||||
</div>
|
||||
</left-menu>
|
||||
<element-set
|
||||
v-if="tools.showElementSet"
|
||||
v-clickoutside="elementsetHide"
|
||||
|
||||
@@ -5,37 +5,6 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="operationlog">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('overall.config')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top" @click="jumpTo('account')" id="prom-jump-account">
|
||||
{{$t('config.account.account')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('promServer')" id="account-jump-promserver">
|
||||
{{$t('config.promServer.promServerList')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('dc')" id="operation-jump-dc">
|
||||
{{$t('config.dc.dc')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('model')" id="operation-jump-model">
|
||||
{{$t('config.model.model')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('mib')" id="operation-jump-mib">
|
||||
{{$t('config.mib.mib')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('system')" id="operation-jump-system">
|
||||
{{$t('config.system.system')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('terminallog')" id="operation-jump-terminallog">
|
||||
{{$t('config.terminallog.terminallog')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item sidebar-info-item-active" @click="jumpTo('operationlog')" id="operation-jump-operation">
|
||||
{{$t('config.operationlog.operationlog')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content">
|
||||
<div class="top-tools">
|
||||
<div></div>
|
||||
<div>
|
||||
@@ -86,8 +55,6 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||
</div>
|
||||
</left-menu>
|
||||
<element-set
|
||||
v-clickoutside="elementsetHide"
|
||||
:dropCol="dropCol"
|
||||
|
||||
@@ -5,35 +5,6 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="prom">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('overall.config')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top" @click="jumpTo('account')" id="prom-jump-account">
|
||||
{{$t('config.account.account')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item sidebar-info-item-active">{{$t('config.promServer.promServerList')}}</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('dc')" id="prom-jump-dc">
|
||||
{{$t('config.dc.dc')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('model')" id="prom-jump-model">
|
||||
{{$t('config.model.model')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('mib')" id="prom-jump-mib">
|
||||
{{$t('config.mib.mib')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('system')" id="prom-jump-system">
|
||||
{{$t('config.system.system')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('terminallog')" id="prom-jump-terminallog">
|
||||
{{$t('config.terminallog.terminallog')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('operationlog')" id="account-jump-operation">
|
||||
{{$t('config.operationlog.operationlog')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right"class="slot-content">
|
||||
<div class="main-list" :class="{'main-list-with-sub': bottomBox.showSubList}">
|
||||
<div class="main-modal"></div>
|
||||
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
||||
@@ -103,8 +74,6 @@
|
||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :obj="bottomBox.promServer" :is-full-screen="bottomBox.isFullScreen" :from="'promServer'" :target-tab.sync="bottomBox.targetTab" :detail="bottomBox.promDetail"
|
||||
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
||||
</transition>
|
||||
</div>
|
||||
</left-menu>
|
||||
<transition name="right-box">
|
||||
<prom-server-box v-if="rightBox.show" :prom-server="promServer" @close="closeRightBox"></prom-server-box>
|
||||
</transition>
|
||||
|
||||
@@ -1,34 +1,5 @@
|
||||
<template>
|
||||
<div class="system">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('overall.config')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top" @click="jumpTo('account')" id="prom-jump-account">
|
||||
{{$t('config.account.account')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item " @click="jumpTo('promServer')">{{$t('config.promServer.promServerList')}}</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('dc')" id="system-jump-dc">
|
||||
{{$t('config.dc.dc')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('model')" id="system-jump-model">
|
||||
{{$t('config.model.model')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('mib')" id="system-jump-mib">
|
||||
{{$t('config.mib.mib')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item sidebar-info-item-active" id="system-jump-system">
|
||||
{{$t('config.system.system')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('terminallog')" id="system-jump-terminallog">
|
||||
{{$t('config.terminallog.terminallog')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('operationlog')" id="account-jump-operation">
|
||||
{{$t('config.operationlog.operationlog')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content system-tabs">
|
||||
<el-tabs type="border-card" @tab-click="selectTab" v-model="activeTab" class="system-tabs" >
|
||||
<el-tab-pane :label="$t('config.system.basic.basic')" name="basic">
|
||||
<div class="system-config-form">
|
||||
@@ -258,8 +229,6 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</left-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -5,37 +5,6 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="terminallog">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('overall.config')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-top" @click="jumpTo('account')" id="prom-jump-account">
|
||||
{{$t('config.account.account')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('promServer')" id="account-jump-promserver">
|
||||
{{$t('config.promServer.promServerList')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('dc')" id="terminallog-jump-dc">
|
||||
{{$t('config.dc.dc')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('model')" id="terminallog-jump-model">
|
||||
{{$t('config.model.model')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('mib')" id="terminal-jump-mib">
|
||||
{{$t('config.mib.mib')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('system')" id="terminal-jump-system">
|
||||
{{$t('config.system.system')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item sidebar-info-item-active" @click="jumpTo('terminallog')" id="terminallog-jump-terminallog">
|
||||
{{$t('config.terminallog.terminallog')}}
|
||||
</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('operationlog')" id="terminallog-jump-operation">
|
||||
{{$t('config.operationlog.operationlog')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content">
|
||||
<div class="top-tools">
|
||||
<div></div>
|
||||
<div>
|
||||
@@ -90,8 +59,6 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||
</div>
|
||||
</left-menu>
|
||||
<element-set
|
||||
v-clickoutside="elementsetHide"
|
||||
:dropCol="dropCol"
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
<template>
|
||||
<div class="explore">
|
||||
<left-menu>
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('dashboard.title')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item " @click="jumpTo('overview')">{{$t('dashboard.overview.title')}}</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('panel')">{{$t('dashboard.panel.title')}}</div>
|
||||
<div class="sidebar-info-item sidebar-info-item-active">{{$t('dashboard.metricPreview.title')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content">
|
||||
<div class="main-list main-and-sub-transition">
|
||||
<!-- 顶部工具栏 -->
|
||||
<div class="top-tools" style="z-index: 1">
|
||||
@@ -206,8 +196,6 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
|
||||
ref="elementset"
|
||||
></element-set>
|
||||
</div>
|
||||
</left-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
<template>
|
||||
<div class="overview">
|
||||
<!--左侧菜单栏-->
|
||||
<left-menu>
|
||||
<div slot="content-left" class="overview-left slot-content">
|
||||
<div class="sidebar-title">{{$t('dashboard.title')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item sidebar-info-item-active" >{{$t('dashboard.overview.title')}}</div>
|
||||
<div class="sidebar-info-item sidebar-info-top " @click="jumpTo('panel')">{{$t('dashboard.panel.title')}}</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('explore')">{{$t('dashboard.metricPreview.title')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--右侧内容-->
|
||||
<div class="overview-right slot-content" id="mainDisplay" slot="content-right">
|
||||
<!--标题-->
|
||||
<div class="overview-content-header">
|
||||
<div class="header-title" :class="{'hide-div':!isFullScreen}">{{systemName&&systemName != 'undefined'&&systemName != null?systemName: $t('dashboard.overview.contentTitle')}}</div>
|
||||
@@ -177,8 +165,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</left-menu>
|
||||
<div class="axis-tooltip el-popover"></div>
|
||||
<!--用于assetType饼图label-->
|
||||
<img src='../../../../assets/img/up.png' id="upPic" style="display: none;">
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
<template>
|
||||
<div class="panel">
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<div class="sidebar-title">{{$t('dashboard.title')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<div class="sidebar-info-item " @click="jumpTo('overview')">{{$t('dashboard.overview.title')}}</div>
|
||||
<div class="sidebar-info-item sidebar-info-top sidebar-info-item-active">{{$t('dashboard.panel.title')}}</div>
|
||||
<div class="sidebar-info-item" @click="jumpTo('explore')">{{$t('dashboard.metricPreview.title')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content">
|
||||
<div class="top-tools">
|
||||
<div class="top-tool-main-left" v-if="panelData.length == 0" style="margin-left: 10px;">
|
||||
<button @click="toAdd" class="nz-btn nz-btn-style-light nz-btn-size-small"><i class="nz-icon nz-icon-create-square"></i> {{$t("dashboard.panel.createPanelTitleSec")}}</button>
|
||||
@@ -76,8 +66,6 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<button class="to-top" :class="{'to-top-is-hover': tableHover}" v-show="showTopBtn" @click="$toTop('el', $refs.dashboardScrollbar.wrap)" style="bottom: 0;"><i class="nz-icon nz-icon-top"></i></button>
|
||||
</div>
|
||||
</left-menu>
|
||||
|
||||
<transition name="right-box">
|
||||
<chart-box @close="closeChartBox" :chart="chart" v-if="rightBox.chart.show" ref="addChartModal" :show-panel="showPanel" :panel-data="panelData" @reload="panelReload" @on-create-success="createSuccess" @on-delete-success="delChartOk" @reloadOnlyPanel="panelReloadOnlyPanel"></chart-box>
|
||||
|
||||
@@ -20,49 +20,7 @@
|
||||
</style>
|
||||
<template>
|
||||
<div class="project">
|
||||
|
||||
<left-menu >
|
||||
<div slot="content-left" class="slot-content">
|
||||
<el-scrollbar ref="leftScrollbar" style="height: 100%">
|
||||
<div class="sidebar-title too-long-split">{{$t('project.project.project')}}</div>
|
||||
<div class="sidebar-info">
|
||||
<el-collapse v-model="currentProjectTitle" class="left-menu-bg" accordion style="padding-top: 0px;" ref="projectLeft">
|
||||
<el-collapse-item v-for="(item,index) in projectList" :key="item.name+item.id+index" :name="item.name+'-'+item.id">
|
||||
<template slot="title">
|
||||
<div class="sidebar-info-item" :class="{'sidebar-info-item-active': item.id == currentProject.id}" @click="detailProject($event,item)" :id="'project-module-'+item.id">
|
||||
<div class="sidebar-info-item-txt">
|
||||
<el-popover v-if="item.name.length > 14" trigger="hover" placement="top-start" :content="item.name" popper-class="transparent-pop">
|
||||
<span slot="reference" class="">
|
||||
{{item.name}}
|
||||
</span>
|
||||
</el-popover>
|
||||
<span v-else>{{item.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="sidebar-info sub-sidebar-info" >
|
||||
<div v-if="getProjectModule(item.id).length == 0" class="sidebar-info-item sidebar-info-item-add" @click="addModule">
|
||||
<i class="nz-icon nz-icon-create-square"></i>
|
||||
</div>
|
||||
<template v-else>
|
||||
<div v-for="module in getProjectModule(item.id)" class="sidebar-info-sub-item" :class="{'sidebar-info-item-active': module.id == currentModule.id}" @click="changeModule(item, module)" :id="'project-module-'+module.id">
|
||||
<div :id="`module-${module.id}`" class="item-tip">
|
||||
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(module.id, module.name, ready)">{{module.name}}</div>
|
||||
<span class="too-long-split" style="width: 120px;">{{module.name}}</span>
|
||||
<div v-show="module.buildIn != 1" class="hid-div side-bar-menu-edit sub-side-bar-menu-edit" @click.stop="editModule(module)" :id="'project-module-edit-'+module.id" ><i class="nz-icon nz-icon-edit"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
|
||||
<!--endpoint-->
|
||||
<div slot="content-right" class="slot-content" v-show="pageType == 'endpoint'">
|
||||
<!-- 主列表 -->
|
||||
<template v-show="pageType == 'endpoint'">
|
||||
<div class="main-list" :class="{'main-list-with-sub': bottomBox.showSubList}">
|
||||
<div class="main-modal"></div>
|
||||
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
||||
@@ -155,16 +113,16 @@
|
||||
<Pagination :tableId="tableId" v-cloak :pageObj="endpointPageObj" @pageNo='endpointPageNo' @pageSize='endpointPageSize' ref="endpointPagination"></Pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-show="pageType == 'project'">
|
||||
<panel-tab from="project" :obj="currentProject" targetTab.sync="panel"></panel-tab>
|
||||
</template>
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :is-full-screen="bottomBox.isFullScreen"
|
||||
:from="'endpoint'" :target-tab.sync="bottomBox.targetTab" :detail="bottomBox.endpointDetail" :obj="endpoint" :asset-detail="bottomBox.assetDetail"
|
||||
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
||||
</transition>
|
||||
</div>
|
||||
<div slot="content-right" class="slot-content" v-show="pageType == 'project'">
|
||||
<panel-tab from="project" :obj="currentProject" targetTab.sync="panel"></panel-tab>
|
||||
</div>
|
||||
</left-menu>
|
||||
|
||||
<element-set
|
||||
v-if="tools.showElementSet"
|
||||
v-clickoutside="elementsetHide"
|
||||
@@ -189,6 +147,7 @@
|
||||
import exportXLSX from "../../common/exportXLSX";
|
||||
import loading from "../../common/loading";
|
||||
import panelTab from '../../common/bottomBox/tabs/panelTab'
|
||||
import bus from '../../../libs/bus'
|
||||
|
||||
export default {
|
||||
name: "project2",
|
||||
@@ -720,6 +679,9 @@
|
||||
setTimeout(() => {
|
||||
this.ready = true;
|
||||
}, 300);
|
||||
bus.$on("project-pageType", pageType => {
|
||||
this.pageType = pageType;
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
//绑定滚动条事件,控制top按钮
|
||||
let el = this.$refs.endpointTable.$el.querySelector(".el-table__body-wrapper");
|
||||
@@ -764,9 +726,9 @@
|
||||
endpointListChange() {
|
||||
return this.$store.state.endpointListChange;
|
||||
},
|
||||
currentProjectChange() {
|
||||
/*currentProjectChange() {
|
||||
return this.$store.state.currentProject;
|
||||
},
|
||||
},*/
|
||||
itemTip() {
|
||||
return function(id, content, ready) {
|
||||
let className = "item-tip-show";
|
||||
@@ -795,7 +757,7 @@
|
||||
endpointListChange(n) {
|
||||
this.getEndpointTableData();
|
||||
},
|
||||
currentProjectChange: {
|
||||
/*currentProjectChange: {
|
||||
immediate:true,
|
||||
handler(n, o) {
|
||||
if (n.id != this.currentProject.id) {
|
||||
@@ -805,7 +767,7 @@
|
||||
this.detailProject(null, this.currentProject);
|
||||
}
|
||||
},
|
||||
},
|
||||
},*/
|
||||
currentProject(n, o) {
|
||||
this.$store.commit("currentProjectChange", Object.assign({}, n));
|
||||
},
|
||||
|
||||
@@ -45,11 +45,11 @@ export default new Router({
|
||||
component: resolve => require(['../components/page/dashboard/explore/explore.vue'], resolve),
|
||||
},
|
||||
{
|
||||
path: 'overview',
|
||||
path: '/overview',
|
||||
component: resolve => require(['../components/page/dashboard/overview/overview2.vue'],resolve)
|
||||
},
|
||||
{
|
||||
path: 'test',
|
||||
path: '/test',
|
||||
component: resolve => require(['../components/charts/d3-line-chart2'],resolve)
|
||||
},
|
||||
{
|
||||
|
||||
@@ -44,7 +44,6 @@ const store = new Vuex.Store({
|
||||
consoleCount:0,//当前console窗口数
|
||||
isAddConsole:false,//是否增加窗口
|
||||
consoleParam:{},//新开console窗口参数
|
||||
leftMenuStat:false, //0展开状态,1隐藏状态
|
||||
linkData:[],//导航数据
|
||||
},
|
||||
getters: {
|
||||
@@ -134,10 +133,7 @@ const store = new Vuex.Store({
|
||||
minConsole(state){//最小化窗口
|
||||
state.consoleShow=false;
|
||||
},
|
||||
setLeftMenuStat:function(state,data){
|
||||
state.leftMenuStat = data;
|
||||
},
|
||||
setLinkData:function(state,data){
|
||||
setLinkData(state, data) {
|
||||
state.linkData = data;
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user