From 0ab574aa5f3d49cd78a41ccbd063ace5a422635c Mon Sep 17 00:00:00 2001 From: wangqi <magical1908@outlook.com> Date: 星期一, 12 四月 2021 17:07:06 +0800 Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop --- src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue | 946 ++++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 576 insertions(+), 370 deletions(-) diff --git a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue index 1973e76..6cf58be 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue @@ -2,105 +2,62 @@ <template> <div id="Tab"> <div class="infomation"> -<!-- <el-tag>姘哀鍖栫墿 : 29.93 鏍囧噯 : 100</el-tag>--> -<!-- <el-tag>浜屾哀鍖栫~ : 17.34 鏍囧噯 : 50</el-tag>--> -<!-- <el-tag>鐑熷皹 : 6.93 鏍囧噯 : 30</el-tag>--> -<!-- <el-tag>搴熸皵娴侀噺 : 120343.18</el-tag>--> - <el-row> - <el-col :span="6"><div class="grid-content bg-purple">姘哀鍖栫墿 : 29.93 鏍囧噯 : 100</div></el-col> - <el-col :span="6"><div class="grid-content bg-purple">浜屾哀鍖栫~ : 17.34 鏍囧噯 : 50</div></el-col> - <el-col :span="6"><div class="grid-content bg-purple">鐑熷皹 : 6.93 鏍囧噯 : 30</div></el-col> - <el-col :span="6"><div class="grid-content bg-purple">搴熸皵娴侀噺 : 120343.18</div></el-col> -<!-- <el-col :span="6"><div class="grid-content bg-purple"></div></el-col>--> - </el-row> + <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> + </div> </div> <div class="form-echrts"> - <!-- :title="this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName" --> <div class="from-search"> -<!-- <el-form :inline="true" :model="formInline" class="demo-form-inline">--> -<!-- <el-form-item label="瀹℃壒浜�">--> -<!-- <el-input v-model="formInline.user" placeholder="瀹℃壒浜�"></el-input>--> -<!-- </el-form-item>--> -<!-- <div class="block">--> -<!-- <el-date-picker--> -<!-- size="'mini"--> -<!-- class="date"--> -<!-- v-model="value"--> -<!-- type="datetimerange"--> -<!-- range-separator="鑷�"--> -<!-- start-placeholder="寮�濮嬫棩鏈�"--> -<!-- end-placeholder="缁撴潫鏃ユ湡">--> -<!-- </el-date-picker>--> -<!-- </div>--> -<!-- <el-form-item label="閲囨牱鐐规暟" class="text-size">--> -<!-- <el-select v-model="formInline.region" placeholder="0">--> -<!-- <el-option label="0" value="shanghai"></el-option>--> -<!-- <el-option label="25" value="beijing"></el-option>--> -<!-- <el-option label="50" value="beijing"></el-option>--> -<!-- <el-option label="75" value="beijing"></el-option>--> -<!-- <el-option label="100" value="beijing"></el-option>--> -<!-- </el-select>--> -<!-- </el-form-item>--> -<!-- <el-form-item>--> -<!-- <el-button type="primary" @click="onSubmit">鏌ヨ</el-button>--> -<!-- </el-form-item>--> - -<!-- </el-form>--> - <div class="layoutFrom"> <div class="pickerMon"> - <div class="pickerData pickerDataLeft"> - <span> 寮�濮嬫椂闂�:</span> - <span class="pickerTable"><el-date-picker - type="datetime" - v-model="value1"> - </el-date-picker></span> - </div> - <div class="pickerData"> - <span >缁撴潫鏃堕棿:</span> - <span class="pickerTable"> + <div class="pickerData"> + <span> 寮�濮嬫椂闂�:</span> + <span class="pickerTable"> + <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="value2" + type="datetime" + v-model="formInline.timeEnd" > </el-date-picker> </span> - </div> - </div> - <div class="sampling"> - <span> - 閲囨牱鐐规暟: - </span> - <input list="source" id="ipt" class="echatsInput"> - <datalist id="source"> - <option value="0" /> - <option value="25" /> - <option value="50" /> - <option value="75" /> - <option value="100" /> - </datalist> - </div> - <div class="InquiryBtn"> - <div>鏌ヨ</div> - </div> - <div class="detailBox"> - <div class="detailbtn" @click="dialogVisible = true" >鏄庣粏琛�</div> - <el-dialog :visible.sync="dialogVisible" - :append-to-body="true" - :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[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> - </el-dialog> </div> - </div> - </div> - <div style="width:100%;height:300px;" id="echarts" ref="main"> + <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> </div> + <!-- 鏄庣粏寮规 --> + <el-dialog :visible.sync="dialogVisible" + :append-to-body="true" + :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[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> + </el-dialog> </div> </template> @@ -118,315 +75,564 @@ value2: '', watchData: [], dialogVisible: false, - dataDate: [], + myChar: null, value: '', - options: { - title: { - // text: '鎶樼嚎鍥惧爢鍙�' - }, - color: ['#5470c6', '#91CC75', '#EE6666', '#FF0087'], - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'cross', - label: { - color: '#1a4245' - } - } - }, - legend: { - x: '200px', - y: '30px', - data: [{ - name: '姘哀鍖栫墿', - textStyle: { - color: '#00d0f9' - } - }, - { - name: '浜屾哀鍖栫~', - textStyle: { - color: '#00d0f9' - } - }, - { - name: '鐑熷皹', - textStyle: { - color: '#00d0f9' - } - }, - { - name: '搴熸皵娴侀噺', - textStyle: { - color: '#00d0f9' - } - }] - }, - grid: { - left: '3%', - right: '1%', - bottom: '3%', - containLabel: true - }, - toolbox: { - }, - // 鍥炬爣缂╂斁璁剧疆 - dataZoom: [{ - type: 'inside', - start: 0, - end: 100 - }, { - start: 0, - end: 100, - show: false, - // handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z', - handleSize: '80%', - handleStyle: { - color: '#fff', - shadowBlur: 3, - shadowColor: 'rgba(0, 0, 0, 0.6)', - shadowOffsetX: 2, - shadowOffsetY: 2 - } - }], - // x杞寸殑璁剧疆 - xAxis: { - type: 'category', - boundaryGap: false, - data: ['12:00:00', '13:00:00', '14:00:00', '15:00:00', '16:00:00', '17:00:00', '18:00:00'], - axisLabel: { // x杞村叏閮ㄦ樉绀� - rotate: 20, - interval: 0, - textStyle: { - color: '#fff' - } - }, - splitLine: { // 缃戞牸鍨傜洿绾夸负铏氱嚎 - show: true, - lineStyle: { - type: 'dashed' - } - }, - axisTick: { // x 杞村埢搴︽樉绀� - show: false - }, - axisLine: { - lineStyle: { - color: '#FFFFFF', - width: 1 // 杩欓噷鏄负浜嗙獊鍑烘樉绀哄姞涓婄殑 - } - } - }, - // Y 杞寸殑璁剧疆 - yAxis: [{ - type: 'value', - // position: 'left', // 澶� Y 杞翠娇鐢� - // name: yname, // 鍚庢湡鍥炬爣Y杞存樉绀哄崟浣� - name: '娴撳害(mg/m鲁)', - axisLabel: { - formatter: '{value}', - textStyle: { - color: '#fff' // 鍧愭爣鐨勫瓧浣撻鑹� - } - }, - axisPointer: { - snap: true // 鑷姩鍚搁檮鏈�杩戠殑鐐� - }, - splitLine: { - show: false // y杞� 缃戞牸绾夸笉鏄剧ず - }, - axisLine: { - lineStyle: { - color: '#ffffff', // 鍧愭爣杞寸殑棰滆壊 - width: 1 - } - } - }], - series: [ - { - name: '姘哀鍖栫墿', - type: 'line', - stack: '鎬婚噺', - data: [120, 132, 101, 134, 90, 230, 210] - }, - { - name: '浜屾哀鍖栫~', - type: 'line', - stack: '鎬婚噺', - data: [150, 232, 201, 154, 190, 330, 410] - }, - { - name: '鐑熷皹', - type: 'line', - stack: '鎬婚噺', - data: [320, 332, 301, 334, 390, 330, 320] - }, - { - name: '搴熸皵娴侀噺', - type: 'line', - stack: '鎬婚噺', - data: [820, 932, 901, 934, 1290, 1330, 1320] - } - ] - }, formInline: { - user: '', - region: '' + region: '', + timeStart: '', + timeEnd: '' + }, + JsonCtarts: { + id: 'mychart', + title: '鍔犵儹鐐夌儫姘�', + legend: [ + { + icon: 'image://../assets/imgs/legend/NOX.png', + itemHeight: 5, + itemWidth: 20, + textStyle: { + color: '#CCC' + }, + name: '姘哀鍖栫墿' + }, + { + icon: 'image://../assets/imgs/legend/SO2.png', + itemHeight: 5, + itemWidth: 20, + name: '浜屾哀鍖栫~', + textStyle: { + color: '#CCC' + } + }, + { + icon: 'image://../assets/imgs/legend/YanChen.png', + itemHeight: 5, + itemWidth: 20, + name: '鐑熷皹', + textStyle: { color: '#ccc' } + }, + { + icon: 'image://../assets/imgs/legend/WenDu.png', + itemHeight: 5, + itemWidth: 20, + name: '娓╁害', + textStyle: { color: '#ccc' } + }, + { + icon: 'image://../assets/imgs/legend/VOCs.png', + itemHeight: 5, + itemWidth: 20, + name: '搴熸皵娴侀噺', + textStyle: { color: '#ccc' } + } + ], + xdata: ['0鏃�', '1鏃�', '2鏃�', '3鏃�', '4鏃�', '5鏃�', '6鏃�', '7鏃�', '8鏃�', '9鏃�', '10鏃�', '11鏃�', '12鏃�', '13鏃�', '14鏃�', '15鏃�', '16鏃�'], + ydatas: [ + { name: '姘哀鍖栫墿', data: ['34.44', '36.91', '37.65', '37.16', '38.03', '38.23', '37.21', '37.67', '37.97', '37.58', '36.61', '37.76', '37.27', '37.24', '35.86', 'NaN', 'NaN'], zdcbcolor: 'red', zxcolor: '#00B0F0', bzz: 50 }, + { name: '浜屾哀鍖栫~', data: ['4.98', '4.57', '4.19', '3.14', '3.80', '3.62', '3.33', '2.80', '3.13', '2.54', '3.08', '2.48', '1.97', '1.76', '0.82', 'NaN', 'NaN'], zdcbcolor: 'red', zxcolor: '#fff21c', bzz: 35 }, + { name: '搴熸皵娴侀噺', data: ['381907.22', '376474.19', '378572.31', '379369.44', '385225.72', '388657.56', '330667.31', '26560.98', '0.00', '0.00', '49567.43', '357837.31', '376972.66', '379693.50', '379982.22', 'NaN', 'NaN'], zdcbcolor: 'red', zxcolor: '#9ACD32', bzz: null }, + { name: '鐑熷皹', data: ['4.02', '4.17', '4.31', '4.00', '4.45', '4.40', '4.40', '4.25', '4.26', '4.18', '4.58', '4.21', '3.96', '3.83', '3.78', 'NaN', 'NaN'], zdcbcolor: 'red', zxcolor: '#f48183', bzz: 10 }, + { name: '娓╁害', data: ['46.55', '46.70', '46.47', '46.56', '46.57', '46.58', '46.56', '46.58', '46.69', '46.47', '46.58', '46.60', '46.54', '46.55', '46.60', 'NaN', 'NaN'], zdcbcolor: 'red', zxcolor: '#F206FF', bzz: null } + ], + yname: ' 娴撳害(mg/m鲁)', + // id:'mychart', + datatype: 2 } } }, methods: { onSubmit () { - console.log('submit!') + console.log(1) + // const date = [this.value1, this.value2, this.formInline.region] + // this.CreateChart(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.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; }, + // CreateChart: function (id, title, legend, xdata, ydatas, yname, jcdID, datatype) { + // this.myChart.clear() + // var dataUnit = '' + // if (datatype === 1) { + // dataUnit = '姘旈噺(m鲁/d)' + // } else { + // dataUnit = '姘旈噺(m鲁/h)' + // } + // + // var serLists = [] + // for (var j = 0; j < ydatas.length; j++) { + // var len = ydatas[j].data.length + // for (var k = 0; k < len; k++) { + // var it = ydatas[j].data[k] + // var it2 = parseFloat(it).toFixed(2) + // ydatas[j].data[k] = it2 + // } + // } + // + // for (var i = 0; i < ydatas.length; i++) { + // var zdcbcolor = ydatas[i].zdcbcolor + // var bzz = ydatas[i].bzz + // var obj + // if (bzz == null) { + // obj = { + // name: ydatas[i].name, + // symbol: 'circle', // 鎶樼偣褰㈢姸 + // symbolSize: 10, // 澶у皬 + // smooth: false, // 鐩寸嚎 锛宼rue 涓烘洸绾� + // yAxisIndex: 1, + // itemStyle: { + // normal: { + // color: function (c) { // 鏍规嵁value 鏄剧ず涓嶅悓鐨勬姌鐐归鑹� + // /* var biaozhuiz + // for (var i = 0; i < exhbzzList.length; i++) { + // if (exhbzzList[i].name == c.seriesName) { + // biaozhuiz = exhbzzList[i].bzhui + // } + // } + // if (c.value > 999999999999) { + // return zdcbcolor + // } else { + // return '#33c95f' + // } */ + // }, + // lineStyle: { // 鎶樼嚎鐨勯鑹� + // color: ydatas[i].zxcolor, + // width: 5 + // }, + // borderColor: ydatas[i].zxcolor, // 鎶樼偣杈规鐨勯鑹� + // label: { // 鏄剧ず鍊� + // show: false + // } + // } + // }, + // type: 'line', + // data: ydatas[i].data + // } + // } else { + // obj = { + // name: ydatas[i].name, + // symbol: 'circle', // 鎶樼偣褰㈢姸 + // symbolSize: 10, // 澶у皬 + // smooth: false, // 鐩寸嚎 锛宼rue 涓烘洸绾� + // itemStyle: { + // normal: { + // color: function (c) { // 鏍规嵁value 鏄剧ず涓嶅悓鐨勬姌鐐归鑹� + // var biaozhuiz + // for (var i = 0; i < exhbzzList.length; i++) { + // if (exhbzzList[i].name == c.seriesName) { + // biaozhuiz = exhbzzList[i].bzhui + // } + // } + // if (c.value > biaozhuiz) { + // return zdcbcolor + // } else if (c.value > biaozhuiz * 0.9) { + // return '#FFA500' + // } else { + // return '#33c95f' + // } + // }, + // lineStyle: { // 鎶樼嚎鐨勯鑹� + // color: ydatas[i].zxcolor, + // width: 5 + // }, + // borderColor: ydatas[i].zxcolor, // 鎶樼偣杈规鐨勯鑹� + // label: { // 鏄剧ず鍊� + // show: false + // } + // } + // }, + // type: 'line', + // data: ydatas[i].data, + // markLine: { // 骞冲潎鍊� 锛� 鍜� 鎸囨爣涓婇檺 + // symbol: 'none', + // data: [ + // /* { + // type: 'average', + // name: '鏃ュ钩鍧囧��', + // label: { + // normal: { + // position: 'end', //鏄剧ず浣嶇疆 + // formatter: ydatas[i].name+'\n鏃ュ钩鍧囧��'+'{c}' //鏄剧ず鏍峰紡 + // } + // }, + // lineStyle:{ // 棰滆壊 + // color: 'yellow', + // type:'solid' + // } + // }, */ { + // label: { + // normal: { + // position: 'end', + // formatter: '' // ydatas[i].name+'鏍囧噯鍊�'//+'{c}' + // } + // }, + // name: '鏍囧噯鍊�', + // yAxis: bzz, + // lineStyle: { + // color: ydatas[i].zxcolor, + // type: 'dashed', + // width: 2 + // } + // } + // ] + // } + // } + // } + // serLists.push(obj) + // } + // + // var option = { + // tooltip: { // 鎻愮ず妗� + // trigger: 'axis', + // axisPointer: { + // type: 'cross', + // label: { + // color: '#1a4245' + // } + // }, + // formatter: function (params) { + // var s = params[0].name + '<br/>' + // for (var i = 0; i < params.length; i++) { + // const name = params[i].name + // // 鍥捐〃title鍚嶇О + // var seriesName = params[i].seriesName + // // 鍊� + // var value = params[i].value + // var valueFliter + // if (value === 'NaN') { + // valueFliter = '' + // } else { + // valueFliter = formatter(value) + // } + // var maker = params[i].marker + // if (seriesName === '浜屾哀鍖栫~') { + // maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#fff21c;"></span>' + // } else if (seriesName === '姘哀鍖栫墿') { + // maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#00B0F0;"></span>' + // } else if (seriesName === '鐑熷皹') { + // maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#f48183;"></span>' + // } else if (seriesName === '娓╁害') { + // maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#F206FF;"></span>' + // } else { + // maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#4ec99c;"></span>' + // } + // s += maker + seriesName + ':' + valueFliter + '<br />' + // } + // return s + // } + // }, + // toolbox: { // 鎵撳嵃绛夊伐鍏� + // show: false, + // feature: { + // saveAsImage: {} + // } + // }, + // grid: { // 缃戞牸 + // top: '20%', + // left: '5%' + // // containLabel: true + // }, + // legend: { // 鍥句緥 + // data: legend + // }, + // dataZoom: [{ + // type: 'inside', + // start: 0, + // end: 100 + // }, { + // start: 0, + // end: 100, + // show: false, + // handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z', + // handleSize: '80%', + // handleStyle: { + // color: '#fff', + // shadowBlur: 3, + // shadowColor: 'rgba(0, 0, 0, 0.6)', + // shadowOffsetX: 2, + // shadowOffsetY: 2 + // } + // }], + // xAxis: { // x 杞磋缃� + // type: 'category', + // boundaryGap: false, + // axisLabel: { // x杞村叏閮ㄦ樉绀� + // rotate: 20, + // interval: 0, + // textStyle: { + // color: '#fff' + // } + // }, + // splitLine: { // 缃戞牸鍨傜洿绾夸负 铏氱嚎 + // show: true, + // lineStyle: { + // type: 'dashed' + // } + // }, + // axisTick: { // x 杞村埢搴︽樉绀� + // show: false + // }, + // axisLine: { + // lineStyle: { + // color: '#FFFFFF', + // width: 1// 杩欓噷鏄负浜嗙獊鍑烘樉绀哄姞涓婄殑 + // } + // }, + // data: xdata + // }, + // yAxis: [{ + // type: 'value', + // name: yname, + // /* max: function (value) { + // var max_val_list = [] // 鎵�鏈夋樉绀烘姌绾跨殑鏍囧噯鍊� + // // if(exhbzzList && exhbzzList.length>0){ + // // if (value.max != "-Infinity") { // 鑾峰彇鎵�鏈夌洃娴嬫寚鏍囩殑max鍊� 2020/12/31 + // // valMax = parseInt(value.max + 5); + // // } + // // $.each(exhbzzList, function (index, item) { + // // if (item.bzhui != null) { + // // max_val_list.push(item.bzhui); + // // } + // // }); + // // } + // max_val_list = max_val_list.sort(function (a, b) { return a - b }) // 鎺掑簭 + // var ma = value.max > max_val_list[max_val_list.length - 1] ? value.max + 5 : max_val_list[max_val_list.length - 1] + // return parseInt(ma) + // }, */ + // axisLabel: { + // formatter: '{value}', + // textStyle: { + // color: '#fff' + // } + // }, + // axisPointer: { + // snap: true + // }, + // splitLine: { + // show: false + // }, // y杞� 缃戞牸绾夸笉鏄剧ず, + // axisLine: { + // lineStyle: { + // color: '#FFFFFF', + // width: 1// 杩欓噷鏄负浜嗙獊鍑烘樉绀哄姞涓婄殑 + // } + // } + // }, { + // type: 'value', + // name: dataUnit, + // max: function (value) { + // var ma = value.max > 120 ? value.max : 120 + // return parseInt(ma) + // }, + // axisLabel: { + // formatter: '{value}', + // textStyle: { + // color: '#fff' + // } + // }, + // axisPointer: { + // snap: true + // }, + // splitLine: { + // show: false + // }, // y杞� 缃戞牸绾夸笉鏄剧ず, + // axisLine: { + // lineStyle: { + // color: '#FFFFFF', + // width: 1// 杩欓噷鏄负浜嗙獊鍑烘樉绀哄姞涓婄殑 + // } + // } + // }], + // series: serLists + // } + // this.myChart.setOption(option) + // + // this.myChart.on('legendselectchanged', function (params) { + // var StdVal = null + // var op = { yAxis: {} } + // const max_val_list = [] // 鎵�鏈夋樉绀烘姌绾跨殑鏍囧噯鍊� + // if (exhbzzList && exhbzzList.length > 0) { + // max_val_list.push(valMax) // 灏嗙洃娴嬫寚鏍囩殑max鍊间篃鏀惧叆鏁扮粍 2020/12/31 + // $.each(exhbzzList, function (index, item) { + // params.selected[item.name] ? max_val_list.push(item.bzhui) : '' + // if (item.name == params.name) { + // item.name == 'VOCs' ? StdVal = 20 : StdVal = item.bzhui + // } + // }) + // } + // max_val_list = max_val_list.sort(function (a, b) { return a - b }) // 鎺掑簭 + // op.yAxis.max = function (value) { + // var ma = value.max < StdVal ? StdVal : Math.ceil(value.max) + // max_val_list ? ma = max_val_list[max_val_list.length - 1] : ''// 閫夋嫨鏈�澶у�� + // return ma + // } + // this.myChart.setOption(op) + // }) + // + // /** + // * 瑙e喅myChart.on('click',function(){...})浜嬩欢閲嶅瑙﹀彂鐨勯棶棰� + // * Date: 20200720 + // */ + // myChart.off('click') + // + // /** + // * 鍥炬爣鐐瑰嚮浜嬩欢 + // * 20190426 add + // * */ + // myChart.on('click', function (params) { + // // 鑾峰彇褰撳墠鏃堕棿锛屽皬鏃� + // var nowHours = new Date().Format('hh') + // // 鐐瑰嚮鎶樼嚎鍥炬姌鐐瑰搴旂殑鏃堕棿 + // // 闇�瑕佷紶鐨勬椂闂翠负 + // var _date = null + // if (params.name.indexOf('鏃�') != -1) { + // var hours = params.name.substring(0, params.name.indexOf('鏃�')) + // if (parseInt(hours) < parseInt(nowHours)) { + // _date = new Date().Format('yyyy-MM-dd') + ' ' + hours + ':00:00' + // } else { + // var currentDate = new Date() + // // 24灏忔椂涔嬪墠鏃堕棿 + // var stringDate = new Date(currentDate.getTime() - 24 * 60 * 60 * 1000).Format('yyyy-MM-dd') + // _date = stringDate + ' ' + hours + ':00:00' + // } + // } else if (params.name.indexOf('鏃�') != -1) { + // var day = params.name.substring(0, params.name.indexOf('鏃�') - 1) + // _date = new Date().Format('yyyy-MM') + '-' + day.trim() + // } + // + // // todo 璋冩帴鍙� 鏌ュ嚟璇� + // if (params.color != 'red') { + // var poltMtrlId + // var monItemId = 28 + // for (var i = 0; i < wrwIDS.length; i++) { + // if (params.seriesName == wrwIDS[i].name) { + // poltMtrlId = wrwIDS[i].id + // } + // } + // getCBMX(jcdID, poltMtrlId, monItemId, _date, function (res) { + // createDivByMouse(res, params.event) + // }) + // } + // // createDivByMouse("s",params.event); + // }) + // }, drawChart: function () { - const myChart = this.$echarts.init(this.$refs.main) - myChart.setOption(this.options) window.onresize = function () { var h1 = document.documentElement.clientHeight// 鑾峰彇灞忓箷鐨勯珮搴� if (h1 > 700) { - myChart.getDom().style.height = 3 + 'rem' - myChart.getDom().style.width = 6 + 'rem' + this.myChart.getDom().style.height = 3 + 'rem' + this.myChart.getDom().style.width = 6 + 'rem' } else { - myChart.getDom().style.height = 3 + 'rem' - myChart.getDom().style.width = 6 + 'rem' + this.myChart.getDom().style.height = 3 + 'rem' + this.myChart.getDom().style.width = 6 + 'rem' } - myChart.resize() + this.myChart.resize() } } - }, - mounted () { - this.$nextTick(() => { - 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"> .grid-content{ - font-size: 8px!important; - background-color:#2e4967; - text-align: center; - margin: 0 2px 4px 2px; - border-radius: 2px; + font-size: 8px; + background-color: #2e4967; + text-align: center; + border-radius: 2px; + margin-right: 10px; + padding:0 10px } -.Infomation { - margin-left: 10px; - height: 0.2rem; -} - -.el-tag { - height: 25px; - width: 140px; - line-height: 25px; - margin-right: 10px; - font-size: 10px; - background-color: rgba(0, 255, 246, 0.14); - color: #00d0f9; - border: none; - padding: 0 15px; +.infomation { + padding: 5px 10px; } .form-echrts { - width: 100%; - height: 2rem; - border-top: 1px solid #396d83; - //margin: 10px 10px 10px 10px; - .from-search{ - margin-top: 6px; - .layoutFrom{ - display: flex; - .sampling{ - margin-left: 100px; - >span{ - margin-right: 10px; - } - } - .InquiryBtn{ - margin-left: 30px; - width: 36px; - height: 20px; - font-size: 8px; - background-color:#2e4967 ; - text-align: center; - border-radius: 3px; - } - .detailBox{ - margin-left: 30px; - } - .pickerMon{ - display: flex; - .pickerDataLeft{ - margin-left: 10px; - margin-right: 90px; - } - .pickerData{ - flex: 1; - display: flex; - >span{ - margin-right: 15px; - } - .pickerTable{ - margin-left: 6px; - width: 40px; - - /deep/.el-input__icon { - width: 1rem; - font-size: 0; - } - } - } - } - } - ///deep/.el-date-editor--datetime{ - // width: 100%; - //} - /deep/.el-input__inner{ - position: relative; - width: 0.9rem!important; - height: 0.125rem!important; - background-color: #2e4967; - color: #ffffff; - font-size: 8px; - padding: 0; - //padding-left:20px ; - //padding: 0!important; - } - .echatsInput{ - color: #00ffff; - background-color: #2e4967; - border: none; - border-radius: 6px; - width: 40px; - } - .detailbtn{ - background-color:#2e4967; - text-align: center; - padding: 0 7px; - line-height: 20px; - border-radius: 4px; - margin-right: 6px; - } - } - .el-dialog-div { - //height: 50vh!important; - overflow: auto; - //overflow: hidden; - } - - #echarts { - margin: 0; - padding: 0; - //height: 3rem; - //border: 1px solid #396d83; + width: 100%; + border-top: 1px solid #396d83; //margin: 10px 10px 10px 10px; - } + .from-search{ + display: flex; + padding:5px; + >div{margin-left: 10px} + .pickerMon{ + display: flex; + >div:first-child { + margin-right: 10px; + } + .pickerData{ + flex: 1; + display: flex; + >span{line-height: 22px} + .pickerTable { + margin-left: 3px; + } + } + } + /deep/.el-date-editor--datetime{ + width: 100%; + } + /deep/.el-input__inner{ + position: relative; + width:140px; + background-color: #2e4967; + color: #ffffff; + font-size: 12px; + height: 24px; + padding: 0; + border-color:#00fff6; + text-align: center; + //padding-left:20px ; + //padding: 0!important; + } + /deep/.el-input__icon{ + display: block; + width: 140px; + height: 22px; + line-height: 22px; + cursor: pointer; + font-size: 0; + } + .echatsInput{ + color: #00ffff; + background-color: #2e4967; + border: none; + border-radius: 6px; + width: 80px; + height: 22px; + text-align: center; + } + input::-webkit-calendar-picker-indicator { + opacity: 100; + } + .detailbtn{ + background-color:#2e4967; + text-align: center; + padding: 0 7px; + line-height: 24px; + border-radius: 4px; + margin-right: 6px; + } + .detailbtn:hover{ + box-shadow: 0 0 0.03rem #fff700 !important; + color:#fff700 !important; + cursor: pointer; + } + } + .el-dialog-div { + //height: 50vh!important; + overflow: auto; + //overflow: hidden; + } + + #echarts { + margin: 0; + padding: 0; + } } </style> -- Gitblit v1.8.0