running.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <div class="_running">
  3. <HeadlineTag value="运行统计"></HeadlineTag>
  4. <div class="_running_mains">
  5. <div class="_running_mains_left">
  6. <div class="_running_mains_left_tuan"></div>
  7. <div class="_running_mains_left_conter">
  8. <div class="_running_mains_left_conter_num">62</div>
  9. <div class="_running_mains_left_conter_text">设备总数</div>
  10. </div>
  11. </div>
  12. <div class="_running_mains_right">
  13. <div class="_running_mains_right_item" v-for="item,index in runningList" :key="index">
  14. <div class="_running_mains_right_item_tuan">
  15. <span class="_running_mains_right_item_tuan_flag" :style="{backgroundColor: item.color}"></span>
  16. <el-text class="w-150px mb-2" truncated style="color: #ccc;">
  17. {{item.name}}
  18. </el-text>
  19. </div>
  20. <div class="_running_mains_right_item__txt">
  21. {{item.state}}
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </template>
  28. <script setup>
  29. import { ref } from "vue";
  30. import HeadlineTag from '@/components/HeadlineTag'
  31. const runningList = ref([
  32. { name:'开启数量', state:'61', color:'#15acaa'},
  33. { name:'关闭数量', state:'1', color:'#FFC107'},
  34. { name:'故障数量', state:'0', color:'#F44336'}
  35. ])
  36. </script>
  37. <style lang="scss">
  38. ._running {
  39. &_mains {
  40. margin: 30px;
  41. display: flex;
  42. align-items: center;
  43. &_left {
  44. width: 150px;
  45. height: 150px;
  46. position: relative;
  47. &_tuan{
  48. width: 100%;
  49. height: 100%;
  50. background: url("@/assets/images/content_circle.png");
  51. background-size: 100% 100%;
  52. background-position: center;
  53. background-repeat: no-repeat;
  54. animation: scanning 4s linear infinite;
  55. }
  56. &_conter {
  57. position: absolute;
  58. left: 0;
  59. top: 0;
  60. flex-shrink: 0;
  61. width: 100%;
  62. height: 100%;
  63. display: flex;
  64. flex-direction: column;
  65. align-items: center;
  66. justify-content: center;
  67. color: #fff;
  68. &_num {
  69. font-size: 18px;
  70. }
  71. &_text {
  72. font-size: 12px;
  73. }
  74. }
  75. }
  76. &_right {
  77. margin-left:10px;
  78. flex: 1;
  79. color: #fff;
  80. &_item{
  81. display: flex;
  82. align-items: center;
  83. gap: 40px;
  84. padding: 5px 0;
  85. &_tuan {
  86. display: flex;
  87. align-items: center;
  88. &_flag{
  89. display: block;
  90. width: 7px;
  91. height: 7px;
  92. border-radius: 50%;
  93. margin-right: 10px;
  94. }
  95. }
  96. &__txt{
  97. font-size:24px;
  98. }
  99. }
  100. }
  101. }
  102. }
  103. @keyframes scanning {
  104. to {
  105. transform: rotate(1turn);
  106. }
  107. }
  108. </style>