|
@@ -14,21 +14,30 @@
|
|
|
<!--渐变折线图-->
|
|
|
<div id="oneGTGyChart" style="width:100%;height:2rem;"></div>
|
|
|
</div>
|
|
|
- <div class="d-flex chartStyle">
|
|
|
+ <div class="d-flex chartStyle" @click="openchart2">
|
|
|
<!--渐变折线图-->
|
|
|
<div id="twoGTGyChart" style="width:100%;height:2rem;"></div>
|
|
|
</div>
|
|
|
- <div class="d-flex chartStyle">
|
|
|
+ <div class="d-flex chartStyle" @click="openchart3">
|
|
|
<!--渐变折线图-->
|
|
|
<div id="threeGTGyChart" style="width:100%;height:2rem;"></div>
|
|
|
</div>
|
|
|
- <div class="d-flex chartStyle">
|
|
|
+ <div class="d-flex chartStyle" @click="openchart4">
|
|
|
<!--渐变折线图-->
|
|
|
<div id="fourGTGyChart" style="width:100%;height:2rem;"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-dialog :visible.sync="openchart" @open="open" width="1600px" append-to-body>
|
|
|
- <div id="oneGTGyChart1" style="width:100%;height:600px;"></div>
|
|
|
+ <el-dialog class="my-info-dialog" :visible.sync="openChartOne" title="2#发电机趋势" @open="open1" width="1600px" destroy-on-close append-to-body>
|
|
|
+ <div id="oneGTGyChart1" style="width:100%;height:600px;"></div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog class="my-info-dialog" :visible.sync="openChartTwo" title="1#发电机趋势" @open="open2" width="1600px" destroy-on-close append-to-body>
|
|
|
+ <div id="twoGTGyChart1" style="width:100%;height:600px;"></div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog class="my-info-dialog" :visible.sync="openChartThree" title="4#发电机趋势" @open="open3" width="1600px" destroy-on-close append-to-body>
|
|
|
+ <div id="threeGTGyChart1" style="width:100%;height:600px;"></div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog class="my-info-dialog" :visible.sync="openChartFour" title="3#发电机趋势" @open="open4" width="1600px" destroy-on-close append-to-body>
|
|
|
+ <div id="fourGTGyChart1" style="width:100%;height:600px;"></div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -49,7 +58,10 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- openchart: false,
|
|
|
+ openChartOne: false,
|
|
|
+ openChartTwo: false,
|
|
|
+ openChartThree: false,
|
|
|
+ openChartFour: false,
|
|
|
config: {
|
|
|
lineWidth: 30,
|
|
|
activeRadius: "80%",
|
|
@@ -125,13 +137,37 @@ export default {
|
|
|
this.initFourChart();
|
|
|
},
|
|
|
methods: {
|
|
|
- open(){
|
|
|
+ open1(){
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.initOneChartDialog()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ open2(){
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.initTwoChartDialog()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ open3(){
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.initThreeChartDialog()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ open4(){
|
|
|
this.$nextTick(() => {
|
|
|
- this.initOneChart1()
|
|
|
+ this.initFourChartDialog()
|
|
|
})
|
|
|
},
|
|
|
openchart1(){
|
|
|
- this.openchart = true
|
|
|
+ this.openChartOne = true
|
|
|
+ },
|
|
|
+ openchart2(){
|
|
|
+ this.openChartTwo = true
|
|
|
+ },
|
|
|
+ openchart3(){
|
|
|
+ this.openChartThree = true
|
|
|
+ },
|
|
|
+ openchart4(){
|
|
|
+ this.openChartFour = true
|
|
|
},
|
|
|
changeTiming() {
|
|
|
setInterval(() => {
|
|
@@ -162,9 +198,18 @@ export default {
|
|
|
top: '13%',
|
|
|
containLabel: true
|
|
|
},
|
|
|
+ title: {
|
|
|
+ text: '2#发电机',
|
|
|
+ textAlign: 'center',
|
|
|
+ x: 'center',
|
|
|
+ y: '1px',
|
|
|
+ textStyle: {
|
|
|
+ color: '#ffffff',
|
|
|
+ fontSize: 12,
|
|
|
+ }
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
- // data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
|
|
|
data:dateDay
|
|
|
},
|
|
|
yAxis: {
|
|
@@ -195,7 +240,7 @@ export default {
|
|
|
]
|
|
|
})
|
|
|
},
|
|
|
- initOneChart1() {
|
|
|
+ initOneChartDialog() {
|
|
|
console.log("====")
|
|
|
// 基于准备好的dom,初始化echarts实例
|
|
|
this.chart1 = this.echarts.init(document.getElementById('oneGTGyChart1'))
|
|
@@ -256,7 +301,6 @@ export default {
|
|
|
dateDay[i] = this.monthData[i].dateDay
|
|
|
dateNum[i] = this.monthData[i].gtg2Lv
|
|
|
}
|
|
|
-
|
|
|
this.chart.setOption({
|
|
|
/* 周围边距 */
|
|
|
grid: {
|
|
@@ -266,6 +310,77 @@ export default {
|
|
|
top: '13%',
|
|
|
containLabel: true
|
|
|
},
|
|
|
+ title: {
|
|
|
+ text: '1#发电机',
|
|
|
+ textAlign: 'center',
|
|
|
+ x: 'center',
|
|
|
+ y: '1px',
|
|
|
+ textStyle: {
|
|
|
+ color: '#ffffff',
|
|
|
+ fontSize: 12,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ // data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
|
|
|
+ data:dateDay
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ // data: [150, 230, 224, 218, 135, 147, 260, 150, 230, 224, 218, 135, 147, 260, 150, 230, 224, 218, 135, 147, 260, 150, 230, 224, 218, 135, 147, 260, 23, 147, 123],
|
|
|
+ data:dateNum,
|
|
|
+ type: 'line',
|
|
|
+ itemStyle: {
|
|
|
+ color: 'rgb(24,56,255)'
|
|
|
+ },
|
|
|
+ symbol: "none",
|
|
|
+ areaStyle: {
|
|
|
+ color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
+ {
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgb(8,32,252)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgb(21,171,231)'
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ },
|
|
|
+ initTwoChartDialog() {
|
|
|
+ // 基于准备好的dom,初始化echarts实例
|
|
|
+ this.chart2 = this.echarts.init(document.getElementById('twoGTGyChart1'))
|
|
|
+ const dateDay = [];
|
|
|
+ const dateNum = [];
|
|
|
+ for (let i = 0; i < this.monthData.length; i++) {
|
|
|
+ dateDay[i] = this.monthData[i].dateDay
|
|
|
+ dateNum[i] = this.monthData[i].gtg2Lv
|
|
|
+ }
|
|
|
+ this.chart2.setOption({
|
|
|
+ /* 周围边距 */
|
|
|
+ grid: {
|
|
|
+ left: '3%',
|
|
|
+ right: '3%',
|
|
|
+ bottom: '1%',
|
|
|
+ top: '13%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ text: '1#发电机',
|
|
|
+ textAlign: 'center',
|
|
|
+ x: 'center',
|
|
|
+ y: '1px',
|
|
|
+ textStyle: {
|
|
|
+ color: '#ffffff',
|
|
|
+ fontSize: 12,
|
|
|
+ }
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
// data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
|
|
@@ -318,6 +433,78 @@ export default {
|
|
|
top: '13%',
|
|
|
containLabel: true
|
|
|
},
|
|
|
+ title: {
|
|
|
+ text: '4#发电机',
|
|
|
+ textAlign: 'center',
|
|
|
+ x: 'center',
|
|
|
+ y: '1px',
|
|
|
+ textStyle: {
|
|
|
+ color: '#ffffff',
|
|
|
+ fontSize: 12,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ // data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
|
|
|
+ data:dateDay
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ // data: [150, 230, 224, 218, 135, 147, 260, 150, 230, 224, 218, 135, 147, 260, 150, 230, 224, 218, 135, 147, 260, 150, 230, 224, 218, 135, 147, 260, 23, 147, 123],
|
|
|
+ data:dateNum,
|
|
|
+ type: 'line',
|
|
|
+ itemStyle: {
|
|
|
+ color: 'rgb(142,161,131)'
|
|
|
+ },
|
|
|
+ symbol: "none",
|
|
|
+ areaStyle: {
|
|
|
+ color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
+ {
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgb(229,245,171)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgb(156,186,137)'
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ },
|
|
|
+ initThreeChartDialog() {
|
|
|
+ // 基于准备好的dom,初始化echarts实例
|
|
|
+ this.chart3 = this.echarts.init(document.getElementById('threeGTGyChart1'))
|
|
|
+ const dateDay = [];
|
|
|
+ const dateNum = [];
|
|
|
+ for (let i = 0; i < this.monthData.length; i++) {
|
|
|
+ dateDay[i] = this.monthData[i].dateDay
|
|
|
+ dateNum[i] = this.monthData[i].gtg3Lv
|
|
|
+ }
|
|
|
+
|
|
|
+ this.chart3.setOption({
|
|
|
+ /* 周围边距 */
|
|
|
+ grid: {
|
|
|
+ left: '3%',
|
|
|
+ right: '3%',
|
|
|
+ bottom: '1%',
|
|
|
+ top: '13%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ text: '4#发电机',
|
|
|
+ textAlign: 'center',
|
|
|
+ x: 'center',
|
|
|
+ y: '1px',
|
|
|
+ textStyle: {
|
|
|
+ color: '#ffffff',
|
|
|
+ fontSize: 12,
|
|
|
+ }
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
// data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
|
|
@@ -370,6 +557,16 @@ export default {
|
|
|
top: '13%',
|
|
|
containLabel: true
|
|
|
},
|
|
|
+ title: {
|
|
|
+ text: '3#发电机',
|
|
|
+ textAlign: 'center',
|
|
|
+ x: 'center',
|
|
|
+ y: '1px',
|
|
|
+ textStyle: {
|
|
|
+ color: '#ffffff',
|
|
|
+ fontSize: 12,
|
|
|
+ }
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
// data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
|
|
@@ -403,12 +600,84 @@ export default {
|
|
|
]
|
|
|
})
|
|
|
},
|
|
|
+ initFourChartDialog() {
|
|
|
+ // 基于准备好的dom,初始化echarts实例
|
|
|
+ this.chart4 = this.echarts.init(document.getElementById('fourGTGyChart1'))
|
|
|
+ const dateDay = [];
|
|
|
+ const dateNum = [];
|
|
|
+ for (let i = 0; i < this.monthData.length; i++) {
|
|
|
+ dateDay[i] = this.monthData[i].dateDay
|
|
|
+ dateNum[i] = this.monthData[i].stg1Lv
|
|
|
+ }
|
|
|
|
|
|
+ this.chart4.setOption({
|
|
|
+ /* 周围边距 */
|
|
|
+ grid: {
|
|
|
+ left: '3%',
|
|
|
+ right: '3%',
|
|
|
+ bottom: '1%',
|
|
|
+ top: '13%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ text: '3#发电机',
|
|
|
+ textAlign: 'center',
|
|
|
+ x: 'center',
|
|
|
+ y: '1px',
|
|
|
+ textStyle: {
|
|
|
+ color: '#ffffff',
|
|
|
+ fontSize: 12,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ // data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
|
|
|
+ data:dateDay
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ // data: [150, 230, 224, 218, 135, 147, 260, 150, 230, 224, 218, 135, 147, 260, 150, 230, 224, 218, 135, 147, 260, 150, 230, 224, 218, 135, 147, 260, 23, 147, 123],
|
|
|
+ data:dateNum,
|
|
|
+ type: 'line',
|
|
|
+ itemStyle: {
|
|
|
+ color: 'rgb(60,95,109)'
|
|
|
+ },
|
|
|
+ symbol: "none",
|
|
|
+ areaStyle: {
|
|
|
+ color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
+ {
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgb(189,225,250)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgb(74,143,189)'
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
+/*body背景色*/
|
|
|
+ .my-info-dialog {
|
|
|
+ .el-dialog {
|
|
|
+ .el-dialog__body{
|
|
|
+ background: #ffffff;
|
|
|
+ }
|
|
|
+ .el-dialog__header{
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
#centreLeft1 {
|
|
|
padding: 0.2rem;
|
|
|
height: 5.125rem;
|