$(function(){ //环境质量 var areaRatio = echarts.init(document.getElementById('areaRatio')); //水文与水环境历史数据 var waterRatio = echarts.init(document.getElementById('waterRatio')); //空气环境历史数据 var soilRatio = echarts.init(document.getElementById('soilRatio')); //土壤历史数据 var airRatio = echarts.init(document.getElementById('airRatio')); //水文与水环境历史数据 var waterHistory = echarts.init(document.getElementById('waterHistory')); //土壤历史数据 var soilHistory = echarts.init(document.getElementById('soilHistory')); //空气环境历史数据 var airHistory = echarts.init(document.getElementById('airHistory')); //气象历史数据 var weatherHistory = echarts.init(document.getElementById('weatherHistory')); var historyQueryEchartJc = echarts.init(document.getElementById('historyQueryEchartJc')); var historyQueryEchart = echarts.init(document.getElementById('historyQueryEchart')); var clickName = ''; $('.tes').show(); //******************** 行政区查询 ******************* $.ajax({ url: getNativePath() + "park/queryRegionlist.do", type: "get", dataType: "json", success: function(data) { var options = ""; for(var i=0; i"+data[i].regionName+""; } findStnm(""); findStnmJc(""); $("#querySelects1").html(options); $("#querySelects5").html(options); layui.use('form', function(){ //监听站点选中事件 动态更新站点 var form = layui.form; form.render(); form.on('select(querySelect1)', function(e){ findStnm(e.value); }); form.on('select(querySelect5)', function(e){ findStnmJc(e.value); }); }); } }); var selectstcd = ''; function findStnm(regionId){ //*************** 查询站点 ************ $.ajax({ url: getNativePath() + "station/findAllStationByStnm.do", type: "get", data:{"regionId":regionId}, dataType: "json", success: function(data) { if(data.data.length <= 0){ var options = ""; }else{ var options = ""; for(var i=0; i"+data.data[i].stnm+""; } } $("#stationInput").val(""); $("#querySelects2").html(options); layui.use('form', function(){ //监听站点选中事件 动态更新站点 var form = layui.form; form.render(); form.on('select(querySelect2)', function(e){ selectstcd = e.value; $("#stationInput").val(e.value); }); }); } }); } function findStnmJc(regionId){ //*************** 查询站点 ************ $.ajax({ url: getNativePath() + "station/findAllStationByStnm.do", type: "get", data:{"regionId":regionId}, dataType: "json", success: function(data) { if(data.data.length <= 0){ var options = ""; }else{ var options = ""; for(var i=0; i"+data.data[i].stnm+""; } } $("#stationInputJc").val(""); $("#querySelects4").html(options); layui.use('form', function(){ //监听站点选中事件 动态更新站点 var form = layui.form; form.render(); form.on('select(querySelect4)', function(e){ $("#stationInputJc").val(e.value); }); }); } }); } //******************** 实时数据 ******************* var dataitem = []; WaterElement("T_DATA_WATER", "", areaRatio, 1, 1); WaterElement("T_DATA_AIR", "", waterRatio, 2, 1); WaterElement("T_DATA_SOIL", "", soilRatio, 3, 1); WaterElement("T_DATA_WEATHER", "", airRatio, 4, 1); function WaterElement(type, stationId, areaRatioEchart, num, mold){ $.ajax({ url: getNativePath() + "naturalFactors/queryElementsValueAndIsWarning.do", type: "get", // data:{"eleName":type, "stcd":stationId}, data:{"elementType":type, "stcd":stationId}, dataType: "json", success: function(data) { dataitem.push(data); data = data.data; // console.log(data) $(".his-loding").hide(); if(data.length>0){ queryHistoryEchart(data, areaRatioEchart, num, mold); }else{ if(mold == 2){ $(".histor-tip").show(); }else{ if(type == "T_DATA_WATER"){ $(".histor-tip-void1").show(); }else if(type == "T_DATA_AIR"){ $(".histor-tip-void2").show(); }else if(type == "T_DATA_SOIL"){ $(".histor-tip-void3").show(); }else if(type == "T_DATA_WEATHER"){ $(".histor-tip-void4").show(); } } } } }); } function queryHistoryEchart(data, airRatio, num, mold){ var selected = {}; var serData = [], serDataAll = [], hosName = [], //站点名称 legendData = [], //元素名称 seriesData = [], unitData = []; // console.log(actualImg) // console.log(data) for(var i=0; i 4){ serDataAll = serDataAll.slice(0,5); hosName = hosName.slice(0,5); } } var valSel = [], valSel1 = [], valSel2 = [], valSel3 = [], valSel4 = [], valSel5 = [], valSel6 = [], valSel7 = [], valSel8 = [], valSel9 = [], valSel10 = [], valSeltm1 = []; for(var i=0; i0){ valSel.push(valSel1); } if(valSel2.length>0){ valSel.push(valSel2); } if(valSel3.length>0){ valSel.push(valSel3); } if(valSel4.length>0){ valSel.push(valSel4); } if(valSel5.length>0){ valSel.push(valSel5); } if(valSel6.length>0){ valSel.push(valSel6); } if(valSel7.length>0){ valSel.push(valSel7); } if(valSel8.length>0){ valSel.push(valSel8); } if(valSel9.length>0){ valSel.push(valSel9); } if(valSel10.length>0){ valSel.push(valSel10); } //------------------------------------------- //如果不是空气环境监测模块,就把数据第一条和第二条换位 var dataList = []; for(var i=0; i'; var unit = ""; for(var i=0; i' } html += '
'+valSeltm1[params[0].dataIndex]+'
' return html; } }, legend: { type:'scroll', top:'5', orient: 'horizontal', // data:legendData, data:newLegendDataArr, selected:selected, textStyle : {color:'#fff'}, pageTextStyle:{color:'#fff'}, pageIconColor:'#fff', pageIconInactiveColor:'#fff', top:topVal, itemWidth:14 }, grid: { left: '12', right: '4%', bottom: '0', top:'15%', containLabel: true }, dataZoom: dataZooms, xAxis: { show:true, type: 'category', nameTextStyle:{color:'#fff'}, axisLabel: { textStyle: { padding:[0, 0, 0, 8], color: '#fff' } }, axisLine:{ show:true, lineStyle:{color:'#fff'}, }, axisTick:{ show:false }, data:hosName, axisLabel: { interval: 0, fontSize:11, formatter:function(value){ var ret = "", start = "";//拼接加\n返回的类目项 var maxLength = 4;//每项显示文字个数 var rowN = Math.ceil(value.length / maxLength); //类目项需要换行的行数 if (rowN > 1){ for (var i = 0; i < rowN; i++) { start = i * maxLength;//开始截取的位置 if(i == 0){ ret += value.substring(start, (start + maxLength)); //凭借最终的字符串 }else{ ret += "\n"+value.substring(start, (start + maxLength)); //凭借最终的字符串 } } return ret; }else{ return value; } } } }, yAxis: [{ show:true, name: '', type: 'value', axisLine:{ lineStyle:{color:'#fff'}, }, axisTick:{ show:false }, axisLabel: { margin: 10, textStyle: { fontSize: 12, color: '#fff' } }, splitLine:{ lineStyle:{color:'#fff'}, show:false }, },{ show:true, name: '', type: 'value', axisLine:{ lineStyle:{color:'#fff'}, }, axisTick:{ show:false }, axisLabel: { margin: 10, textStyle: { fontSize: 12, color: '#fff' } }, splitLine:{ lineStyle:{color:'#fff'}, show:false }, }], series: seriesData, }; waterHistory.setOption(waterOption); $(window).resize(waterHistory.resize); //先解除事件监听,再添加 waterHistory.off('legendselectchanged'); waterHistory.on('legendselectchanged', function(params) { clickName = params.name; for(var x in legendData){ if(legendData[x] == clickName){ var index = x; } } var keys; //获取第一个元素 for(var i in params.selected){ keys = i; break; } for(var z in params.selected){ //如果选中元素是第一个,则不进行其他元素操作 if(params.name == keys){ break; } //不是选中元素且不是第一个元素的元素都取消选中 if(z != params.name && z != keys){ params.selected[z] = false; } } if(index == 0){ if(num == 1){ if(params.selected[clickName]){ waterOption.legend.data[index].icon = 'image://./images/c1.png'; }else{ waterOption.legend.data[index].icon = 'image://./images/f1.png' } }else if(num == 2){ if(params.selected[clickName]){ waterOption.legend.data[index].icon = 'image://./images/c2.png'; }else{ waterOption.legend.data[index].icon = 'image://./images/f2.png' } }else if(num == 3){ if(params.selected[clickName]){ waterOption.legend.data[index].icon = 'image://./images/c4.png'; }else{ waterOption.legend.data[index].icon = 'image://./images/f4.png' } }else if(num == 4){ if(params.selected[clickName]){ waterOption.legend.data[index].icon = 'image://./images/c3.png'; }else{ waterOption.legend.data[index].icon = 'image://./images/f3.png' } } }else{ if(num == 1){ if(params.selected[clickName]){ for(var s in waterOption.legend.data){ if(s == index){ waterOption.legend.data[index].icon = 'image://./images/s1.png'; }else{ if(s != 0){ waterOption.legend.data[s].icon = 'image://./images/d1.png'; } } } }else{ waterOption.legend.data[index].icon = 'image://./images/d1.png' } }else if(num == 2){ if(params.selected[clickName]){ for(var s in waterOption.legend.data){ if(s == index){ waterOption.legend.data[index].icon = 'image://./images/s2.png'; }else{ if(s != 0){ waterOption.legend.data[s].icon = 'image://./images/d2.png'; } } } }else{ waterOption.legend.data[index].icon = 'image://./images/d2.png' } }else if(num == 3){ if(params.selected[clickName]){ for(var s in waterOption.legend.data){ if(s == index){ waterOption.legend.data[index].icon = 'image://./images/s4.png'; }else{ if(s != 0){ waterOption.legend.data[s].icon = 'image://./images/d4.png'; } } } }else{ waterOption.legend.data[index].icon = 'image://./images/d4.png' } }else if(num == 4){ if(params.selected[clickName]){ for(var s in waterOption.legend.data){ if(s == index){ waterOption.legend.data[index].icon = 'image://./images/s3.png'; }else{ if(s != 0){ waterOption.legend.data[s].icon = 'image://./images/d3.png'; } } } }else{ waterOption.legend.data[index].icon = 'image://./images/d3.png' } } } naturalEchart(this, hosName, legendData, seriesData, params.selected, mold, valSeltm1, unitData, newLegendDataArr, num); }) } //******************** 实时数据 -- 更多 ******************* $(".acreage-close").unbind().click(function(){ //关闭弹窗 $('.history-query-box').hide(); }); $('.acreage-more').unbind().click(function(){ //更多 --- 打开弹窗 $(".history-query").hide(); $(".history-query-title h3").html($(this).attr("data-html")); $('.history-query-box').show(); $("#stationInputTitle").val($(this).attr('data-id')); $("#stationInputJc").val(""); $("#querySelects5").find("option").each(function(){ $(this).removeAttr("selected"); if($(this).val() == ""){ $(this).attr("selected","selected"); findStnmJc(""); } }) layui.use('form', function(){ //监听站点选中事件 动态更新站点 var form = layui.form; form.render(); }); historyQueryEchartJc.dispose(); //销毁图表 $(window).off('resize'); //移除已销毁图表的resize事件 historyMoreQueryJc(); }); //******************** 实时数据 -- 查询 ******************* $("#hisToryQueryBtnJc").unbind().click(function(){ historyQueryEchartJc.dispose(); //销毁图表 $(window).off('resize'); //移除已销毁图表的resize事件 historyMoreQueryJc(historyQueryEchartJc); }); $("#hisToryClearBtnJc").unbind().click(function(){ $("#stationInputJc").val(""); $("#querySelects5").find("option").each(function(){ $(this).removeAttr("selected"); if($(this).val() == ""){ $(this).attr("selected","selected"); findStnmJc(""); } }) layui.use('form', function(){ //监听站点选中事件 动态更新站点 var form = layui.form; form.render(); }); historyQueryEchartJc.dispose(); //销毁图表 $(window).off('resize'); //移除已销毁图表的resize事件 historyMoreQueryJc(); }); $("#hisToryDownLoadBtnJc").unbind().click(function(){ var type = $('.history-query-title h3').html(); if(type == '水文与环境监测'){ var sendType = 'T_DATA_WATER'; }else if(type == '空气环境监测'){ var sendType = 'T_DATA_AIR'; }else if(type == '气象监测'){ var sendType = 'T_DATA_WEATHER'; }else if(type == '土壤监测'){ var sendType = 'T_DATA_SOIL'; } type = encodeURI(type, "UTF-8"); $.ajax({ url:getNativePath() + "naturalFactors/booleanExcelExportEleDataByStcdOrEleName.do?eleName=" + sendType + "&stcd=", success:function(res){ if(res && res.success){ window.open(getNativePath() + "naturalFactors/excelExportEleDataByStcdOrEleName.do?eleName=" + sendType + "&title=" + type + "&stcd="); }else{ layer.msg('暂无数据,无法下载!'); } } }); }) function historyMoreQueryJc(){ $(".his-loding").show(); $(".histor-tip").hide(); var dataId = $("#stationInputTitle").val(); var stcd = $("#stationInputJc").val(); historyQueryEchartJc = echarts.init(document.getElementById('historyQueryEchartJc')); //初始化图表 if(dataId == "T_DATA_WATER"){ WaterElement(dataId, stcd, historyQueryEchartJc, 1, 2); }else if(dataId == "T_DATA_AIR"){ WaterElement(dataId, stcd, historyQueryEchartJc, 2, 2); }else if(dataId == "T_DATA_SOIL"){ WaterElement(dataId, stcd, historyQueryEchartJc, 3, 2); }else if(dataId == "T_DATA_WEATHER"){ WaterElement(dataId, stcd, historyQueryEchartJc, 4, 2); } } //******************** 历史数据 ******************* $.ajax({ url: getNativePath() + "fieldsdict/findAllEleInfoGroupByType.do", type: "get", dataType: "json", success: function(data) { $('.tes').hide(); selectData(data.data.T_DATA_WATER, "waterSelect", waterHistory); selectData(data.data.T_DATA_AIR, "airSelect", airHistory); selectData(data.data.T_DATA_SOIL, "soilSelect", soilHistory); selectData(data.data.T_DATA_WEATHER, "weatherSelect", weatherHistory); renderForm(); } }); function renderForm(){ layui.use('form', function(){ var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功 form.render(); form.on('select(wateraihao)', function(e){ $(".main-bottom .monit-history:nth-child(1) .monit-tip").hide(); historyData(e.value,"waterSelect", waterHistory); }); form.on('select(airaihao)', function(e){ $(".main-bottom .monit-history:nth-child(2) .monit-tip").hide(); historyData(e.value, "airSelect", airHistory); }); form.on('select(soilaihao)', function(e){ $(".main-bottom .monit-history:nth-child(4) .monit-tip").hide(); historyData(e.value, "soilSelect", soilHistory); }); form.on('select(weatheraihao)', function(e){ $(".main-bottom .monit-history:nth-child(3) .monit-tip").hide(); historyData(e.value, "weatherSelect", weatherHistory); }); }); } function selectData(datas, selId, echartBox){ var html = ""; //----------------------------------------- if(selId == "airSelect"){ var datasList = []; for(var i=0; i'+ datas[i].fieldName+''; }else{ html += ''; } } $('#'+selId).html(html); } function historyData(field, selId, echartBox){ $(window).resize(waterHistory.resize); $(window).resize(airHistory.resize); $(window).resize(soilHistory.resize); $(window).resize(weatherHistory.resize); echartBox.clear(); var datas = {}, unit=""; for(var k in actualImgParam){ if(k == field){ unit = actualImgParam[k].unit; } }; if(selId != "querySelects"){ var nowtime = new Date(); var endtime = times(nowtime); var starttime = nowtime.getFullYear()+'-'+p(nowtime.getMonth()+1)+"-"+p(nowtime.getDate())+" 00:00:00"; $("#historyStratTime").val(starttime); $("#historyEndTime").val(endtime); datas = {"startTime":starttime, "endTime":endtime, "elementId":field, "stcd":""}; }else{ var endtime = $("#historyEndTime").val(); var starttime = $("#historyStratTime").val(); var stationInput = $("#stationInput").val(); datas = {"startTime":starttime, "endTime":endtime, "elementId":field, "stcd":stationInput}; } datas.endTime = getToday("e", 0); $.ajax({ url: getNativePath() + "naturalFactors/findElementStationInfo.do", type: "get", data:datas, dataType: "json", success: function(data) { $(".his-loding").hide(); $(".histor-tip").hide(); // console.log(data) if(data.data.length > 0){ //------------------------------------------- if(data.data.length == 1){ var dataList = data.data; }else{ var dataList = []; for(var i=0; i 4){ seriesData = seriesData.slice(0,4); legendData = legendData.slice(0,4); } } historyEchart(echartBox, time, legendData, seriesData, selected, selId, unit); } function historyEchart(waterHistory, time, legendData, seriesData, selected, selId, unit){ if(unit){ unit = "("+unit+")"; } var colorData = ['#FC9E17', '#08f67c', '#50a37d', '#2ac2de', '#FC9E17', '#f8da0f', '#a63535', '#f89c00', '#a06602', '#189f5a']; var dataZooms = []; if(selId == "querySelects"){ dataZooms = [{ type: 'inside', start: 0, end: 100 }, { start: 0, end: 10, 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', bottom:'35', height:8, handleColor: '#ff8c80', handleStyle: { borderColor: '#ff8c80', borderWidth: "1", shadowBlur: 0, background: '#ff8c80', shadowColor: '#ff8c80', }, }] } var waterOption = { color:colorData, tooltip: { trigger: 'axis', }, legend: { type:'scroll', orient: 'horizontal', data:legendData, selected:selected, textStyle : {color:'#fff'}, pageTextStyle:{color:'#fff'}, pageIconColor:'#fff', pageIconInactiveColor:'#fff', right:'90', left:'10', top:'5', itemWidth:14 }, grid: { left: '12', right: '4%', bottom: '1%', top:'45', containLabel: true }, dataZoom: dataZooms, xAxis: { type: 'category', show:true, boundaryGap: false, nameTextStyle:{color:'#fff'}, axisLabel: { textStyle: { color: '#fff' } }, axisLine:{ lineStyle:{ color:"#fff" } }, splitLine:{ lineStyle:{color:'#fff'}, interval:false }, data:time.map(function(str) { return str.replace(' ', '\n') }) }, yAxis: { name: unit, type: 'value', nameGap:8, show:true, axisLine:{ lineStyle:{ color:"#fff" } }, axisTick:{ show:false }, axisLabel: { margin: 10, textStyle: { fontSize: 12, color: '#fff' } }, splitLine:{ lineStyle:{color:'#fff'}, show:false }, }, series: seriesData }; waterHistory.setOption(waterOption); $(window).resize(waterHistory.resize); } //******************** 历史数据 ----- 更多 ******************* $(".his-close").unbind().click(function(){ //关闭更多 $(".history-query").hide(); $(".history-query").removeClass('on'); }); $('.history-more').unbind().click(function(){ $('.history-query-box').hide(); var dataId = $(this).attr('data-id'); $("#historyType").val(dataId); strTime = getToday("s", 0); endTime = getToday("e", 0); $("#historyStratTime").val(strTime); $("#historyEndTime").val(endTime); $(".history-query-date span").removeClass('on'); $(".history-query-date span").eq(0).addClass('on'); $(".history-query-title h3").html($(this).attr("data-html")); $("#stationInput").val(""); $("#querySelects1").find("option").each(function(){ $(this).removeAttr("selected"); if($(this).val() == ""){ $(this).attr("selected","selected"); findStnm(""); } }) layui.use('form', function(){ //监听站点选中事件 动态更新站点 var form = layui.form; form.render(); }); historyMoreQuery(dataId); }); function historyMoreQuery(dataId){ $(".his-loding").show(); $('.histor-tip').hide(); var stcd = $("#searchScid").val(); var starttime = $("#historyStratTime").val(); var endtime = $("#historyEndTime").val(); if(starttime.length < 14){ starttime = starttime +" 00:00:00"; endtime = endtime+" 23:59:59" } $(".history-query").show(); $(".history-query").addClass('on'); historyQueryEchart.dispose(); //销毁图表 $(window).off('resize'); //移除已销毁图表的resize事件 historyQueryEchart = echarts.init(document.getElementById('historyQueryEchart')); //初始化图表 $.ajax({ url: getNativePath() + "fieldsdict/findAllEleInfoGroupByType.do", type: "get", dataType: "json", success: function(data) { var jsons = [], html=""; if(dataId == "host1"){ jsons = data.data.T_DATA_WATER; }else if(dataId == "host2"){ jsons = data.data.T_DATA_AIR; //----------------------------------- var datasList = []; for(var i=0; i'+ jsons[i].fieldName+''; }else{ html += ''; } } $('#querySelects3').html(html); layui.use('form', function(){ var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功 form.render(); form.on('select(querySelect3)', function(e){ $("#actualInput").val(e.value); }); }); } }); } //******************** 历史数据 ----- 查询 ******************* $("#hisToryQueryBtn").unbind().click(function(){ $(".his-loding").show(); $('.histor-tip').hide(); var values = $("#actualInput").val(); historyQueryEchart.dispose(); //销毁图表 $(window).off('resize'); //移除已销毁图表的resize事件 historyQueryEchart = echarts.init(document.getElementById('historyQueryEchart')); //初始化图表 historyData(values,"querySelects", historyQueryEchart); }); $("#hisToryClearBtn").unbind().click(function(){ $("#stationInput").val(""); $("#querySelects1").find("option").each(function(){ $(this).removeAttr("selected"); if($(this).val() == ""){ $(this).attr("selected","selected"); findStnm(""); } }) layui.use('form', function(){ //监听站点选中事件 动态更新站点 var form = layui.form; form.render(); }); $(".history-query-date span").removeClass('on').eq(0).addClass('on'); var nowtime = new Date(); var endtime = times(nowtime); var starttime = nowtime.getFullYear()+'-'+p(nowtime.getMonth()+1)+"-"+p(nowtime.getDate())+" 00:00:00"; $("#historyStratTime").val(starttime); $("#historyEndTime").val(endtime); var values = $("#actualInput").val(); historyQueryEchart.dispose(); //销毁图表 $(window).off('resize'); //移除已销毁图表的resize事件 historyQueryEchart = echarts.init(document.getElementById('historyQueryEchart')); //初始化图表 historyData(values,"querySelects", historyQueryEchart); }); $("#hisToryDownLoadBtn").unbind().click(function(){ var nowtime = new Date(); var endtime = times(nowtime); var starttime = $('#historyStratTime').val(); if(starttime.length<19){ starttime += " 00:00:00"; } $.ajax({ url:getNativePath() + "naturalFactors/booleanExcelExportMonitorElements.do?stcd=" + selectstcd + "&startTime=" + starttime + "&endTime=" + endtime + "&elementId=" + $("#actualInput").val() + "&title=" + encodeURI($('.history-query-title h3').html(), "UTF-8") + "", success:function(res){ if(res && res.success){ window.open(getNativePath() + "naturalFactors/excelExportMonitorElements.do?stcd=" + selectstcd + "&startTime=" + starttime + "&endTime=" + endtime + "&elementId=" + $("#actualInput").val() + "&title=" + encodeURI($('.history-query-title h3').html(), "UTF-8") + "") }else{ layer.msg('暂无数据,无法下载!'); } } }); }) $(".history-query-date span").unbind().click(function(){ $(".his-loding").show(); $('.histor-tip').hide(); var type = $(this).attr("data-txt"); var strTime = "", endTime = ""; var values = $("#actualInput").val(); $(this).addClass('on').siblings().removeClass('on'); if(type == "day"){ strTime = getToday("s", 0); endTime = getToday("e", 0); }else if(type == "week"){ strTime = getMonday("s", 0); endTime = getToday("e", 0).substr(0,10); }else if(type == "month"){ strTime = getMonth("s", 0); endTime = getToday("e", 0).substr(0,10); } $("#historyStratTime").val(strTime); $("#historyEndTime").val(endTime); historyQueryEchart.dispose(); //销毁图表 $(window).off('resize'); //移除已销毁图表的resize事件 historyQueryEchart = echarts.init(document.getElementById('historyQueryEchart')); //初始化图表 historyData(values,"querySelects", historyQueryEchart); }); function max(arr){ var num = arr[0]; for(var i=0;i