From 6e4022b4c7eb1fad134e0563a1e1da14cbf80724 Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期日, 25 四月 2021 17:08:30 +0800 Subject: [PATCH] 废水废气图表问题修改 --- src/components/BaseNav/WasteWater/WasteWaterRealChart.vue | 112 ++++++++++++++----------------------------------------- 1 files changed, 29 insertions(+), 83 deletions(-) diff --git a/src/components/BaseNav/WasteWater/WasteWaterRealChart.vue b/src/components/BaseNav/WasteWater/WasteWaterRealChart.vue index c73f030..cf1c44f 100644 --- a/src/components/BaseNav/WasteWater/WasteWaterRealChart.vue +++ b/src/components/BaseNav/WasteWater/WasteWaterRealChart.vue @@ -22,7 +22,7 @@ <el-option v-for="(item,index) in regionList" :key="index" :label="item" :value="item"></el-option> </el-select> <el-button @click="querySearch()">鏌ヨ</el-button> - <el-button>鏄庣粏琛�</el-button> + <!-- <el-button>鏄庣粏琛�</el-button>--> </div> <div class="echarts-chart"> <div style="width:5rem;height:1.5rem;" ref="echarts"></div> @@ -148,11 +148,11 @@ // temp 涓存椂鏁版嵁鍒ゆ柇鏂规硶 const tempList = [ { - 'TJIP45.lscl2tbAIA-10505-1': '姘哀鍖栫墿', - 'TJIP45.lscl2tbAIA-10505-2': '鐑熷皹', - 'TJIP45.lscl2tb552AISA11202A': '浜屾哀鍖栫7', - 'TJIP45.lscl2tb552AISA11201B': 'pH', - 'TJIP45.lscl2tb552AI10710': '浜屾哀鍖栫⒊' + 'TJIP45.lscl2tb552AISA11201B': 'COD', + 'TJIP45.lscl2tbAIA-10505-1': '姘ㄦ爱', + 'TJIP45.lscl2tbAIA-10505-2': '鎬荤7', + 'TJIP45.lscl2tb552AI10710': '鎬绘爱', + 'TJIP45.lscl2tb552AISA11202A': '搴熸按娴侀噺' } ] // 鎸囨爣 @@ -237,15 +237,15 @@ for (let l = 0; l < this.nameList.length; l++) { let obj let IconUrl - if (this.nameList[l] === 'pH') { - IconUrl = 'image://../assets/imgs/legend/WenDu.png' - } else if (this.nameList[l] === '姘哀鍖栫墿') { + if (this.nameList[l] === 'COD') { + IconUrl = 'image://../assets/imgs/legend/SO2.png' + } else if (this.nameList[l] === '姘ㄦ爱') { IconUrl = 'image://../assets/imgs/legend/NOX.png' - } else if (this.nameList[l] === '鐑熷皹') { - IconUrl = 'image://../assets/imgs/legend/zongdan.png' - } else if (this.nameList[l] === '浜屾哀鍖栫⒊') { + } else if (this.nameList[l] === '鎬荤7') { IconUrl = 'image://../assets/imgs/legend/YanChen.png' - } else if (this.nameList[l] === '浜屾哀鍖栫7') { + } else if (this.nameList[l] === '鎬绘爱') { + IconUrl = 'image://../assets/imgs/legend/zongdan.png' + } else if (this.nameList[l] === '搴熸按娴侀噺') { IconUrl = 'image://../assets/imgs/legend/VOCs.png' } if (this.nameList[l] === '搴熸按' || this.nameList[l] === '搴熸按娴侀噺') { // 灏嗗簾姘存祦閲忔帓鍒版暟缁勬渶鍚� @@ -279,19 +279,19 @@ this.ydatas = [] for (let j = 0; j < this.nameList.length; j++) { let zdcbcolor, zxcolor - if (this.nameList[j] === 'pH') { + if (this.nameList[j] === 'COD') { zdcbcolor = 'red' - zxcolor = '#900090' + zxcolor = '#ffff00' } else if (this.nameList[j] === '姘ㄦ爱') { zdcbcolor = 'red' zxcolor = '#00B0F0' - } else if (this.nameList[j] === '鐑熷皹') { + } else if (this.nameList[j] === '鎬荤7') { zdcbcolor = 'red' zxcolor = '#f48183' } else if (this.nameList[j] === '鎬绘爱') { zdcbcolor = 'red' zxcolor = '#e0ffff' - } else { + } else if (this.nameList[j] === '搴熸按娴侀噺') { zdcbcolor = 'red' zxcolor = '#9ACD32' } @@ -300,10 +300,10 @@ // 涓存椂鏁版嵁 const BBZMAPPING = { COD: 35, - pH: 9, - 鎬绘爱: 15, + 姘ㄦ爱: 30, 鎬荤7: 0.3, - 姘ㄦ爱: 3 + 鎬绘爱: 15, + 搴熸按娴侀噺: 3 } for (let m = 0; m < this.RealTimeDataList.length; m++) { let stdValue = null @@ -491,19 +491,19 @@ let maker = params[i].marker let colo = '' switch (seriesName) { - case 'pH': - colo = '#900090' + case 'COD': + colo = '#ffff00' break - case '浜屾哀鍖栫⒊': + case '姘ㄦ爱': colo = '#00B0F0' break - case '鐑熷皹': + case '鎬绘爱': colo = '#e0ffff' break - case '姘哀鍖栫墿': + case '搴熸按娴侀噺': colo = '#9ACD32' break - case '浜屾哀鍖栫7': + case '鎬荤7': colo = '#f48183' break default: @@ -523,7 +523,8 @@ } }, grid: { // 缃戞牸 - top: '20%' + top: '20%', + left: '15%' }, legend: { data: legend @@ -578,7 +579,7 @@ type: 'value', name: yname, max: function (value) { - return parseInt(value.max + 30) + return parseInt(value.max + 3) }, axisLabel: { formatter: '{value}', @@ -633,60 +634,5 @@ </script> <style scoped lang="less"> -.echarts-box { - .tab-scroll { - display: flex; - align-items: center; - justify-content: space-between; - .time-select { - cursor: pointer; - padding: 5px; - border: 1px solid #2b87c8; - border-radius: 4px; - text-align: center; - color: #fff; - font-size: 11px; - width: 280px; - } - } - - .echarts-form { - height: 0.3rem; - line-height: 0.3rem; - - .demonstration { - color: #00fff6; - font-size: 12px; - margin-left: 10px; - } - - /deep/ .el-input__inner { - height: 0.15rem; - background-color: #2e4967; - color: #fff; - font-size: 12px; - padding: 0; - border-color: #00fff6; - text-align: center; - } - - .el-button { - margin: 0 15px; - width: 0.3rem; - height: 0.15rem; - display: inline-block; - background-color: #2e4967; - color: #fff; - font-size: 12px; - padding: 0; - border-color: #00fff6; - text-align: center; - } - } - - /deep/ .el-icon-time:before { - content: " "; - } -} </style> -- Gitblit v1.8.0