From a19ce43fb54c9d5e3aeb237ca3b2ca2f2abe0ba8 Mon Sep 17 00:00:00 2001
From: zhangshuaibao <15731629597@163.com>
Date: 星期三, 14 四月 2021 10:38:08 +0800
Subject: [PATCH] 废水图标完善
---
src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue | 116 ++++++++++++++++++++++++++++++----------------------------
1 files changed, 60 insertions(+), 56 deletions(-)
diff --git a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue
index 495445a..cf7c29f 100644
--- a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue
+++ b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue
@@ -3,10 +3,9 @@
<div id="Tab">
<div class="infomation">
<div>
- <span class="grid-content">姘哀鍖栫墿 :<i>29.93</i> 鏍囧噯 : 100</span>
- <span class="grid-content">浜屾哀鍖栫~ : <i>17.34</i> 鏍囧噯 : 50</span>
- <span class="grid-content">鐑熷皹 : <i>6.93</i> 鏍囧噯 : 30</span>
- <span class="grid-content">搴熸皵娴侀噺 : <i>120343.18</i></span>
+ <span class="grid-content">COD : <i style="color: #e8ee0b">6.039</i> 鏍囧噯 : 10</span>
+ <span class="grid-content">姘ㄦ爱 : <i style="color: #e8ee0b">0.38</i> 鏍囧噯 : 5</span>
+ <span class="grid-content">搴熸按娴侀噺 : <i style="color: #e8ee0b">254.643997</i></span>
</div>
</div>
<div class="form-echrts">
@@ -15,35 +14,34 @@
<div class="pickerData">
<span> 寮�濮嬫椂闂�:</span>
<span class="pickerTable">
- <el-date-picker type="datetime" v-model="formInline.timeStart">
+ <el-date-picker type="datetime" v-model="formInline.timeStart">
</el-date-picker>
</span>
</div>
<div class="pickerData">
<span >缁撴潫鏃堕棿:</span>
<span class="pickerTable">
- <el-date-picker
- type="datetime"
- v-model="formInline.timeEnd"
- >
+ <el-date-picker type="datetime" v-model="formInline.timeEnd">
</el-date-picker>
</span>
</div>
</div>
- <div>
- 閲囨牱鐐规暟:
- <el-select v-model="formInline.region">
- <el-option label="0" value="0"></el-option>
- <el-option label="25" value="25"></el-option>
- <el-option label="50" value="50"></el-option>
- <el-option label="75" value="75"></el-option>
- <el-option label="100" value="100"></el-option>
- </el-select>
- </div>
+<!-- <div>-->
+<!-- 閲囨牱鐐规暟:-->
+<!-- <el-select v-model="formInline.region">-->
+<!-- <el-option label="0" value="0"></el-option>-->
+<!-- <el-option label="25" value="25"></el-option>-->
+<!-- <el-option label="50" value="50"></el-option>-->
+<!-- <el-option label="75" value="75"></el-option>-->
+<!-- <el-option label="100" value="100"></el-option>-->
+<!-- </el-select>-->
+<!-- </div>-->
<div class="detailbtn" @click="onSubmit">鏌ヨ</div>
<div class="detailbtn" @click="dialogVisible = true" >鏄庣粏琛�</div>
</div>
- <div style="width:5rem;height:2rem;" id="echarts" ref="main">
+ <div class="boxChart" style="height: 260px">
+ <div style="width: 100%;height: 100%;" id="popChart" ref="main">
+ </div>
</div>
</div>
<!-- 鏄庣粏寮规 -->
@@ -54,7 +52,7 @@
center
v-dialogDrag
>
- <div class="el-dialog-div" style="height: 500px">
+ <div class="el-dialog-div" style="height: 260px">
<public-detailed-list v-bind="$attrs"></public-detailed-list>
</div>
</el-dialog>
@@ -79,11 +77,11 @@
value: '',
formInline: {
region: '',
- timeStart: '',
- timeEnd: ''
+ timeStart: '2021-04-12 17:00:00',
+ timeEnd: '2021-04-13 16:00:00'
},
myChart: null,
- JsonWater: {
+ JsonHourWater: {
id: 'mycharteff',
title: '',
datatype: 2,
@@ -127,22 +125,23 @@
}
}
},
+ mounted () {
+ this.onSubmit()
+ },
methods: {
onSubmit () {
- console.log(1)
-
- // const date = [this.value1, this.value2, this.formInline.region]
- this.effChartShow(this.JsonWater.id, this.JsonWater.title, this.JsonWater.legend, this.JsonWater.xdata, this.JsonWater.ydatas, this.JsonWater.yname, this.JsonWater.id, this.JsonWater.datatype)
- // console.log(date)
- // if (date) {
- // var date1 = new Date(date)
- // date1 = new Date(date1.getTime() - (8 * 3600000))
- // console.log(date1)
- // var dateUtil = new DateUtil()
- // var datePkg = dateUtil.getTowDate(date1, "a", 24 * 3600000 - 1);
- // var datatype = 2;
+ this.effChartShow()
},
- effChartShow: function (id, title, legend, xdata, ydatas, yname, jcdID, datatype) {
+ effChartShow: function () {
+ // var id = this.JsonHourWater.id
+ // var title = this.JsonHourWater.title
+ var legend = this.JsonHourWater.legend
+ var xdata = this.JsonHourWater.xdata
+ var ydatas = this.JsonHourWater.ydatas
+ var yname = this.JsonHourWater.yname
+ // var jcdId = this.JsonHourWater.jcdID
+ var datatype = this.JsonHourWater.datatype
+
this.myChart = this.$echarts.init(this.$refs.main)
this.myChart.clear()
var dataUnit = ''
@@ -161,6 +160,7 @@
ydatas[j].data[k] = it2
}
}
+
for (var i = 0; i < ydatas.length; i++) {
// var zdcbcolor = ydatas[i].zdcbcolor
var bz = ydatas[i].bzz
@@ -197,11 +197,10 @@
show: false
}
}
-
},
type: 'line',
data: ydatas[i].data,
- markLine: { // 骞冲潎鍊� 锛� 鍜� 鎸囨爣涓婇檺
+ markLine: { // 骞冲潎鍊� 鍜� 鎸囨爣涓婇檺
symbol: 'none',
data: [{
label: {
@@ -245,7 +244,7 @@
},
lineStyle: { // 鎶樼嚎鐨勯鑹�
color: ydatas[i].zxcolor,
- width: 5
+ width: 4
},
borderColor: 'black', // 鎶樼偣杈规鐨勯鑹�
label: { // 鏄剧ず鍊�
@@ -311,10 +310,14 @@
},
grid: { // 缃戞牸
top: '20%',
- left: '5%'
+ left: '7%',
+ bottom: '10%'
},
legend: {
- data: legend
+ data: legend,
+ textStyle: {
+ color: '#fff'
+ }
},
dataZoom: [{
type: 'inside',
@@ -341,7 +344,8 @@
rotate: 20,
interval: 0,
textStyle: {
- color: '#fff'
+ color: '#fff',
+ fontSize: 10
}
},
splitLine: { // 缃戞牸鍨傜洿绾夸负 铏氱嚎
@@ -559,20 +563,20 @@
}
// createDivByMouse("s",params.event);
}) */
- },
- drawChart: function () {
- window.onresize = function () {
- var h1 = document.documentElement.clientHeight// 鑾峰彇灞忓箷鐨勯珮搴�
- if (h1 > 700) {
- this.myChart.getDom().style.height = 3 + 'rem'
- this.myChart.getDom().style.width = 6 + 'rem'
- } else {
- this.myChart.getDom().style.height = 3 + 'rem'
- this.myChart.getDom().style.width = 6 + 'rem'
- }
- this.myChart.resize()
- }
}
+ // drawChart: function () {
+ // window.onresize = function () {
+ // var h1 = document.documentElement.clientHeight// 鑾峰彇灞忓箷鐨勯珮搴�
+ // if (h1 > 700) {
+ // this.myChart.getDom().style.height = 3 + 'rem'
+ // this.myChart.getDom().style.width = 6 + 'rem'
+ // } else {
+ // this.myChart.getDom().style.height = 3 + 'rem'
+ // this.myChart.getDom().style.width = 6 + 'rem'
+ // }
+ // this.myChart.resize()
+ // }
+ // }
}
--
Gitblit v1.8.0