Browse Source

echarts放大图重新更改id

zy 5 months ago
parent
commit
3d3e32b984

+ 2 - 2
cpp-ui/src/views/largeScreen/components/center-bottom.vue

@@ -28,7 +28,7 @@
         :destroy-on-close="true"
         center
       >
-        <div id="main" ref="fullChart" :style="'width:100%;height:' + (screenHeight - 110) + 'px'"/>
+        <div id="forecastFullChart" ref="fullChart" :style="'width:100%;height:' + (screenHeight - 110) + 'px'"/>
       </el-dialog>
     </div>
 
@@ -124,7 +124,7 @@ export default {
       window.addEventListener("resize", this.chartsResize);
     },
     setFullOptions({realList, ableList,theoryList,dqList,cdqList,timeList} = {}) {
-      this.fullChart = this.$echarts.init(document.getElementById('main'));
+      this.fullChart = this.$echarts.init(document.getElementById('forecastFullChart'));
       let option = JSON.parse(JSON.stringify(lineOption))
       option.series[0].data = realList
       option.series[1].data = ableList

+ 2 - 2
cpp-ui/src/views/largeScreen/components/left-bottom.vue

@@ -13,7 +13,7 @@
         :destroy-on-close="true"
         center
       >
-        <div id="main" ref="fullChart" :style="'width:100%;height:' + (screenHeight - 110) + 'px'"/>
+        <div id="tickFullChart" ref="fullChart" :style="'width:100%;height:' + (screenHeight - 110) + 'px'"/>
       </el-dialog>
     </div>
 
@@ -328,7 +328,7 @@ export default {
       }
     },
     setFullOptions({xData, boxplotData,scatterData} = {}) {
-      this.fullChart = this.$echarts.init(document.getElementById('main'));
+      this.fullChart = this.$echarts.init(document.getElementById('tickFullChart'));
       let option = JSON.parse(JSON.stringify(dqTickOptions))
       let series = [
         {

+ 2 - 2
cpp-ui/src/views/largeScreen/components/right-bottom.vue

@@ -13,7 +13,7 @@
         :destroy-on-close="true"
         center
       >
-        <div id="main" ref="fullChart" :style="'width:100%;height:' + (screenHeight - 110) + 'px'"/>
+        <div id="fullChart" ref="fullChart" :style="'width:100%;height:' + (screenHeight - 110) + 'px'"/>
       </el-dialog>
     </div>
 
@@ -102,7 +102,7 @@ export default {
       window.addEventListener("resize", this.chartsResize);
     },
     setFullOptions({xData, pData} = {}) {
-      this.fullChart = this.$echarts.init(document.getElementById('main'));
+      this.fullChart = this.$echarts.init(document.getElementById('fullChart'));
       let option = JSON.parse(JSON.stringify(forecast10LineOption))
       option.xAxis.data = xData
       option.series[0].data = pData

+ 2 - 2
cpp-ui/src/views/largeScreen/components/right-middle.vue

@@ -21,7 +21,7 @@
         :destroy-on-close="true"
         center
       >
-        <div id="main" ref="fullChart" :style="'width:100%;height:' + (screenHeight - 110) + 'px'"/>
+        <div id="weatherFullChart" ref="fullChart" :style="'width:100%;height:' + (screenHeight - 110) + 'px'"/>
       </el-dialog>
     </div>
 
@@ -390,7 +390,7 @@ export default {
         }else{
           option.yAxis[0].name='m/s'
         }
-        this.fullChart = this.$echarts.init(document.getElementById('main'));
+        this.fullChart = this.$echarts.init(document.getElementById('weatherFullChart'));
         this.fullChart.setOption(option, true)
       }).catch(err => {
       })