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