From ea2065ea37762e65f1ca0481be21efd9d6b99d12 Mon Sep 17 00:00:00 2001 From: wangqi <magical1908@outlook.com> Date: 星期三, 07 四月 2021 16:12:26 +0800 Subject: [PATCH] 修改废气 修改废气废水显示 --- src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue | 38 ++++++++++++++++++++++++-------------- 1 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue b/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue index c3338d4..5abace4 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue @@ -11,10 +11,11 @@ <el-button size="mini" round @click="dialogVisible = true">鏄庣粏琛�</el-button> <el-dialog :visible.sync="dialogVisible" :append-to-body="true" - width="66%" + width="68%" center + v-dialogDrag > - <div class="el-dialog-div" style="height: 600px"> + <div class="el-dialog-div" style="height: 500px"> <public-detailed-list v-bind="$attrs"></public-detailed-list> </div> </el-dialog> @@ -34,13 +35,10 @@ }, data () { return { - dialogVisible: false - } - }, - methods: { - drawChart: function () { - const myChart = this.$echarts.init(this.$refs.main) - const option = { + watchData: [], + dialogVisible: false, + dataDate: [], + options: { title: { // text: '鎶樼嚎鍥惧爢鍙�' }, @@ -120,7 +118,7 @@ xAxis: { type: 'category', boundaryGap: false, - data: ['2021.01.01', '2021.01.02', '2021.01.03', '2021.01.04', '2021.01.05', '2021.01.06', '2021.01.07'], + data: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲', '鍛ㄥ叚', '鍛ㄥ叚'], axisLabel: { // x杞村叏閮ㄦ樉绀� rotate: 20, interval: 0, @@ -196,20 +194,32 @@ } ] } - myChart.setOption(option) + } + }, + methods: { + drawChart: function () { + const myChart = this.$echarts.init(this.$refs.main) + myChart.setOption(this.options) } }, mounted () { this.drawChart() + const dataWatch = JSON.parse(JSON.stringify(this.$attrs.getWasteWaterMonitoring)) + console.log(dataWatch) + for (var i = 0; i < dataWatch.length; i++) { + this.dataDate.push(dataWatch[i].MonTimeStr.substring(10, 17)) + } + console.log(this.dataDate) } } </script> <style scoped lang="less"> - .Infomation{ + .Infomation { margin-left: 10px; } - .el-tag{ + + .el-tag { height: 25px; line-height: 25px; margin-right: 10px; @@ -222,7 +232,7 @@ .form-echrts{ width: 100%; height: 100%; - border: 1px solid #396d83; + border-top: 1px solid #396d83; //margin: 10px 10px 10px 10px; .el-dialog-div{ //height: 50vh!important; -- Gitblit v1.8.0