index.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <template>
  2. <div class="company-home">
  3. <customHeader>{{ mainTitle }}</customHeader>
  4. <div class="company-content">
  5. <div class="content-item item-1">
  6. <infoBox class="infoBox1">
  7. <template #title> 系统数据量 </template>
  8. <template #container>
  9. <div class="content-wrapper wrapper-1 grid">
  10. <div class="data-item">
  11. <div class="item-icon icon1"></div>
  12. <div>
  13. <div class="label">接入系统数量</div>
  14. <div class="value">262 </div>
  15. </div>
  16. </div>
  17. <div class="data-item">
  18. <div class="item-icon icon2"></div>
  19. <div>
  20. <div class="label">接入点位数量</div>
  21. <div class="value status-normal">14521</div>
  22. </div>
  23. </div>
  24. <div class="data-item">
  25. <div class="item-icon icon3"></div>
  26. <div>
  27. <div class="label">数据存储量</div>
  28. <div class="value status-normal">14521</div>
  29. </div>
  30. </div>
  31. <div class="data-item">
  32. <div class="item-icon icon4"></div>
  33. <div>
  34. <div class="label">消息总数量(条)</div>
  35. <div class="value status-normal">14521</div>
  36. </div>
  37. </div>
  38. <div class="data-item">
  39. <div class="item-icon icon5"></div>
  40. <div>
  41. <div class="label">共享接口数量</div>
  42. <div class="value status-normal">14521</div>
  43. </div>
  44. </div>
  45. </div>
  46. </template>
  47. </infoBox>
  48. </div>
  49. <div class="content-item item-2 grid">
  50. <infoBox class="infoBox2">
  51. <template #title> 每日采集数据量 </template>
  52. <template #container>
  53. <div class="content-wrapper">
  54. <CustomChart :chart-config="dailyNumOption" :chart-data="dailyNumData" height="250px" />
  55. </div>
  56. </template>
  57. </infoBox>
  58. <infoBox class="infoBox3">
  59. <template #title> 系统数据量排名 </template>
  60. <template #container>
  61. <div class="content-wrapper">
  62. <a-table size="small" :dataSource="sysData" :columns="sysDataColumn" :pagination="false" />
  63. </div>
  64. </template>
  65. </infoBox>
  66. </div>
  67. <div class="content-item item-3">
  68. <infoBox class="infoBox4">
  69. <template #title> 系统接入情况 </template>
  70. <template #container>
  71. <div class="content-wrapper">
  72. <a-table size="small" :dataSource="accessStatusData" :columns="accessStatusColumn" :pagination="false">
  73. <template #action="{ record }">
  74. <div class="option-cont">
  75. <div class="view-icon"></div>
  76. <a class="table-action-link" @click="viewData(record)">查看数据</a>
  77. </div>
  78. </template>
  79. </a-table>
  80. </div>
  81. </template>
  82. </infoBox>
  83. </div>
  84. </div>
  85. </div>
  86. </template>
  87. <script lang="ts" setup>
  88. import { ref } from 'vue';
  89. import customHeader from '/@/components/vent/customHeader.vue';
  90. import infoBox from './components/infoBox.vue';
  91. import { sysDataColumn, sysData, accessStatusColumn, accessStatusData, dailyNumOption, dailyNumData } from './infoCenter.data';
  92. import CustomChart from '@/views/vent/home/configurable/components/detail/CustomChart.vue';
  93. let mainTitle = ref('智能通风数据中心');
  94. function viewData(record) {
  95. console.log(record);
  96. }
  97. </script>
  98. <style lang="less" scoped>
  99. @font-face {
  100. font-family: 'douyuFont';
  101. src: url('@/assets/font/douyuFont.otf');
  102. }
  103. .company-home {
  104. width: 100%;
  105. height: 100%;
  106. position: relative;
  107. :deep(.vent-home-header) {
  108. height: 50px;
  109. background: url('@/assets/images/vent/home/modal-top.png') no-repeat center;
  110. background-size: 100% 100%;
  111. }
  112. .company-content {
  113. position: absolute;
  114. left: 0;
  115. width: 100%;
  116. height: calc(100% - 50px);
  117. padding: 20px 20px 10px 20px;
  118. --image-border1: url('/@/assets/images/dataCenter/infoCenter/info-border1.png');
  119. --image-border2: url('/@/assets/images/dataCenter/infoCenter/info-border2.png');
  120. --image-border3: url('/@/assets/images/dataCenter/infoCenter/info-border3.png');
  121. --image-border4: url('/@/assets/images/dataCenter/infoCenter/info-border4.png');
  122. --image-split-line: url('/@/assets/images/dataCenter/infoCenter/split-line.png');
  123. --image-rank: url('/@/assets/images/dataCenter/infoCenter/rank-bg.png');
  124. .content-item {
  125. width: 100%;
  126. overflow: hidden;
  127. padding-bottom: 20px;
  128. }
  129. .item-1 {
  130. height: 20%;
  131. }
  132. .item-2 {
  133. height: 40%;
  134. grid-template-columns: 6fr 4fr;
  135. gap: 20px;
  136. :deep(table) {
  137. border-collapse: separate !important;
  138. border-spacing: 0 10px !important;
  139. .zxm-table-thead {
  140. height: 35px;
  141. background-color: unset !important;
  142. .zxm-table-cell {
  143. color: #66ffff !important;
  144. }
  145. }
  146. .zxm-table-tbody {
  147. background-color: unset !important;
  148. }
  149. .zxm-table-cell {
  150. border: none !important;
  151. background: none !important;
  152. padding: 0px;
  153. }
  154. tr {
  155. background: var(--image-rank) no-repeat !important;
  156. background-size: 100% 100% !important;
  157. }
  158. }
  159. }
  160. .item-3 {
  161. height: 40%;
  162. padding-bottom: 0;
  163. :deep(table) {
  164. border-collapse: collapse !important;
  165. // border-spacing: 0 10px !important;
  166. .zxm-table-thead {
  167. height: 35px;
  168. background-color: #0b2542 !important;
  169. border: 1px solid #1f7eb5;
  170. .zxm-table-cell {
  171. border: none !important;
  172. color: #37e0eb !important;
  173. }
  174. }
  175. .zxm-table-tbody {
  176. .zxm-table-row:nth-child(odd) {
  177. background-color: #0e3455;
  178. }
  179. /* 偶数行背景色 */
  180. .zxm-table-row:nth-child(even) {
  181. background-color: #114268 !important;
  182. }
  183. .zxm-table-cell {
  184. border: none !important;
  185. background: none !important;
  186. }
  187. }
  188. }
  189. }
  190. .infoBox1 {
  191. background-color: var(--image-border1) no-repeat;
  192. }
  193. .infoBox2 {
  194. background-color: var(--image-border2) no-repeat;
  195. }
  196. .infoBox3 {
  197. background-color: var(--image-border3) no-repeat;
  198. }
  199. .infoBox4 {
  200. background-color: var(--image-border4) no-repeat;
  201. }
  202. }
  203. .wrapper-1 {
  204. grid-template-columns: repeat(5, 1fr);
  205. .data-item {
  206. display: flex;
  207. align-items: center;
  208. justify-content: center;
  209. position: relative;
  210. &::after {
  211. position: absolute;
  212. right: 1px;
  213. top: 5px;
  214. display: block;
  215. width: 2px;
  216. height: 100%;
  217. background: var(--image-split-line);
  218. content: '';
  219. }
  220. &:last-child::after {
  221. display: none;
  222. }
  223. .value {
  224. font-family: 'douyuFont';
  225. color: #66ffff;
  226. margin-top: 20px;
  227. }
  228. .item-icon {
  229. width: 80px;
  230. height: 80px;
  231. background-size: 100% 100%;
  232. margin-right: 15px;
  233. }
  234. .icon1 {
  235. background-image: url('/@/assets/images/dataCenter/infoCenter/icon1.png');
  236. }
  237. .icon2 {
  238. background-image: url('/@/assets/images/dataCenter/infoCenter/icon2.png');
  239. }
  240. .icon3 {
  241. background-image: url('/@/assets/images/dataCenter/infoCenter/icon3.png');
  242. }
  243. .icon4 {
  244. background-image: url('/@/assets/images/dataCenter/infoCenter/icon4.png');
  245. }
  246. .icon5 {
  247. background-image: url('/@/assets/images/dataCenter/infoCenter/icon5.png');
  248. }
  249. }
  250. }
  251. .option-cont {
  252. display: flex;
  253. justify-content: center;
  254. align-items: center;
  255. .view-icon {
  256. width: 20px;
  257. height: 20px;
  258. background-image: url('/@/assets/images/dataCenter/infoCenter/view-icon.png');
  259. background-repeat: no-repeat;
  260. background-size: contain;
  261. background-position: center;
  262. }
  263. }
  264. }
  265. </style>