tb-monitor.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>车辆备案-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!-- 所有的 css & js 资源 -->
  9. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  10. <link rel="stylesheet" href="../../static/sa.css">
  11. <script src="../../static/kj/vue.min.js"></script>
  12. <script src="../../static/kj/element-ui/index.js"></script>
  13. <script src="../../static/kj/httpVueLoader.js"></script>
  14. <script src="../../static/kj/jquery.min.js"></script>
  15. <script src="../../static/kj/layer/layer.js"></script>
  16. <script src="../../static/sa.js"></script>
  17. <style>
  18. /* 第一行 */
  19. .sa-wnk {
  20. background-color: #FFF;
  21. border: 1px #ddd solid;
  22. margin-bottom: 14px;
  23. min-height: 100px;
  24. cursor: pointer;
  25. transition: all 0.3s;
  26. overflow: hidden;
  27. }
  28. .sa-wnk:hover {
  29. box-shadow: 0 0 20px #999;
  30. }
  31. .sa-wnk img {
  32. float: left;
  33. line-height: 100px;
  34. margin: 25px 0px 0 20px;
  35. width: 50px;
  36. height: 50px;
  37. vertical-align: middle;
  38. }
  39. .sa-wnk .sa-wnk-tv {
  40. float: left;
  41. margin-left: 10px;
  42. max-width: calc(100% - 100px);
  43. }
  44. .sa-wnk-title {
  45. margin-top: 25px;
  46. font-size: 16px;
  47. }
  48. .sa-wnk-value {
  49. margin-top: 4px;
  50. font-size: 24px;
  51. padding-bottom: 20px;
  52. }
  53. </style>
  54. </head>
  55. <body>
  56. <div class="vue-box" style="display: none;" :style="'display: block;'">
  57. <el-card>
  58. <div slot="header">
  59. <h2>进出记录监控</h2>
  60. </div>
  61. <el-row :gutter="14">
  62. <el-col :lg="5" :sm="8" :xs="24">
  63. <div class="sa-wnk">
  64. <img src="../../static/icon/icon-user.png">
  65. <div class="sa-wnk-tv">
  66. <p class="sa-wnk-title">今日进出人数</p>
  67. <p class="sa-wnk-value">{{sta.todayCount}}</p>
  68. </div>
  69. </div>
  70. </el-col>
  71. <el-col :lg="5" :sm="8" :xs="24">
  72. <div class="sa-wnk">
  73. <img src="../../static/icon/icon-user.png">
  74. <div class="sa-wnk-tv">
  75. <p class="sa-wnk-title">最近一周进出人数</p>
  76. <p class="sa-wnk-value">{{sta.weekCount}}</p>
  77. </div>
  78. </div>
  79. </el-col>
  80. <el-col :lg="5" :sm="8" :xs="24">
  81. <div class="sa-wnk">
  82. <img src="../../static/icon/icon-user.png">
  83. <div class="sa-wnk-tv">
  84. <p class="sa-wnk-title">最近一个月进出人数</p>
  85. <p class="sa-wnk-value">{{sta.monthCount}}</p>
  86. </div>
  87. </div>
  88. </el-col>
  89. <el-col :lg="5" :sm="8" :xs="24">
  90. <div class="sa-wnk">
  91. <img src="../../static/icon/icon-user.png">
  92. <div class="sa-wnk-tv">
  93. <p class="sa-wnk-title">最近一年进出人数</p>
  94. <p class="sa-wnk-value">{{sta.yearCount}}</p>
  95. </div>
  96. </div>
  97. </el-col>
  98. <el-col :lg="4" :sm="8" :xs="24">
  99. <div class="sa-wnk">
  100. <img src="../../static/icon/icon-user.png">
  101. <div class="sa-wnk-tv">
  102. <p class="sa-wnk-title">平均每天进出人数</p>
  103. <p class="sa-wnk-value">{{sta.avg}}</p>
  104. </div>
  105. </div>
  106. </el-col>
  107. </el-row>
  108. </el-card>
  109. <!-- <el-card>
  110. <div slot="header">
  111. <h2>健康码监控</h2>
  112. </div>
  113. <el-row :gutter="14">
  114. <el-col :lg="5" :sm="8" :xs="24">
  115. <div class="sa-wnk">
  116. <img src="../../static/icon/icon-error.png">
  117. <div class="sa-wnk-tv">
  118. <p class="sa-wnk-title">今日健康码异常数</p>
  119. <p class="sa-wnk-value">{{sta.todayHealthErrorCount}}</p>
  120. </div>
  121. </div>
  122. </el-col>
  123. <el-col :lg="5" :sm="8" :xs="24">
  124. <div class="sa-wnk">
  125. <img src="../../static/icon/icon-error.png">
  126. <div class="sa-wnk-tv">
  127. <p class="sa-wnk-title">最近一周健康码异常数</p>
  128. <p class="sa-wnk-value">{{sta.weekHealthErrorCount}}</p>
  129. </div>
  130. </div>
  131. </el-col>
  132. <el-col :lg="5" :sm="8" :xs="24">
  133. <div class="sa-wnk">
  134. <img src="../../static/icon/icon-error.png">
  135. <div class="sa-wnk-tv">
  136. <p class="sa-wnk-title">最近一个月健康码异常数</p>
  137. <p class="sa-wnk-value">{{sta.monthHealthErrorCount}}</p>
  138. </div>
  139. </div>
  140. </el-col>
  141. <el-col :lg="5" :sm="8" :xs="24">
  142. <div class="sa-wnk">
  143. <img src="../../static/icon/icon-error.png">
  144. <div class="sa-wnk-tv">
  145. <p class="sa-wnk-title">最近一年健康码异常数</p>
  146. <p class="sa-wnk-value">{{sta.yearHealthErrorCount}}</p>
  147. </div>
  148. </div>
  149. </el-col>
  150. <el-col :lg="4" :sm="8" :xs="24">
  151. <div class="sa-wnk">
  152. <img src="../../static/icon/icon-error.png">
  153. <div class="sa-wnk-tv">
  154. <p class="sa-wnk-title">平均每天健康码异常数</p>
  155. <p class="sa-wnk-value">{{sta.avgError}}</p>
  156. </div>
  157. </div>
  158. </el-col>
  159. </el-row>
  160. </el-card> -->
  161. </div>
  162. <script>
  163. var app = new Vue({
  164. el: '.vue-box',
  165. data: {
  166. timmer:null,
  167. sta: {
  168. todayCount: 0,
  169. todayHealthErrorCount: 0,
  170. weekCount: 0,
  171. weekHealthErrorCount: 0,
  172. monthCount: 0,
  173. monthHealthErrorCount: 0,
  174. yearCount: 0,
  175. yearHealthErrorCount: 0,
  176. avg: 0,
  177. avgError: 0
  178. },
  179. },
  180. methods: {
  181. getMonitor() {
  182. sa.ajax('/monitor/watch', function(res) {
  183. this.sta = res.data;
  184. }.bind(this));
  185. }
  186. },
  187. created: function() {
  188. this.getMonitor();
  189. this.timmer=setInterval(()=>{
  190. this.getMonitor()
  191. },30000)
  192. },
  193. onbeforeunload() {
  194. clearInterval(this.timmer)
  195. }
  196. })
  197. </script>
  198. </body>
  199. </html>