index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <!--
  2. * @Author: LiZhiWei
  3. * @Date: 2026-01-26 09:26:13
  4. * @LastEditors: LiZhiWei
  5. * @LastEditTime: 2026-01-26 11:08:17
  6. * @Description: 客户案例列表页
  7. -->
  8. <template>
  9. <div class="cases-page bg-#f6f8fd min-h-screen">
  10. <!-- Header/Banner -->
  11. <div class="cases-header py-226px text-center bg-white lt-sm:py-160px">
  12. <div class="landing-container">
  13. <h1 class="font-s-48px text-#000000 pf-sc-semibold lt-sm:font-s-64px">解决方案标杆案例</h1>
  14. </div>
  15. </div>
  16. <!-- Cases List -->
  17. <div class="landing-container py-60px lt-sm:py-120px lt-sm:px-32px">
  18. <div class="flex flex-col gap-40px lt-sm:gap-64px">
  19. <solution-case-card
  20. v-for="(item, index) in pagedCases"
  21. :key="index"
  22. :case-item="item"
  23. class="hover:shadow-lg transition-shadow duration-300"
  24. />
  25. </div>
  26. <!-- Pagination -->
  27. <div class="pagination-wrapper">
  28. <el-pagination
  29. v-model:current-page="currentPage"
  30. :page-size="pageSize"
  31. :total="total"
  32. layout="prev, pager, next, jumper, ->, slot"
  33. background
  34. @current-change="handlePageChange"
  35. ></el-pagination>
  36. </div>
  37. </div>
  38. <section-cta />
  39. </div>
  40. </template>
  41. <script setup lang="ts">
  42. import { solutionPoints } from '@/constants/common'
  43. import { type CaseItem } from '~/components/solution/case-card.vue'
  44. // Flatten all cases from solutions
  45. const allCases = computed<CaseItem[]>(() => {
  46. return solutionPoints.flatMap((solution) => solution.typicalCases?.cases || [])
  47. })
  48. // Pagination
  49. const currentPage = ref(1)
  50. const pageSize = ref(5)
  51. const total = computed(() => allCases.value.length)
  52. const pagedCases = computed(() => {
  53. const start = (currentPage.value - 1) * pageSize.value
  54. const end = start + pageSize.value
  55. return allCases.value.slice(start, end)
  56. })
  57. const handlePageChange = () => {
  58. window.scrollTo({ top: 450, behavior: 'smooth' })
  59. }
  60. useSeoMeta({
  61. title: '客户案例 - 绘家科技',
  62. description: '绘家科技智慧物业解决方案标杆案例,展示数字化转型成果与客户价值。',
  63. })
  64. </script>
  65. <style scoped lang="scss">
  66. .cases-header {
  67. @apply bg-cover bg-center bg-no-repeat;
  68. background-image: url('@/assets/images/solution-cases-bg.png');
  69. }
  70. .pagination-wrapper {
  71. @apply mt-60px flex justify-center lt-sm:mt-80px;
  72. :deep(.el-pagination) {
  73. @apply flex items-center gap-12px flex-nowrap justify-center;
  74. @apply lt-sm:gap-8px;
  75. button,
  76. .el-pager li {
  77. @apply bg-white border border-#E2E8F0 rounded-4px font-s-14px text-#64748B min-w-40px h-40px flex items-center justify-center transition-all duration-300;
  78. @apply lt-sm:min-w-64px lt-sm:h-64px lt-sm:font-s-24px;
  79. &:not(:disabled):not(.disabled):hover {
  80. @apply border-#0F67F8! text-#0F67F8!;
  81. }
  82. &.is-active {
  83. @apply bg-#0F67F8! border-#0F67F8! text-white!;
  84. }
  85. &:disabled,
  86. &.disabled {
  87. @apply opacity-50 cursor-not-allowed bg-white! border-#E2E8F0! text-#64748B!;
  88. }
  89. }
  90. &.is-background {
  91. .btn-prev,
  92. .btn-next {
  93. @apply mx-0!;
  94. }
  95. .el-pager li {
  96. @apply mx-4px!;
  97. }
  98. }
  99. .el-icon {
  100. @apply lt-sm:font-s-24px;
  101. }
  102. .el-pagination__jump {
  103. @apply ml-24px font-s-14px text-#64748B flex items-center gap-8px;
  104. @apply lt-sm:ml-18px lt-sm:font-s-22px lt-sm:gap-8px;
  105. .el-input {
  106. @apply w-56px! mx-0!;
  107. @apply lt-sm:w-80px!;
  108. .el-input__wrapper {
  109. @apply shadow-none! border border-#E2E8F0! px-0! h-40px! rounded-4px!;
  110. @apply lt-sm:h-64px!;
  111. &.is-focus {
  112. @apply border-#0F67F8!;
  113. }
  114. }
  115. input {
  116. @apply text-center! font-s-14px! text-#091221! h-full!;
  117. @apply lt-sm:font-s-24px!;
  118. }
  119. }
  120. .el-pagination__goto,
  121. .el-pagination__classifier {
  122. @apply lt-sm:m-0;
  123. }
  124. }
  125. }
  126. }
  127. </style>