From 0b6aa43a573857633d01f583bec0593d968c5f1a Mon Sep 17 00:00:00 2001 From: renpy Date: Fri, 18 Aug 2023 13:49:25 +0800 Subject: [PATCH] =?UTF-8?q?Center=20-=20History=20=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0type=E5=8F=82=E6=95=B0=20=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC=E6=88=96=E8=80=85=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E6=97=B6=EF=BC=8C=E4=B8=8B=E6=8B=89=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../abnormalAlarm/alarmCenter/alarmHistory/index.vue | 9 +++++---- .../abnormalAlarm/serverMonitor/instances/cpu.vue | 1 + .../abnormalAlarm/serverMonitor/instances/details.vue | 11 ++++++++++- .../abnormalAlarm/serverMonitor/instances/index.vue | 2 +- .../abnormalAlarm/serverMonitor/instances/monitor.vue | 1 + .../serverMonitor/instances/serviceProcess.vue | 1 + .../abnormalAlarm/serverMonitor/overview/index.vue | 11 +++++++++-- 7 files changed, 28 insertions(+), 8 deletions(-) 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 @@