派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-04-25 7760532449ddc115cdeee8143923e08d79685f97
src/components/BaseNav/WasteGas/WasteGasRealChart.vue
@@ -283,14 +283,12 @@
          }
          let ydata
          // 临时数据
          const BBZMAPPING = [
            {
              氮氧化物: 35,
              烟尘: 9,
              二氧化磷: 15,
              ph: 0.3
            }
          ]
          const BBZMAPPING = {
            氮氧化物: 30,
            烟尘: 9,
            二氧化磷: 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'