earlyWarning.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <div class="person_box">
  3. <div class="left_warning center_in">
  4. <div class="warning_card center_in">
  5. <svg class="warning_icon_star" aria-hidden="true">
  6. <defs>
  7. <linearGradient id="myGradient" x1="0%" y1="100%" x2="0%" y2="0%">
  8. <stop offset="0%" stop-color="rgb(20, 188, 244)" />
  9. <stop offset="100%" stop-color="#ffffff" />
  10. </linearGradient>
  11. </defs>
  12. <use xlink:href="#icon-user" fill="url('#myGradient')" />
  13. </svg>
  14. </div>
  15. </div>
  16. <div class="right_warning">
  17. <div class="box_equipment">
  18. <span class="equi_title">网络设备</span>
  19. <span class="equi_num">389</span>
  20. </div>
  21. <div class="box_early_warn">
  22. <div class="space_between_in card_eary">
  23. <div class="type_title_early">正常</div>
  24. <div class="type_num_early">343个</div>
  25. </div>
  26. <el-progress :percentage="50" :text-inside="true" color="rgb(100, 178, 161)" />
  27. </div>
  28. <div class="box_early_warn">
  29. <div class="space_between_in card_eary">
  30. <div class="type_title_early">故障</div>
  31. <div class="type_num_early">33个</div>
  32. </div>
  33. <el-progress :percentage="50" :text-inside="true" color="rgb(230, 162, 60)" />
  34. </div>
  35. <div class="box_early_warn">
  36. <div class="space_between_in card_eary">
  37. <div class="type_title_early">离线</div>
  38. <div class="type_num_early">0个</div>
  39. </div>
  40. <el-progress :percentage="50" :text-inside="true" color="rgb(245, 108, 108)" />
  41. </div>
  42. </div>
  43. </div>
  44. </template>
  45. <script setup>
  46. defineProps({
  47. title: {
  48. type: String,
  49. default: '暂无数据'
  50. }
  51. })
  52. // 生命周期
  53. onMounted(() => {
  54. });
  55. </script>
  56. <style scoped lang="scss">
  57. .person_box {
  58. width: 100%;
  59. height: 100%;
  60. display: flex;
  61. align-items: center;
  62. }
  63. .left_warning {
  64. width: 100px;
  65. }
  66. .right_warning {
  67. display: flex;
  68. flex-direction: column;
  69. justify-content: center;
  70. flex: 1;
  71. height: 100%;
  72. padding-left: 20px;
  73. }
  74. .box_equipment {
  75. display: flex;
  76. align-items: center;
  77. justify-content: center;
  78. border-radius: 20px;
  79. width: 100%;
  80. height: 40px;
  81. border: 1px solid rgb(48 69 129);
  82. }
  83. .box_early_warn {
  84. margin-top: 10px;
  85. margin-bottom: 20px;
  86. }
  87. .equi_title {
  88. font-size: 18px;
  89. font-weight: bold;
  90. line-height: 30px;
  91. font-weight: bold;
  92. background-image: -webkit-linear-gradient(bottom, rgb(143, 190, 224), rgb(245 245 245));
  93. -webkit-background-clip: text;
  94. -webkit-text-fill-color: transparent;
  95. }
  96. .equi_num {
  97. font-size: 18px;
  98. color: #fff;
  99. margin-left: 20px;
  100. line-height: 30px;
  101. }
  102. .card_eary {
  103. margin-bottom: 8px;
  104. }
  105. .type_title_early {
  106. font-size: 16px;
  107. font-weight: bold;
  108. background-image: -webkit-linear-gradient(bottom, rgb(143, 190, 224), rgb(245 245 245));
  109. -webkit-background-clip: text;
  110. -webkit-text-fill-color: transparent;
  111. }
  112. .type_num_early {
  113. font-size: 16px;
  114. }
  115. .warning_card {
  116. width: 90px;
  117. height: 90px;
  118. border-radius: 50%;
  119. background-color: rgb(9, 29, 56);
  120. box-shadow: inset 0px 0px 20px 3px rgb(14 67 117);
  121. border: 1px solid rgb(135, 152, 189);
  122. }
  123. .warning_icon_star {
  124. width: 40px;
  125. height: 40px;
  126. }
  127. </style>
  128. <style lang="scss" scoped>
  129. :deep(.el-progress__text) {
  130. color: #ffffff !important;
  131. }
  132. :deep(.el-progress-bar__outer) {
  133. overflow: unset !important;
  134. }
  135. :deep(.el-progress-bar__innerText) {
  136. position: absolute;
  137. left: 0;
  138. bottom: -16px;
  139. }
  140. </style>