diff --git a/src/views/abnormalAlarm/alarmCenter/alarmHistory/index.vue b/src/views/abnormalAlarm/alarmCenter/alarmHistory/index.vue index 87170d4..ff58160 100644 --- a/src/views/abnormalAlarm/alarmCenter/alarmHistory/index.vue +++ b/src/views/abnormalAlarm/alarmCenter/alarmHistory/index.vue @@ -145,15 +145,16 @@ export default { endDate, types } - this.getAlarmLogBar({ startDate, endDate }) + this.getAlarmLogBar({ startDate, endDate, types }) this.getTypeAlarmPie({ startDate, endDate }) this.getAlarmLogTable({ startDate, endDate, types }) - this.getAlarmTop({ startDate, endDate }) + this.getAlarmTop({ startDate, endDate, types }) }, getAlarmLogBar(obj) { let params = { startDate:obj.startDate, - endDate:obj.endDate, + endDate: obj.endDate, + type: obj.types } postAction("/alarmLog/viewAll", params).then(res => { if (res.success) { @@ -236,7 +237,6 @@ export default { }, label: { formatter: (params) => { - console.log(params); return params.value>0?params.value:"" }, show: true, @@ -360,6 +360,7 @@ export default { let params = { startDate:obj.startDate, endDate:obj.endDate, + type: obj.types } postAction("/alarmLog/ruleTop", params).then(res => { console.log(res); diff --git a/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue b/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue index 2f84b04..7773848 100644 --- a/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue +++ b/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue @@ -191,6 +191,7 @@ export default { value: item.sourceId } }) + this.queryParams.server = this.$route.query.serverId || res.result[0].sourceId } else { this.$message.warning("This operation fails. Contact your system administrator") } diff --git a/src/views/abnormalAlarm/serverMonitor/instances/details.vue b/src/views/abnormalAlarm/serverMonitor/instances/details.vue index bc16110..f452626 100644 --- a/src/views/abnormalAlarm/serverMonitor/instances/details.vue +++ b/src/views/abnormalAlarm/serverMonitor/instances/details.vue @@ -429,15 +429,24 @@ export default { guageMemory: null, guageLoads: null, areaCpu: null, + currId: "" } }, - mounted () { + mounted() { + // this.currId = this.$route.query.serverId||"" this.getSysServer(res => { this.loading = false if (res.success) { this.ipagination.total = res.result.total this.dataSource = res.result.records + if (this.$route.query.serverId) { + this.currId = this.$route.query.serverId + this.currIndex = this.dataSource.findIndex(item=>item.id === this.currId) + } else { + this.currId = this.dataSource[0].id + this.currIndex = 0 + } } else { this.$message.warning("This operation fails. Contact your system administrator") } diff --git a/src/views/abnormalAlarm/serverMonitor/instances/index.vue b/src/views/abnormalAlarm/serverMonitor/instances/index.vue index 13667e2..95c87be 100644 --- a/src/views/abnormalAlarm/serverMonitor/instances/index.vue +++ b/src/views/abnormalAlarm/serverMonitor/instances/index.vue @@ -1,7 +1,7 @@