From 7760532449ddc115cdeee8143923e08d79685f97 Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期日, 25 四月 2021 10:34:42 +0800
Subject: [PATCH] 图表数据弹框相关修改
---
src/components/BaseNav/WasteGas/WasteGasRealChart.vue | 51 ++++++++++++++++++++++++++++-----------------------
1 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/src/components/BaseNav/WasteGas/WasteGasRealChart.vue b/src/components/BaseNav/WasteGas/WasteGasRealChart.vue
index 8491fa3..1991563 100644
--- a/src/components/BaseNav/WasteGas/WasteGasRealChart.vue
+++ b/src/components/BaseNav/WasteGas/WasteGasRealChart.vue
@@ -283,14 +283,12 @@
}
let ydata
// 涓存椂鏁版嵁
- const BBZMAPPING = [
- {
- 姘哀鍖栫墿: 35,
- 鐑熷皹: 9,
- 浜屾哀鍖栫7: 15,
- ph: 0.3
- }
- ]
+ const BBZMAPPING = {
+ 姘哀鍖栫墿: 30,
+ 鐑熷皹: 9,
+ 浜屾哀鍖栫7: 15,
+ ph: 0.3
+ }
for (let m = 0; m < this.EXHRealTimeDataList.length; m++) {
let stdValue = null
if (this.EXHRealTimeDataList[m].name === nameList[j]) {
@@ -298,9 +296,14 @@
// i++
// stdValue = BBZMAPPING[this.EXHRealTimeDataList[m].name]
// }
- BBZMAPPING.forEach(item => {
+ // BBZMAPPING.forEach(item => {
+ // stdValue = BBZMAPPING[this.EXHRealTimeDataList[m].name]
+ // })
+ for (const p in BBZMAPPING) {
+ // console.log('p' + p)
+ this.a = p
stdValue = BBZMAPPING[this.EXHRealTimeDataList[m].name]
- })
+ }
ydata = {
name: nameList[j],
@@ -335,6 +338,9 @@
const zdcbcolor = ydatas[i].zdcbcolor
const bz = ydatas[i].bzz
let obj
+ let biaozhuiz
+ const exhbzzList = this.exhbzzList
+ // console.log(exhbzzList)
if (bz) {
obj = {
name: ydatas[i].name,
@@ -344,14 +350,14 @@
itemStyle: {
normal: {
color: function (c) { // 鏍规嵁value 鏄剧ず涓嶅悓鐨勬姌鐐归鑹�
- for (let i = 0; i < this.exhbzzList.length; i++) {
- if (this.exhbzzList[i].name === c.seriesName) {
- this.biaozhuiz = this.exhbzzList[i].bzhui
+ for (let i = 0; i < exhbzzList.length; i++) {
+ if (exhbzzList[i].name === c.seriesName) {
+ biaozhuiz = exhbzzList[i].bzhui
}
}
- if (c.value[1] > this.biaozhuiz) {
+ if (c.value[1] > biaozhuiz) {
return zdcbcolor
- } else if (c.value[1] > this.biaozhuiz * 0.9) {
+ } else if (c.value[1] > biaozhuiz * 0.9) {
return '#FFA500'
} else {
return '#33c95f'
@@ -399,15 +405,14 @@
itemStyle: {
normal: {
color: function (c) { // 鏍规嵁value 鏄剧ず涓嶅悓鐨勬姌鐐归鑹�
- // let biaozhuiz
- // for (let i = 0; i < this.exhbzzList.length; i++) {
- // if (this.exhbzzList[i].name === c.seriesName) {
- // this.biaozhuiz = this.exhbzzList[i].bzhui
- // }
- // }
- if (c.value[1] > 20) {
+ for (let i = 0; i < exhbzzList.length; i++) {
+ if (exhbzzList[i].name === c.seriesName) {
+ biaozhuiz = exhbzzList[i].bzhui
+ }
+ }
+ if (c.value[1] > biaozhuiz) {
return zdcbcolor
- } else if (c.value[1] > 15 * 0.9) {
+ } else if (c.value[1] > biaozhuiz * 0.8) {
return '#FFA500'
} else {
return '#33c95f'
--
Gitblit v1.8.0