monitorDetaileWin.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <meta name="format-detection"content="telephone=no">
  8. <title>index</title>
  9. <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
  10. <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
  11. <link rel="stylesheet" href="../../css/projeck.css">
  12. <style media="screen">
  13. body{
  14. background: #fff;
  15. }
  16. .status_itme{
  17. padding: 25px;
  18. }
  19. .status_itme li{
  20. text-align: center;
  21. width: 62px;
  22. height: 62px;
  23. padding: 10px 5px;
  24. color: #ffffff;
  25. font-size: 14px;
  26. -webkit-border-radius: 50%;
  27. -moz-border-radius: 50%;
  28. border-radius: 50%;
  29. overflow: hidden;
  30. text-overflow: ellipsis;
  31. white-space: nowrap;
  32. box-sizing: border-box;
  33. }
  34. .status_itme li p{
  35. color: #ffffff;
  36. font-size: 16px;
  37. }
  38. .content_item li{
  39. padding: 15px;
  40. }
  41. .status_title{
  42. justify-content: flex-start;
  43. -webkit-justify-content: flex-start;
  44. color: #284572;
  45. padding-bottom: 10px;
  46. border-bottom: 1px solid #ebeef3;
  47. }
  48. .status_title i{
  49. display: block;
  50. width: 40px;
  51. height: 40px;
  52. margin-right: 15px;
  53. }
  54. .nav_title{
  55. padding: 0 5px;
  56. background: #f3f6fa;
  57. }
  58. .nav_title li{
  59. text-align: center;
  60. font-size: 14px;
  61. padding: 12px 0 ;
  62. }
  63. .nav_title li:nth-child(1){
  64. width: 20%;
  65. }
  66. .nav_title li:nth-child(2){
  67. width: 60%;
  68. }
  69. .nav_title li:nth-child(3){
  70. width: 20%;
  71. }
  72. </style>
  73. </head>
  74. <body>
  75. <div class="api_layout" id="api_layout">
  76. <header class="header-login">
  77. <img class="backBtn" src="../../image/btn_back.png" alt="" onclick="backIndex()">
  78. <p class="api_text"></p>
  79. </header>
  80. <div class="status_itmes">
  81. <ul class="status_itme flex-space" id="status_itme">
  82. </ul>
  83. </div>
  84. <nav>
  85. <ul class="nav_title flex-space">
  86. <li>序号</li>
  87. <li>安装地点</li>
  88. <li>数值/状态</li>
  89. </ul>
  90. </nav>
  91. </div>
  92. </body>
  93. </html>
  94. <script type="text/template" id="templateStatus">
  95. {{for(var i = 0;i<it.length;i++) { }}
  96. <li onclick="monitorDataSearch('{{=it[i].type}}')" class="{{=it[i].type}}Bg">
  97. <p>{{=it[i].name}}</p>
  98. <span id="alarmCount">{{=it[i].count}}个</span>
  99. </li>
  100. {{ } }}
  101. </script>
  102. <script type="text/javascript" src="../../script/api.js"></script>
  103. <script src="../../script/doT.min.js"></script>
  104. <script src="../../script/config.js"></script>
  105. <script type="text/javascript">
  106. var title = ""
  107. apiready = function () {
  108. $api.fixStatusBar($api.dom('header') );
  109. $api.html($api.dom('.api_text'), api.pageParam.title);
  110. title = api.pageParam.title;
  111. var statusType = api.pageParam.statusType;
  112. openFrame(statusType)
  113. }
  114. // 详情
  115. function openFrame(type) {
  116. api.openFrame({
  117. name: 'monitorDetaile',
  118. url: 'monitorDetaile.html',
  119. rect: {
  120. x: 0,
  121. y: $api.dom('header').offsetHeight+ $api.dom('nav').offsetHeight+112,
  122. w: 'auto',
  123. h: 'auto'
  124. },
  125. pageParam: {
  126. title: title,
  127. statusType:type
  128. },
  129. bounces: true,
  130. bgColor: '#fff',
  131. vScrollBarEnabled: true,
  132. hScrollBarEnabled: true
  133. });
  134. }
  135. // 状态数
  136. function monitorDatas() {
  137. $apis.html(status_itme,'#templateStatus',JSON.parse($api.getStorage('totals')));
  138. }
  139. // 查询
  140. function monitorDataSearch(sType) {
  141. api.execScript({
  142. name: 'monitorDetaileWin',
  143. frameName:'monitorDetaile',
  144. script : 'monitorDataFun("'+title+'","'+sType+'");'
  145. })
  146. }
  147. function backIndex() {
  148. $api.rmStorage('totals');
  149. api.closeWin();
  150. }
  151. // 监听物理返回键
  152. function keybackFun() {
  153. api.addEventListener({
  154. name: 'keyback'
  155. }, function(ret, err){
  156. $api.rmStorage('totals');
  157. api.closeWin();
  158. });
  159. }
  160. </script>