diff --git a/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue b/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue index a0f81e9..6319ad2 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue @@ -176,13 +176,13 @@ XAxis:[], nh4n:[], DO:[], - turb:[], + codcr:[], cond:[], ph:[], marklineObj:{ nh4n:'', DO:'', - turb:'', + codcr:'', cond:'', ph:'', }, @@ -193,33 +193,33 @@ at.XAxis = e.siteEchartDto.times; if(e.targetQuality==1){ at.marklineObj.nh4n=0.15 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=7.5 + at.marklineObj.DO=7.5 + at.marklineObj.codcr=15 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==2){ at.marklineObj.nh4n=0.5 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=6 + at.marklineObj.DO=6 + at.marklineObj.codcr=15 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==3){ at.marklineObj.nh4n=1 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=5 + at.marklineObj.DO=5 + at.marklineObj.codcr=20 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==4){ at.marklineObj.nh4n=1.5 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=3 + at.marklineObj.DO=3 + at.marklineObj.codcr=30 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==5){ at.marklineObj.nh4n=2 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=2 + at.marklineObj.DO=2 + at.marklineObj.codcr=40 + at.marklineObj.cond='' at.marklineObj.ph='' } e.siteEchartDto.datas.forEach((j) => { @@ -231,8 +231,8 @@ case "DO": at.DO = j.datas; break; - case "turb": - at.turb = j.datas; + case "codcr": + at.codcr = j.datas; break; case "cond": at.cond = j.datas; diff --git a/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue b/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue index a0f81e9..6319ad2 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue @@ -176,13 +176,13 @@ XAxis:[], nh4n:[], DO:[], - turb:[], + codcr:[], cond:[], ph:[], marklineObj:{ nh4n:'', DO:'', - turb:'', + codcr:'', cond:'', ph:'', }, @@ -193,33 +193,33 @@ at.XAxis = e.siteEchartDto.times; if(e.targetQuality==1){ at.marklineObj.nh4n=0.15 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=7.5 + at.marklineObj.DO=7.5 + at.marklineObj.codcr=15 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==2){ at.marklineObj.nh4n=0.5 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=6 + at.marklineObj.DO=6 + at.marklineObj.codcr=15 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==3){ at.marklineObj.nh4n=1 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=5 + at.marklineObj.DO=5 + at.marklineObj.codcr=20 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==4){ at.marklineObj.nh4n=1.5 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=3 + at.marklineObj.DO=3 + at.marklineObj.codcr=30 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==5){ at.marklineObj.nh4n=2 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=2 + at.marklineObj.DO=2 + at.marklineObj.codcr=40 + at.marklineObj.cond='' at.marklineObj.ph='' } e.siteEchartDto.datas.forEach((j) => { @@ -231,8 +231,8 @@ case "DO": at.DO = j.datas; break; - case "turb": - at.turb = j.datas; + case "codcr": + at.codcr = j.datas; break; case "cond": at.cond = j.datas; diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue b/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue index 2a868e4..72ceeac 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue @@ -111,9 +111,9 @@ axisLabel: { show: true, color: "#EBFEFF", - fontSize: nowSize(14, 1920), + fontSize: nowSize(10, 1920), formatter: function (value) { - return moment(value).format("MM月"); + return moment(value).format("YY年MM月"); }, }, }, diff --git a/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue b/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue index a0f81e9..6319ad2 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue @@ -176,13 +176,13 @@ XAxis:[], nh4n:[], DO:[], - turb:[], + codcr:[], cond:[], ph:[], marklineObj:{ nh4n:'', DO:'', - turb:'', + codcr:'', cond:'', ph:'', }, @@ -193,33 +193,33 @@ at.XAxis = e.siteEchartDto.times; if(e.targetQuality==1){ at.marklineObj.nh4n=0.15 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=7.5 + at.marklineObj.DO=7.5 + at.marklineObj.codcr=15 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==2){ at.marklineObj.nh4n=0.5 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=6 + at.marklineObj.DO=6 + at.marklineObj.codcr=15 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==3){ at.marklineObj.nh4n=1 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=5 + at.marklineObj.DO=5 + at.marklineObj.codcr=20 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==4){ at.marklineObj.nh4n=1.5 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=3 + at.marklineObj.DO=3 + at.marklineObj.codcr=30 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==5){ at.marklineObj.nh4n=2 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=2 + at.marklineObj.DO=2 + at.marklineObj.codcr=40 + at.marklineObj.cond='' at.marklineObj.ph='' } e.siteEchartDto.datas.forEach((j) => { @@ -231,8 +231,8 @@ case "DO": at.DO = j.datas; break; - case "turb": - at.turb = j.datas; + case "codcr": + at.codcr = j.datas; break; case "cond": at.cond = j.datas; diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue b/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue index 2a868e4..72ceeac 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue @@ -111,9 +111,9 @@ axisLabel: { show: true, color: "#EBFEFF", - fontSize: nowSize(14, 1920), + fontSize: nowSize(10, 1920), formatter: function (value) { - return moment(value).format("MM月"); + return moment(value).format("YY年MM月"); }, }, }, diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/ShuiZhicharts.vue b/src/views/pictureOnMap/page/DrainageSystem/components/ShuiZhicharts.vue index 6d334a4..c80eef4 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/components/ShuiZhicharts.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/components/ShuiZhicharts.vue @@ -41,11 +41,10 @@ function init() { let position = ['insideStartTop', 'insideMiddleTop', 'insideEndBottom']; myChart.value = echarts.init(document.getElementById(id)); - console.log('Number(props.data.marklineObj.cond)',Number(props.data.marklineObj.cond)); - let a=Number(props.data.marklineObj.cond) - let b=[1,2,3,4,5] - console.log('22222',Math.max(...[Number(props.data.marklineObj.cond),...props.data.DO]) * 1.1); -console.log('12',Math.max([a,...b]) * 1.1,); + + let maxnh4n=Number((Math.max(...[Number(props.data.marklineObj.nh4n),...props.data.nh4n]) * 1.2)) + console.log('123',maxnh4n); +// console.log('2222332',(Math.max(...[Number(props.data.marklineObj.nh4n),...props.data.nh4n]) * 1.1).toFixed(2)); let option = { tooltip: { trigger: 'axis', @@ -57,19 +56,19 @@ // 字体颜色 color: 'white', // 字体大小 - fontSize: 14, + fontSize: nowSize(14, 1920), }, }, legend: { - data: ['氨氮', '溶解氧', '浊度', '电导率', 'PH值'], + data: ['氨氮', '溶解氧', 'COD', '电导率', 'PH值'], textStyle: { color: '#FFFFFF', - fontSize: 12, + fontSize: nowSize(12, 1920), }, }, grid: { top: 52, - left: 30, + left: 20, right: 25, bottom: 10, containLabel: true, @@ -82,7 +81,7 @@ data: props.data.XAxis, axisLabel: { color: 'rgba(255,255,255,1)', - fontSize: 12, + fontSize: nowSize(12, 1920), fontFamily: 'AlibabaPuHuiTi', formatter: function (value) { return moment(value).format('HH:MM'); @@ -125,13 +124,16 @@ // minInterval: 1, min: 0, + max:Number((Math.max(...[Number(props.data.marklineObj.nh4n),...props.data.nh4n]) * 1.3)).toFixed(2), + axisLabel: { color: '#259543', show: true, - // formatter: function (value) { - // return value.toFixed(2); // 保留两位小数 - // }, + formatter: function (value) { + return value.toFixed(1); // 保留两位小数 + }, }, + nameTextStyle: { color: '#259543', padding: [0, 0, 0, -5], @@ -154,19 +156,19 @@ name: '溶解氧', type: 'value', // minInterval: 1, - // min: 0, - // max:(Math.max(...[Number(props.data.marklineObj.cond),...props.data.DO]) * 1.1).toFixed(2), + min: 0, + max:(Math.max(...[Number(props.data.marklineObj.DO),...props.data.DO]) * 1.3).toFixed(2), axisLabel: { color: '#b14de5', show: true, - // formatter: function (value) { - // return value.toFixed(2); // 保留两位小数 - // }, + formatter: function (value) { + return value.toFixed(0); // 保留两位小数 + }, }, nameTextStyle: { color: '#b14de5', - padding: [0, 0, 0, -10], + padding: [0, 0, 0, -5], }, splitLine: { show: false, @@ -180,10 +182,11 @@ offset: -5, }, { - name: '浊度', + name: 'COD', type: 'value', // minInterval: 1, min: 0, + max:(Math.max(...[Number(props.data.marklineObj.codcr),...props.data.codcr]) * 1.3).toFixed(2), axisLabel: { color: '#99FF55', show: true, @@ -193,7 +196,7 @@ }, nameTextStyle: { color: '#99FF55', - padding: [0, 0, 0, 15], + padding: [0, 0, 0, 10], }, splitLine: { show: false, @@ -221,7 +224,7 @@ }, nameTextStyle: { color: '#FFC155', - padding: [0, 0, 0, 20], + padding: [0, 0, 0, 15], }, splitLine: { show: false, @@ -248,7 +251,7 @@ }, nameTextStyle: { color: '#009BE9', - padding: [0, 0, 0, 20], + padding: [0, 0, 0, 15], }, splitLine: { show: false, @@ -291,7 +294,7 @@ show: true, formatter: '氨氮警戒线:' + props.data.marklineObj.nh4n, color: '#259543', - fontSize: 12, + fontSize: nowSize(12, 1920), position: 'middle', }, }, @@ -318,16 +321,16 @@ markLine: { data: [ { - yAxis: props.data.marklineObj.cond, // 这是水平线的 Y 轴值 + yAxis: props.data.marklineObj.DO, // 这是水平线的 Y 轴值 lineStyle: { type: 'dashed', color: '#b14de5', // 线的颜色 }, label: { show: true, - formatter: '溶解氧警戒线:' + props.data.marklineObj.cond, + formatter: '溶解氧警戒线:' + props.data.marklineObj.DO, color: '#b14de5', - fontSize: 12, + fontSize: nowSize(12, 1920), position: 'middle', }, }, @@ -336,9 +339,9 @@ }, }, { - name: '浊度', + name: 'COD', type: 'line', - data: props.data.turb, + data: props.data.codcr, yAxisIndex: 2, // 修改折线颜色 lineStyle: { @@ -349,7 +352,25 @@ itemStyle: { color: '#99FF55', // 数据点颜色 }, - + markLine: { + data: [ + { + yAxis: props.data.marklineObj.codcr, // 这是水平线的 Y 轴值 + lineStyle: { + type: 'dashed', + color: '#99FF55', // 线的颜色 + }, + label: { + show: true, + formatter: 'COD警戒线:' + props.data.marklineObj.codcr, + color: '#99FF55', + fontSize: nowSize(12, 1920), + position: 'middle', + }, + }, + ], + symbol: ['none', 'none'], // 这里设置标记线两端的标记为'none',即不显示箭头 + }, }, { name: '电导率', diff --git a/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue b/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue index a0f81e9..6319ad2 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/YSIndex_right2.vue @@ -176,13 +176,13 @@ XAxis:[], nh4n:[], DO:[], - turb:[], + codcr:[], cond:[], ph:[], marklineObj:{ nh4n:'', DO:'', - turb:'', + codcr:'', cond:'', ph:'', }, @@ -193,33 +193,33 @@ at.XAxis = e.siteEchartDto.times; if(e.targetQuality==1){ at.marklineObj.nh4n=0.15 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=7.5 + at.marklineObj.DO=7.5 + at.marklineObj.codcr=15 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==2){ at.marklineObj.nh4n=0.5 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=6 + at.marklineObj.DO=6 + at.marklineObj.codcr=15 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==3){ at.marklineObj.nh4n=1 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=5 + at.marklineObj.DO=5 + at.marklineObj.codcr=20 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==4){ at.marklineObj.nh4n=1.5 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=3 + at.marklineObj.DO=3 + at.marklineObj.codcr=30 + at.marklineObj.cond='' at.marklineObj.ph='' }else if(e.targetQuality==5){ at.marklineObj.nh4n=2 - at.marklineObj.DO='' - at.marklineObj.turb='' - at.marklineObj.cond=2 + at.marklineObj.DO=2 + at.marklineObj.codcr=40 + at.marklineObj.cond='' at.marklineObj.ph='' } e.siteEchartDto.datas.forEach((j) => { @@ -231,8 +231,8 @@ case "DO": at.DO = j.datas; break; - case "turb": - at.turb = j.datas; + case "codcr": + at.codcr = j.datas; break; case "cond": at.cond = j.datas; diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue b/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue index 2a868e4..72ceeac 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/components/HistorySZChart.vue @@ -111,9 +111,9 @@ axisLabel: { show: true, color: "#EBFEFF", - fontSize: nowSize(14, 1920), + fontSize: nowSize(10, 1920), formatter: function (value) { - return moment(value).format("MM月"); + return moment(value).format("YY年MM月"); }, }, }, diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/ShuiZhicharts.vue b/src/views/pictureOnMap/page/DrainageSystem/components/ShuiZhicharts.vue index 6d334a4..c80eef4 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/components/ShuiZhicharts.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/components/ShuiZhicharts.vue @@ -41,11 +41,10 @@ function init() { let position = ['insideStartTop', 'insideMiddleTop', 'insideEndBottom']; myChart.value = echarts.init(document.getElementById(id)); - console.log('Number(props.data.marklineObj.cond)',Number(props.data.marklineObj.cond)); - let a=Number(props.data.marklineObj.cond) - let b=[1,2,3,4,5] - console.log('22222',Math.max(...[Number(props.data.marklineObj.cond),...props.data.DO]) * 1.1); -console.log('12',Math.max([a,...b]) * 1.1,); + + let maxnh4n=Number((Math.max(...[Number(props.data.marklineObj.nh4n),...props.data.nh4n]) * 1.2)) + console.log('123',maxnh4n); +// console.log('2222332',(Math.max(...[Number(props.data.marklineObj.nh4n),...props.data.nh4n]) * 1.1).toFixed(2)); let option = { tooltip: { trigger: 'axis', @@ -57,19 +56,19 @@ // 字体颜色 color: 'white', // 字体大小 - fontSize: 14, + fontSize: nowSize(14, 1920), }, }, legend: { - data: ['氨氮', '溶解氧', '浊度', '电导率', 'PH值'], + data: ['氨氮', '溶解氧', 'COD', '电导率', 'PH值'], textStyle: { color: '#FFFFFF', - fontSize: 12, + fontSize: nowSize(12, 1920), }, }, grid: { top: 52, - left: 30, + left: 20, right: 25, bottom: 10, containLabel: true, @@ -82,7 +81,7 @@ data: props.data.XAxis, axisLabel: { color: 'rgba(255,255,255,1)', - fontSize: 12, + fontSize: nowSize(12, 1920), fontFamily: 'AlibabaPuHuiTi', formatter: function (value) { return moment(value).format('HH:MM'); @@ -125,13 +124,16 @@ // minInterval: 1, min: 0, + max:Number((Math.max(...[Number(props.data.marklineObj.nh4n),...props.data.nh4n]) * 1.3)).toFixed(2), + axisLabel: { color: '#259543', show: true, - // formatter: function (value) { - // return value.toFixed(2); // 保留两位小数 - // }, + formatter: function (value) { + return value.toFixed(1); // 保留两位小数 + }, }, + nameTextStyle: { color: '#259543', padding: [0, 0, 0, -5], @@ -154,19 +156,19 @@ name: '溶解氧', type: 'value', // minInterval: 1, - // min: 0, - // max:(Math.max(...[Number(props.data.marklineObj.cond),...props.data.DO]) * 1.1).toFixed(2), + min: 0, + max:(Math.max(...[Number(props.data.marklineObj.DO),...props.data.DO]) * 1.3).toFixed(2), axisLabel: { color: '#b14de5', show: true, - // formatter: function (value) { - // return value.toFixed(2); // 保留两位小数 - // }, + formatter: function (value) { + return value.toFixed(0); // 保留两位小数 + }, }, nameTextStyle: { color: '#b14de5', - padding: [0, 0, 0, -10], + padding: [0, 0, 0, -5], }, splitLine: { show: false, @@ -180,10 +182,11 @@ offset: -5, }, { - name: '浊度', + name: 'COD', type: 'value', // minInterval: 1, min: 0, + max:(Math.max(...[Number(props.data.marklineObj.codcr),...props.data.codcr]) * 1.3).toFixed(2), axisLabel: { color: '#99FF55', show: true, @@ -193,7 +196,7 @@ }, nameTextStyle: { color: '#99FF55', - padding: [0, 0, 0, 15], + padding: [0, 0, 0, 10], }, splitLine: { show: false, @@ -221,7 +224,7 @@ }, nameTextStyle: { color: '#FFC155', - padding: [0, 0, 0, 20], + padding: [0, 0, 0, 15], }, splitLine: { show: false, @@ -248,7 +251,7 @@ }, nameTextStyle: { color: '#009BE9', - padding: [0, 0, 0, 20], + padding: [0, 0, 0, 15], }, splitLine: { show: false, @@ -291,7 +294,7 @@ show: true, formatter: '氨氮警戒线:' + props.data.marklineObj.nh4n, color: '#259543', - fontSize: 12, + fontSize: nowSize(12, 1920), position: 'middle', }, }, @@ -318,16 +321,16 @@ markLine: { data: [ { - yAxis: props.data.marklineObj.cond, // 这是水平线的 Y 轴值 + yAxis: props.data.marklineObj.DO, // 这是水平线的 Y 轴值 lineStyle: { type: 'dashed', color: '#b14de5', // 线的颜色 }, label: { show: true, - formatter: '溶解氧警戒线:' + props.data.marklineObj.cond, + formatter: '溶解氧警戒线:' + props.data.marklineObj.DO, color: '#b14de5', - fontSize: 12, + fontSize: nowSize(12, 1920), position: 'middle', }, }, @@ -336,9 +339,9 @@ }, }, { - name: '浊度', + name: 'COD', type: 'line', - data: props.data.turb, + data: props.data.codcr, yAxisIndex: 2, // 修改折线颜色 lineStyle: { @@ -349,7 +352,25 @@ itemStyle: { color: '#99FF55', // 数据点颜色 }, - + markLine: { + data: [ + { + yAxis: props.data.marklineObj.codcr, // 这是水平线的 Y 轴值 + lineStyle: { + type: 'dashed', + color: '#99FF55', // 线的颜色 + }, + label: { + show: true, + formatter: 'COD警戒线:' + props.data.marklineObj.codcr, + color: '#99FF55', + fontSize: nowSize(12, 1920), + position: 'middle', + }, + }, + ], + symbol: ['none', 'none'], // 这里设置标记线两端的标记为'none',即不显示箭头 + }, }, { name: '电导率', diff --git a/src/views/pictureOnMap/page/WaterAssets/MonitoringAssetsRight/index.vue b/src/views/pictureOnMap/page/WaterAssets/MonitoringAssetsRight/index.vue index 851a9bb..c0439e7 100644 --- a/src/views/pictureOnMap/page/WaterAssets/MonitoringAssetsRight/index.vue +++ b/src/views/pictureOnMap/page/WaterAssets/MonitoringAssetsRight/index.vue @@ -58,11 +58,10 @@