2025-04-14 02:33:18 +01:00
|
|
|
<template>
|
2025-05-28 14:20:07 +08:00
|
|
|
<!-- <page-layout :menus="state.menus"> </page-layout>-->
|
|
|
|
<section>
|
|
|
|
<common>
|
|
|
|
<template #main>
|
|
|
|
<el-card shadow="none" style="border-radius: 14px">
|
|
|
|
<div class="tabs">
|
2025-05-30 14:18:54 +08:00
|
|
|
<div class="tab" style="color: rgba(153, 153, 153, 1)">仓储分类</div>
|
2025-05-28 14:20:07 +08:00
|
|
|
<div class="tab cursor" :class="{ active: currentTab === 0 }" @click.stop="currentTab = 0">普通仓库</div>
|
2025-05-30 14:18:54 +08:00
|
|
|
<!-- <div class="tab cursor" :class="{ active: currentTab === 1 }" @click.stop="currentTab = 1">恒温仓库</div>-->
|
2025-05-28 14:20:07 +08:00
|
|
|
<div class="tab cursor" :class="{ active: currentTab === 2 }" @click.stop="currentTab = 2">冷库</div>
|
2025-05-30 14:18:54 +08:00
|
|
|
<!-- <div class="tab cursor" :class="{ active: currentTab === 3 }" @click.stop="currentTab = 3">气调仓库</div>-->
|
2025-05-28 14:20:07 +08:00
|
|
|
<div class="tab"> </div>
|
|
|
|
</div>
|
|
|
|
</el-card>
|
|
|
|
<el-row :gutter="20" style="margin-top: 10px">
|
|
|
|
<el-col v-for="(item, index) in state.data" :key="index" :span="12">
|
|
|
|
<el-card class="storage-card" shadow="hover">
|
|
|
|
<div class="storage-content">
|
|
|
|
<div class="storage-content-top" @click="toLink(item)">
|
2025-05-30 14:18:54 +08:00
|
|
|
<el-image :src="item.imgPath" fit="cover" class="storage-image" />
|
2025-05-28 14:20:07 +08:00
|
|
|
<div class="storage-info">
|
2025-05-30 14:18:54 +08:00
|
|
|
<h3 class="storage-title">{{ item.name }}</h3>
|
2025-05-28 14:20:07 +08:00
|
|
|
<div class="storage-desc">
|
2025-05-30 14:18:54 +08:00
|
|
|
<span>{{ item.parentTitle }}</span>
|
2025-05-28 14:20:07 +08:00
|
|
|
<img :src="getAssetsFile('images/warehouseLogistics/认证.png')" alt="" style="width: 20px" />
|
|
|
|
<img :src="getAssetsFile('images/warehouseLogistics/优先级.png')" alt="" style="width: 20px" />
|
|
|
|
</div>
|
|
|
|
<div class="storage-tags">
|
2025-05-30 14:18:54 +08:00
|
|
|
<el-tag
|
|
|
|
v-for="(tags, indexT) in item.tag"
|
|
|
|
:key="indexT"
|
|
|
|
effect="plain"
|
|
|
|
round
|
|
|
|
style="background-color: rgba(37, 191, 130, 0.2); color: #25bf82"
|
|
|
|
>
|
|
|
|
{{ tags }}
|
|
|
|
</el-tag>
|
|
|
|
<!-- <el-tag effect="plain" round style="background-color: rgba(37, 191, 130, 0.2); color: #25bf82">保鲜储存</el-tag>-->
|
2025-05-28 14:20:07 +08:00
|
|
|
</div>
|
|
|
|
<div class="storage-location">
|
|
|
|
<el-icon><Location /></el-icon>
|
2025-05-30 14:18:54 +08:00
|
|
|
{{ item.address }}
|
2025-05-28 14:20:07 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2025-04-14 02:33:18 +01:00
|
|
|
</div>
|
2025-05-28 14:20:07 +08:00
|
|
|
<div class="storage-price">
|
|
|
|
<div class="storage-price-left">
|
|
|
|
<span class="price-label">报价</span>
|
2025-05-30 14:18:54 +08:00
|
|
|
<span class="price-amount"
|
|
|
|
>¥{{ item.price }}/{{ item.priceSpec === 1 ? 'm³' : item.priceSpec === 2 ? '间' : item.priceSpec === 3 ? '㎡' : '' }}/{{
|
|
|
|
item.timeSpec === 1 ? '天' : item.timeSpec === 2 ? '月' : item.timeSpec === 3 ? '年' : ''
|
|
|
|
}}
|
|
|
|
</span>
|
2025-05-28 14:20:07 +08:00
|
|
|
</div>
|
|
|
|
<el-button type="success" class="contact-btn">
|
|
|
|
<img :src="getAssetsFile('images/warehouseLogistics/messageBox.png')" alt="" style="height: 30px; margin-right: 5px" />
|
|
|
|
<span>联系卖家</span>
|
|
|
|
</el-button>
|
2025-04-14 02:33:18 +01:00
|
|
|
</div>
|
2025-05-28 14:20:07 +08:00
|
|
|
<div v-if="item.rank" class="rank-badge">
|
|
|
|
<!-- {{ item.rank }}-->
|
|
|
|
<img :src="getAssetsFile('images/warehouseLogistics/top' + item.rank + '.png')" alt="" style="width: 80px" />
|
2025-04-14 02:33:18 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2025-05-28 14:20:07 +08:00
|
|
|
</el-card>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<page-pagination :total="20" @current-change="currentChange" />
|
|
|
|
</template>
|
|
|
|
</common>
|
|
|
|
</section>
|
2025-04-14 02:33:18 +01:00
|
|
|
</template>
|
|
|
|
<script setup name="page-menu">
|
2025-05-30 14:18:54 +08:00
|
|
|
import { ref, reactive, watch, onMounted } from 'vue';
|
2025-04-14 02:33:18 +01:00
|
|
|
import { getAssetsFile } from '@/utils';
|
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
2025-05-30 14:18:54 +08:00
|
|
|
import { warehouseList } from '@/apis/warehouseLogistics.js';
|
2025-04-14 02:33:18 +01:00
|
|
|
import warehouseLogisticsRoutes from '@/router/modules/warehouseLogistics';
|
2025-05-28 14:20:07 +08:00
|
|
|
import Common from '../components/common.vue';
|
2025-05-30 14:18:54 +08:00
|
|
|
import { useGetCommonData } from '@/store/modules/common.js';
|
2025-05-28 16:51:38 +08:00
|
|
|
import { storeToRefs } from 'pinia';
|
|
|
|
const store = useGetCommonData();
|
|
|
|
const { data } = storeToRefs(store);
|
2025-04-14 02:33:18 +01:00
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
const state = reactive({
|
|
|
|
menus: warehouseLogisticsRoutes[0].children,
|
|
|
|
query: {
|
|
|
|
current: 1,
|
|
|
|
},
|
|
|
|
data: [
|
|
|
|
{
|
|
|
|
imageUrl: '/storage1.jpg',
|
|
|
|
title: '果蔬保鲜仓储',
|
|
|
|
description: '绿鲜蔬选果蔬仓储中心 ',
|
|
|
|
location: '临沧市-耿马县',
|
|
|
|
price: '600.0',
|
|
|
|
rank: '1',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
imageUrl: '/storage2.jpg',
|
|
|
|
title: '果蔬保鲜仓储',
|
|
|
|
description: '绿鲜蔬选果蔬仓储中心',
|
|
|
|
location: '临沧市-耿马县',
|
|
|
|
price: '600.0',
|
2025-05-28 11:43:31 +08:00
|
|
|
rank: '2',
|
2025-04-14 02:33:18 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
imageUrl: '/storage3.jpg',
|
|
|
|
title: '果蔬保鲜仓储',
|
|
|
|
description: '绿鲜蔬选果蔬仓储中心 ',
|
|
|
|
location: '临沧市-耿马县',
|
|
|
|
price: '600.0',
|
|
|
|
rank: '3',
|
|
|
|
},
|
2025-05-28 14:20:07 +08:00
|
|
|
{
|
|
|
|
imageUrl: '/storage3.jpg',
|
|
|
|
title: '果蔬保鲜仓储',
|
|
|
|
description: '绿鲜蔬选果蔬仓储中心 ',
|
|
|
|
location: '临沧市-耿马县',
|
|
|
|
price: '600.0',
|
|
|
|
rank: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
imageUrl: '/storage3.jpg',
|
|
|
|
title: '果蔬保鲜仓储',
|
|
|
|
description: '绿鲜蔬选果蔬仓储中心 ',
|
|
|
|
location: '临沧市-耿马县',
|
|
|
|
price: '600.0',
|
|
|
|
rank: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
imageUrl: '/storage3.jpg',
|
|
|
|
title: '果蔬保鲜仓储',
|
|
|
|
description: '绿鲜蔬选果蔬仓储中心 ',
|
|
|
|
location: '临沧市-耿马县',
|
|
|
|
price: '600.0',
|
|
|
|
rank: '',
|
|
|
|
},
|
2025-04-14 02:33:18 +01:00
|
|
|
],
|
|
|
|
});
|
|
|
|
|
2025-05-30 14:18:54 +08:00
|
|
|
onMounted(() => {
|
|
|
|
warehouseList().then((res) => {
|
|
|
|
state.data = [];
|
|
|
|
if (res.code === 200) {
|
|
|
|
state.data = res.data.records;
|
|
|
|
for (let i in state.data) {
|
|
|
|
state.data[i].tag = state.data[i].tags.split(',');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2025-05-28 14:20:07 +08:00
|
|
|
const currentTab = ref(0);
|
|
|
|
|
2025-04-14 02:33:18 +01:00
|
|
|
const currentChange = (current) => {
|
|
|
|
state.query.current = current;
|
|
|
|
};
|
|
|
|
|
|
|
|
const toLink = (row) => {
|
2025-05-30 17:30:23 +08:00
|
|
|
router.push({
|
|
|
|
name: 'warehouse-detail',
|
|
|
|
query: { id: row?.id ?? '100' },
|
|
|
|
});
|
2025-04-14 02:33:18 +01:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
2025-05-28 14:20:07 +08:00
|
|
|
.tabs {
|
|
|
|
height: 50px;
|
|
|
|
line-height: 50px;
|
|
|
|
display: flex;
|
|
|
|
font-size: 18px;
|
2025-05-30 14:18:54 +08:00
|
|
|
justify-content: flex-start;
|
2025-05-28 14:20:07 +08:00
|
|
|
padding: 0 20px;
|
2025-05-30 14:18:54 +08:00
|
|
|
.tab {
|
|
|
|
margin: 0 20px;
|
|
|
|
}
|
2025-05-28 14:20:07 +08:00
|
|
|
}
|
|
|
|
.cursor {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
.active {
|
|
|
|
color: rgba(37, 191, 130, 1);
|
|
|
|
}
|
2025-04-14 02:33:18 +01:00
|
|
|
.storage-card {
|
|
|
|
position: relative;
|
|
|
|
overflow: hidden;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
border: 0;
|
2025-05-20 13:05:37 +08:00
|
|
|
border-radius: 24px;
|
2025-04-14 02:33:18 +01:00
|
|
|
}
|
|
|
|
.storage-content {
|
2025-05-20 13:05:37 +08:00
|
|
|
@include flex-column;
|
2025-04-14 02:33:18 +01:00
|
|
|
|
2025-05-20 13:05:37 +08:00
|
|
|
gap: 16px;
|
2025-04-14 02:33:18 +01:00
|
|
|
&-top {
|
2025-05-20 13:05:37 +08:00
|
|
|
@include flex-row;
|
|
|
|
|
2025-04-14 02:33:18 +01:00
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.storage-image {
|
2025-05-20 13:05:37 +08:00
|
|
|
margin-right: 16px;
|
2025-04-14 02:33:18 +01:00
|
|
|
width: 120px;
|
|
|
|
height: 120px;
|
|
|
|
border-radius: 8px;
|
|
|
|
object-fit: cover;
|
|
|
|
}
|
|
|
|
.storage-info {
|
|
|
|
padding-right: 50px;
|
|
|
|
flex: 1;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
.storage-title,
|
|
|
|
.storage-desc,
|
|
|
|
.storage-tags,
|
|
|
|
.storage-location {
|
|
|
|
overflow: hidden;
|
2025-05-20 13:05:37 +08:00
|
|
|
margin: 10px 0;
|
|
|
|
width: 100%;
|
2025-04-14 02:33:18 +01:00
|
|
|
}
|
|
|
|
.storage-title {
|
|
|
|
font-size: 20px;
|
|
|
|
font-weight: 700;
|
2025-05-20 13:05:37 +08:00
|
|
|
color: #000000;
|
|
|
|
@include ellipsis;
|
2025-04-14 02:33:18 +01:00
|
|
|
}
|
|
|
|
.storage-desc {
|
|
|
|
font-size: 16px;
|
2025-05-20 13:05:37 +08:00
|
|
|
color: #999999;
|
|
|
|
@include ellipsis;
|
2025-04-14 02:33:18 +01:00
|
|
|
i {
|
|
|
|
display: inline-block;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.storage-tags {
|
|
|
|
span {
|
|
|
|
margin-right: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.storage-location {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
font-size: 16px;
|
|
|
|
font-weight: 400;
|
2025-05-20 13:05:37 +08:00
|
|
|
color: #000000;
|
2025-04-14 02:33:18 +01:00
|
|
|
}
|
|
|
|
.storage-price {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
&-left {
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.price-label {
|
|
|
|
margin-right: 10px;
|
2025-05-20 13:05:37 +08:00
|
|
|
font-size: 16px;
|
|
|
|
color: #999999;
|
2025-04-14 02:33:18 +01:00
|
|
|
}
|
|
|
|
.price-amount {
|
|
|
|
font-size: 20px;
|
|
|
|
font-weight: 700;
|
2025-05-20 13:05:37 +08:00
|
|
|
color: $color-primary;
|
2025-04-14 02:33:18 +01:00
|
|
|
}
|
|
|
|
.contact-btn {
|
|
|
|
width: 152px;
|
|
|
|
height: 48px;
|
|
|
|
font-size: 20px;
|
|
|
|
border-radius: 8px;
|
|
|
|
background: #25bf82 !important;
|
|
|
|
:deep(.el-icon) {
|
|
|
|
margin-right: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.rank-badge {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 20px;
|
|
|
|
width: 80px;
|
|
|
|
height: 80px;
|
|
|
|
}
|
|
|
|
</style>
|