monitor.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Aisky-Sixth</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <!-- 新 Bootstrap4 核心 CSS 文件 -->
  8. <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
  9. <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  10. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  11. <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
  12. <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  13. <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
  14. <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  15. <!--可用來建立使用者小圖示-->
  16. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  17. <script>
  18. function Module(){
  19. window.location.href='/module';
  20. };
  21. function CheckAll(i){
  22. var checkone_arr = document.getElementsByName('features' + i);
  23. for(var i=0; i<checkone_arr.length; i++){
  24. checkone_arr[i].checked = true;
  25. };
  26. };
  27. $(function(){
  28. var node_div = document.getElementById('node_div');
  29. for(var i=1; i<=Number({{params.monitor_num}}); i++){
  30. var div = document.createElement('div');
  31. var html = '';
  32. html += '<h2 class="item-title text-center">節點' + i + '</h2>';
  33. html += '<div class="row node-opt">';
  34. html += '<div class="col-2"></div>';
  35. html += '<div class="col-8">';
  36. html += '<span>1.</span>';
  37. html += '<input type="checkbox" name="features' + i + '" value="weather">&nbsp;&nbsp;氣象站';
  38. html += '<br>';
  39. html += '<span>2.</span>';
  40. html += '<input type="checkbox" name="features' + i + '" value="irrigation">&nbsp;&nbsp;灌溉';
  41. html += '<br>';
  42. html += '<span>3.</span>';
  43. html += '<input type="checkbox" name="features' + i + '" value="water">&nbsp;&nbsp;水質';
  44. html += '<br>';
  45. html += '<br>';
  46. html += '(可複選)';
  47. html += '<input id="checkall' + i + '" type="button" value="全選" onclick="CheckAll(' + i + ');" style="background:#C0C0C0;">';
  48. html += '</div>';
  49. html += '<div class="col-2"></div>';
  50. html += '</div>';
  51. div.innerHTML = html;
  52. div.setAttribute('class', 'node col-xl-3 col-lg-3 col-md-3 col-sm-8 col-xs-8');
  53. node_div.appendChild(div);
  54. };
  55. });
  56. </script>
  57. <style>
  58. body {
  59. margin:0;
  60. }
  61. .navbar-dark .navbar-nav .nav-link {
  62. color: white;
  63. cursor: pointer;
  64. text-decoration:none;
  65. width: 110px;
  66. height: 46px;
  67. }
  68. .nav-top {
  69. line-height:40px;
  70. background-color: #C4C4C4;
  71. }
  72. .website_title{
  73. font-family: Roboto;
  74. font-style: normal;
  75. font-weight: normal;
  76. font-size: 30px;
  77. color: #000000;
  78. }
  79. .navbar-nav > li{
  80. float: none;
  81. display: inline-block;
  82. width: 110px;
  83. margin: 0 auto;
  84. text-align: center;
  85. }
  86. .navbar-nav > li a{
  87. font-size: 20px;
  88. }
  89. .main-page {
  90. margin-top: 200px;
  91. }
  92. .page-title {
  93. font-family: Roboto;
  94. font-style: normal;
  95. font-weight: bold;
  96. font-size: 36px;
  97. }
  98. .flex {
  99. display: flex;
  100. flex-direction: row;
  101. flex-wrap: wrap;
  102. justify-content: center;
  103. }
  104. .node {
  105. height: 250px;
  106. border: 2px solid #E5E5E5;
  107. border-radius: 5px;
  108. margin-top:35px;
  109. }
  110. .node-opt {
  111. font-size: 21px;
  112. }
  113. .set-link {
  114. display: inline-block;
  115. width: 350px;
  116. height: 100px;
  117. line-height: 100px;
  118. background: #008CBA;
  119. border: 1px solid #CFCFCF;
  120. box-sizing: border-box;
  121. color: #FFFFFF;
  122. border-radius: 10px;
  123. font-size: 36px;
  124. }
  125. .page-bottom {
  126. margin-top: 70px;
  127. }
  128. .form-control {
  129. background: #008CBA;
  130. border: 1px solid #CFCFCF;
  131. box-sizing: border-box;
  132. border-radius: 5px;
  133. width: 120px;
  134. height: 58px;
  135. text-align: center;
  136. line-height: 50px;
  137. font-size:20px;
  138. color: #FFFFFF;
  139. display: inline-block;
  140. }
  141. .fa{
  142. display: inline-block;
  143. font: normal normal normal 14px/1 FontAwesome;
  144. font-size: inherit;
  145. text-rendering: auto;
  146. -webkit-font-smoothing: antialiased;
  147. }
  148. .fa-user-o:before{
  149. content: "\f2c0";
  150. }
  151. [type="button"] {
  152. cursor: pointer;
  153. }
  154. @media(max-width:373px){
  155. .card {
  156. margin-right: 0px;
  157. }
  158. }
  159. @media(max-width:577px){
  160. }
  161. @media(min-width:576px){
  162. }
  163. @media(min-width:768px){
  164. .navbar-nav > li {
  165. margin-left: 0px;
  166. }
  167. .navbar-nav .li-block {
  168. display:none;
  169. }
  170. }
  171. @media(min-width:991px){
  172. .navbar-nav > li {
  173. margin-left: 20px;
  174. }
  175. .navbar-nav .li-block {
  176. display:none;
  177. }
  178. .page-bottom input:last-child {
  179. margin-left: 100px;
  180. }
  181. .node {
  182. margin-right:35px;
  183. }
  184. }
  185. @media(min-width:1200px){
  186. .navbar-nav > li {
  187. margin-left: 35px;
  188. }
  189. .navbar-nav .li-block {
  190. display: inline-block;
  191. width: 100px;
  192. }
  193. .page-bottom input:last-child {
  194. margin-left: 100px;
  195. }
  196. .node {
  197. margin-right:35px;
  198. }
  199. }
  200. @media(min-width:1400px){
  201. .navbar-nav .li-block {
  202. display: inline-block;
  203. width: 200px;
  204. }
  205. .page-bottom input:last-child {
  206. margin-left: 100px;
  207. }
  208. .node {
  209. margin-right:35px;
  210. }
  211. }
  212. @media(min-width:1689px) {
  213. .navbar-nav > li {
  214. margin-left: 50px;
  215. }
  216. .navbar-nav .li-block {
  217. display: inline-block;
  218. width: 500px;
  219. }
  220. .page-bottom input:last-child {
  221. margin-left: 100px;
  222. }
  223. .node {
  224. margin-right:35px;
  225. }
  226. }
  227. </style>
  228. <body>
  229. <nav class="fixed-top">
  230. <nav class="navbar navbar-expand-md nav-top justify-content-center">
  231. <div>
  232. <span class="website_title">監控功能</span>
  233. </div>
  234. </nav>
  235. <nav class="navbar navbar-expand-md bg-dark navbar-dark nav-bottom">
  236. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
  237. <span class="navbar-toggler-icon"></span>
  238. </button>
  239. <div class="collapse navbar-collapse" id="collapsibleNavbar">
  240. <ul class="navbar-nav">
  241. <li class="nav-item">
  242. <a class="nav-link" href="/">首頁</a>
  243. </li>
  244. <li class="nav-item">
  245. <a class="nav-link" href="#">關於我們</a>
  246. </li>
  247. <li class="nav-item">
  248. <a class="nav-link" href="#">案場資訊</a>
  249. </li>
  250. <li class="nav-item">
  251. <a class="nav-link" href="#">聯絡方法</a>
  252. </li>
  253. <li class="nav-item">
  254. <a class="nav-link" href="#">案場地圖</a>
  255. </li>
  256. <li class="nav-item">
  257. <a class="nav-link" href="#">環境資訊</a>
  258. </li>
  259. <li class="li-block"></li>
  260. <li class="nav-item">
  261. <a class="nav-link" href="#"><i class="fa fa-user-o"></i> {{params.username}}</a>
  262. </li>
  263. <li class="nav-item">
  264. <a class="nav-link" href="/logout">Logout</a>
  265. </li>
  266. </ul>
  267. </div>
  268. </nav>
  269. </nav>
  270. <div class="main-page">
  271. <form method="post" action="/monitor">
  272. <div class="container">
  273. <div class="row">
  274. <div class="col flex" id="node_div">
  275. <div class="col-10">
  276. <sapn style="color:#008CBA;font-size:22px;">親愛的顧客您好,請選擇您需要監控的功能:</sapn>
  277. </div>
  278. <!--<div class="node col-xl-3 col-lg-3 col-md-3 col-sm-8 col-xs-8">-->
  279. <!--<h2 class="item-title text-center">節點1</h2>-->
  280. <!--<div class="row node-opt">-->
  281. <!--<div class="col-2"></div>-->
  282. <!--<div class="col-8">-->
  283. <!--<span>1.</span>-->
  284. <!--<input type="checkbox" name="features" value="weather">&nbsp;&nbsp;氣象站-->
  285. <!--<br>-->
  286. <!--<span>2.</span>-->
  287. <!--<input type="checkbox" name="features" value="irrigation">&nbsp;&nbsp;灌溉-->
  288. <!--<br>-->
  289. <!--<span>3.</span>-->
  290. <!--<input type="checkbox" name="features" value="water">&nbsp;&nbsp;水質-->
  291. <!--<br>-->
  292. <!--<br>-->
  293. <!--(可複選)-->
  294. <!--</div>-->
  295. <!--<div class="col-2"></div>-->
  296. <!--</div>-->
  297. <!--</div>-->
  298. <!--<div class="node col-xl-3 col-lg-3 col-md-3 col-sm-8 col-xs-8">-->
  299. <!--<h2 class="item-title text-center">節點2</h2>-->
  300. <!--<div class="row node-opt">-->
  301. <!--<div class="col-2"></div>-->
  302. <!--<div class="col-8">-->
  303. <!--<span>1.</span>-->
  304. <!--<input type="checkbox" name="features" value="weather">&nbsp;&nbsp;氣象站-->
  305. <!--<br>-->
  306. <!--<span>2.</span>-->
  307. <!--<input type="checkbox" name="features" value="irrigation">&nbsp;&nbsp;灌溉-->
  308. <!--<br>-->
  309. <!--<span>3.</span>-->
  310. <!--<input type="checkbox" name="features" value="water">&nbsp;&nbsp;水質-->
  311. <!--<br>-->
  312. <!--<br>-->
  313. <!--(可複選)-->
  314. <!--</div>-->
  315. <!--<div class="col-2"></div>-->
  316. <!--</div>-->
  317. <!--</div>-->
  318. <!--<div class="node col-xl-3 col-lg-3 col-md-3 col-sm-8 col-xs-8">-->
  319. <!--<h2 class="item-title text-center">節點3</h2>-->
  320. <!--<div class="row node-opt">-->
  321. <!--<div class="col-2"></div>-->
  322. <!--<div class="col-8">-->
  323. <!--<span>1.</span>-->
  324. <!--<input type="checkbox" name="features" value="weather">&nbsp;&nbsp;氣象站-->
  325. <!--<br>-->
  326. <!--<span>2.</span>-->
  327. <!--<input type="checkbox" name="features" value="irrigation">&nbsp;&nbsp;灌溉-->
  328. <!--<br>-->
  329. <!--<span>3.</span>-->
  330. <!--<input type="checkbox" name="features" value="water">&nbsp;&nbsp;水質-->
  331. <!--<br>-->
  332. <!--<br>-->
  333. <!--(可複選)-->
  334. <!--</div>-->
  335. <!--<div class="col-2"></div>-->
  336. <!--</div>-->
  337. <!--</div>-->
  338. </div>
  339. </div>
  340. <div class="row page-bottom">
  341. <div class="col"></div>
  342. <div class="col-xl-4 col-lg-6 col-md-8 col-sm-10 col-xs-10" style="text-align:center;">
  343. <div class="form-group">
  344. <input type="reset" class="form-control" value="重設">
  345. <input type="submit" class="form-control" value="送出">
  346. <input type="button" class="form-control" value="下一頁" onclick="Module();">
  347. </div>
  348. </div>
  349. <div class="col"></div>
  350. </div>
  351. </div>
  352. </form>
  353. </div>
  354. </body>
  355. </html>