yqnh.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <div class="yqxf_box">
  3. <el-row :gutter="16">
  4. <el-col :span="4">
  5. <div class="statistic-card">
  6. <el-statistic :value="500">
  7. <template #title>
  8. <div style="display: inline-flex; align-items: center">
  9. 接入设备
  10. <el-tooltip effect="dark" content="园区接入设备数量" placement="top">
  11. <el-icon style="margin-left: 4px" :size="12">
  12. <Warning />
  13. </el-icon>
  14. </el-tooltip>
  15. </div>
  16. </template>
  17. </el-statistic>
  18. </div>
  19. </el-col>
  20. <el-col :span="4">
  21. <div class="statistic-card">
  22. <el-statistic :value="500">
  23. <template #title>
  24. <div style="display: inline-flex; align-items: center">
  25. 在线设备数
  26. <el-tooltip effect="dark" content="园区接入设备数量" placement="top">
  27. <el-icon style="margin-left: 4px" :size="12">
  28. <Warning />
  29. </el-icon>
  30. </el-tooltip>
  31. </div>
  32. </template>
  33. </el-statistic>
  34. </div>
  35. </el-col>
  36. <el-col :span="4">
  37. <div class="statistic-card">
  38. <el-statistic :value="401">
  39. <template #title>
  40. <div style="display: inline-flex; align-items: center">
  41. 报警次数
  42. <el-tooltip effect="dark" content="园区接入设备数量" placement="top">
  43. <el-icon style="margin-left: 4px" :size="12">
  44. <Warning />
  45. </el-icon>
  46. </el-tooltip>
  47. </div>
  48. </template>
  49. </el-statistic>
  50. </div>
  51. </el-col>
  52. <el-col :span="4">
  53. <div class="statistic-card">
  54. <el-statistic :value="50">
  55. <template #title>
  56. <div style="display: inline-flex; align-items: center">
  57. 有效报警次数
  58. <el-tooltip effect="dark" content="园区接入设备数量" placement="top">
  59. <el-icon style="margin-left: 4px" :size="12">
  60. <Warning />
  61. </el-icon>
  62. </el-tooltip>
  63. </div>
  64. </template>
  65. </el-statistic>
  66. </div>
  67. </el-col>
  68. <el-col :span="4">
  69. <div class="statistic-card">
  70. <el-statistic :value="50">
  71. <template #title>
  72. <div style="display: inline-flex; align-items: center">
  73. 今日用水量(m³)
  74. <el-tooltip effect="dark" content="园区接入设备数量" placement="top">
  75. <el-icon style="margin-left: 4px" :size="12">
  76. <Warning />
  77. </el-icon>
  78. </el-tooltip>
  79. </div>
  80. </template>
  81. </el-statistic>
  82. </div>
  83. </el-col>
  84. <el-col :span="4">
  85. <div class="statistic-card">
  86. <el-statistic :value="5000">
  87. <template #title>
  88. <div style="display: inline-flex; align-items: center">
  89. 今日用电量(kWh)
  90. <el-tooltip effect="dark" content="园区接入设备数量" placement="top">
  91. <el-icon style="margin-left: 4px" :size="12">
  92. <Warning />
  93. </el-icon>
  94. </el-tooltip>
  95. </div>
  96. </template>
  97. </el-statistic>
  98. </div>
  99. </el-col>
  100. </el-row>
  101. <div>
  102. <el-table :data="tableData" stripe style="width: 100%">
  103. <el-table-column prop="id" label="设备编号"/>
  104. <el-table-column prop="name" label="设备名称"/>
  105. <el-table-column prop="sblx" label="设备类型"/>
  106. <el-table-column prop="yxzt" label="运行状态"/>
  107. <el-table-column prop="sccj" label="生成厂家"/>
  108. <el-table-column prop="address" label="设备位置"/>
  109. </el-table>
  110. </div>
  111. </div>
  112. </template>
  113. <script lang="ts" setup>
  114. import {
  115. ArrowRight,
  116. CaretBottom,
  117. CaretTop,
  118. Warning,
  119. } from '@element-plus/icons-vue'
  120. const tableData = [
  121. {
  122. id: '1',
  123. name: '一楼园林水表',
  124. sblx:'水表',
  125. yxzt:'开启',
  126. sccj:'XXX公司',
  127. address: '一楼大厅外面门右侧',
  128. },{
  129. id: '1',
  130. name: '一楼园林水表',
  131. sblx:'水表',
  132. yxzt:'开启',
  133. sccj:'XXX公司',
  134. address: '一楼大厅外面门右侧',
  135. },{
  136. id: '1',
  137. name: '一楼园林水表',
  138. sblx:'水表',
  139. yxzt:'开启',
  140. sccj:'XXX公司',
  141. address: '一楼大厅外面门右侧',
  142. },{
  143. id: '1',
  144. name: '一楼园林水表',
  145. sblx:'水表',
  146. yxzt:'开启',
  147. sccj:'XXX公司',
  148. address: '一楼大厅外面门右侧',
  149. }
  150. ]
  151. </script>
  152. <style scoped>
  153. .yqxf_box {
  154. margin: 20px;
  155. }
  156. :global(h2#card-usage ~ .example .example-showcase) {
  157. background-color: var(--el-fill-color) !important;
  158. }
  159. .el-statistic {
  160. --el-statistic-content-font-size: 28px;
  161. background-color: var(--el-fill-color) !important;
  162. border-radius: 20px;
  163. padding: 20px;
  164. }
  165. .statistic-card {
  166. height: 100%;
  167. padding: 20px;
  168. border-radius: 4px;
  169. background-color: var(--el-bg-color-overlay);
  170. }
  171. .statistic-footer {
  172. display: flex;
  173. justify-content: space-between;
  174. align-items: center;
  175. flex-wrap: wrap;
  176. font-size: 12px;
  177. color: var(--el-text-color-regular);
  178. margin-top: 16px;
  179. }
  180. .statistic-footer .footer-item {
  181. display: flex;
  182. justify-content: space-between;
  183. align-items: center;
  184. }
  185. .statistic-footer .footer-item span:last-child {
  186. display: inline-flex;
  187. align-items: center;
  188. margin-left: 4px;
  189. }
  190. .green {
  191. color: var(--el-color-success);
  192. }
  193. .red {
  194. color: var(--el-color-error);
  195. }
  196. </style>