From eb4111e0fd7110e5aa6a00608da2da9af21a3035 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 20 十月 2025 10:13:32 +0800
Subject: [PATCH] 2025.10.18 修改嫉妒报告生成逻辑
---
src/components/chart/RealTimeLineChart.vue | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/components/chart/RealTimeLineChart.vue b/src/components/chart/RealTimeLineChart.vue
index a66e2ac..bd75435 100644
--- a/src/components/chart/RealTimeLineChart.vue
+++ b/src/components/chart/RealTimeLineChart.vue
@@ -9,7 +9,7 @@
</template>
<script>
import * as echarts from 'echarts';
-import { smallLineOption } from '@/utils/chart/chart-option';
+import { smallLineOption, baseVisualMap } from '@/utils/chart/chart-option';
export default {
props: {
@@ -22,10 +22,18 @@
// };
// }
},
+ // 鎶樼嚎鍥惧睍绀洪珮搴�
chartHeight: {
type: String,
default: '140px'
- }
+ },
+ // 鎶樼嚎鍥綴杞村埢搴﹂棿璺�
+ yMinInterval: {
+ type: Number,
+ default: 1
+ },
+ // 寮傚父鏁版嵁绱㈠紩鑼冨洿闆嗗悎锛孾[i1,i2], [i3,i4],...]
+ exceptionIndexArr: Array
},
data() {
return {
@@ -45,7 +53,11 @@
refreshChart() {
const { xAxis, series } = this.modelValue;
if (!this.option) {
- this.option = smallLineOption(xAxis, series);
+ this.option = smallLineOption(xAxis, series, this.yMinInterval);
+ if (this.exceptionIndexArr) {
+ const visualMap = baseVisualMap(this.exceptionIndexArr);
+ this.option.visualMap = visualMap;
+ }
} else {
this.option.xAxis[0].data = xAxis;
this.option.series = series;
--
Gitblit v1.9.3