From 021e4bb85124931388b067c262d844bcd6f1db09 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期四, 13 六月 2024 17:29:31 +0800 Subject: [PATCH] 完善创建任务功能 --- src/components/chart/ProgressLineChart.vue | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/chart/ProgressLineChart.vue b/src/components/chart/ProgressLineChart.vue index 4aedf0a..7a40cc0 100644 --- a/src/components/chart/ProgressLineChart.vue +++ b/src/components/chart/ProgressLineChart.vue @@ -40,7 +40,9 @@ allSeries: [], option: null, pageSize: 200, - progress: 0 + progress: 0, + // 瀵瑰簲progress杩涘害涓嬶紝鎵�灞曠ず鏁版嵁鐨勮捣濮嬬储寮� + sIndex: 0 }; }, emits: ['chartClick'], @@ -155,8 +157,9 @@ len = len < 0 ? 0 : len; const sIndex = Math.round((len * this.progress) / 100); const eIndex = sIndex + this.pageSize; - const startPer = (sIndex / this.allXAxis.length) * 100; + const startPer = (this.sIndex / this.allXAxis.length) * 100; const endPer = (eIndex / this.allXAxis.length) * 100; + this.sIndex = sIndex; return { sIndex, eIndex, startPer, endPer }; } }, @@ -166,7 +169,8 @@ mounted() { this.lineChart = echarts.init(this.$refs.lineChart); this.lineChart.on('click', (e) => { - this.$emit('chartClick', e.dataIndex); + console.log(e); + this.$emit('chartClick', this.sIndex + e.dataIndex); }); } }; -- Gitblit v1.9.3