From ee40707d2c8593bc95d26a78860bd0b670c7de44 Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Wed, 27 Sep 2023 09:33:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=E5=8F=8A=E8=83=BD?= =?UTF-8?q?=E6=BA=90=E5=88=86=E6=9E=90=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/svg/downArrow.svg | 13 ++++++ src/assets/icons/svg/upArrow.svg | 13 ++++++ .../contrastAnalysis/components/barChart.vue | 38 ++++++++++++++-- .../contrastAnalysis/components/lineChart.vue | 33 ++++++++++++-- .../components/searchArea.vue | 2 +- .../analysis/contrastAnalysis/index.vue | 45 ++++++++++++++++--- .../qoqAnalysis/components/lineChart.vue | 19 ++++++-- .../energy/analysis/qoqAnalysis/index.vue | 18 +++++--- .../trendAnalysis/components/barChart.vue | 39 ++++++++++++++-- .../trendAnalysis/components/lineChart.vue | 30 ++++++++++++- .../energy/analysis/trendAnalysis/index.vue | 45 ++++++++++++++++--- .../yoyAnalysis/components/lineChart.vue | 5 ++- .../yoyAnalysis/components/subRate.vue | 18 ++++++++ .../energy/analysis/yoyAnalysis/index.vue | 31 ++++++++----- .../monitoring/energyReportSearch/index.vue | 6 +-- 15 files changed, 302 insertions(+), 53 deletions(-) create mode 100644 src/assets/icons/svg/downArrow.svg create mode 100644 src/assets/icons/svg/upArrow.svg create mode 100644 src/views/energy/analysis/yoyAnalysis/components/subRate.vue diff --git a/src/assets/icons/svg/downArrow.svg b/src/assets/icons/svg/downArrow.svg new file mode 100644 index 00000000..a7eca2c4 --- /dev/null +++ b/src/assets/icons/svg/downArrow.svg @@ -0,0 +1,13 @@ + + + 收起箭头小备份 3 + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/upArrow.svg b/src/assets/icons/svg/upArrow.svg new file mode 100644 index 00000000..7a5ae7e8 --- /dev/null +++ b/src/assets/icons/svg/upArrow.svg @@ -0,0 +1,13 @@ + + + 收起箭头小备份 11 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/energy/analysis/contrastAnalysis/components/barChart.vue b/src/views/energy/analysis/contrastAnalysis/components/barChart.vue index 846a6d2f..943c5a36 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/barChart.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/barChart.vue @@ -25,6 +25,10 @@ export default { default: () => { return [] } + }, + timeDim: { + type: String, + default: '' } }, watch: { @@ -58,32 +62,58 @@ export default { tempArr = this.chartData[0].trendRespVOList } for (let k = 0; k < tempArr.length; k++) { - xData.push(tempArr[k].time) + let time = '' + if (this.timeDim === '3') { + let year = tempArr[k].time.slice(0,4) + let weak = tempArr[k].time.slice(4,6) + time = year+' 第 '+weak+' 周' + } else { + time = tempArr[k].time + } + xData.push(time) } for (let i = 0; i < this.chartData.length; i++) { let obj = { name: this.chartData[i].objName + this.chartData[i].objCode, type: 'bar', + barMaxWidth: 20, + label: { + show: true, + position: 'top' + }, data: [] } legendData.push(this.chartData[i].objName + this.chartData[i].objCode) let temp = this.chartData[i].trendRespVOList for (let j = 0; j < temp.length; j++) { - let num = temp[j].useNum ? temp[j].useNum : 0 + let num = temp[j].useNum ? temp[j].useNum : '' obj.data.push(num) } yData.push(obj) } var option = { + color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF'], tooltip: { - trigger: 'axis' + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + grid: { + left: '4%', + right: '1%', + bottom: '1%', + containLabel: true }, legend: { data: legendData }, xAxis: { type: 'category', - data: xData + data: xData, + axisLabel: { + rotate: "45" + } }, yAxis: { type: 'value' diff --git a/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue b/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue index 35b1b108..ae958da9 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue @@ -25,6 +25,10 @@ export default { default: () => { return [] } + }, + timeDim: { + type: String, + default: '' } }, watch: { @@ -58,7 +62,15 @@ export default { tempArr = this.chartData[0].trendRespVOList } for (let k = 0; k < tempArr.length; k++) { - xData.push(tempArr[k].time) + let time = '' + if (this.timeDim === '3') { + let year = tempArr[k].time.slice(0,4) + let weak = tempArr[k].time.slice(4,6) + time = year+' 第 '+weak+' 周' + } else { + time = tempArr[k].time + } + xData.push(time) } for (let i = 0; i < this.chartData.length; i++) { let obj = { @@ -70,22 +82,35 @@ export default { legendData.push(this.chartData[i].objName + this.chartData[i].objCode) let temp = this.chartData[i].trendRespVOList for (let j = 0; j < temp.length; j++) { - let num = temp[j].useNum ? temp[j].useNum : 0 + let num = temp[j].useNum ? temp[j].useNum : '' obj.data.push(num) } yData.push(obj) } var option = { + color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF'], tooltip: { - trigger: 'axis' + trigger: 'axis', + axisPointer: { + type: 'cross' + } + }, + grid: { + left: '4%', + right: '1%', + bottom: '1%', + containLabel: true }, legend: { data: legendData }, xAxis: { type: 'category', - data: xData + data: xData, + axisLabel: { + rotate: "45" + } }, yAxis: { type: 'value' diff --git a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue index 3557d29e..4d7d48ea 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue @@ -135,7 +135,7 @@ - + -
+
- + - + - + + +
\ No newline at end of file + + \ No newline at end of file diff --git a/src/views/energy/analysis/qoqAnalysis/components/lineChart.vue b/src/views/energy/analysis/qoqAnalysis/components/lineChart.vue index 64968301..ef025963 100644 --- a/src/views/energy/analysis/qoqAnalysis/components/lineChart.vue +++ b/src/views/energy/analysis/qoqAnalysis/components/lineChart.vue @@ -57,12 +57,22 @@ export default { { name: '本期', type: 'bar', - data: [] + data: [], + barWidth: 20, + label: { + show: true, + position: 'top' + } }, { name: '上期', type: 'bar', - data: [] + data: [], + barWidth: 20, + label: { + show: true, + position: 'top' + } } ] for (let j = 0; j < arr.length; j++) { @@ -79,6 +89,7 @@ export default { // title: { // text: 'World Population' // }, + color:['#288AFF','#8EF0AB'], tooltip: { trigger: 'axis', axisPointer: { @@ -87,8 +98,8 @@ export default { }, legend: {}, grid: { - left: '3%', - right: '4%', + left: '1%', + right: '1%', bottom: '3%', containLabel: true }, diff --git a/src/views/energy/analysis/qoqAnalysis/index.vue b/src/views/energy/analysis/qoqAnalysis/index.vue index d8e9766e..25918374 100644 --- a/src/views/energy/analysis/qoqAnalysis/index.vue +++ b/src/views/energy/analysis/qoqAnalysis/index.vue @@ -3,14 +3,18 @@ - -
- +
+ +
+ +
+ +
\ No newline at end of file + + \ No newline at end of file diff --git a/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue b/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue index 6d80bd0e..e7650d8d 100644 --- a/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue +++ b/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue @@ -75,6 +75,7 @@ export default { } } var option = { + color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF','#FF6860','#FF9747','#B0EB42','#D680FF','#0043D2'], legend: { data: keys }, @@ -82,8 +83,8 @@ export default { trigger: 'axis' }, grid: { - left: '3%', - right: '4%', + left: '1%', + right: '1%', bottom: '3%', containLabel: true }, diff --git a/src/views/energy/analysis/yoyAnalysis/components/subRate.vue b/src/views/energy/analysis/yoyAnalysis/components/subRate.vue new file mode 100644 index 00000000..9aef9955 --- /dev/null +++ b/src/views/energy/analysis/yoyAnalysis/components/subRate.vue @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/src/views/energy/analysis/yoyAnalysis/index.vue b/src/views/energy/analysis/yoyAnalysis/index.vue index 2a697c6a..670c2563 100644 --- a/src/views/energy/analysis/yoyAnalysis/index.vue +++ b/src/views/energy/analysis/yoyAnalysis/index.vue @@ -2,20 +2,25 @@
-
- +
+
+ +
+ +
- - + +