From 22e5d744b28c0df0f115476b44a75d1d46cac228 Mon Sep 17 00:00:00 2001 From: zhangshuaibao <15731629597@163.com> Date: 星期二, 13 四月 2021 17:36:12 +0800 Subject: [PATCH] echarts数据显示功能完善 --- src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue | 39 +++++++++++++++------------------------ 1 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue index 1752528..a64d39c 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue @@ -14,17 +14,14 @@ <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> @@ -53,7 +50,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> @@ -78,8 +75,8 @@ value: '', formInline: { region: '', - timeStart: '', - timeEnd: '' + timeStart: '2021-04-12 17:00:00', + timeEnd: '2021-04-13 16:00:00' }, myChart: null, JsonHourWater: { @@ -128,18 +125,7 @@ }, methods: { onSubmit () { - console.log(1) - - // const date = [this.value1, this.value2, this.formInline.region] this.effChartShow(this.JsonHourWater.id, this.JsonHourWater.title, this.JsonHourWater.legend, this.JsonHourWater.xdata, this.JsonHourWater.ydatas, this.JsonHourWater.yname, this.JsonHourWater.id, this.JsonHourWater.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; }, effChartShow: function (id, title, legend, xdata, ydatas, yname, jcdID, datatype) { this.myChart = this.$echarts.init(this.$refs.main) @@ -189,7 +175,7 @@ }, lineStyle: { // 鎶樼嚎鐨勯鑹� color: ydatas[i].zxcolor, - width: 5 + width: 4 }, borderColor: 'black', // 鎶樼偣杈规鐨勯鑹� label: { // 鏄剧ず鍊� @@ -244,7 +230,7 @@ }, lineStyle: { // 鎶樼嚎鐨勯鑹� color: ydatas[i].zxcolor, - width: 5 + width: 4 }, borderColor: 'black', // 鎶樼偣杈规鐨勯鑹� label: { // 鏄剧ず鍊� @@ -310,10 +296,14 @@ }, grid: { // 缃戞牸 top: '20%', - left: '5%' + left: '7%', + bottom: '10%' }, legend: { - data: legend + data: legend, + textStyle: { + color: '#fff' + } }, dataZoom: [{ type: 'inside', @@ -340,7 +330,8 @@ rotate: 20, interval: 0, textStyle: { - color: '#fff' + color: '#fff', + fontSize: 10 } }, splitLine: { // 缃戞牸鍨傜洿绾夸负 铏氱嚎 -- Gitblit v1.8.0