index.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <template>
  2. <div class="solve">
  3. <div class="solve-head">
  4. <div class="head-bos">
  5. <div class="nav-bos flex-row-start">
  6. <div v-for="(item, index) in navList" :key="index" class="nav-list" :class="navIndex == index ? 'hig' : ''">
  7. {{ item.title }}
  8. </div>
  9. </div>
  10. <div class="filter-bos">
  11. <div v-for="(item1, index1) in filterListy" :key="index1" class="filter-list flex-row-start">
  12. <div class="filter-title">{{ item1.title }}</div>
  13. <div v-for="(item2, index2) in item1.list" :key="index2" class="filter-item" :class="item1.hig == item2.id ? 'hig' : ''">
  14. {{ item2.title }}
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. <!-- 数据 -->
  21. <div class="data-bos">
  22. <div v-for="(item, index) in 9" :key="index" class="data-list" @click="onPath">
  23. <img class="data-img" src="@/assets/images/login-background.jpg" alt="" />
  24. <div class="data-box flex-column-between">
  25. <div>
  26. <div class="title ellipsis">2025中秋福利 企业团购方案</div>
  27. <div class="info ellipsis">干款好礼·百大品牌·个性定制</div>
  28. </div>
  29. <div class="text flex-row-start">
  30. <div>了解详情</div>
  31. <el-icon color="#e7000b" size="14" style="margin: 0 0 0 10px">
  32. <ArrowRight />
  33. </el-icon>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <!-- 分页 -->
  39. <div class="pagination-bos flex-row-between">
  40. <div></div>
  41. <el-pagination
  42. v-model:current-page="currentPage1"
  43. v-model:page-size="pageSize2"
  44. layout="sizes, prev, pager, next ,jumper"
  45. :total="1000"
  46. @size-change="handleSizeChange"
  47. @current-change="handleCurrentChange"
  48. />
  49. </div>
  50. </div>
  51. </template>
  52. <script setup lang="ts">
  53. const currentPage1 = ref(5);
  54. const pageSize2 = ref(100);
  55. const navList = ref<any>([
  56. { title: '专题分类' },
  57. { title: '大中型企业采购' },
  58. { title: '政府&公共采购' },
  59. { title: '营销福利' },
  60. { title: '商用工程' },
  61. { title: '中小型企业采购' }
  62. ]);
  63. const filterListy = ref<any>([
  64. {
  65. title: '适配场景',
  66. hig: 1,
  67. list: [
  68. { title: '全部', id: 1 },
  69. { title: '1-100', id: 2 },
  70. { title: '100-500', id: 3 },
  71. { title: '1000+', id: 4 }
  72. ]
  73. },
  74. {
  75. title: '适配行业',
  76. hig: 1,
  77. list: [
  78. { title: '全部', id: 1 },
  79. { title: '食品饮料', id: 2 },
  80. { title: '食品饮料', id: 3 },
  81. { title: '食品饮料', id: 4 }
  82. ]
  83. },
  84. {
  85. title: '价格区间',
  86. hig: 1,
  87. list: [
  88. { title: '全部', id: 1 },
  89. { title: '香港小熊', id: 2 }
  90. ]
  91. },
  92. {
  93. title: '推荐标签',
  94. hig: 1,
  95. list: [
  96. { title: '全部', id: 1 },
  97. { title: '香港小熊', id: 2 }
  98. ]
  99. }
  100. ]);
  101. const navIndex = ref(0);
  102. const router = useRouter();
  103. const handleSizeChange = (val: number) => {
  104. console.log(`${val} items per page`);
  105. };
  106. const handleCurrentChange = (val: number) => {
  107. console.log(`current page: ${val}`);
  108. };
  109. const onPath = () => {
  110. router.push('/solve/info');
  111. };
  112. </script>
  113. <style lang="scss" scoped>
  114. .solve {
  115. width: 100%;
  116. .solve-head {
  117. width: 100%;
  118. background: #ffffff;
  119. .head-bos {
  120. width: 1200px;
  121. margin: 0 auto;
  122. padding-bottom: 20px;
  123. }
  124. }
  125. .nav-bos {
  126. border-bottom: 1px solid #e5e7eb;
  127. width: 1200px;
  128. padding-bottom: 20px;
  129. .nav-list {
  130. height: 32px;
  131. padding: 0 12px;
  132. background: #f7f8fa;
  133. border-radius: 2px 2px 2px 2px;
  134. font-size: 14px;
  135. color: #4e5969;
  136. margin-right: 8px;
  137. line-height: 32px;
  138. cursor: pointer;
  139. &.hig {
  140. background: #ffe8e8;
  141. color: #e7000b;
  142. }
  143. &:hover {
  144. color: #e7000b;
  145. }
  146. }
  147. }
  148. .filter-bos {
  149. .filter-list {
  150. margin-top: 20px;
  151. .filter-title {
  152. font-size: 14px;
  153. color: #101828;
  154. margin-right: 40px;
  155. }
  156. .filter-item {
  157. font-size: 14px;
  158. color: #364153;
  159. margin-right: 30px;
  160. cursor: pointer;
  161. &.hig {
  162. color: #e7000b;
  163. }
  164. }
  165. }
  166. }
  167. // 数据
  168. .data-bos {
  169. width: 1200px;
  170. margin: 0 auto;
  171. display: flex;
  172. gap: 20px;
  173. flex-wrap: wrap;
  174. padding: 22px 0 40px 0;
  175. .data-list {
  176. width: 386px;
  177. height: 302px;
  178. background: #ffffff;
  179. border-radius: 10px;
  180. overflow: hidden;
  181. cursor: pointer;
  182. .data-img {
  183. height: 200px;
  184. width: 386px;
  185. }
  186. .data-box {
  187. height: 102px;
  188. width: 386px;
  189. padding: 12px 20px;
  190. .title {
  191. font-weight: 600;
  192. font-size: 14px;
  193. color: #101828;
  194. }
  195. .info {
  196. font-size: 12px;
  197. color: #364153;
  198. margin-top: 4px;
  199. }
  200. .text {
  201. font-size: 14px;
  202. color: #e7000b;
  203. }
  204. }
  205. }
  206. }
  207. //分页
  208. .pagination-bos {
  209. width: 1200px;
  210. margin: 0 auto;
  211. padding-bottom: 60px;
  212. :deep(.el-select__wrapper) {
  213. background: #f4f4f4;
  214. box-shadow: 0 0 0 1px #e5e6eb inset;
  215. border-radius: 2px;
  216. }
  217. :deep(.el-select__placeholder) {
  218. color: #1d2129;
  219. }
  220. :deep(.el-input__wrapper) {
  221. background: #f4f4f4;
  222. box-shadow: 0 0 0 1px #e5e6eb inset;
  223. border-radius: 2px;
  224. }
  225. :deep(.el-input__inner) {
  226. color: #1d2129;
  227. }
  228. :deep(.btn-prev) {
  229. background: #f4f4f4;
  230. border: 1px solid #e5e6eb;
  231. margin-right: 8px;
  232. }
  233. :deep(.btn-next) {
  234. background: #f4f4f4;
  235. border: 1px solid #e5e6eb;
  236. margin-left: 8px;
  237. }
  238. :deep(.el-pager) {
  239. gap: 0 8px;
  240. li {
  241. background: #f4f4f4;
  242. border: 1px solid #e5e6eb;
  243. color: #1d2129;
  244. }
  245. }
  246. }
  247. }
  248. </style>