From 550bcc468527acdd7e6d0b0c3e4c424f02b4953c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=B7=E5=86=89=E5=86=89?= Date: Wed, 19 Nov 2025 18:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E6=8E=A7=E7=9C=8B=E6=9D=BF=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96=E3=80=81=E4=BC=98=E5=8C=96=E5=B9=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1、监控看板功能优化 2、修改列表展示条数 3、优化并修改bug --- src/components/Pagination/index.vue | 226 +++++++++--------- src/components/echartsList/line.vue | 43 ++++ src/utils/request.js | 2 +- .../busValueCount/busValueCount.vue | 2 +- src/views/earnManage/busValueCount/index.vue | 4 +- .../businessIdent/businessIdent.vue | 2 +- src/views/earnManage/server/index.vue | 4 +- src/views/earnManage/server/serverTabs.vue | 2 +- src/views/earnManage/switch/index.vue | 4 +- src/views/earnManage/switch/switchTabs.vue | 2 +- .../resource/monitorBoard/dialogMonitor.vue | 2 +- .../resource/monitorBoard/monitorBoard.vue | 127 ++++++---- .../monitorBoard/monitorBoardView.vue | 102 ++++++-- src/views/resource/serverRegister/index.vue | 6 +- 14 files changed, 341 insertions(+), 187 deletions(-) diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index 53c72b4..63d837f 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -1,113 +1,113 @@ - - - - - + + + + + diff --git a/src/components/echartsList/line.vue b/src/components/echartsList/line.vue index 01f61d3..43119fd 100644 --- a/src/components/echartsList/line.vue +++ b/src/components/echartsList/line.vue @@ -191,9 +191,27 @@ show: true, }, }, + // 配置高亮状态下的样式 + emphasis: dataXY && dataXY.highlight ? { + itemStyle: { + borderWidth: 2, // 边框加粗 + shadowBlur: 5, // 添加阴影光晕 + }, + label: { + show: false, // 高亮时显示标签 + } + } : {}, series: series }; lineDataListIntance.setOption(option); + if (dataXY && dataXY.highlight) { + // 然后高亮当前点击的数据点 + lineDataListIntance.dispatchAction({ + type: 'highlight', // 高亮类型 + seriesIndex: 0, // 系列索引,从点击事件参数中获取 + dataIndex: 0 // 数据索引,从点击事件参数中获取 + }); + } if (dataXY && dataXY.unitSelList && dataXY.unitSelList.length > 0) { // 初始化图表后,调用方法定位下拉框 this.positionYAxisSelector(lineDataListIntance); @@ -207,6 +225,31 @@ lineDataListIntance.off('click'); lineDataListIntance.on("click", function(params) { that.$emit("chartClickModel", {params: params}); + if (dataXY && dataXY.highlight) { + // 首先取消之前可能存在的高亮状态 + lineDataListIntance.dispatchAction({ + type: 'downplay' // 取消所有数据点的高亮 + }); + + // 然后高亮当前点击的数据点 + setTimeout(() => { + lineDataListIntance.dispatchAction({ + type: 'highlight', // 高亮类型 + seriesIndex: params.seriesIndex, // 系列索引,从点击事件参数中获取 + dataIndex: params.dataIndex // 数据索引,从点击事件参数中获取 + }); + },1000); + } + }); + // 2. 关键:拦截默认的鼠标移出事件,不做任何操作(即不取消高亮) + lineDataListIntance.on('mouseover', (params) => { + // 这个函数体为空,或者只包含一些不涉及downplay的逻辑 + // 这样就阻止了鼠标移出时高亮自动消失 + }); + // 2. 关键:拦截默认的鼠标移出事件,不做任何操作(即不取消高亮) + lineDataListIntance.on('mouseout', (params) => { + // 这个函数体为空,或者只包含一些不涉及downplay的逻辑 + // 这样就阻止了鼠标移出时高亮自动消失 }); }, positionYAxisSelector(chartInstance) { diff --git a/src/utils/request.js b/src/utils/request.js index 8266971..06a9aa7 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -17,7 +17,7 @@ const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: process.env.VUE_APP_BASE_API, // 超时 - timeout: 10000 + timeout: 30000 }) // request拦截器 diff --git a/src/views/earnManage/busValueCount/busValueCount.vue b/src/views/earnManage/busValueCount/busValueCount.vue index 1da40cf..fc2ce71 100644 --- a/src/views/earnManage/busValueCount/busValueCount.vue +++ b/src/views/earnManage/busValueCount/busValueCount.vue @@ -97,7 +97,7 @@ }, queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 8, total: 0, }, } diff --git a/src/views/earnManage/busValueCount/index.vue b/src/views/earnManage/busValueCount/index.vue index e591c0a..96c1d41 100644 --- a/src/views/earnManage/busValueCount/index.vue +++ b/src/views/earnManage/busValueCount/index.vue @@ -1,6 +1,6 @@