From 4f35a8b56c12315c82fd5bd136f32da2dcadc5e2 Mon Sep 17 00:00:00 2001
From: chenyabin <Chenab123!>
Date: 星期二, 27 四月 2021 09:27:22 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/BaseNav/WasteGas/WasteGasRealChart.vue |   87 +++++++++++++++++++++++--------------------
 1 files changed, 47 insertions(+), 40 deletions(-)

diff --git a/src/components/BaseNav/WasteGas/WasteGasRealChart.vue b/src/components/BaseNav/WasteGas/WasteGasRealChart.vue
index 8491fa3..de4951a 100644
--- a/src/components/BaseNav/WasteGas/WasteGasRealChart.vue
+++ b/src/components/BaseNav/WasteGas/WasteGasRealChart.vue
@@ -22,16 +22,16 @@
         <el-option v-for="(item,index) in formData.regionList" :key="index" :label="item" :value="item"></el-option>
       </el-select>
       <el-button @click="querySearch">鏌ヨ</el-button>
-      <el-button>鏄庣粏琛�</el-button>
     </div>
     <div class="echarts-chart">
       <div style="width:5rem;height:1.5rem;" ref="echarts"></div>
+      <!--      <public-chart :propsData="propsData"></public-chart>-->
     </div>
   </div>
 </template>
 
 <script>
-
+// import PublicChart from '../PublicChart'
 import PublicDataStandard from '../PublicDataStandard'
 import mapApi from '../../../api/mapApi'
 import 'dayjs/locale/es'
@@ -40,6 +40,7 @@
 export default {
   name: 'WasteGasRealChart',
   components: {
+    // PublicChart,
     PublicDataStandard
   },
   data () {
@@ -86,6 +87,7 @@
             val: null
           }
         }],
+      propsData: {},
 
       // 寮�濮� /缁撴潫 鏃堕棿 鍜岄噰鏍风偣鍊肩殑缁戝畾鍊兼暟鎹�
       formData: {
@@ -148,9 +150,9 @@
           const nameListTemp = [
             {
               'TJIP45.y2h508CEMS01NOX': '姘哀鍖栫墿',
-              'TJIP45.y2h508CEMS01SO2': '鐑熷皹',
-              'TJIP45.y2h508CEMS01F': '浜屾哀鍖栫7',
-              'TJIP45.y2h508CEMS01PM': 'ph'
+              'TJIP45.y2h508CEMS01SO2': '姘у惈閲�',
+              'TJIP45.y2h508CEMS01F': '娓╁害',
+              'TJIP45.y2h508CEMS01PM': '搴熸皵娴侀噺'
               // 'TJIP45.lscl2tb552AI10710': '浜屾哀鍖栫⒊'
             }
           ]
@@ -223,15 +225,15 @@
         for (let l = 0; l < nameList.length; l++) {
           let obj
           let iconUrl
-          if (nameList[l] === 'ph') {
+          if (nameList[l] === '娓╁害') {
             iconUrl = 'image://../assets/imgs/legend/WenDu.png'
           } else if (nameList[l] === '姘哀鍖栫墿') {
             iconUrl = 'image://../assets/imgs/legend/NOX.png'
           } else if (nameList[l] === '鐑熷皹') {
             iconUrl = 'image://../assets/imgs/legend/zongdan.png'
-          } else if (nameList[l] === '浜屾哀鍖栫7') {
-            iconUrl = 'image://../assets/imgs/legend/YanChen.png'
-          } else if (nameList[l] === '浜屾哀鍖栫⒊') {
+          } else if (nameList[l] === '姘у惈閲�') {
+            iconUrl = 'image://../assets/imgs/legend/VOCs.png'
+          } else if (nameList[l] === '搴熸皵娴侀噺') {
             iconUrl = 'image://../assets/imgs/legend/VOCs.png'
           }
 
@@ -265,7 +267,7 @@
 
         for (let j = 0; j < nameList.length; j++) {
           let zdcbcolor, zxcolor
-          if (nameList[j] === 'ph') {
+          if (nameList[j] === '娓╁害') {
             zdcbcolor = 'red'
             zxcolor = '#f206ff'
           } else if (nameList[j] === '鐑熷皹') {
@@ -274,23 +276,21 @@
           } else if (nameList[j] === '姘哀鍖栫墿') {
             zdcbcolor = 'red'
             zxcolor = '#00B0F0'
-          } else if (nameList[j] === '浜屾哀鍖栫⒊') {
+          } else if (nameList[j] === '搴熸皵娴侀噺') {
             zdcbcolor = 'red'
             zxcolor = '#9ACD32'
-          } else if (nameList[j] === '浜屾哀鍖栫7') {
+          } else if (nameList[j] === '姘у惈閲�') {
             zdcbcolor = 'red'
-            zxcolor = '#f48183'
+            zxcolor = '#008000'
           }
           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 +298,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 +340,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 +352,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 +407,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'
@@ -466,7 +473,7 @@
               let maker = params[i].marker
               let colo = ''
               switch (seriesName) {
-                case 'ph':
+                case '娓╁害':
                   colo = '#f206ff'
                   break
                 case '姘哀鍖栫墿':
@@ -475,11 +482,11 @@
                 case '鐑熷皹':
                   colo = '#e0ffff'
                   break
-                case '浜屾哀鍖栫⒊':
+                case '搴熸皵娴侀噺':
                   colo = '#9ACD32'
                   break
-                case '浜屾哀鍖栫7':
-                  colo = '#f48183'
+                case '姘у惈閲�':
+                  colo = '#008000'
                   break
                 default:
                   colo = ''

--
Gitblit v1.8.0