plantScreen/src/view/detail.vue
2023-12-24 21:56:23 +08:00

221 lines
5.9 KiB
Vue

<template>
<div class="box">
<div class="l">
<div class="top">
<leftTop :data="data" :key="data.land_id"></leftTop>
</div>
<div class="bottom top">
<leftCenter :data="data" :key="data.land_id"></leftCenter>
</div>
<div class="top center">
<JessibucaDemo v-if="video_url" :src="video_url"></JessibucaDemo>
<!-- <video style="margin-top: 1vh;width: 100%;height: 100%;" autoplay muted
src="http://192.168.1.27/live/test.live.mp4?secret=gqig2yFKkDpIMic1uWZY1L5MsIo0eflm">
</video> -->
</div>
</div>
<div class="center">
<div class="top-c">
<div style="display: flex;justify-content: space-between;">
<div class=" c-top-tits"><span class="color-font" @click="router.push('/')">返回首页</span></div>
<div class=" c-top-tits"><span class="color-font">{{ route.query.town }}地块</span> </div>
</div>
<farmerMap @changeLand="changeLandFn"></farmerMap>
</div>
<div class="bottom">
<centerBottom :data="data" :key="data.land_id"></centerBottom>
</div>
</div>
<div class="r">
<div class="center top">
<rightTop :data="data" :key="data.land_id"></rightTop>
</div>
<div class="bottom">
<rightBottom :data="data" :key="data.land_id"></rightBottom>
</div>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue"
import farmerMap from "../components/farmerMap.vue";
import leftTop from "../components/detail/leftTop.vue";
import leftCenter from "../components/detail/leftCenter.vue";
import centerBottom from "../components/detail/centerBottom.vue";
import rightTop from "../components/detail/rightTop.vue";
import rightBottom from "../components/detail/rightBottom.vue";
import { useRouter, useRoute } from "vue-router"
import JessibucaDemo from "@/components/videoFlv.vue"
import { landListApi } from "@/api.js"
const video_url = ref('')
const router = useRouter()
const route = useRoute()
let data = reactive(
{
land_id: route.query.landId,
areaCode: JSON.parse(route.query.parmas).areaCode,
streetCode: JSON.parse(route.query.parmas).streetCode
}
)
landListApi({
...data
}).then(res => {
console.log(res)
res.data.list.forEach(item => {
if (item.id == data.land_id) {
video_url.value = item.video_url
}
})
})
const changeLandFn = (land_id) => {
data.land_id = land_id
}
</script>
<style lang="scss">
.box {
width: 100vw;
height: 93vh;
margin-top: 1vh;
display: flex;
justify-content: space-between;
.l {
width: 25vw;
height: 93vh;
.top {
width: 25vw;
height: 30vh;
background-size: 100% 100%;
// background-color: pink;
background-image: url('/static/index/SBGJTJ.png');
margin-top: 1vh;
box-sizing: border-box;
padding: 6vh 2vh 1vh 2vh;
color: #E5EFFF;
}
.center {
background-image: url("/static/detail/MQJk.png");
}
.bottom {
position: relative;
}
}
.center {
width: 49vw;
height: 93vh;
.top-c {
margin-top: 1vh;
width: 49vw;
height: 61vh;
// background-color: RED;
background-image: url('/static/index/ZBK.png');
background-size: 100% 100%;
box-sizing: border-box;
padding: 2vh 2vw;
.c-top-tits {
padding: 1vh 1vw;
font-size: 20px;
// border: 1px solid red;
cursor: pointer;
background-image: url('/static/detail/FHSY.png');
background-size: 100% 100%;
}
}
.bottom {
width: 49vw;
height: 30vh;
margin-top: 1vh;
background-image: url('/static/detail/QXHJJC.png');
background-size: 100% 100%;
box-sizing: border-box;
padding: 6vh 1vh 1vh 2vh;
position: relative;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
}
.r {
width: 25vw;
height: 93vh;
.bottom {
width: 25vw;
box-sizing: border-box;
padding: 5vh 1vh 1.5vh;
height: 61vh;
background-size: 100% 100%;
background-image: url('/static/detail/TRSQ.png');
margin-top: 1vh;
display: flex;
justify-content: space-between;
flex-direction: column;
align-items: center;
.r-b-li {
width: 95%;
height: 7.5vh;
background-image: url('/static/detail/SQBG.png');
background-size: 100% 100%;
color: white;
font-family: FZCYJ;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0 1.5VW;
font-size: 14PX;
}
.act {
color: #C55956;
}
}
.top {
width: 25vw;
height: 30vh;
padding: 2vh;
box-sizing: border-box;
background-size: 100% 100%;
background-image: url('/static/index/YJCP.png');
margin-top: 1vh;
padding-top: 6vh;
color: #E5EFFF;
}
.center {
background-image: url('/static/index/JCSBSLTJ.png');
}
}
}
</style>