EquipInfo.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <div class="equipinfo">
  3. <div class="other-people">
  4. <div class="image-border image-border1"></div>
  5. <div class="image-border image-border2"></div>
  6. <div class="image-border image-border3"></div>
  7. <div class="image-border image-border4"></div>
  8. <div class="other-people-title">
  9. 设备信息统计
  10. </div>
  11. <div class="thisContent">
  12. <ul>
  13. <li>
  14. <div class="ringCircle">
  15. <Ring></Ring>
  16. </div>
  17. <em>{{info.Detector_totalnum}}台</em>
  18. <span>设备总数</span>
  19. </li>
  20. <li>
  21. <div class="ringCircle">
  22. <Ring></Ring>
  23. </div>
  24. <em>{{info.Detector_onlinenum}}台</em>
  25. <span>在线设备</span>
  26. </li>
  27. <li>
  28. <div class="ringCircle">
  29. <Ring></Ring>
  30. </div>
  31. <em>{{info.Detector_offlinenum}}台</em>
  32. <span>离线设备</span>
  33. </li>
  34. <li>
  35. <div class="ringCircle">
  36. <Ring></Ring>
  37. </div>
  38. <em>{{info.Detector_disablednum}}台</em>
  39. <span>禁用设备</span>
  40. </li>
  41. <li>
  42. <div class="ringCircle">
  43. <Ring></Ring>
  44. </div>
  45. <em>{{info.Warninglog_todaycount}}台</em>
  46. <span>当日报警数</span>
  47. </li>
  48. <li>
  49. <div class="ringCircle">
  50. <Ring></Ring>
  51. </div>
  52. <em>{{info.Warninglog_totalcount}}件</em>
  53. <span>可疑事件总数</span>
  54. </li>
  55. </ul>
  56. </div>
  57. </div>
  58. </div>
  59. </template>
  60. <script>
  61. let qs = require('qs');
  62. import { GetStaticinfo } from '../api/getApiRes.js'
  63. import Ring from '@/components/Ring.vue'
  64. // 设备信息统计与
  65. export default {
  66. data() {
  67. return {
  68. info: {
  69. Detector_disablednum: 0,
  70. Detector_offlinenum: 0,
  71. Detector_onlinenum: 0,
  72. Detector_totalnum: 0,
  73. Warninglog_todaycount: 0,
  74. Warninglog_totalcount: 0,
  75. }
  76. }
  77. },
  78. mounted() {
  79. let that = this;
  80. that.getDate();
  81. this.timer = setInterval(() => {
  82. that.getDate();
  83. }, 1600);
  84. },
  85. methods: {
  86. getDate() {
  87. let that = this;
  88. let param = {
  89. token: localStorage.token
  90. };
  91. let postdata = qs.stringify(param);
  92. GetStaticinfo(postdata).then(res => {
  93. let json = res;
  94. if (json.Code == 0) {
  95. this.info = json.Rs;
  96. } else {
  97. that.$message.error(json.Memo);
  98. }
  99. })
  100. },
  101. },
  102. components: {
  103. Ring
  104. }
  105. }
  106. </script>
  107. <style scoped>
  108. .other-people {
  109. width: 439px;
  110. height: 422px;
  111. margin-left: 0;
  112. overflow: hidden;
  113. background: #000F2A;
  114. }
  115. .equipinfo .image-border2 {
  116. right: 0;
  117. }
  118. .equipinfo .image-border4 {
  119. right: 0;
  120. }
  121. ul, li {
  122. list-style: none;
  123. padding: 0;
  124. margin: 0;
  125. }
  126. .thisContent ul {
  127. width: 100%;
  128. overflow: hidden;
  129. display: block;
  130. padding: 0 23px;
  131. margin: 0 auto;
  132. margin-top: 60px;
  133. }
  134. .thisContent ul li {
  135. width: 120px;
  136. height: 110px;
  137. float: left;
  138. margin-right: 20px;
  139. margin-bottom: 80px;
  140. }
  141. .thisContent ul li:nth-child(3) {
  142. margin-right: 0;
  143. }
  144. .thisContent ul li:nth-child(6) {
  145. margin-right: 0;
  146. }
  147. .ringCircle {
  148. width: 100px;
  149. height: 100px;
  150. overflow: hidden;
  151. border-radius: 250px;
  152. border: 10px solid rgba(37, 146, 226, 0.6);
  153. }
  154. .thisContent li em {
  155. position: relative;
  156. width: 100%;
  157. overflow: hidden;
  158. display: block;
  159. margin: 0 auto;
  160. bottom: 75px;
  161. color: #67BFFF;
  162. font-size: 18px;
  163. text-align: center;
  164. font-style: normal;
  165. }
  166. .thisContent li span {
  167. position: relative;
  168. bottom: 20px;
  169. color: #67BFFF;
  170. font-size: 16px;
  171. text-align: center;
  172. }
  173. </style>