123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Aisky-Sixth</title>
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <!-- 新 Bootstrap4 核心 CSS 文件 -->
- <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
- <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
- <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
- <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
- <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
- <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
- <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
- <!-- 引入 echarts.js -->
- <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
- <!--可用來建立使用者小圖示-->
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- <style>
- body {
- margin:0;
- }
- .navbar-dark .navbar-nav .nav-link {
- color: white;
- cursor: pointer;
- text-decoration:none;
- width: 110px;
- height: 46px;
- }
- .nav-top {
- line-height:40px;
- background-color: #C4C4C4;
- }
- .website_title{
- font-family: Roboto;
- font-style: normal;
- font-weight: normal;
- font-size: 30px;
- color: #000000;
- }
- .navbar-nav > li{
- float: none;
- display: inline-block;
- width: 110px;
- margin: 0 auto;
- text-align: center;
- }
- .navbar-nav > li a{
- font-size: 20px;
- }
- .main-page {
- margin-top: 150px;
- }
- .div-title {
- font-family: Roboto;
- font-style: normal;
- font-weight: bold;
- font-size: 36px;
- }
- .sensor {
- margin-top: 50px;
- }
- .flex {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: center;
- }
- .set-link {
- display: inline-block;
- width: 350px;
- height: 100px;
- line-height: 100px;
- background: #008CBA;
- border: 1px solid #CFCFCF;
- box-sizing: border-box;
- color: #FFFFFF;
- border-radius: 10px;
- font-size: 36px;
- }
- .td_in {
- margin-top:10%;
- border-radius: 15px;
- text-align: center;
- background-color:#C4C4C4;
- width:150px;
- height: 100px;
- margin:auto;
- }
- .td_in:hover {
- cursor:pointer;
- }
- .sensor_status {
- width: 200px;
- height: 170px;
- background: #FFFFFF;
- border: 1px solid #CFCFCF;
- box-sizing: border-box;
- color: #000000;
- border-radius: 5px;
- font-size: 24px;
- margin:auto;
- }
- .show-info{
- position: absolute;
- background-color: #FFFFFF;
- border: 1px solid #949494;
- box-sizing: border-box;
- z-index: 3;
- left: 8%;
- }
- .show-info > h1 {
- text-align: center;
- }
- .show-chart {
- height: 500px;
- border: 2px solid #FFF;
- background: #C4C4C4;
- }
- .btn-input input{
- background: #008CBA;
- border: 1px solid #CFCFCF;
- box-sizing: border-box;
- border-radius: 5px;
- width: 120px;
- height: 58px;
- text-align: center;
- line-height: 58px;
- font-size: 20px;
- margin-top: 50px;
- color: #FFFFFF;
- }
- .fa{
- display: inline-block;
- font: normal normal normal 14px/1 FontAwesome;
- font-size: inherit;
- text-rendering: auto;
- -webkit-font-smoothing: antialiased;
- }
- .fa-user-o:before{
- content: "\f2c0";
- }
- button {
- cursor: pointer;
- }
- @media(max-width:373px){
- .card {
- margin-right: 0px;
- }
- }
- @media(max-width:577px){
- }
- @media(min-width:576px){
- }
- @media(min-width:768px){
- .navbar-nav > li {
- margin-left: 0px;
- }
- .navbar-nav .li-block {
- display:none;
- }
- }
- @media(min-width:991px){
- .navbar-nav > li {
- margin-left: 20px;
- }
- .navbar-nav .li-block {
- display:none;
- }
- .sensor {
- margin-right: 0px;
- }
- .btn-input input:last-child{
- margin-left:100px;
- }
- }
- @media(min-width:1200px){
- .navbar-nav > li {
- margin-left: 35px;
- }
- .navbar-nav .li-block {
- display: inline-block;
- width: 100px;
- }
- .sensor {
- margin-right: 0px;
- }
- .btn-input input:last-child{
- margin-left:100px;
- }
- }
- @media(min-width:1400px){
- .navbar-nav .li-block {
- display: inline-block;
- width: 200px;
- }
- .sensor {
- margin-right: 0px;
- }
- .btn-input input:last-child{
- margin-left:100px;
- }
- }
- @media(min-width:1689px) {
- .navbar-nav > li {
- margin-left: 50px;
- }
- .navbar-nav .li-block {
- display: inline-block;
- width: 500px;
- }
- .sensor {
- margin-right: 0px;
- }
- .btn-input input:last-child{
- margin-left:100px;
- }
- }
- </style>
- <script>
- function Echart(evt){
- <!--$("#" + evt + "-div").css('display','block');-->
- //基於準備好的dom,初始化echarts例項
- var myChart = echarts.init(document.getElementsByClassName('show-chart')[0]);
- //指定圖表的配置項和資料
- var option = {
- xAxis: {
- type: 'category',
- data: ['2015', '2016', '2017', '2018', '2019', '2020', '2021']
- },
- yAxis: {
- type: 'value'
- },
- series: [{
- data: [820, 932, 901, 934, 1290, 1330, 1320],
- type: 'line'
- }]
- };
- //使用剛指定的配置項和資料顯示圖表
- myChart.setOption(option);
- };
- //下載檔案函數
- function downloadFile() {
- //藉型別陣列建構的 blob 來建立 URL
- let fileName = "fileName.csv";
- const data = getRandomData();
- let blob = new Blob([data], {
- type: "application/octet-stream"
- });
- var href = URL.createObjectURL(blob);
- // 從 Blob 取出資料
- var link = document.createElement("a");
- document.body.appendChild(link);
- link.href = href;
- link.download = fileName;
- link.click();
- };
- //假資料函數
- function getRandomData() {
- var header = "RandomHeader";
- var data = "";
- for (let i = 0; i < 5; i++) {
- for (var j = 0; j < 2; j++) {
- if (j > 0) {
- data = data + ",";
- }
- data = data + "Item" + i + "_" + j;
- }
- }
- return header + data;
- };
- function ShowInfoHTML(){
- var html = '';
- html += '<div id="" class="show-info col-xl-10 col-lg-10 col-md-10 col-sm-10 col-xs-10" style="display: none;">';
- html += '<br>';
- html += '<h1></h1>';
- html += '<center>';
- html += '<select name="date" class="text-right">';
- html += '<option value="year">year</option>';
- html += '<option value="month">month</option>';
- html += '<option value="day">day</option>';
- html += '</select>';
- html += '<span>從</span>';
- html += '<label for="start"></label><input id="start" type="date">';
- html += '<span>到</span>';
- html += '<label for="end"></label><input id="end" type="date">';
- html += '<span>為止</span>';
- html += '<input type="button" value="查詢" onclick="Echart(\'\');">';
- html += '</center>';
- html += '<div class="row">';
- html += '<div class="col-1"></div>';
- html += '<div class="col-10 show-chart" style="margin-top: 10px;text-align:center;"></div>';
- html += '<div class="col-1"></div>';
- html += '</div>';
- html += '<div class="btn-input" style="text-align:center;">';
- html += '<input type="button" value="關閉" style="margin-left:0px;" onclick="CloseInfo()">';
- html += '<input class="" type="button" value="匯出">';
- html += '</div>';
- html += '</div>';
- return html;
- };
- function Module(module, obj){
- var sensor_html = '';
- sensor_html += '<div class="sensor col-xl-3 col-lg-3 col-md-3 col-sm-8 col-xs-8" style="text-align:center;">';
- sensor_html += '<div class="div-title text-center">';
- sensor_html += '<div class="sensor_status">';
- sensor_html += '<div class="sensor_title" style="">';
- sensor_html += '<label>' + module + '</label>';
- sensor_html += '</div>';
- sensor_html += '<div id="' + obj + '" class="td_in" onclick="ShowInfo(' + '\'' + module + '\',\'' + obj + '\');"></div>';
- sensor_html += '</div>';
- sensor_html += '</div>';
- sensor_html += '</div>';
- return sensor_html;
- };
- var sensor_list = "";
- $.each({{params.sensor_list|tojson}},function(index, obj){
- sensor_list += "if(obj == '" + obj.en_name + "'){html += Module('" + obj.ch_name + obj.version + "',obj);};";
- });
- function Monitor(arr){
- var html = '';
- $.each(arr, function(index, obj){
- <!--if(obj == 'airTem'){-->
- <!--html += Module('空氣溫度', obj);-->
- <!--}else if(obj == 'airHum'){-->
- <!--html += Module('空氣濕度', obj);-->
- <!--}else if(obj == 'dewPoint'){-->
- <!--html += Module('露點', obj);-->
- <!--}else if(obj == 'sun'){-->
- <!--html += Module('日照', obj);-->
- <!--}else if(obj == 'soilHum'){-->
- <!--html += Module('土壤含水率', obj);-->
- <!--}else if(obj == 'soilTem'){-->
- <!--html += Module('土壤溫度', obj);-->
- <!--}else if(obj == 'soilEC'){-->
- <!--html += Module('土壤EC值', obj);-->
- <!--}else if(obj == 'windSpd'){-->
- <!--html += Module('風速', obj);-->
- <!--}else if(obj == 'windDin'){-->
- <!--html += Module('風向', obj);-->
- <!--}else if(obj == 'rain'){-->
- <!--html += Module('降雨量', obj);-->
- <!--}else if(obj == 'atmosphere'){-->
- <!--html += Module('大氣壓', obj);-->
- <!--};-->
- eval(sensor_list);
- });
- return html;
- };
- //改變監控功能後端抓取資料函數
- function MonitorChange(){
- var monitor = $("#monitor").val();
- var json = {"monitor":monitor};
- var sensor = document.getElementById('sensor_list');
- sensor.innerHTML = '';
- var sensor_html = '';
- $.get("/monitor/" + {{params.tid}}, json, function(resText){
- var module_list = resText;
- sensor_html += Monitor(module_list);
- sensor_html += ShowInfoHTML();
- sensor.innerHTML += sensor_html;
- }, 'json');
- };
- $(function(){
- //監聽可嘗試用eval函數做,循環便歷每個感測器
- <!--//監聽airTem匯出-->
- <!--let airTemDownloadBtn = document.querySelector(".airTemDownloadBtn");-->
- <!--airTemDownloadBtn.addEventListener("click", downloadFile);-->
- <!--//監聽airHum匯出-->
- <!--let airHumDownloadBtn = document.querySelector(".airHumDownloadBtn");-->
- <!--airHumDownloadBtn.addEventListener("click", downloadFile);-->
- {% if params.monitor_num %}
- var node_list = document.getElementById('node_list');
- var html = '';
- for(var i=1; i<={{params.monitor_num}}; i++){
- html += '<a href="/env_info/' + i + '"><button class="btn btn-primary btn-lg" style="margin-top:5px;margin-bottom:5px">' + i + '</button></a> ';
- };
- node_list.innerHTML = html;
- {% endif %}
- {% if params.first_monitor %}
- var first_monitor = JSON.parse({{params.first_monitor|tojson}});
- var monitor = document.getElementById('monitor');
- var monitor_html = '';
- var sensor = document.getElementById('sensor_list');
- var sensor_html = '';
- if(first_monitor.weather){
- monitor_html += '<option value="weather">氣象站</option>';
- sensor_html += Monitor(first_monitor.weather);
- };
- if(first_monitor.irrigation){
- monitor_html += '<option value="irrigation">灌溉</option>';
- if(!first_monitor.weather){
- sensor_html += Monitor(first_monitor.irrigation);
- };
- };
- if(first_monitor.water){
- monitor_html += '<option value="water">水質</option>';
- if(!first_monitor.irrigation && !first_monitor.weather){
- sensor_html += Monitor(first_monitor.water);
- };
- };
- monitor.innerHTML = monitor_html;
- sensor.innerHTML += sensor_html;
- {% endif %}
- });
- </script>
- </head>
- <body>
- <nav class="fixed-top">
- <nav class="navbar navbar-expand-md nav-top justify-content-center">
- <div>
- <span class="website_title">環境資訊</span>
- </div>
- </nav>
- <nav class="navbar navbar-expand-md bg-dark navbar-dark nav-bottom">
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="collapsibleNavbar">
- <ul class="navbar-nav">
- <li class="nav-item">
- <a class="nav-link" href="/">首頁</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/env_info/1">環境資訊</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">報表輸出</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">RMA</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/map">故障紀錄</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/system_status">求助</a>
- </li>
- <li class="li-block"></li>
- <li class="nav-item">
- <a class="nav-link" href="#"><i class="fa fa-user-o"></i> {{params.username}}</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/logout">Logout</a>
- </li>
- </ul>
- </div>
- </nav>
- </nav>
- <div class="main-page">
- <div class="container">
- <div class="row">
- <div class="col flex">
- <div class="col-12 text-center">
- <h1 style="">節點{{params.tid}}</h1>
- </div>
- <div id="node_list" class="col-12 text-center" style="margin-top:20px;">
- </div>
- <div class="col-12 text-center" style="margin-top:20px;">
- 監控功能 :
- <select id="monitor" name="monitor">
- <option value="weather">氣象站</option>
- <option value="irrigation">灌溉</option>
- <option value="water">水質</option>
- </select>
- <button type="button" onclick="MonitorChange();">查詢</button>
- </div>
- <div id="sensor_list" class="col-12 row text-center">
- <form action="" method="">
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>空氣溫度</label>-->
- <!--</div>-->
- <!--<div id="airTem" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>空氣濕度</label>-->
- <!--</div>-->
- <!--<div id="airHum" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>露點</label>-->
- <!--</div>-->
- <!--<div id="dewPoint" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>日照</label>-->
- <!--</div>-->
- <!--<div id="sun" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>土壤含水率</label>-->
- <!--</div>-->
- <!--<div id="soilHum" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>土壤溫度</label>-->
- <!--</div>-->
- <!--<div id="soilTem" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>土壤EC值</label>-->
- <!--</div>-->
- <!--<div id="soilEC" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>風速</label>-->
- <!--</div>-->
- <!--<div id="windSpd" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>風向</label>-->
- <!--</div>-->
- <!--<div id="windDin" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>降雨量</label>-->
- <!--</div>-->
- <!--<div id="rain" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>大氣壓</label>-->
- <!--</div>-->
- <!--<div id="atmosphere" class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label>RF</label>-->
- <!--</div>-->
- <!--<div class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;">-->
- <!--<div class="div-title text-center">-->
- <!--<div class="sensor_status">-->
- <!--<div class="sensor_title" style="">-->
- <!--<label><img src="../static/img/battery.png" style="width:40px;"></label>-->
- <!--</div>-->
- <!--<div class="td_in" style=""></div>-->
- <!--</div>-->
- <!--</div>-->
- <!--</div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;"></div>-->
- <!--<div class="sensor col-xl-2 col-lg-2 col-md-2 col-sm-8 col-xs-8" style="text-align:center;"></div>-->
- <div id="" class="show-info col-xl-10 col-lg-10 col-md-10 col-sm-10 col-xs-10" style="display: none;">
- <br>
- <h1></h1>
- <center>
- <select name="date" class="text-right">
- <option value="year">year</option>
- <option value="month">month</option>
- <option value="day">day</option>
- </select>
- <span>從</span>
- <label for="start"></label><input id="start" type="date">
- <span>到</span>
- <label for="end"></label><input id="end" type="date">
- <span>為止</span>
- <input type="button" value="查詢" onclick="Echart('');">
- </center>
- <div class="row">
- <div class="col-1"></div>
- <div class="col-10 show-chart" style="margin-top: 10px;text-align:center;"></div>
- <div class="col-1"></div>
- </div>
- <div class="btn-input" style="text-align:center;">
- <input type="button" value="關閉" style="margin-left:0px;" onclick="CloseInfo()">
- <input class="" type="button" value="匯出">
- </div>
- </div>
- <!--<div id="airTem-div" class="show-info col-xl-10 col-lg-10 col-md-10 col-sm-10 col-xs-10" style="display: none;">-->
- <!--<br>-->
- <!--<h1>空氣溫度</h1>-->
- <!--<center>-->
- <!--<select name="airTem-day" class="text-right">-->
- <!--<option value="year">year</option>-->
- <!--<option value="month">month</option>-->
- <!--<option value="day">day</option>-->
- <!--</select>-->
- <!--<span>從</span>-->
- <!--<label for="airTem-start"></label><input id="airTem-start" type="date">-->
- <!--<span>到</span>-->
- <!--<label for="airTem-end"></label><input id="airTem-end" type="date">-->
- <!--<span>為止</span>-->
- <!--<input type="button" value="查詢" onclick="Echart('airTem');">-->
- <!--</center>-->
- <!--<div class="row">-->
- <!--<div class="col-1"></div>-->
- <!--<div class="col-10 airTem show-chart" style="margin-top: 10px;text-align:center;"></div>-->
- <!--<div class="col-1"></div>-->
- <!--</div>-->
- <!--<div class="btn-input" style="text-align:center;">-->
- <!--<input type="button" value="關閉" style="margin-left:0px;" class="airTem-cancel">-->
- <!--<input class="airTemdownloadBtn" type="button" value="匯出">-->
- <!--</div>-->
- <!--</div>-->
- <!--<div id="airHum-div" class="show-info col-xl-10 col-lg-10 col-md-10 col-sm-10 col-xs-10" style="display: none;">-->
- <!--<br>-->
- <!--<h1>空氣濕度</h1>-->
- <!--<center>-->
- <!--<select name="airHum-day" class="text-right">-->
- <!--<option value="year">year</option>-->
- <!--<option value="month">month</option>-->
- <!--<option value="day">day</option>-->
- <!--</select>-->
- <!--<span>從</span>-->
- <!--<label for="airHum-start"></label><input id="airHum-start" type="date">-->
- <!--<span>到</span>-->
- <!--<label for="airHum-end"></label><input id="airHum-end" type="date">-->
- <!--<span>為止</span>-->
- <!--<input type="button" value="查詢" onclick="Echart('airHum');">-->
- <!--</center>-->
- <!--<div class="row">-->
- <!--<div class="col-1"></div>-->
- <!--<div class="col-10 airHum show-chart" style="margin-top: 10px;text-align:center;"></div>-->
- <!--<div class="col-1"></div>-->
- <!--</div>-->
- <!--<div class="btn-input" style="text-align:center;">-->
- <!--<input type="button" value="關閉" style="margin-left:0px;" class="airHum-cancel">-->
- <!--<input class="airHumdownloadBtn" type="button" value="匯出">-->
- <!--</div>-->
- <!--</div>-->
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- <script>
- function ShowInfo(module, obj){
- $(".show-info").css('display','block');
- $(".show-info h1").text(module);
- $("input[value=查詢]").attr('onclick', 'Echart(\'node' + {{params.tid}} + '-' + obj + '\')');
- $("input[value=匯出]").attr('class', obj + 'DownloadBtn');
- let DownloadBtn = document.querySelector("." + obj + "DownloadBtn");
- DownloadBtn.addEventListener("click", downloadFile);
- };
- function CloseInfo(){
- $(".show-info").css('display','none');
- };
- </script>
- </html>
|