| | |
| | | |
| | | $('.jimu-widget-searchTabaPopup').find('#query').click(() => { |
| | | if (that.times[0] != 1) { |
| | | // console.log(that.times); |
| | | var stcd = $('.jimu-widget-searchTabaPopup').find('#userMyStcd').val() |
| | | console.log(stcd); |
| | | that.getOurData(that.times, stcd); |
| | | } else { |
| | | layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){ |
| | |
| | | let begintime = value.substring(0, 19), |
| | | endtime = value.substring(22); |
| | | that.times = [begintime, endtime]; |
| | | // console.log(that.times) |
| | | } |
| | | }); |
| | | // laydate.render({ |
| | |
| | | this.myChart2 = echarts.init(dom); |
| | | }, |
| | | getOurData: function (time, stcd) { |
| | | console.log(time) |
| | | var that = this |
| | | , url = `http://171.34.76.171:8880/pyh-station/monitorData/queryStationHistoryMonitorData?stcd=${stcd}&startTime=${time[0]}&endTime=${time[1]}`, |
| | | token = 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJlY2hpc2FuIiwic3ViIjoiYWRtaW4iLCJpYXQiOjE2MjMyNDQxNDQsImV4cCI6MTYyNTgzNjE0NH0.wjtMw7hv8IYGxFKI9b1vo2ozMXD1pE0-02HinfPl-r8l0TYVg1YvMBxW_VzzFKoY1jeC6XByQQT-aC_mAvBnWA'; |
| | |
| | | for (var i in ins) { |
| | | xDataair.push(ins[i].startTime); |
| | | } |
| | | // console.log(shui); |
| | | // console.log(seriesData); |
| | | // 渲染图表 |
| | | that.getEchartsData(legendDataair, xDataair, seriesDataair, 2);//空气 |
| | | |
| | |
| | | for (var i in ins) { |
| | | xDataqi.push(ins[i].startTime); |
| | | } |
| | | // console.log(shui); |
| | | // console.log(seriesData); |
| | | // 渲染图表 |
| | | that.getEchartsData(legendDataqi, xDataqi, seriesDataqi, 3);//气象 |
| | | } |
| | |
| | | var that = this; |
| | | |
| | | var option; |
| | | // console.log(this.myChart); |
| | | |
| | | option = { |
| | | // title: { |