diff --git a/README.md b/README.md
index b0152d1..7585c90 100644
--- a/README.md
+++ b/README.md
@@ -4,12 +4,7 @@
- 成员项目: 基于 vben5(ant-design-vue) 的前端项目 [ruoyi-plus-vben5](https://github.com/imdap/ruoyi-plus-vben5)
- 成员项目: 基于soybean 的前端项目 [ruoyi-plus-soybean](https://gitee.com/xlsea/ruoyi-plus-soybean)
-## 配套后端代码仓库地址
-| 介绍 | 项目名 | 项目地址 |
-|------------|:-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| 🔥 分布式集群框架 | RuoYi-Vue-Plus | - [Gitee](https://gitee.com/dromara/RuoYi-Vue-Plus)
- [GitHub](https://github.com/dromara/RuoYi-Vue-Plus)
- [GitCode](https://gitcode.com/dromara/RuoYi-Vue-Plus) |
-| 🔥 微服务框架 | RuoYi-Cloud-Plus | - [Gitee](https://gitee.com/dromara/RuoYi-Cloud-Plus)
- [GitHub](https://github.com/dromara/RuoYi-Cloud-Plus)
- [GitCode](https://gitcode.com/dromara/RuoYi-Cloud-Plus) |
## 分支说明
@@ -57,27 +52,3 @@ npm run build:prod
| 缓存监控 | 对系统的缓存信息查询,命令统计等。 | 支持 | 支持 |
| 在线构建器 | 拖动表单元素生成相应的HTML代码。 | 支持 | 支持 |
| 使用案例 | 系统的一些功能案例 | 支持 | 不支持 |
-
-## 演示图例
-
-| | |
-| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
-|  |  |
diff --git a/src/views/ems/report/tempBoard/advanced/index.vue b/src/views/ems/report/tempBoard/advanced/index.vue
index 44be458..2a4da44 100644
--- a/src/views/ems/report/tempBoard/advanced/index.vue
+++ b/src/views/ems/report/tempBoard/advanced/index.vue
@@ -95,8 +95,11 @@ const parallelChartRef = ref()
const { getChart } = useChartResize(sankeyChartRef, themeRiverChartRef, treemapChartRef, sunburstChartRef, parallelChartRef)
+/** 初始化默认时间范围:昨天8:30 ~ 今天8:30 */
function initTimeRange() {
- const end = new Date(); const start = new Date(end.getTime() - 7 * 24 * 3600 * 1000)
+ const now = new Date()
+ const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 30, 0)
+ const start = new Date(end.getTime() - 24 * 3600 * 1000)
const p = (n: number) => n.toString().padStart(2, '0')
const fmt = (d: Date) => `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
timeRange.value = [fmt(start), fmt(end)]
@@ -245,8 +248,31 @@ function renderParallel(data: TempBoardAdvancedVO[]) {
if (!chart || !data.length) return
const dimNames = ['测点', '平均温度', '最高温度', '最低温度', '标准差', '平均延迟(s)']
const fields = ['avgTemp', 'maxTemp', 'minTemp', 'tempStddev', 'avgDelay'] as const
- // 为每条线生成不同颜色
const colors = ['#409eff', '#67c23a', '#e6a23c', '#f56c6c', '#9b59b6', '#1abc9c', '#e74c3c', '#2ecc71']
+
+ // 基于IQR(四分位距)动态计算每根轴的范围,避免异常值导致线条超出可视区域
+ function calcAxisRange(field: string): { min: number; max: number } {
+ const values = data.map(d => (d as any)[field] as number).filter(v => v != null).sort((a, b) => a - b)
+ if (values.length === 0) return { min: 0, max: 100 }
+ if (values.length <= 2) {
+ // 数据太少时直接用实际范围,加一点余量
+ const range = values[values.length - 1] - values[0]
+ const pad = Math.max(range * 0.1, 1)
+ return { min: Math.floor(values[0] - pad), max: Math.ceil(values[values.length - 1] + pad) }
+ }
+ const q1 = values[Math.floor(values.length * 0.25)]
+ const q3 = values[Math.floor(values.length * 0.75)]
+ const iqr = q3 - q1
+ // 上下限:Q1 - 1.5*IQR ~ Q3 + 1.5*IQR,并兜底覆盖全部数据
+ const lower = Math.min(q1 - 1.5 * iqr, values[0])
+ const upper = Math.max(q3 + 1.5 * iqr, values[values.length - 1])
+ const pad = Math.max((upper - lower) * 0.05, 0.5)
+ return { min: Math.floor(lower - pad), max: Math.ceil(upper + pad) }
+ }
+
+ // 为数值维度预计算轴范围
+ const axisRanges = fields.map(f => calcAxisRange(f))
+
chart.setOption({
tooltip: { trigger: 'item' },
legend: {
@@ -257,7 +283,18 @@ function renderParallel(data: TempBoardAdvancedVO[]) {
},
parallelAxis: [
{ type: 'category', data: data.map(d => d.monitorName || d.monitorId), dim: 0, name: dimNames[0], axisLabel: { rotate: 30, color: '#666' } },
- ...fields.map((f, i) => ({ dim: i + 1, name: dimNames[i + 1], axisLabel: { color: '#666' } }))
+ ...fields.map((f, i) => ({
+ type: 'value',
+ dim: i + 1,
+ name: dimNames[i + 1],
+ min: axisRanges[i].min,
+ max: axisRanges[i].max,
+ nameLocation: 'end',
+ nameTextStyle: { color: '#333', fontSize: 12 },
+ axisLabel: { color: '#666', fontSize: 11 },
+ splitLine: { show: true, lineStyle: { color: '#eee' } },
+ axisTick: { show: true }
+ }))
],
parallel: { left: 100, right: 50, top: 50, bottom: 30 },
series: data.map((d, idx) => ({
diff --git a/src/views/ems/report/tempBoard/anomaly/index.vue b/src/views/ems/report/tempBoard/anomaly/index.vue
index 33c4917..f41d114 100644
--- a/src/views/ems/report/tempBoard/anomaly/index.vue
+++ b/src/views/ems/report/tempBoard/anomaly/index.vue
@@ -168,8 +168,10 @@ const continuousList = ref([])
const rapidRiseList = ref([])
const jitterList = ref([])
+/** 初始化默认时间范围:昨天8:30 ~ 今天8:30 */
function initTimeRange() {
- const end = new Date()
+ const now = new Date()
+ const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 30, 0)
const start = new Date(end.getTime() - 24 * 3600 * 1000)
const p = (n: number) => n.toString().padStart(2, '0')
const fmt = (d: Date) => `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
diff --git a/src/views/ems/report/tempBoard/comparison/index.vue b/src/views/ems/report/tempBoard/comparison/index.vue
index 588f4a7..9b1dea6 100644
--- a/src/views/ems/report/tempBoard/comparison/index.vue
+++ b/src/views/ems/report/tempBoard/comparison/index.vue
@@ -111,8 +111,11 @@ const fluctuationChartRef = ref()
const { getChart } = useChartResize(avgRankChartRef, stabilityChartRef, dailyDiffChartRef, fluctuationChartRef)
+/** 初始化默认时间范围:昨天8:30 ~ 今天8:30 */
function initTimeRange() {
- const end = new Date(); const start = new Date(end.getTime() - 24 * 3600 * 1000)
+ const now = new Date()
+ const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 30, 0)
+ const start = new Date(end.getTime() - 24 * 3600 * 1000)
const p = (n: number) => n.toString().padStart(2, '0')
const fmt = (d: Date) => `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
timeRange.value = [fmt(start), fmt(end)]
diff --git a/src/views/ems/report/tempBoard/components/TempBoardFilter.vue b/src/views/ems/report/tempBoard/components/TempBoardFilter.vue
index fea9a34..b68c43e 100644
--- a/src/views/ems/report/tempBoard/components/TempBoardFilter.vue
+++ b/src/views/ems/report/tempBoard/components/TempBoardFilter.vue
@@ -123,9 +123,12 @@ const loading = ref(false)
const highTopNChartRef = ref()
const lowTopNChartRef = ref()
-/** 初始化默认时间范围(最近24小时) */
+/** 初始化默认时间范围:昨天8:30 ~ 今天8:30 */
function initDefaultTimeRange() {
- const end = new Date()
+ const now = new Date()
+ // 结束时间:今天 8:30:00
+ const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 30, 0)
+ // 开始时间:昨天 8:30:00
const start = new Date(end.getTime() - 24 * 3600 * 1000)
const fmt = (d: Date) => {
const pad = (n: number) => n.toString().padStart(2, '0')
diff --git a/src/views/ems/report/tempBoard/distribution/index.vue b/src/views/ems/report/tempBoard/distribution/index.vue
index 001c63c..45baedb 100644
--- a/src/views/ems/report/tempBoard/distribution/index.vue
+++ b/src/views/ems/report/tempBoard/distribution/index.vue
@@ -83,9 +83,11 @@ const hourlyHeatmapRef = ref()
const { getChart } = useChartResize(intervalChartRef, histogramChartRef, calendarHeatmapRef, hourlyHeatmapRef)
+/** 初始化默认时间范围:昨天8:30 ~ 今天8:30 */
function initTimeRange() {
- const end = new Date()
- const start = new Date(end.getTime() - 7 * 24 * 3600 * 1000)
+ const now = new Date()
+ const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 30, 0)
+ const start = new Date(end.getTime() - 24 * 3600 * 1000)
const p = (n: number) => n.toString().padStart(2, '0')
const fmt = (d: Date) => `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
timeRange.value = [fmt(start), fmt(end)]
diff --git a/src/views/ems/report/tempBoard/overview/index.vue b/src/views/ems/report/tempBoard/overview/index.vue
index 35e77d7..c2b9e54 100644
--- a/src/views/ems/report/tempBoard/overview/index.vue
+++ b/src/views/ems/report/tempBoard/overview/index.vue
@@ -131,8 +131,10 @@ const lowTopNChartRef = ref()
const { getChart } = useChartResize(highTopNChartRef, lowTopNChartRef)
+/** 初始化默认时间范围:昨天8:30 ~ 今天8:30 */
function initDefaultTimeRange() {
- const end = new Date()
+ const now = new Date()
+ const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 30, 0)
const start = new Date(end.getTime() - 24 * 3600 * 1000)
const fmt = (d: Date) => {
const p = (n: number) => n.toString().padStart(2, '0')
diff --git a/src/views/ems/report/tempBoard/quality/index.vue b/src/views/ems/report/tempBoard/quality/index.vue
index 2f044e9..1ffe655 100644
--- a/src/views/ems/report/tempBoard/quality/index.vue
+++ b/src/views/ems/report/tempBoard/quality/index.vue
@@ -141,8 +141,11 @@ const activityList = ref([])
const { getChart } = useChartResize(delayDistChartRef)
+/** 初始化默认时间范围:昨天8:30 ~ 今天8:30 */
function initTimeRange() {
- const end = new Date(); const start = new Date(end.getTime() - 24 * 3600 * 1000)
+ const now = new Date()
+ const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 30, 0)
+ const start = new Date(end.getTime() - 24 * 3600 * 1000)
const p = (n: number) => n.toString().padStart(2, '0')
const fmt = (d: Date) => `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
timeRange.value = [fmt(start), fmt(end)]
diff --git a/src/views/ems/report/tempBoard/realtime/index.vue b/src/views/ems/report/tempBoard/realtime/index.vue
index 4cfea12..3f6800e 100644
--- a/src/views/ems/report/tempBoard/realtime/index.vue
+++ b/src/views/ems/report/tempBoard/realtime/index.vue
@@ -140,8 +140,10 @@ const highTempList = ref([])
const lowTempList = ref([])
const staleList = ref([])
+/** 初始化默认时间范围:昨天8:30 ~ 今天8:30 */
function initTimeRange() {
- const end = new Date()
+ const now = new Date()
+ const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 30, 0)
const start = new Date(end.getTime() - 24 * 3600 * 1000)
const fmt = (d: Date) => {
const p = (n: number) => n.toString().padStart(2, '0')
diff --git a/src/views/ems/report/tempBoard/trend/index.vue b/src/views/ems/report/tempBoard/trend/index.vue
index 7c91c9b..4d6b1a8 100644
--- a/src/views/ems/report/tempBoard/trend/index.vue
+++ b/src/views/ems/report/tempBoard/trend/index.vue
@@ -93,8 +93,10 @@ const peakValleyList = ref([])
const { getChart } = useChartResize(minuteChartRef, hourlyChartRef, dailyChartRef)
+/** 初始化默认时间范围:昨天8:30 ~ 今天8:30 */
function initTimeRange() {
- const end = new Date()
+ const now = new Date()
+ const end = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 30, 0)
const start = new Date(end.getTime() - 24 * 3600 * 1000)
const p = (n: number) => n.toString().padStart(2, '0')
const fmt = (d: Date) => `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`