diff --git a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorListDto.java b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorListDto.java index 6c146d16..bf07d07c 100644 --- a/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorListDto.java +++ b/ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorListDto.java @@ -20,7 +20,7 @@ public class MonitorListDto { private String deviceLevel; private String location; private String status; - + private String equImage; // 监控指标 private Float cpuUtilization; private String health; diff --git a/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml index 70a53d5d..4e0c876c 100644 --- a/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml +++ b/ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml @@ -200,6 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" c.equTypeName, c.equManuId, c.equManuName, + c.equImage, c.version, c.deviceLevel, c.location, @@ -219,6 +220,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t.name AS equTypeName, b.manufacture AS equManuId, m.name AS equManuName, + b.equ_image AS equImage, b.version, b.device_level AS deviceLevel, b.location, @@ -324,9 +326,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN equ_supplier s ON b.supplier_id = s.id LEFT JOIN equ_gather g ON b.id = g.equ_id - where g.cpu_utilization is not null - and b.id = #{id} - + where b.id = #{id} ORDER BY g.gather_time desc limit 1 diff --git a/ALOps_sys_fe/alops-ui/package.json b/ALOps_sys_fe/alops-ui/package.json index 77b1102f..aa33ef61 100644 --- a/ALOps_sys_fe/alops-ui/package.json +++ b/ALOps_sys_fe/alops-ui/package.json @@ -29,6 +29,7 @@ "axios": "0.28.1", "clipboard": "2.0.8", "core-js": "3.37.1", + "dayjs": "^1.11.18", "echarts": "5.4.0", "element-ui": "2.15.14", "file-saver": "2.0.5", @@ -37,6 +38,7 @@ "js-beautify": "1.13.0", "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", + "lodash": "^4.17.21", "nprogress": "0.2.0", "quill": "2.0.2", "screenfull": "5.0.2", diff --git a/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js b/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js index e68555c1..e3551bfd 100644 --- a/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js +++ b/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js @@ -1,5 +1,5 @@ import request from '@/utils/request' -const api = '/QandA/knowledge/' +const api = '/QandA/knowledge' // 查询详细 export function getDict() { @@ -21,7 +21,7 @@ export function permanentKnowledgeList(query) { // 获取所有上传文件信息 export function uploadedFilesList(query) { return request({ - url: api + '/knowBase/uploaded-files', + url: '/QandA/knowledge/uploaded-files', method: 'get', params: query }) @@ -30,16 +30,19 @@ export function uploadedFilesList(query) { // 新增 export function add(data) { return request({ - url: api + 'upload', + url: api + '/upload', method: 'post', - data: data + data: data, + headers: { + 'Content-Type': 'multipart/form-data' + } }) } // 修改 export function update(data) { return request({ - url: api + 'upload', + url: api + '/update-knowledge', method: 'put', data: data }) diff --git a/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js b/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js index 3bcafb5d..44941732 100644 --- a/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js +++ b/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js @@ -1,4 +1,5 @@ import request from '@/utils/request' +import { parseStrEmpty } from "@/utils/ruoyi"; const api = '/device/deviceType/' // 查询详细 diff --git a/ALOps_sys_fe/alops-ui/src/api/inMonitoring/assessment.js b/ALOps_sys_fe/alops-ui/src/api/inMonitoring/assessment.js index 97ea2fe5..d632514c 100644 --- a/ALOps_sys_fe/alops-ui/src/api/inMonitoring/assessment.js +++ b/ALOps_sys_fe/alops-ui/src/api/inMonitoring/assessment.js @@ -1,11 +1,11 @@ import request from '@/utils/request' // 新增用户 -export function knowledgeAsk(data) { +export function list(query) { return request({ - url: '/QandA/knowledge/ask', - method: 'post', - data: data + url: '/inMonitoring/equAssessment/list', + method: 'get', + params: query }) } diff --git a/ALOps_sys_fe/alops-ui/src/api/inMonitoring/devicesState.js b/ALOps_sys_fe/alops-ui/src/api/inMonitoring/devicesState.js index ffac4566..d30626e1 100644 --- a/ALOps_sys_fe/alops-ui/src/api/inMonitoring/devicesState.js +++ b/ALOps_sys_fe/alops-ui/src/api/inMonitoring/devicesState.js @@ -2,7 +2,7 @@ import request from '@/utils/request' import { parseStrEmpty } from "@/utils/ruoyi"; const api = '/device/files/' -// 查询多台设备列表 +// 查询多台设备列表-s首页 export function list(query) { return request({ url: api + 'monitorById', @@ -11,6 +11,15 @@ export function list(query) { }) } +// 查询多台设备列表-s首页 +export function monitorpageList(query) { + return request({ + url: api + 'monitorpage', + method: 'get', + params: query + }) +} + // 查询单台设备 export function getInfo(id) { return request({ @@ -31,7 +40,7 @@ export function historyQuery(query) { // 设备历史预警 export function alertmessage(equId) { return request({ - url: '/inMonitoring/alertmessage/' + parseStrEmpty(equId), + url: '/inMonitoring/alertMessage/' + parseStrEmpty(equId), method: 'get' }) } diff --git a/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue b/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue index b424e211..8d9d07eb 100644 --- a/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue @@ -14,13 +14,15 @@ - - - - - + + + @@ -41,19 +43,13 @@ - - + + - - - - - - - - + + @@ -178,7 +174,7 @@ export default { }, upImage(fileList){ console.log(fileList) - this.form.fileUrl = fileList + this.form.file = fileList }, @@ -235,18 +231,25 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { if (valid) { + const formData = new FormData(); + formData.append("source", this.form.source) + formData.append("description", this.form.description) + formData.append("file", this.form.file) + + + if (this.form.id != undefined) { - update(this.form).then(response => { + update(formData).then(response => { this.$modal.msgSuccess("修改成功") this.open = false this.getList() }) } else { - add(this.form).then(response => { + add(formData).then(response => { this.$modal.msgSuccess("新增成功") this.open = false this.getList() - }) + }).catch(error => console.error('上传失败', error)); } } }) diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/assessment/index.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/assessment/index.vue index 4e0467b1..5d3c8d53 100644 --- a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/assessment/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/assessment/index.vue @@ -7,76 +7,44 @@ - - - - - - - - - - - - - - - - - 搜索 - 重置 - - - - - - 新增 - - - 修改 - - - 删除 - - - 导入 - - - 导出 - - - - - - - - - - + + + + + + + + + + - + - - diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/cardItem.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/cardItem.vue index fa4311d4..8cb87934 100644 --- a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/cardItem.vue +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/cardItem.vue @@ -18,7 +18,7 @@
- +
@@ -43,6 +43,7 @@
带外IP + 带内IP {{cardData.ip || '暂无'}}
@@ -55,29 +56,27 @@
{{cardData.cpuUtilization||0}}%
CPU占用
-
+
-
{{cardData.contWorkPeriod||0}}%
-
内存占用
+
{{getPercentage(cardData.health)||0}}%
+
健康度
-
+
-
{{cardData.unhandledAlertCount||0}}
待处理预警数
-
{{cardData.handledAlertCount||0}}
预警总数
- + @@ -87,11 +86,8 @@ import * as echarts from 'echarts' require('echarts/theme/macarons') // echarts theme -import BarChart from './BarChart1.vue' -import BarChart2 from './BarChart2.vue' export default { name: "cardItem", - components: { BarChart, BarChart2 }, props: { cardData: { type: Object, @@ -101,6 +97,7 @@ export default { }, data() { return { + baseUrl: process.env.VUE_APP_BASE_API } }, mounted() { @@ -223,6 +220,19 @@ export default { const userId = row.id this.$router.push("/inMonitoring/devicesState-detail/detail/" + userId) }, + getPercentage(value) { + const percentageMap = { + 1: 100, + 2: 75, + 3: 50, + 4: 25, + 0: 0, + }; + return percentageMap[value] || 0; // 如果 value 不存在,返回 0 + }, + + + } @@ -232,7 +242,7 @@ export default { .body { color: #2d3748; line-height: 1.6; - min-height: 100vh; + min-height: 60vh; } .dashboard { diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/detail.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/detail.vue index 4204f890..a8f3cede 100644 --- a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/detail.vue +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/detail.vue @@ -16,7 +16,7 @@
- +
@@ -157,17 +157,51 @@ 设备运行数据 + + v-model="DateValue" + type="datetimerange" + value-format="yyyy-MM-dd hh:mm:ss" + range-separator="至" + start-placeholder="开始日期" + end-placeholder="结束日期" + @change="handleDateChange">
- -
-
+ + + +
+
+ +
+
+ +
+
+ +
+
+
+ + +
+ + +
+ + + +
+ + +
+ + +
+ + +
@@ -182,7 +216,16 @@
- + +
+
+ +
+
+ +
+
+
@@ -195,14 +238,20 @@ import { getInfo, historyQuery } from "@/api/inMonitoring/devicesState" import * as echarts from 'echarts' +import dayjs from 'dayjs'; require('echarts/theme/macarons') // echarts theme import History from './history.vue' +import Interface from './interface.vue' +import Vlan from './vlan.vue' +import Routing from './routing.vue' +import LineChart from './LineChart.vue' + export default { name: "cardItem", - components: { History }, + components: { History, Interface, Vlan, Routing, LineChart }, data() { return { - dateRange: [], + DateValue: [dayjs().subtract(1, 'month').format('YYYY-MM-DD HH:mm:ss'),dayjs().format('YYYY-MM-DD HH:mm:ss')], selectedTab: 1, tabs: [ { name: '历史预警' }, @@ -211,35 +260,342 @@ export default { { name: '路由表信息' }, ], tabIndex: 0, - details: {}, - historyQueryList: { - minTime: '', - maxTime: '', - pageNum: 1, - pageSize: 1000, - }, - - - + dsId:null, + details: {}, + historyQueryList: { + maxTime:dayjs().format('YYYY-MM-DD HH:mm:ss'), + minTime:dayjs().subtract(1, 'month').format('YYYY-MM-DD HH:mm:ss'), + pageNum: 1, + pageSize: 1000, + }, + historyQueryData: { + }, + baseUrl: process.env.VUE_APP_BASE_API } }, mounted() { let routeList = this.$route.params; - this.initCharts(); - this.getInfoFun(routeList.id) - this.gethistoryQuery(routeList.id) + this.dsId = routeList.id; + this.getInfoFun(this.dsId) + setTimeout(() => { + this.gethistoryQuery(this.dsId) + }, 1000) }, methods: { initCharts() { // 性能图表 + let details = this.historyQueryData; const performanceChart = echarts.init(document.getElementById('performanceChart')); + const performanceChart2 = echarts.init(document.getElementById('performanceChart2')); + const performanceChart3 = echarts.init(document.getElementById('performanceChart3')); + const performanceChart4 = echarts.init(document.getElementById('performanceChart4')); + const usedmemory = echarts.init(this.$refs.usedmemory, "macarons") + const usedmemory2 = echarts.init(this.$refs.usedmemory2, "macarons") + const usedmemory3 = echarts.init(this.$refs.usedmemory3, "macarons") + const usedmemory4 = echarts.init(this.$refs.usedmemory4, "macarons") + const usedmemory5 = echarts.init(this.$refs.usedmemory5, "macarons") + const chartData = { min: 0, max: 100, value: 70 }; + usedmemory.setOption({ + series: [ + { + type: 'gauge', + center: ['50%', '60%'], + radius: '90%', + min: chartData.min, + max: chartData.max, + startAngle: 220, + endAngle: -40, + splitNumber: 8, + axisLine: { + lineStyle: { + color: [ + [0.25, '#7afeaf'], + [0.5, '#58d9f9'], + [0.75, '#fbdd5e'], + [1, '#f03b44'], + ], + width: 10, + }, + }, + splitLine: { + // 分隔线 + show: true, + length: 15, + distance: 10, + lineStyle: { + width: 2, + color: 'auto', + }, + }, + axisTick: { + // 刻度线样式(及短线样式) + show: true, + lineStyle: { + width: 2, + color: 'auto', + }, + length: 10, + distance: 10, + }, + axisLabel: false, + detail: { + fontSize: '16', + formatter: '{value}℃', + color: 'auto', + offsetCenter: ['0', '0%'], + }, + pointer: { + icon: 'triangle', + show: true, + + offsetCenter: [0, '-70%'], + itemStyle: { + color: 'auto', + }, + length: '10%', + width: '3%', + }, + data: [ + { + value: this.details.temperature, + + name: '温度', + title: { + show: true, + color: '#606266', + offsetCenter: [0, '70%'], + fontSize: 18, + } + }, + ], + } + ] + }) + usedmemory2.setOption({ + series: [ + { + type: 'gauge', + center: ['50%', '60%'], + radius: '90%', + min: chartData.min, + max: chartData.max, + startAngle: 220, + endAngle: -40, + splitNumber: 8, + axisLine: { + lineStyle: { + color: [ + [0.25, '#f03b44'], + [0.5, '#fbdd5e'], + [0.75, '#58d9f9'], + [1, '#7afeaf'], + ], + width: 10, + }, + }, + splitLine: { + // 分隔线 + show: true, + length: 15, + distance: 10, + lineStyle: { + width: 2, + color: 'auto', + }, + }, + axisTick: { + // 刻度线样式(及短线样式) + show: true, + lineStyle: { + width: 2, + color: 'auto', + }, + length: 10, + distance: 10, + }, + axisLabel: false, + detail: { + fontSize: '16', + formatter: '{value}', + color: 'auto', + offsetCenter: ['0', '0%'], + }, + pointer: { + icon: 'triangle', + show: true, + + offsetCenter: [0, '-70%'], + itemStyle: { + color: 'auto', + }, + length: '10%', + width: '3%', + }, + data: [ + { + value: this.details.health == 1 ? '100' : this.details.health == 2 ? '75': this.details.health == 3 ? '50': this.details.health == 4 ? '25' : '0', + + name: '健康度', + title: { + show: true, + color: '#606266', + offsetCenter: [0, '70%'], + fontSize: 18, + } + }, + ], + } + ] + }) + usedmemory3.setOption({ + title: [ + { + text: 'CPU占用', + left: '45%', + top: '55%', + textAlign: 'center', + textStyle: { + fontSize: '14', + fontWeight: '400', + color: '#6AA0E4', + textAlign: 'center', + textShadowColor: '#000', + }, + }, + ], + series: { + type: 'pie', + radius: ['90%', "100%"], + hoverAnimation: false, + data: [ + { + value: this.details.cpuUtilization, + label: { + normal: { + color: '#6AA0E4', + fontSize: 22, + fontWeight: 'bold', + formatter: function(params) { + return params.value + '%'; + }, + position: 'center', + show: true, + } + }, + itemStyle: { + normal: { + color: '#6AA0E4' + } + } + },{ + value: 100-this.details.cpuUtilization, + name: '', + labelLine: { + show: false + }, + itemStyle: { + normal: { + color: '#D8D8D8' + }, + emphasis:{ + color:'#D8D8D8' + } + } + }] + } + }) + usedmemory4.setOption({ + title: [ + { + text: '内存使用率', + left: '45%', + top: '55%', + textAlign: 'center', + textStyle: { + fontSize: '14', + fontWeight: '400', + color: '#6AA0E4', + textAlign: 'center', + textShadowColor: '#000', + }, + }, + ], + series: { + type: 'pie', + radius: ['90%', "100%"], + hoverAnimation: false, + data: [ + { + value: this.details.memoryUtilization, + label: { + normal: { + color: '#6AA0E4', + fontSize: 22, + fontWeight: 'bold', + formatter: function(params) { + return params.value + '%'; + }, + position: 'center', + show: true, + } + }, + itemStyle: { + normal: { + color: '#6AA0E4' + } + } + },{ + value: 100-this.details.memoryUtilization, + name: '', + labelLine: { + show: false + }, + itemStyle: { + normal: { + color: '#D8D8D8' + }, + emphasis:{ + color:'#D8D8D8' + } + } + }] + } + }) + + usedmemory5.setOption({ + series: [ + { + type: 'pie', + radius: [0, '100%'], + center: ['50%', '50%'], + label: { + position: 'inside', + formatter: '{b}\n{c}', + color: '#30465D' + }, + labelLine: { + length: 5, + length2: 5 + }, + data: [{ + name: '输入', + value: this.details.volIn + }, + { + name: '输出', + value: this.details.volOut + } + ] + } + ] + }) performanceChart.setOption({ tooltip: { trigger: 'axis' }, legend: { - data: ['CPU使用率', '内存使用率'], + data: ['设备温度'], textStyle: { color: '#718096' } @@ -253,7 +609,7 @@ mounted() { xAxis: { type: 'category', boundaryGap: false, - data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'], + data: [...details.temperatureList], axisLine: { lineStyle: { color: '#cbd5e0' @@ -280,17 +636,25 @@ mounted() { } } }, + dataZoom: [ + { + type: 'inside', // 内部滚轮控制 + xAxisIndex: 0, + start: 0, + end: 50 + } + ], series: [ { - name: 'CPU使用率', + name: '设备温度', type: 'line', smooth: true, - data: [45, 52, 38, 66, 58, 62, 48], + data: [...details.temperatureList], lineStyle: { - color: '#ed8936' + color: '#4299e1' }, itemStyle: { - color: '#ed8936' + color: '#4299e1' }, areaStyle: { color: { @@ -300,18 +664,75 @@ mounted() { x2: 0, y2: 1, colorStops: [{ - offset: 0, color: 'rgba(237, 137, 54, 0.3)' + offset: 0, color: 'rgba(66, 153, 225, 0.3)' }, { - offset: 1, color: 'rgba(237, 137, 54, 0.1)' + offset: 1, color: 'rgba(66, 153, 225, 0.1)' }] } } + } + ] + }); + performanceChart4.setOption({ + tooltip: { + trigger: 'axis' + }, + legend: { + data: ['健康度'], + textStyle: { + color: '#718096' + } + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'category', + boundaryGap: false, + data: [...details.timeList], + axisLine: { + lineStyle: { + color: '#cbd5e0' + } }, + axisLabel: { + color: '#718096' + } + }, + yAxis: { + type: 'value', + axisLine: { + lineStyle: { + color: '#cbd5e0' + } + }, + axisLabel: { + color: '#718096', + formatter: '{value}%' + }, + splitLine: { + lineStyle: { + color: 'rgba(203, 213, 224, 0.6)' + } + } + }, + dataZoom: [ { - name: '内存使用率', + type: 'inside', // 内部滚轮控制 + xAxisIndex: 0, + start: 0, + end: 50 + } + ], + series: [ + { + name: '健康度', type: 'line', smooth: true, - data: [30, 45, 35, 50, 42, 38, 32], + data: [...details.healthList], lineStyle: { color: '#4299e1' }, @@ -335,19 +756,12 @@ mounted() { } ] }); - - - // 流量图表 - const trafficChart = echarts.init(document.getElementById('trafficChart')); - trafficChart.setOption({ + performanceChart3.setOption({ tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow' - } + trigger: 'axis' }, legend: { - data: ['入站流量', '出站流量'], + data: ['CPU使用率'], textStyle: { color: '#718096' } @@ -360,7 +774,8 @@ mounted() { }, xAxis: { type: 'category', - data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], + boundaryGap: false, + data: [...details.timeList], axisLine: { lineStyle: { color: '#cbd5e0' @@ -372,14 +787,14 @@ mounted() { }, yAxis: { type: 'value', - name: 'MB/s', axisLine: { lineStyle: { color: '#cbd5e0' } }, axisLabel: { - color: '#718096' + color: '#718096', + formatter: '{value}%' }, splitLine: { lineStyle: { @@ -387,30 +802,135 @@ mounted() { } } }, + dataZoom: [ + { + type: 'inside', // 内部滚轮控制 + xAxisIndex: 0, + start: 0, + end: 50 + } + ], series: [ { - name: '入站流量', - type: 'bar', - data: [320, 332, 301, 334, 390, 330, 320], + name: 'CPU使用率', + type: 'line', + smooth: true, + data: [...details.cpuList], + lineStyle: { + color: '#4299e1' + }, itemStyle: { color: '#4299e1' + }, + areaStyle: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(66, 153, 225, 0.3)' + }, { + offset: 1, color: 'rgba(66, 153, 225, 0.1)' + }] + } + } + } + ] + }); + performanceChart2.setOption({ + tooltip: { + trigger: 'axis' + }, + legend: { + data: ['内存使用率'], + textStyle: { + color: '#718096' + } + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'category', + boundaryGap: false, + data: [...details.timeList], + axisLine: { + lineStyle: { + color: '#cbd5e0' } }, + axisLabel: { + color: '#718096' + } + }, + yAxis: { + type: 'value', + axisLine: { + lineStyle: { + color: '#cbd5e0' + } + }, + axisLabel: { + color: '#718096', + formatter: '{value}%' + }, + splitLine: { + lineStyle: { + color: 'rgba(203, 213, 224, 0.6)' + } + } + }, + dataZoom: [ { - name: '出站流量', - type: 'bar', - data: [220, 182, 191, 234, 290, 330, 310], + type: 'inside', // 内部滚轮控制 + xAxisIndex: 0, + start: 0, + end: 50 + } + ], + series: [ + { + name: '内存使用率', + type: 'line', + smooth: true, + data: [...details.memoryList], + lineStyle: { + color: '#4299e1' + }, itemStyle: { - color: '#ed8936' + color: '#4299e1' + }, + areaStyle: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(66, 153, 225, 0.3)' + }, { + offset: 1, color: 'rgba(66, 153, 225, 0.1)' + }] + } } } ] }); - // 响应窗口大小变化 window.addEventListener('resize', function() { performanceChart.resize(); - trafficChart.resize(); + performanceChart2.resize(); + performanceChart3.resize(); + performanceChart4.resize(); + usedmemory.resize(); + usedmemory2.resize(); + // trafficChart.resize(); }); }, /** 查询设备列表 */ @@ -430,12 +950,18 @@ mounted() { ...this.historyQueryList } historyQuery(queryForm).then(response => { - this.details = response.data - this.loading = false + this.historyQueryData = response.data + console.log("%c 🇸🇸: gethistoryQuery -> this.historyQueryData ", "font-size:16px;background-color:#bc384b;color:white;", this.historyQueryData) + this.loading = false + this.initCharts(); } ) }, - + handleDateChange(date) { + this.historyQueryList.minTime = date[0] + this.historyQueryList.maxTime = date[1] + this.gethistoryQuery(this.$route.params.id) + } } } @@ -446,7 +972,7 @@ mounted() { color: #2d3748; line-height: 1.6; padding: 20px; - min-height: 100vh; + min-height: 60vh; } .dashboard { @@ -585,11 +1111,23 @@ mounted() { color: #4299e1; opacity: 0.8; } + .device-icon{ + width: 100%; + } .device-info { display: flex; flex-direction:column; - gap: 15px; + background: linear-gradient(135deg, #edf2f7, #e2e8f0); + border-radius: 12px; + border: 1px solid rgba(226, 232, 240, 0.8); + transition: all 0.3s ease; + } + .device-info:hover { + background: rgba(255, 255, 255, 0.9); + border-color: rgba(66, 153, 225, 0.3); + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); } .info-title { @@ -597,24 +1135,16 @@ mounted() { font-size: 16px; font-weight: 600; text-align: center; + padding-top: 10px; } .info-item { display: flex; flex-direction: column; padding: 8px 12px; - background: rgba(255, 255, 255, 0.7); - border-radius: 12px; - border: 1px solid rgba(226, 232, 240, 0.8); - transition: all 0.3s ease; } - .info-item:hover { - background: rgba(255, 255, 255, 0.9); - border-color: rgba(66, 153, 225, 0.3); - transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); - } + .info-label { font-size: 13px; @@ -638,7 +1168,7 @@ mounted() { .chart-container { width: 100%; - height: 300px; + height: 200px; margin-top: 10px; } diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/history.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/history.vue index f9828db3..4956198c 100644 --- a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/history.vue +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/history.vue @@ -1,39 +1,48 @@ \ No newline at end of file diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/routing.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/routing.vue new file mode 100644 index 00000000..4abfaed6 --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/routing.vue @@ -0,0 +1,71 @@ + + + \ No newline at end of file diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/vlan.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/vlan.vue new file mode 100644 index 00000000..f91b3c27 --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/vlan.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue index f3decfa0..f97ae395 100644 --- a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue @@ -35,7 +35,12 @@ > - + + + @@ -288,6 +293,9 @@ export default { }, methods: { + findParamName(tableName) { + return this.byTableData.find(item => item.tableName == tableName).paramName + }, /** 查询设备列表 */ getList() { this.loading = true