From 2a5d7a14fc383329fc7ec45b3f96479bd2c18e26 Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期三, 07 四月 2021 15:32:04 +0800 Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop --- src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue | 82 +++++++++++++++++++++++------------------ 1 files changed, 46 insertions(+), 36 deletions(-) diff --git a/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue b/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue index 51d41e4..9ba4b4f 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue @@ -6,29 +6,30 @@ <el-tag>鐑熷皹 : 6.93 鏍囧噯 : 30</el-tag> <el-tag>搴熸皵娴侀噺 : 120343.18</el-tag> </div> - <div class="form-echrts"> - <div> - <el-button size="mini" round @click="dialogVisible = true">鏄庣粏琛�</el-button> - <el-dialog :visible.sync="dialogVisible" - :append-to-body="true" - :title="this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName" - width="68%" - center - v-dialogDrag - > - <div class="el-dialog-div" style="height: 500px"> - <public-detailed-list v-bind="$attrs"></public-detailed-list> + <div class="form-echrts"> + <!-- :title="this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName"--> + <div> + <el-button size="mini" round @click="dialogVisible = true">鏄庣粏琛�</el-button> + <el-dialog :visible.sync="dialogVisible" + :append-to-body="true" + width="68%" + center + v-dialogDrag + > + <div class="el-dialog-div" style="height: 500px"> + <public-detailed-list v-bind="$attrs"></public-detailed-list> + </div> + </el-dialog> </div> - </el-dialog> + <div style="width:750px;height:260px;" id="echarts" ref="main"> + </div> </div> - <div style="width:750px;height:260px;" id="echarts" ref="main"> - </div> - </div> </div> </template> <script> import PublicDetailedList from '@components/BaseNav/PublicBounced/GasComponents/PublicDetailedList' + export default { name: 'ECharts', components: { @@ -38,6 +39,9 @@ return { watchData: [], dialogVisible: false, + options: { + dialogVisible: false, + dataDate: [], options: { title: { // text: '鎶樼嚎鍥惧爢鍙�' @@ -118,7 +122,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, @@ -199,23 +203,27 @@ methods: { drawChart: function () { const myChart = this.$echarts.init(this.$refs.main) - // const option = {} myChart.setOption(this.options) } }, mounted () { this.drawChart() - const dataWatch = JSON.parse(JSON.stringify(this.$attrs)) + 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; @@ -225,21 +233,23 @@ border: none; padding: 0 15px; } - .form-echrts{ - width: 100%; - height: 100%; - border: 1px solid #396d83; - //margin: 10px 10px 10px 10px; - .el-dialog-div{ - //height: 50vh!important; - overflow: auto; - //overflow: hidden; - } - #echarts { - margin: 0; - padding: 0; - //border: 1px solid #396d83; + + .form-echrts { + width: 100%; + height: 100%; + border: 1px solid #396d83; //margin: 10px 10px 10px 10px; + .el-dialog-div { + //height: 50vh!important; + overflow: auto; + //overflow: hidden; + } + + #echarts { + margin: 0; + padding: 0; + //border: 1px solid #396d83; + //margin: 10px 10px 10px 10px; + } } - } </style> -- Gitblit v1.8.0