|
|
@ -3,11 +3,44 @@ |
|
|
|
<div class="w-[1310px] mx-auto mt-60px bg-white pb-9 px-6 pt-6 rounded relative"> |
|
|
|
<div class="title "> |
|
|
|
<h3 class="font-bold text-2xl">房型详情</h3> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="flex w-full pt-2 justify-between divide-x divide-white-100 divide-dashed"> |
|
|
|
<div class="w-1/2 pr-4"> |
|
|
|
<div> |
|
|
|
<img src="@/assets/images/ar.png"> |
|
|
|
<div class="w-1/2 pr-10"> |
|
|
|
<div class=" w-full relative "> |
|
|
|
<div v-if="activeTab === 'video'" class="w-full h-72"> |
|
|
|
<video :src="houseDetail.vrUrl" controls class="w-full h-full object-cover rounded-md" /> |
|
|
|
</div> |
|
|
|
<el-carousel v-if="activeTab === 'img'" height="300px"> |
|
|
|
<el-carousel-item v-for="(img, idx) in houseDetail.images" :key="idx"> |
|
|
|
<img :src="img.url" class="w-full h-72 object-cover rounded-md" /> |
|
|
|
</el-carousel-item> |
|
|
|
</el-carousel> |
|
|
|
<div v-if="activeTab === 'vr'" class="relative"> |
|
|
|
<img class="w-full h-72 object-cover rounded-md" :src="houseDetail.vrUrl" alt="VR封面图" /> |
|
|
|
<a :href="vrLink" target="_blank"> |
|
|
|
<div class="absolute inset-0 flex items-center justify-center bg-black bg-opacity-30 cursor-pointer"> |
|
|
|
</div> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div class="mt-4 flex justify-center border rounded-full overflow-hidden w-fit absolute bottom-10 left-52"> |
|
|
|
<button class="px-4 py-1 text-sm font-medium" |
|
|
|
:class="activeTab === 'vr' ? 'bg-blue-500 text-white' : 'bg-white text-gray-800'" |
|
|
|
@click="activeTab = 'vr'"> |
|
|
|
VR |
|
|
|
</button> |
|
|
|
<button class="px-4 py-1 text-sm font-medium" |
|
|
|
:class="activeTab === 'img' ? 'bg-blue-500 text-white' : 'bg-white text-gray-800'" |
|
|
|
@click="activeTab = 'img'"> |
|
|
|
图片 |
|
|
|
</button> |
|
|
|
<button class="px-4 py-1 text-sm font-medium" |
|
|
|
:class="activeTab === 'video' ? 'bg-blue-500 text-white' : 'bg-white text-gray-800'" |
|
|
|
@click="activeTab = 'video'"> |
|
|
|
视频 |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="pt-3"> |
|
|
|
<div class="text-xl font-bold ">{{ houseDetail.apartmentName }} I {{ houseDetail.typeName }}</div> |
|
|
@ -23,39 +56,43 @@ |
|
|
|
<div class="text-xl font-bold ">房屋设施</div> |
|
|
|
</div> |
|
|
|
<div class="flex pt-3"> |
|
|
|
<div v-for="(item, index) in houseDetail.facilityIcon" :key="index"> |
|
|
|
<img class="w-5 h-5 pl-7" style="width: 50px; height: 20px;" :src="item" /> |
|
|
|
<div class="" v-for="(item, index) in houseDetail.facilityIcon" :key="index"> |
|
|
|
<div class="w-20"> |
|
|
|
<img class="w-33 h-5 pl-6" style="width: 50px; height: 20px;" :src="item" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex pt-3"> |
|
|
|
<div v-for="(item, index) in houseDetail.facilityNames" :key="index"> |
|
|
|
<div class=" pl-6">{{ item }}</div> |
|
|
|
<div class=" pl-5 w-20 h-7">{{ item }}</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class=" w-1/2 pl-32"> |
|
|
|
<div class=" w-1/2 pl-10"> |
|
|
|
<div class="text-xl font-bold">房间详情</div> |
|
|
|
<div class="flex pt-3" v-for="(item, index) in houseDetail.roomTypes" :key="index"> |
|
|
|
<img class="w-36 h-38" :src="item.coverImg"> |
|
|
|
<div class="flex-col pl-4"> |
|
|
|
<div class="text-base font-semibold">{{ item.roomTypeName }} |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div class="flex "> |
|
|
|
<div>{{ item.area }}㎡</div> |
|
|
|
<div>{{ item.roomTypeName }}</div> |
|
|
|
<div>{{ item.roomTypeName }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div>南卧 |
|
|
|
<div class="flex items-start gap-4 py-4 border-gray-200 border-dashed" |
|
|
|
:class="{ 'border-b': index !== houseDetail.roomTypes.length - 1 }" |
|
|
|
v-for="(item, index) in houseDetail.roomTypes" :key="index"> |
|
|
|
<!-- 封面图 --> |
|
|
|
<img class="w-45 h-36 object-cover rounded-md" :src="item.coverImg" alt="封面" /> |
|
|
|
|
|
|
|
<!-- 文字信息 --> |
|
|
|
<div class="flex flex-col justify-between"> |
|
|
|
<div class="text-lg font-bold">{{ item.roomTypeName }}</div> |
|
|
|
<div class="flex flex-wrap items-center text-sm text-gray-600 mt-2 space-x-3"> |
|
|
|
<div>{{ item.area }}㎡</div> |
|
|
|
<div>{{ item.roomTypeName }}</div> |
|
|
|
<div>{{ item.hasWindow ? '有窗' : '无窗' }}</div> |
|
|
|
</div> |
|
|
|
<div class="text-xs text-gray-900 mt-2 leading-snug">{{ item.description }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex w-full pt-14 justify-between divide-x divide-white-100 divide-dashed"> |
|
|
|
<div class="w-1/2 pr-4"> |
|
|
|
<div class="w-1/2 pr-10"> |
|
|
|
<div> |
|
|
|
<div class="text-xl font-bold ">小区及周边</div> |
|
|
|
</div> |
|
|
@ -67,7 +104,7 @@ |
|
|
|
<div class="pt-3"> |
|
|
|
<div class="indent-8">{{ residentialDetail.introduce }}</div> |
|
|
|
</div> |
|
|
|
<div class="flex gap-2"> |
|
|
|
<div class="flex gap-2 mb-3"> |
|
|
|
<div class="flex pt-3 gap-2" v-for="(item, index) in residentialDetail.labels" :key="index"> |
|
|
|
<el-tag :type="item.tagType">{{ item.dictLabel }}</el-tag> |
|
|
|
</div> |
|
|
@ -75,12 +112,52 @@ |
|
|
|
<div class="map-container" ref="mapContainer"></div> |
|
|
|
<!-- <div class=" w-1/2 pl-32">房型详情 </div> --> |
|
|
|
</div> |
|
|
|
<div class=" w-1/2 pl-10"> |
|
|
|
<div class="text-xl font-bold">入住评价</div> |
|
|
|
<div style="width: 100%; height: 100%;"> |
|
|
|
<template> |
|
|
|
<el-empty image="@/assets/images/03ec6a8d46ed1a7ca22a2576a8caa85.png" /> |
|
|
|
</template> |
|
|
|
<img src="@/assets/images/03ec6a8d46ed1a7ca22a2576a8caa85.png"> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- <div class="max-h-[600px] overflow-y-auto pr-2"> |
|
|
|
<div class="items-start gap-4 py-4 border-gray-200 border-dashed" |
|
|
|
:class="{ 'border-b': index !== houseDetail.roomTypes.length - 1 }" |
|
|
|
v-for="(item, index) in houseDetail.roomTypes" :key="index"> |
|
|
|
<div class="flex justify-between w-full"> |
|
|
|
<div class="flex"> |
|
|
|
|
|
|
|
<img class="w-16 h-16 object-cover rounded-full" :src="item.coverImg" alt="封面" /> |
|
|
|
<div class="flex flex-col pl-3"> |
|
|
|
<div class="flex flex-wrap items-center text-sm text-gray-600 mt-2 space-x-3"> |
|
|
|
<div>{{ item.roomTypeName }}</div> |
|
|
|
</div> |
|
|
|
<div class="text-xs text-gray-500 mt-2 leading-snug">{{ houseDetail.createTime }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-rate disabled v-model="starRating" colors="['#13c2c2']" size="large" /> |
|
|
|
</div> |
|
|
|
<div class="flex gap-x-0.5"> |
|
|
|
<div v-for="(item, index) in houseDetail.facilityIcon" :key="index" class="flex"> |
|
|
|
<img class="w-28" src="../../assets/images/ewm1.png"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
</div> |
|
|
|
<!-- 返回 --> |
|
|
|
<div class="text-white flex items-center mb-2 absolute -top-14 absolute"> |
|
|
|
<!-- <div class="text-white flex items-center mb-2 absolute -top-14 absolute"> |
|
|
|
<span class="cursor-pointer text-xl">看房选房</span><span class="text-2xl">>房型详情</span> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <div class="flex justify-center align-center"> |
|
|
|
<el-button @click="handerReturn">取消</el-button> |
|
|
|
<el-button type="primary">选择房型</el-button> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script setup> |
|
|
@ -91,7 +168,14 @@ import { onMounted } from 'vue'; |
|
|
|
import AMapLoader from "@amap/amap-jsapi-loader"; |
|
|
|
const route = useRoute(); |
|
|
|
const router = useRouter(); |
|
|
|
const activeTab = ref('vr') |
|
|
|
const deptId = route.query.deptId; |
|
|
|
const imgList = ref([ |
|
|
|
'https://example.com/img1.jpg', |
|
|
|
'https://example.com/img2.jpg', |
|
|
|
'https://example.com/img3.jpg', |
|
|
|
]) |
|
|
|
|
|
|
|
const houseId = route.query.id; |
|
|
|
const houseDetail = ref({}); // 存储房屋详情数据 |
|
|
|
const residentialDetail = ref({}); // 存储小区详情数据 |
|
|
@ -100,8 +184,11 @@ const deptInfo = ref({}); // 存储部门信息数据 |
|
|
|
const getDictTab = ref([]) |
|
|
|
const getRoomList = ref([]) |
|
|
|
let map = null; |
|
|
|
|
|
|
|
const starRating = ref(3.7) |
|
|
|
const mapContainer = ref(null); |
|
|
|
const handerReturn = async () => { |
|
|
|
router.go(-1) // 返回上一页 |
|
|
|
} |
|
|
|
const getHouseType = async () => { |
|
|
|
try { |
|
|
|
console.log(houseId, "sfdjksdlk;"); |
|
|
|