middleBox.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div class="left-top-box">
  3. <div class="flex gap-15px h-90px">
  4. <div
  5. class="box-style color- flex-1 flex flex-col flex-justify-center flex-items-center gap-2px"
  6. >
  7. <span>监控点位</span>
  8. <Countto class="text-20px color-#389bff font-bold" :endVal="80" />
  9. </div>
  10. <div class="box-style flex-1 flex flex-col flex-justify-center flex-items-center gap-2px">
  11. <span>智能分析</span>
  12. <Countto class="text-20px color-#389bff font-bold" :endVal="60" />
  13. </div>
  14. </div>
  15. <ECharts
  16. id="sbxx-echarts"
  17. width="100%"
  18. height="280px"
  19. :loading="loading"
  20. :fullOptions="{ options: chartOptions.setSbxxOption() }"
  21. />
  22. <!-- <swiper
  23. :spaceBetween="30"
  24. :centeredSlides="true"
  25. :autoplay="{
  26. delay: 5000,
  27. disableOnInteraction: false,
  28. pauseOnMouseEnter: true
  29. }"
  30. :pagination="{
  31. clickable: true
  32. }"
  33. :modules="modules"
  34. class="mySwiper"
  35. >
  36. <swiper-slide>
  37. <ECharts
  38. id="sbxx-echarts"
  39. width="100%"
  40. height="280px"
  41. :loading="loading"
  42. :fullOptions="{ options: chartOptions.setSbxxOption() }"
  43. />
  44. </swiper-slide>
  45. <swiper-slide>
  46. <ECharts
  47. id="sbxx-echarts2"
  48. width="100%"
  49. height="280px"
  50. ref="echartsRef"
  51. :loading="loading"
  52. :fullOptions="{ options: chartOptions.setSbxxOption2() }"
  53. />
  54. </swiper-slide>
  55. </swiper> -->
  56. </div>
  57. </template>
  58. <script setup>
  59. import { chartOptions } from '@/components/ECharts/optionsConfig'
  60. import { Swiper, SwiperSlide } from 'swiper/vue'
  61. import { Autoplay, Pagination, Navigation } from 'swiper/modules'
  62. import 'swiper/css'
  63. import 'swiper/css/pagination'
  64. import 'swiper/css/navigation'
  65. const modules = [Autoplay, Pagination, Navigation]
  66. const loading = ref(true)
  67. const echartsRef = ref(null)
  68. onMounted(() => {
  69. setTimeout(() => {
  70. loading.value = false
  71. }, 1000)
  72. })
  73. </script>
  74. <style scoped lang="scss">
  75. .box-style {
  76. background: url('@/assets/images/box-bg.png') no-repeat center;
  77. background-size: 100% 100%;
  78. }
  79. .left-top-box {
  80. :deep(.swiper) {
  81. width: 100%;
  82. height: 300px;
  83. .swiper-slide {
  84. height: 100%;
  85. }
  86. .swiper-pagination {
  87. --swiper-pagination-bottom: -5px;
  88. }
  89. .swiper-pagination-bullet {
  90. --swiper-pagination-bullet-width: 20px;
  91. --swiper-pagination-bullet-height: 4px;
  92. border-radius: 0;
  93. }
  94. }
  95. }
  96. </style>