YZProjectCloud/yanzhu-bigscreen/src/views/schedule/photography.vue

209 lines
6.4 KiB
Vue
Raw Normal View History

2025-03-31 22:35:57 +08:00
<template>
2025-04-13 22:28:19 +08:00
<div class="project-photography main-page">
<el-col :span="6" class="h100">
<module-one-3-1 label="项目全景列表">
<div class="left-list scroll">
<template v-if="infoList && infoList.length > 0">
<div v-for="(item, index) in infoList" :key="index" :class="info==item?'is-active':''" class="video-item" @click.stop="playVideo(item)">
<span class="div-date">{{ item.videoDate }}</span>
<i class="header-icon el-icon-camera-solid" style="font-size: 24px; color: aqua"></i>
</div>
</template>
<div v-else style="text-align: center" class="div-no-data">
<img src="images/nodata.png" style="width: 120px" />
<div style="text-align: center; font-size: 12px; color: #888">暂无数据</div>
</div>
</div>
</module-one-3-1>
</el-col>
<el-col :span="18" class="no-title">
<module-one-3-3 :notitle="true">
<template v-if="info">
<div class="right-title">
<span class="sp-title">{{ info.videoDate }}</span>
</div>
<video style="width: 98%;" controls>
<source :src="info.videoUrl" type="video/mp4" />您的浏览器不支持Video标签
</video>
</template>
<div v-else style="text-align: center" class="div-no-data">
<img src="images/nodata.png" style="width: 120px" />
<div style="text-align: center; font-size: 12px; color: #888">暂无数据</div>
</div>
</module-one-3-3>
</el-col>
</div>
2025-03-31 22:35:57 +08:00
</template>
<script>
export default {
2025-04-13 22:28:19 +08:00
data() {
return {
info: null,
activeNames: [],
infoList: {},
2025-03-31 22:35:57 +08:00
}
},
2025-04-13 22:28:19 +08:00
mounted() {
window.photography = this
this.$store.dispatch('ChangeNav', 501)
this.$bus.$on('projectChange', (prj) => {
this.selProject = prj
this.init()
})
this.selProject = this.$store.getters.selProject
this.init()
},
methods: {
playVideo(it) {
this.info = null
setTimeout(() => {
this.info = it
}, 400)
},
init() {
if (!this.selProject) {
return
}
this.$api.detail.photographyList(this.selProject.id).then((d) => {
if (d.data.length > 0) {
this.info = d.data[0]
} else {
this.info = null
}
this.infoList = d.data
})
},
},
}
2025-03-31 22:35:57 +08:00
</script>
<style lang="less">
.project-photography {
2025-04-13 22:28:19 +08:00
.div-no-data {
text-align: center;
height: 600px;
display: flex;
align-items: center;
justify-content: center;
2025-03-31 22:35:57 +08:00
}
2025-04-13 22:28:19 +08:00
.no-title {
.right-title {
height: 200px;
display: flex;
align-items: center;
justify-content: center;
}
.sp-title {
display: inline-block;
line-height: 72px;
padding: 0px 40px;
font-size: 40px;
background-size: 100% 100%;
background-image: url('../../assets/images/bgphoto.png');
}
video {
width: 100%;
height: calc(100% - 201px);
}
/deep/ .screen-one-3-3 {
background-image: none;
border: solid 1px #409eff5c;
.module-title {
display: none;
}
}
2025-03-31 22:35:57 +08:00
}
2025-04-13 22:28:19 +08:00
.left-list {
max-height: calc(100% - 40px);
overflow-y: auto;
&::-webkit-scrollbar {
width: 4px;
height: 4px;
}
2025-03-31 22:35:57 +08:00
}
2025-04-13 22:28:19 +08:00
.screen-one-3-1 {
height: calc(100% - 20px) !important;
.left-list {
padding: 10px 10px 10px 0px;
.video-item {
line-height: 40px;
border: solid 1px #1e8fff83;
padding: 0px 20px;
margin-top: 10px;
position: relative;
cursor: pointer;
&:first-child {
margin-top: 0px;
}
.header-icon {
position: absolute;
right: 10px;
top: 10px;
}
&.is-active {
background-color: #089fff;
color: #fff;
&:hover {
background-color: #089fff;
color: #fff;
}
}
&:hover {
background-color: #08a0ff95;
color: #fff;
}
}
}
2025-03-31 22:35:57 +08:00
}
2025-04-13 22:28:19 +08:00
/deep/ .screen-one-3-1 {
.el-collapse {
border: none;
margin-top: 4px;
2025-03-31 22:35:57 +08:00
2025-04-13 22:28:19 +08:00
.el-collapse-item {
}
2025-03-31 22:35:57 +08:00
2025-04-13 22:28:19 +08:00
.el-collapse-item__header {
background-color: #097fca2e;
color: #089fff;
border-bottom: dotted 1px #089fff77;
}
2025-03-31 22:35:57 +08:00
2025-04-13 22:28:19 +08:00
.el-collapse-item__content {
padding-bottom: 12px;
}
2025-03-31 22:35:57 +08:00
2025-04-13 22:28:19 +08:00
.el-collapse-item__wrap {
background-color: transparent;
border: none;
.img-item {
margin-top: 8px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
color: #fff;
position: relative;
}
.video-item {
position: relative;
line-height: 30px;
display: flex;
align-items: center;
cursor: pointer;
border-bottom: solid 1px #089fff77;
.div-date {
width: calc(90% - 24px);
text-align: left;
bottom: 0px;
color: #089fff;
padding-left: 24px;
}
}
}
2025-03-31 22:35:57 +08:00
}
}
}
</style>