monitor0.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta
  6. name="viewport"
  7. content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"
  8. />
  9. <meta
  10. name="format-detection"
  11. content="telephone=no,email=no,date=no,address=no"
  12. />
  13. <title></title>
  14. <link rel="stylesheet" type="text/css" href="../../css/api.css" />
  15. <link rel="stylesheet" type="text/css" href="../../css/style.css" />
  16. <link rel="stylesheet" href="../../css/aui.css" />
  17. <link rel="stylesheet" href="../../css/projeck.css" />
  18. <!-- <script src="http://at.alicdn.com/t/font_1226884_f65dqkm6tpn.js" charset="utf-8"></script> -->
  19. <style>
  20. /*.icon {*/
  21. /*width: 20px; height: 20px;*/
  22. /*vertical-align: -0.15em;*/
  23. /*fill: currentColor;*/
  24. /*overflow: hidden;*/
  25. /*color: #000;*/
  26. /*}*/
  27. body {
  28. background: #fff;
  29. }
  30. .status_itme {
  31. padding: 25px;
  32. }
  33. .status_itme li {
  34. text-align: center;
  35. width: 62px;
  36. height: 62px;
  37. padding: 10px 5px;
  38. color: #ffffff;
  39. font-size: 14px;
  40. -webkit-border-radius: 50%;
  41. -moz-border-radius: 50%;
  42. border-radius: 50%;
  43. overflow: hidden;
  44. text-overflow: ellipsis;
  45. white-space: nowrap;
  46. }
  47. .status_itme li p {
  48. color: #ffffff;
  49. font-size: 16px;
  50. }
  51. .status_itme li:nth-child(1) {
  52. background: #2c3e50;
  53. }
  54. .status_itme li:nth-child(2) {
  55. background: #e74c3c;
  56. }
  57. .status_itme li:nth-child(3) {
  58. background: #27ae60;
  59. }
  60. .status_itme li:nth-child(4) {
  61. background: #2873ff;
  62. }
  63. .content_item li {
  64. padding: 15px;
  65. }
  66. .status_title {
  67. justify-content: flex-start;
  68. -webkit-justify-content: flex-start;
  69. color: #284572;
  70. padding-bottom: 10px;
  71. border-bottom: 1px solid #ebeef3;
  72. }
  73. .status_title i {
  74. display: block;
  75. width: 40px;
  76. height: 40px;
  77. margin-right: 15px;
  78. }
  79. .status_text span {
  80. display: block;
  81. color: #97a3b4;
  82. font-size: 14px;
  83. }
  84. .status_text .col {
  85. text-align: center;
  86. padding-top: 14px;
  87. }
  88. .status_text .col:nth-child(1) span:last-child {
  89. color: #2c3e50;
  90. }
  91. .status_text .col:nth-child(2) span:last-child {
  92. color: #e74c3c;
  93. }
  94. .status_text .col:nth-child(3) span:last-child {
  95. color: #27ae60;
  96. }
  97. .status_text .col:nth-child(4) span:last-child {
  98. color: #2873ff;
  99. }
  100. </style>
  101. </head>
  102. <body>
  103. <div class="api_layout">
  104. <div class="status_itmes">
  105. <ul class="status_itme flex-space" id="status_itme"></ul>
  106. </div>
  107. <div class="api_line" style="height: 2px;"></div>
  108. <div class="content_items">
  109. <ul class="content_item" id="content_item">
  110. <!-- <li class="relative after-border" onclick="monitorDetaile('一氧化碳')">
  111. <div class="status_title flex-space">
  112. <i style="background: url(../../image/an.png) no-repeat;background-size: cover"></i>
  113. <span>一氧化碳</span>
  114. </div>
  115. <div class="status_text flex-wrap">
  116. <div class="col flex-con">
  117. <span>正常</span>
  118. <span>400个</span>
  119. </div>
  120. <div class="col flex-con">
  121. <span>正常</span>
  122. <span>400个</span>
  123. </div>
  124. <div class="col flex-con">
  125. <span>正常</span>
  126. <span>400个</span>
  127. </div>
  128. <div class="col flex-con">
  129. <span>正常</span>
  130. <span>400个</span>
  131. </div>
  132. </div>
  133. </li> -->
  134. </ul>
  135. </div>
  136. </div>
  137. <script type="text/template" id="templateStatus">
  138. {{for(var i = 0;i<it.length;i++) { }}
  139. <li onclick="statusFun('{{=it[i].name}}','{{=it[i].type}}')">
  140. <p>{{=it[i].name}}</p>
  141. <span>{{=it[i].count}}个</span>
  142. </li>
  143. {{ } }}
  144. </script>
  145. <script type="text/template" id="templateMonitor">
  146. {{~it:value}}
  147. <li class="relative after-border">
  148. <div class="status_title flex-space" onclick="monitorDetaile('{{=value.typeCodeDesc}}','')">
  149. <i style="background: url('http://jiewei-icon.oss-cn-beijing.aliyuncs.com/safe-system/{{=value.typeCode}}.png') no-repeat;background-size: cover"></i>
  150. <span>{{=value.typeCodeDesc}}</span>
  151. </div>
  152. <div class="status_text flex-wrap">
  153. {{ for(var i = 0;i<value.normalCount.length;i++) { }}
  154. <div class="col flex-con" onclick="sonTrmeSeacrh('{{=value.typeCodeDesc}}','{{=value.normalCount[i].type}}')">
  155. <span>{{=value.normalCount[i].name}}</span>
  156. <span>{{=value.normalCount[i].count}}个</span>
  157. </div>
  158. {{ } }}
  159. </div>
  160. </li>
  161. {{~}}
  162. </script>
  163. <script src="../../script/api.js"></script>
  164. <!-- <script src="../../script/fastclick.min.js"></script> -->
  165. <!-- <script src="../../script/aui-toast.js" charset="utf-8"></script> -->
  166. <script src="../../script/doT.min.js"></script>
  167. <script src="../../script/config.js"></script>
  168. <script>
  169. var toast = new auiToast();
  170. apiready = function () {
  171. monitorListFun();
  172. // simulationTotal();
  173. };
  174. // 模拟量
  175. function simulationTotal() {
  176. $http.fnReuestData(
  177. zaoquanUrlRouter.simulationTotal,
  178. '',
  179. 'post',
  180. '',
  181. function (ret, err) {
  182. if (ret && ret.code === 0) {
  183. toast.hide();
  184. $apis.html(status_itme, '#templateStatus', ret.data);
  185. }
  186. }
  187. );
  188. }
  189. function monitorListFun() {
  190. $http.fnReuestData(
  191. zaoquanUrlRouter.simulationTotal,
  192. '',
  193. 'post',
  194. '',
  195. function (ret, err) {
  196. toast.hide();
  197. if (ret && ret.code === 0) {
  198. $apis.html(status_itme, '#templateStatus', ret.total);
  199. $apis.html(content_item, '#templateMonitor', ret.data);
  200. $api.removeCls($api.dom('.api_line'), 'show');
  201. } else if (ret.code == 1) {
  202. $api.addCls($api.dom('.api_line'), 'hide');
  203. api.toast({
  204. msg: '网络请求超时,请稍后重试',
  205. duration: 2000,
  206. location: 'bottom',
  207. });
  208. }
  209. }
  210. );
  211. }
  212. // 详情
  213. function monitorDetaile(t, sType) {
  214. var pageParam = {title: t, statusType: sType};
  215. // $event.openTabLayout('monitorDetaile','monitorDetaile',title,pageParam);
  216. $event.openWin('monitorDetaileWin', 'monitorDetaileWin', pageParam, '');
  217. }
  218. //子项状态查询
  219. function sonTrmeSeacrh(t, sType) {
  220. var pageParam = {title: t, statusType: sType};
  221. $event.openWin('monitorDetaileWin', 'monitorDetaileWin', pageParam, '');
  222. // $event.openTabLayout('monitorDetaile','monitorDetaile',title,pageParam);
  223. }
  224. // 状态
  225. function statusFun(t, sType) {
  226. var pageParam = {title: t, statusType: sType, type: 'simulation'};
  227. $event.openWin('statusListWin', 'statusListWin', pageParam, '');
  228. // $event.openTabLayout('statusList','statusList',title,pageParam);
  229. }
  230. </script>
  231. </body>
  232. </html>