| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- <template>
- <div class="solve">
- <div class="solve-head">
- <div class="head-bos">
- <div class="nav-bos flex-row-start">
- <div v-for="(item, index) in navList" :key="index" class="nav-list" :class="navIndex == index ? 'hig' : ''">
- {{ item.title }}
- </div>
- </div>
- <div class="filter-bos">
- <div v-for="(item1, index1) in filterListy" :key="index1" class="filter-list flex-row-start">
- <div class="filter-title">{{ item1.title }}</div>
- <div v-for="(item2, index2) in item1.list" :key="index2" class="filter-item" :class="item1.hig == item2.id ? 'hig' : ''">
- {{ item2.title }}
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 数据 -->
- <div class="data-bos">
- <div v-for="(item, index) in 9" :key="index" class="data-list" @click="onPath">
- <img class="data-img" src="@/assets/images/login-background.jpg" alt="" />
- <div class="data-box flex-column-between">
- <div>
- <div class="title ellipsis">2025中秋福利 企业团购方案</div>
- <div class="info ellipsis">干款好礼·百大品牌·个性定制</div>
- </div>
- <div class="text flex-row-start">
- <div>了解详情</div>
- <el-icon color="#e7000b" size="14" style="margin: 0 0 0 10px">
- <ArrowRight />
- </el-icon>
- </div>
- </div>
- </div>
- </div>
- <!-- 分页 -->
- <div class="pagination-bos flex-row-between">
- <div></div>
- <el-pagination
- v-model:current-page="currentPage1"
- v-model:page-size="pageSize2"
- layout="sizes, prev, pager, next ,jumper"
- :total="1000"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- />
- </div>
- </div>
- </template>
- <script setup lang="ts">
- const currentPage1 = ref(5);
- const pageSize2 = ref(100);
- const navList = ref<any>([
- { title: '专题分类' },
- { title: '大中型企业采购' },
- { title: '政府&公共采购' },
- { title: '营销福利' },
- { title: '商用工程' },
- { title: '中小型企业采购' }
- ]);
- const filterListy = ref<any>([
- {
- title: '适配场景',
- hig: 1,
- list: [
- { title: '全部', id: 1 },
- { title: '1-100', id: 2 },
- { title: '100-500', id: 3 },
- { title: '1000+', id: 4 }
- ]
- },
- {
- title: '适配行业',
- hig: 1,
- list: [
- { title: '全部', id: 1 },
- { title: '食品饮料', id: 2 },
- { title: '食品饮料', id: 3 },
- { title: '食品饮料', id: 4 }
- ]
- },
- {
- title: '价格区间',
- hig: 1,
- list: [
- { title: '全部', id: 1 },
- { title: '香港小熊', id: 2 }
- ]
- },
- {
- title: '推荐标签',
- hig: 1,
- list: [
- { title: '全部', id: 1 },
- { title: '香港小熊', id: 2 }
- ]
- }
- ]);
- const navIndex = ref(0);
- const router = useRouter();
- const handleSizeChange = (val: number) => {
- console.log(`${val} items per page`);
- };
- const handleCurrentChange = (val: number) => {
- console.log(`current page: ${val}`);
- };
- const onPath = () => {
- router.push('/solve/info');
- };
- </script>
- <style lang="scss" scoped>
- .solve {
- width: 100%;
- .solve-head {
- width: 100%;
- background: #ffffff;
- .head-bos {
- width: 1200px;
- margin: 0 auto;
- padding-bottom: 20px;
- }
- }
- .nav-bos {
- border-bottom: 1px solid #e5e7eb;
- width: 1200px;
- padding-bottom: 20px;
- .nav-list {
- height: 32px;
- padding: 0 12px;
- background: #f7f8fa;
- border-radius: 2px 2px 2px 2px;
- font-size: 14px;
- color: #4e5969;
- margin-right: 8px;
- line-height: 32px;
- cursor: pointer;
- &.hig {
- background: #ffe8e8;
- color: #e7000b;
- }
- &:hover {
- color: #e7000b;
- }
- }
- }
- .filter-bos {
- .filter-list {
- margin-top: 20px;
- .filter-title {
- font-size: 14px;
- color: #101828;
- margin-right: 40px;
- }
- .filter-item {
- font-size: 14px;
- color: #364153;
- margin-right: 30px;
- cursor: pointer;
- &.hig {
- color: #e7000b;
- }
- }
- }
- }
- // 数据
- .data-bos {
- width: 1200px;
- margin: 0 auto;
- display: flex;
- gap: 20px;
- flex-wrap: wrap;
- padding: 22px 0 40px 0;
- .data-list {
- width: 386px;
- height: 302px;
- background: #ffffff;
- border-radius: 10px;
- overflow: hidden;
- cursor: pointer;
- .data-img {
- height: 200px;
- width: 386px;
- }
- .data-box {
- height: 102px;
- width: 386px;
- padding: 12px 20px;
- .title {
- font-weight: 600;
- font-size: 14px;
- color: #101828;
- }
- .info {
- font-size: 12px;
- color: #364153;
- margin-top: 4px;
- }
- .text {
- font-size: 14px;
- color: #e7000b;
- }
- }
- }
- }
- //分页
- .pagination-bos {
- width: 1200px;
- margin: 0 auto;
- padding-bottom: 60px;
- :deep(.el-select__wrapper) {
- background: #f4f4f4;
- box-shadow: 0 0 0 1px #e5e6eb inset;
- border-radius: 2px;
- }
- :deep(.el-select__placeholder) {
- color: #1d2129;
- }
- :deep(.el-input__wrapper) {
- background: #f4f4f4;
- box-shadow: 0 0 0 1px #e5e6eb inset;
- border-radius: 2px;
- }
- :deep(.el-input__inner) {
- color: #1d2129;
- }
- :deep(.btn-prev) {
- background: #f4f4f4;
- border: 1px solid #e5e6eb;
- margin-right: 8px;
- }
- :deep(.btn-next) {
- background: #f4f4f4;
- border: 1px solid #e5e6eb;
- margin-left: 8px;
- }
- :deep(.el-pager) {
- gap: 0 8px;
- li {
- background: #f4f4f4;
- border: 1px solid #e5e6eb;
- color: #1d2129;
- }
- }
- }
- }
- </style>
|