From 4b2a5a88cbca4c21c18a7b59dae825051cf75c1f Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期五, 23 四月 2021 16:30:55 +0800 Subject: [PATCH] 废水图表数据弹框相关修改 --- src/components/BaseNav/WasteWater/WasteWaterRealChart.vue | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/BaseNav/WasteWater/RealData.vue b/src/components/BaseNav/WasteWater/WasteWaterRealChart.vue similarity index 97% rename from src/components/BaseNav/WasteWater/RealData.vue rename to src/components/BaseNav/WasteWater/WasteWaterRealChart.vue index c11e43f..c73f030 100644 --- a/src/components/BaseNav/WasteWater/RealData.vue +++ b/src/components/BaseNav/WasteWater/WasteWaterRealChart.vue @@ -39,7 +39,7 @@ import PublicDataStandard from '../PublicDataStandard' export default { - name: 'ECharts', + name: 'WasteWaterRealChart', components: { PublicDataStandard }, @@ -114,6 +114,7 @@ querySearch () { this.initEchartsData() }, + // 鍒濆鍖栨暟鎹姹� async initEchartsData () { const data = { $tagCodeList: 'TJIP45.y2h508CEMS01NOX,CTJIP45.y2h508CEMS01SO2,CTJIP45.y2h508CEMS01F,CTJIP45.y2h508CEMS01PM', @@ -121,16 +122,23 @@ $endTime: this.formData.endTime, $step: 15 } + // console.log(data) const result = (await mapApi.getDataItems(data)).data + // 鏁版嵁鎸夌被鍒垎缁� this.pointsSet(result) + // 鍥炬爣瀛樺偍澶勭悊 this.legendSet() + // ydata鏁版嵁 this.yDataSet() + // 鏍规嵁宸叉湁鏁版嵁缁樺埗鍥捐〃 this.drawRealTimeDateChart() }, // 鎺ュ彛鏁版嵁鎸夌収 鏁版嵁鍐呭垎绫诲埆璁剧疆 pointsSet (d) { let data = [] let datalist = [] + this.nameList = [] + this.RealTimeDataList = [] for (let i = 0; i < d.length; i++) { // this.RealTimeDataList = [] // 鍒ゆ柇鏄惁缁х画鎵ц @@ -220,7 +228,7 @@ } } } - console.log(this.RealTimeDataList) + // console.log(this.RealTimeDataList) }, // legend绫诲埆鍥捐〃灞曠ず璁剧疆鏁扮粍 legendSet () { @@ -617,8 +625,7 @@ }], series: serLists } - this.myChart.setOption(options, true) - console.log(options) + this.myChart.setOption(options) window.onresize = this.myChart.resize } } -- Gitblit v1.8.0