处理Overview 双击进去instances的时候 左侧导航没有切换到对应的的问题
server 切换服务器的时候 数据没有清空Instances页面报警历史接口问题
This commit is contained in:
parent
5a6387bef9
commit
41c34034ed
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<a-card :bordered="false" style="height: 100%;">
|
||||
<a-card :bordered="false" style="height: 100%">
|
||||
<a-layout id="components-layout-demo-custom-trigger" style="height: 100%">
|
||||
<a-layout-sider theme="light" v-model="collapsed" :trigger="null" collapsible width="350px">
|
||||
<div style="height: 100%">
|
||||
|
@ -97,13 +97,13 @@ export default {
|
|||
},
|
||||
created() {
|
||||
var permissionList = this.$store.getters.permissionList
|
||||
console.log("permissionList",permissionList);
|
||||
console.log('permissionList', permissionList)
|
||||
permissionList.forEach((f) => {
|
||||
if (f.name === "abnormal-alarm") {
|
||||
if (f.name === 'abnormal-alarm') {
|
||||
this.menus = f.children
|
||||
}
|
||||
})
|
||||
console.log("路由信息",this.menus);
|
||||
console.log('路由信息', this.menus)
|
||||
// this.initDefaultKeys(this.menus[0])
|
||||
// 将从缓存中取出openKeys
|
||||
// const openKeys = window.sessionStorage.getItem('openKeys')
|
||||
|
@ -113,10 +113,9 @@ export default {
|
|||
// this.defaultSelectedKeys.push(selectedKeys)
|
||||
this.currSlecteKey.push(selectedKeys)
|
||||
} else {
|
||||
|
||||
this.initDefaultKeys(this.menus[0])
|
||||
}
|
||||
this.openKeys =this.defaultOpenKeys= this.menus.map(item => {
|
||||
this.openKeys = this.defaultOpenKeys = this.menus.map((item) => {
|
||||
return item.path
|
||||
})
|
||||
// if (openKeys) {
|
||||
|
@ -128,21 +127,22 @@ export default {
|
|||
// this.openKeys = JSON.parse(openKeys)
|
||||
// }
|
||||
},
|
||||
// watch: {
|
||||
// "$route": {
|
||||
// handler: function (val, oldVal) {
|
||||
// this.currSlecteKey=[]
|
||||
// console.log(val);
|
||||
// this.currSlecteKey.push(val.path)
|
||||
// window.sessionStorage.setItem('currMenu', val.path)
|
||||
// },
|
||||
// deep:true,
|
||||
// immediate:true
|
||||
// }
|
||||
// },
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function (val, oldVal) {
|
||||
this.currSlecteKey = []
|
||||
console.log(val)
|
||||
this.currSlecteKey.push(val.path)
|
||||
window.sessionStorage.setItem('currMenu_alarm', val.path)
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 点击菜单,路由跳转,注意的是当点击MenuItem才会触发此函数
|
||||
menuClick({ item, key, keyPath }) {
|
||||
console.log(item, key, keyPath)
|
||||
this.currSlecteKey = []
|
||||
window.sessionStorage.setItem('currMenu_alarm', key)
|
||||
// var parentPath = item._props.parentMenu._props.eventKey;
|
||||
|
@ -156,7 +156,7 @@ export default {
|
|||
},
|
||||
initDefaultKeys(data) {
|
||||
this.currSlecteKey = []
|
||||
console.log("datadefaultOpenKeys",data);
|
||||
console.log('datadefaultOpenKeys', data)
|
||||
this.defaultOpenKeys.push(data.path)
|
||||
data.children.some((f) => {
|
||||
if (f.children) {
|
||||
|
|
|
@ -448,6 +448,8 @@ export default {
|
|||
max: 0,
|
||||
min: 0,
|
||||
avg: 0,
|
||||
xData: [],
|
||||
yData: [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -622,7 +624,6 @@ export default {
|
|||
getCpuUtilizationData() {
|
||||
let params = {
|
||||
itemId: this.currItemId,
|
||||
// itemId: '37550',
|
||||
itemType: 0,
|
||||
start: `${dateFormat(new Date(), 'yyyy-MM-dd')} 00:00:00`,
|
||||
end: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
||||
|
@ -646,7 +647,6 @@ export default {
|
|||
getTimeLineData() {
|
||||
let params = {
|
||||
itemId: this.currItemId,
|
||||
// itemId: '37550',
|
||||
itemType: 0,
|
||||
start: `${dateFormat(new Date(), 'yyyy-MM-dd')} 00:00:00`,
|
||||
end: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
||||
|
@ -728,6 +728,16 @@ export default {
|
|||
this.currIndex = i
|
||||
this.currItemId = item.cpuUsedItemId
|
||||
this.currSourceId = item.sourceId
|
||||
this.detailInfo = {}
|
||||
this.cpuData = {
|
||||
max: 0,
|
||||
min: 0,
|
||||
avg: 0,
|
||||
xData: [],
|
||||
yData: [],
|
||||
}
|
||||
startTime = null
|
||||
data1 = []
|
||||
this.getBasiclnfo(item.hostId)
|
||||
this.getCpuUtilizationData()
|
||||
this.getTimeLineData()
|
||||
|
@ -735,8 +745,7 @@ export default {
|
|||
getDetailsAlarmInfo(callBack) {
|
||||
this.loading = true
|
||||
let params = {
|
||||
// sourceId:this.currSourceId,
|
||||
sourceId: 'e2',
|
||||
sourceId: this.currSourceId,
|
||||
pageNo: this.ipagination_alarm_info.current,
|
||||
pageSize: this.ipagination_alarm_info.pageSize,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user