From 679ab7e1e5d91c87ecff757961b1fa2bd93bee6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E8=90=8C?= <525441437@qq.com> Date: Wed, 6 Mar 2024 11:31:40 +0800 Subject: [PATCH] 1 --- src/assets/js/charts.js | 5 ++- src/views/index.vue | 77 ++++++++++++++++++++--------------------- 2 files changed, 39 insertions(+), 43 deletions(-) diff --git a/src/assets/js/charts.js b/src/assets/js/charts.js index e25eebd..e25e234 100644 --- a/src/assets/js/charts.js +++ b/src/assets/js/charts.js @@ -200,7 +200,7 @@ export function realTimeLine(id, data,pageId) { return item.name === el1.name; }); if (containsIndex == -1) { - dataList.push({ name: el1.name, value: [] }) + dataList.push({ name: el1.name, value: [el1.value] }) } else { dataList[containsIndex].value.push(el1.value) } @@ -568,7 +568,7 @@ export function realTimeLine1(id, data,pageId) { return item.name === el1.name; }); if (containsIndex == -1) { - dataList.push({ name: el1.name, value: [] }) + dataList.push({ name: el1.name, value: [el1.value] }) } else { dataList[containsIndex].value.push(el1.value) } @@ -581,7 +581,6 @@ export function realTimeLine1(id, data,pageId) { // selList[el.name]=(index==0?true:false) // }) // } - dataList.forEach((el, index) => { list.push({ name: el.name, diff --git a/src/views/index.vue b/src/views/index.vue index 3e668d2..2511a81 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -4,11 +4,11 @@