提交 500f4865 authored 作者: Anix's avatar Anix

文物页、首页、精品展首屏布局修改

上级 77b2b159
...@@ -2,13 +2,21 @@ ...@@ -2,13 +2,21 @@
<span> <span>
<span class="operations"> <span class="operations">
<span class="operation-item"> <span class="operation-item">
<svg-icon <!-- <svg-icon
@click="handleLike" @click="handleLike"
:icon-class="loveCountStatus ? 'like-s' : 'like'" :icon-class="loveCountStatus ? 'like-s' : 'like'"
:style="{ :style="{
fontSize: iconSize + 'px', fontSize: iconSize + 'px',
color: loveCountStatus ? selectColor : '#61666d', color: loveCountStatus ? selectColor : '#61666d',
}" }"
></svg-icon> -->
<svg-icon
@click="handleLike"
:icon-class="loveCountStatus ? 'like-s' : 'like'"
:style="{
fontSize: iconSize + 'px',
color: loveCountStatus ? selectColor : '#ddd',
}"
></svg-icon> ></svg-icon>
<span>{{ <span>{{
formatNum(loveCount) == 0 ? "点赞" : formatNum(loveCount) formatNum(loveCount) == 0 ? "点赞" : formatNum(loveCount)
......
<template>
<div class="card-slider">
<div class="swiper">
<swiper
class="swiper gallery-top"
:options="swiperOptionTop"
ref="swiperTop"
>
<swiper-slide
class="slide-item"
v-for="(item, index) in imgList"
:key="index"
>
<img :src="item.pressUrl" alt="" />
<!-- <div class="enlarge" @click="handelPreviewImages(imgList)">
<img src="@/assets/imgs/enlarge-s.png" alt="" />
</div> -->
</swiper-slide>
</swiper>
</div>
<!-- <el-image-viewer
v-if="imgViewerVisible"
:on-close="closeImgViewer"
:url-list="previewList"
/> -->
</div>
</template>
<script>
import { swiper, swiperSlide } from "vue-awesome-swiper";
import "swiper/dist/css/swiper.css";
export default {
name: "SlideImage",
components: {
swiper,
swiperSlide,
/* "el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer"), */
},
props: {
imgKey: {
type: String,
default: "pressUrl",
},
imgList: {
type: Array,
default: () => [],
},
},
data() {
return {
swiperOptionTop: {
loop: true,
loopedSlides: 8, // looped slides should be the same
spaceBetween: 10,
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
},
imgViewerVisible: false,
};
},
/* mounted() {
this.$nextTick(() => {
const swiperTop = this.$refs.swiperTop.swiper;
const swiperThumbs = this.$refs.swiperThumbs.swiper;
swiperTop.controller.control = swiperThumbs;
swiperThumbs.controller.control = swiperTop;
});
}, */
methods: {
handelPreviewImages(items) {
this.imgViewerVisible = true;
this.previewList = items.map((item) => this.$getFullUrl(item.url));
},
closeImgViewer() {
this.imgViewerVisible = false;
},
},
};
</script>
<style lang="scss" scoped>
.card-slider {
width: 100%;
height: 100%;
.slide-item {
background: transparent;
position: relative;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
}
</style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</li> </li>
</ul> </ul>
</div> --> </div> -->
<ul class="fixed-tabs"> <!-- <ul class="fixed-tabs">
<li v-for="node in tabs" :key="node.tab" @click="handleTabClick(node)"> <li v-for="node in tabs" :key="node.tab" @click="handleTabClick(node)">
<div class="tab-container"> <div class="tab-container">
<img <img
...@@ -22,7 +22,10 @@ ...@@ -22,7 +22,10 @@
<span class="name">{{ node.name }}</span> <span class="name">{{ node.name }}</span>
</div> </div>
</li> </li>
</ul> </ul> -->
<div class="boutique-tabs">
<m-tabs></m-tabs>
</div>
<div class="boutique-content" ref="boutiqueContent"> <div class="boutique-content" ref="boutiqueContent">
<div class="focus-content" v-if="activeTab"> <div class="focus-content" v-if="activeTab">
...@@ -48,6 +51,7 @@ ...@@ -48,6 +51,7 @@
</template> </template>
<script> <script>
import mTabs from '@/views/home/components/Boutique.vue'
import NavBar from "@/components/NavBar"; import NavBar from "@/components/NavBar";
import Footer from "@/components/Footer"; import Footer from "@/components/Footer";
import SMGZ from "./components/SMGZ"; import SMGZ from "./components/SMGZ";
...@@ -55,7 +59,7 @@ import SMGZ from "./components/SMGZ"; ...@@ -55,7 +59,7 @@ import SMGZ from "./components/SMGZ";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
name: "Boutique", name: "Boutique",
components: { NavBar, Footer, SMGZ }, components: { NavBar, Footer, SMGZ, mTabs },
data() { data() {
return { return {
tabs: [ tabs: [
...@@ -141,6 +145,10 @@ export default { ...@@ -141,6 +145,10 @@ export default {
// object-fit: cover; // object-fit: cover;
// } // }
// } // }
.boutique-tabs {
width: 100%;
height: 100vh;
}
.fixed-tabs { .fixed-tabs {
position: fixed; position: fixed;
left: 0; left: 0;
...@@ -149,6 +157,7 @@ export default { ...@@ -149,6 +157,7 @@ export default {
height: calc(100vh - 100px); height: calc(100vh - 100px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
display: none;
li { li {
flex: 1; flex: 1;
position: relative; position: relative;
......
<template> <template>
<div class="content"> <div class="content">
<!-- 文物图片 --> <div class="bg">
<!-- <div class="content-item display-detail_imgs" ref="imgs"> <img src="@/assets/imgs/gray.jpg" alt="" />
<img <div class="mask"></div>
class="animate__animated animate__fadeInDownBig" </div>
v-if="CRDetail.imagesVo && CRDetail.imagesVo.length > 0"
id="faceImage"
:src="$getFullUrl(CRDetail.imagesVo[0].pressUrl)"
/>
<img
id="faceImage"
v-else-if="CRDetail.faceImagePressUrl"
class="animate__animated animate__fadeInDownBig"
:src="CRDetail.faceImagePressUrl"
/>
</div> -->
<div class="wrapper wow animate__animated animate__fadeInUpBig"> <div class="wrapper wow animate__animated animate__fadeInUpBig">
<div class="inner"> <div class="inner">
<!-- 展览基本信息 --> <!-- 展览基本信息 -->
<div class="content-item display-detail_basic_info"> <div class="inner-left wow animate__animated animate__fadeInLeft">
<div class="info-container"> <div>
<div <SlideImage
class=" :imgList="CRDetail.imagesVo"
info-container-left v-if="CRDetail.imagesVo && CRDetail.imagesVo.length > 0"
wow />
animate__animated animate__fadeInLeft <SlideImage
" :imgList="[{ pressUrl: CRDetail.faceImagePressUrl }]"
> v-else-if="CRDetail.faceImagePressUrl"
<SlideImage />
:imgList="CRDetail.imagesVo" </div>
v-if="CRDetail.imagesVo && CRDetail.imagesVo.length > 0" <!-- <div>
/> <img :src="CRDetail.faceImagePressUrl" alt="" />
<SlideImage </div> -->
:imgList="[{ pressUrl: CRDetail.faceImagePressUrl }]" </div>
v-else-if="CRDetail.faceImagePressUrl"
/>
</div>
<div <div class="inner-right">
class=" <!-- tabs -->
info-container-right <ul>
wow <li
animate__animated animate__fadeInRight :class="{ active: nodeActive === 'intro' }"
" @click="handleTabClick('intro')"
>
<span>文物简介</span>
</li>
<template v-for="node in tabbarData">
<li
:key="node.domId"
:class="{ active: nodeActive === node.domId }"
@click="handleTabClick(node.domId)"
v-if="
node.domId !== 'intro' &&
CRDetail[`${node.domId}`] &&
CRDetail[`${node.domId}`].length > 0
"
>
<span>{{ node.name }}</span>
</li>
</template>
<li
:class="{ active: nodeActive === 'relateRelics' }"
@click="handleTabClick('relateRelics')"
> >
<span>相关文献</span>
</li>
</ul>
<!-- 基本信息 -->
<div class="info-container-right" v-if="nodeActive === 'intro'">
<div class="wow animate__animated animate__fadeInRight">
<div class="info-title"> <div class="info-title">
<span>{{ CRDetail.name }} </span> <span>{{ CRDetail.name }} </span>
<div class="view-count"> <div class="view-count">
...@@ -53,59 +65,66 @@ ...@@ -53,59 +65,66 @@
</div> </div>
</div> </div>
<div class="basic-info"> <div class="basic-info">
<div class="body-item"> <div class="body-item" v-if="CRDetail.yearsLabel">
<span class="label"> <!-- <span class="label">
<!-- <svg-icon icon-class="keyword"></svg-icon> --> 年代</span
年代</span > -->
>
<span class="value">{{ CRDetail.yearsLabel || "暂无" }}</span> <span class="value">{{ CRDetail.yearsLabel || "暂无" }}</span>
</div> </div>
<div class="body-item"> <div class="body-item" v-if="CRDetail.sourceWay">
<span class="label"> <!-- <span class="label">
<!-- <svg-icon icon-class="glww"></svg-icon> --> 来源</span
来源</span > -->
>
<span class="value">{{ CRDetail.sourceWay || "暂无" }}</span> <span class="value">{{ CRDetail.sourceWay || "暂无" }}</span>
</div> </div>
<div class="body-item"> <div class="body-item" v-if="CRDetail.typeLabel">
<span class="label"> <!-- <span class="label">
<!-- <svg-icon icon-class="zllx"></svg-icon> --> 类别</span
类别</span > -->
>
<span class="value">{{ CRDetail.typeLabel || "暂无" }}</span> <span class="value">{{ CRDetail.typeLabel || "暂无" }}</span>
</div> </div>
<div class="body-item"> <div class="body-item" v-if="CRDetail.levelLabel">
<span class="label"> <!-- <span class="label">
<!-- <svg-icon icon-class="zlxz"></svg-icon> --> 级别</span
级别</span > -->
>
<span class="value">{{ CRDetail.levelLabel || "暂无" }}</span> <span class="value">{{ CRDetail.levelLabel || "暂无" }}</span>
</div> </div>
<div class="body-item"> <div class="body-item" v-if="CRDetail.textureTypeLabel">
<span class="label"> <!-- <span class="label">
<!-- <svg-icon icon-class="wwzd"></svg-icon> --> 质地</span
质地</span > -->
>
<span class="value">{{ <span class="value">{{
CRDetail.textureTypeLabel || "暂无" CRDetail.textureTypeLabel || "暂无"
}}</span> }}</span>
</div> </div>
<div class="body-item"> <div class="body-item" v-if="CRDetail.detailSize">
<span class="label"> <!-- <span class="label">
<!-- <svg-icon icon-class="wwcc"></svg-icon> --> 尺寸
尺寸 </span> -->
</span>
<span class="value">{{ CRDetail.detailSize || "暂无" }}</span> <span class="value">{{ CRDetail.detailSize || "暂无" }}</span>
</div> </div>
<div class="body-item"> <div class="body-item" v-if="CRDetail.deptName">
<span class="label"> <!-- <span class="label">
<!-- <svg-icon icon-class="zldq"></svg-icon> -->
馆藏单位</span 馆藏单位</span
> > -->
<span class="value">{{ CRDetail.deptName || "暂无" }}</span> <span class="value">{{ CRDetail.deptName || "暂无" }}</span>
</div> </div>
</div> </div>
<!-- 文物简介 -->
<div
class="content-item display-detail_intro"
v-if="CRDetail.intro"
id="intro"
>
<div class="intro-content">
<div
class="intro-content-container"
v-html="CRDetail.intro"
></div>
</div>
</div>
<div class="bottom"> <div class="bottom">
<div class="tools"> <div class="tools">
<ReaderOperations <ReaderOperations
...@@ -126,212 +145,167 @@ ...@@ -126,212 +145,167 @@
</div> </div>
</div> </div>
</div> </div>
<div <!-- 音频 -->
<!-- <div
class="audio wow animate__animated animate__fadeInRight" class="audio wow animate__animated animate__fadeInRight"
:style="{ animationPlayState: audioPlaying ? 'running' : 'paused' }" :style="{
animationPlayState: audioPlaying ? 'running' : 'paused',
}"
@click="handleClickAudio" @click="handleClickAudio"
v-if="CRDetail.audiosVo && CRDetail.audiosVo.length > 0" v-if="CRDetail.audiosVo && CRDetail.audiosVo.length > 0"
> >
<!-- <img src="@/assets/imgs/display/normal/music.png" alt="" /> -->
<svg-icon icon-class="music"></svg-icon> <svg-icon icon-class="music"></svg-icon>
<AudioPlayer <AudioPlayer
style="display: none" style="display: none"
:url="$getFullUrl(CRDetail.audiosVo[0].url)" :url="$getFullUrl(CRDetail.audiosVo[0].url)"
ref="AudioPlayer" ref="AudioPlayer"
/> />
</div> </div> -->
</div> <!-- 文物视频 -->
<div
<div class="content-item display-detail_videos"
class="content-item display-detail_tabbar" v-if="
id="tabbar" CRDetail.videosVo &&
:class="{ isFixed: isFixed }" CRDetail.videosVo.length > 0 &&
> nodeActive === 'videosVo'
<span v-for="(item, index) in tabbarData" :key="index"> "
<span id="videosVo"
@click="handleClickTabItem(item)" >
:class="[ <div class="video-title">
'tab-item', <!-- <i class="el-icon-video-camera"></i> -->
currentTab && currentTab.domId == item.domId ? 'active' : '', 相关视频
]" </div>
v-html="item.name" <div class="video-names">
v-if="CRDetail[item.domId] && CRDetail[item.domId].length > 0"
>
</span>
<span
@click="handleClickTabItem(item)"
v-else-if="
item.domId == 'relateRelics' &&
relateRelics &&
relateRelics.length > 0
"
v-html="item.name"
:class="[
'tab-item',
currentTab && currentTab.domId == item.domId ? 'active' : '',
]"
>
</span>
</span>
</div>
<!-- 文物简介 -->
<div
class="content-item display-detail_intro"
v-if="CRDetail.intro"
id="intro"
>
<div class="intro-title">
<!-- <svg-icon icon-class="jianjie"></svg-icon> -->
<!-- <i class="el-icon-tickets" style="margin-right: 10px"></i> -->
<span>文物简介</span>
</div>
<div class="intro-content">
<div class="left-box">简介</div>
<div class="intro-content-container" v-html="CRDetail.intro"></div>
</div>
</div>
<!-- 文物视频 -->
<div
class="content-item display-detail_videos"
v-if="CRDetail.videosVo && CRDetail.videosVo.length > 0"
id="videosVo"
>
<div class="video-title">
<!-- <i class="el-icon-video-camera"></i> -->
相关视频
</div>
<div class="video-names">
<div
class="video-item"
v-for="(item, index) in CRDetail.videosVo"
:key="index"
@click="handleChangeCurrentVideo(item)"
>
<div <div
:class="[ class="video-item"
'name', v-for="(item, index) in CRDetail.videosVo"
currentVideo && item.fileId == currentVideo.fileId :key="index"
? 'active' @click="handleChangeCurrentVideo(item)"
: '',
]"
> >
{{ item.name.split(".")[0] }} <div
:class="[
'name',
currentVideo && item.fileId == currentVideo.fileId
? 'active'
: '',
]"
>
{{ item.name.split(".")[0] }}
</div>
</div> </div>
</div> </div>
<video-player
v-if="currentVideo"
:src="$getFullUrl(currentVideo.url)"
class="video-box"
></video-player>
</div> </div>
<video-player <!--相关文物 -->
v-if="currentVideo" <div
:src="$getFullUrl(currentVideo.url)" class="content-item display-detail_relate_rc"
class="video-box" ref="units"
></video-player> id="relateRelics"
</div> v-if="nodeActive === 'relateRelics'"
>
<div class="recommend-type">
<el-radio-group v-model="currentRcKey" size="small">
<el-radio :label="'type'" v-if="CRDetail.type">同类别</el-radio>
<el-radio :label="'years'" v-if="CRDetail.years"
>同年代</el-radio
>
<el-radio :label="'deptId'" v-if="CRDetail.deptId"
>同馆藏</el-radio
>
</el-radio-group>
</div>
<div class="recommend-obj">
<div class="recommend-obj-node" v-if="relateRelics.length > 0">
<div v-for="(item, index) in relateRelics" :key="index">
<div class="img-container" @click="handleToCr(item)">
<img :src="item.faceImagePressUrl" alt="" />
</div>
<div class="cr-name">{{ item.name }}</div>
</div>
</div>
<!--相关文物 --> <el-empty
<div v-else
class="content-item display-detail_relate_rc" description="暂无相关推荐,去看看其他的吧~"
ref="units" ></el-empty>
id="relateRelics" </div>
>
<div class="intro-title">
<!-- <i class="el-icon-menu" style="margin-right: 10px"></i> -->
<span>相关文物推荐</span>
</div>
<div class="recommend-type">
<el-radio-group v-model="currentRcKey" size="small">
<el-radio :label="'type'" v-if="CRDetail.type">同类别</el-radio>
<el-radio :label="'years'" v-if="CRDetail.years">同年代</el-radio>
<el-radio :label="'deptId'" v-if="CRDetail.deptId"
>同馆藏</el-radio
>
</el-radio-group>
</div> </div>
<el-row :gutter="8" v-if="relateRelics.length > 0"> <!-- 相关文献 -->
<el-col <div
:span="6" class="content-item display-detail_lts"
v-for="(item, index) in relateRelics" id="literatureVo"
:key="index" v-if="
> CRDetail.literatureVo &&
<div class="img-container" @click="handleToCr(item)"> CRDetail.literatureVo.length > 0 &&
<img :src="item.faceImagePressUrl" alt="" /> nodeActive === 'literatureVo'
"
>
<!-- <div class="wrapper"> -->
<div class="custom_title wow animate__animated animate__fadeInUp">
<div class="desc">
<div class="divider"></div>
<img
src="@/assets/imgs/display/normal/title-desc.png"
class="modify"
alt=""
/>
</div>
<div class="center">
<svg-icon icon-class="wenxian"></svg-icon>
<span class="title">相关文献</span>
</div>
<div class="desc">
<img
src="@/assets/imgs/display/normal/title-desc.png"
class="modify"
alt=""
/>
<div class="divider"></div>
</div> </div>
<div class="cr-name">{{ item.name }}</div>
</el-col>
</el-row>
<el-empty
v-else
description="暂无相关推荐,去看看其他的吧~"
></el-empty>
</div>
<!-- 相关文献 -->
<div
class="content-item display-detail_lts"
id="literatureVo"
v-if="CRDetail.literatureVo && CRDetail.literatureVo.length > 0"
>
<!-- <div class="wrapper"> -->
<div class="custom_title wow animate__animated animate__fadeInUp">
<div class="desc">
<div class="divider"></div>
<img
src="@/assets/imgs/display/normal/title-desc.png"
class="modify"
alt=""
/>
</div>
<div class="center">
<svg-icon icon-class="wenxian"></svg-icon>
<span class="title">相关文献</span>
</div> </div>
<div class="desc"> <div class="lts-content wow animate__animated animate__fadeInUp">
<img <el-table
src="@/assets/imgs/display/normal/title-desc.png" :data="CRDetail.literatureVo"
class="modify" :header-cell-style="{
alt="" background: '#eeeeee',
/> color: '#333',
<div class="divider"></div> }"
:row-style="tableRowStyle"
>
<el-table-column
prop="name"
label="名称"
align="center"
></el-table-column>
<el-table-column
prop="authors"
label="作者"
align="center"
></el-table-column>
<el-table-column
prop="date"
label="出版时间"
align="center"
></el-table-column>
<el-table-column
align="center"
prop="source"
label="出版所在刊物"
></el-table-column>
<el-table-column label="阅读" align="center">
<template slot-scope="scope">
<div class="pdf-img" @click="handleViewLt(scope.row)">
<img src="@/assets/imgs/display/ch/pdf-icon.png" />
</div>
</template>
</el-table-column>
</el-table>
</div> </div>
</div> </div>
<div class="lts-content wow animate__animated animate__fadeInUp">
<el-table
:data="CRDetail.literatureVo"
:header-cell-style="{
background: '#eeeeee',
color: '#333',
}"
:row-style="tableRowStyle"
>
<el-table-column
prop="name"
label="名称"
align="center"
></el-table-column>
<el-table-column
prop="authors"
label="作者"
align="center"
></el-table-column>
<el-table-column
prop="date"
label="出版时间"
align="center"
></el-table-column>
<el-table-column
align="center"
prop="source"
label="出版所在刊物"
></el-table-column>
<el-table-column label="阅读" align="center">
<template slot-scope="scope">
<div class="pdf-img" @click="handleViewLt(scope.row)">
<img src="@/assets/imgs/display/ch/pdf-icon.png" />
</div>
</template>
</el-table-column>
</el-table>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -342,8 +316,8 @@ ...@@ -342,8 +316,8 @@
/> />
</div> </div>
</template> </template>
<script> <script>
// import SearchBar from "@/components/SearchBar"; // import SearchBar from "@/components/SearchBar";
// import CustomTitle from "@/components/CustomTitle"; // import CustomTitle from "@/components/CustomTitle";
// import QRCode from "qrcodejs2"; // import QRCode from "qrcodejs2";
...@@ -353,7 +327,7 @@ import ReaderOperations from "@/components/ReaderOperations"; ...@@ -353,7 +327,7 @@ import ReaderOperations from "@/components/ReaderOperations";
import { getRCDetailByIdV2, crRecommendByPage } from "@/api/culturalRelic"; import { getRCDetailByIdV2, crRecommendByPage } from "@/api/culturalRelic";
import { previewFile } from "@/utils/index"; import { previewFile } from "@/utils/index";
import videoPlayer from "@/components/VideoPlayer"; import videoPlayer from "@/components/VideoPlayer";
import SlideImage from "@/components/SlideImage"; import SlideImage from "@/components/SlideImage/slider.vue";
import { isElementInViewport2 } from "@/utils/index"; import { isElementInViewport2 } from "@/utils/index";
export default { export default {
components: { components: {
...@@ -399,6 +373,7 @@ export default { ...@@ -399,6 +373,7 @@ export default {
}, },
], ],
// tabbarItems: ["文物简介", "相关视频", "相关文物", "相关文献"], // tabbarItems: ["文物简介", "相关视频", "相关文物", "相关文献"],
nodeActive: "intro",
}; };
}, },
watch: { watch: {
...@@ -412,7 +387,7 @@ export default { ...@@ -412,7 +387,7 @@ export default {
async mounted() { async mounted() {
let crId = this.$route.params.crId; let crId = this.$route.params.crId;
this.loadDetail(crId); this.loadDetail(crId);
setTimeout(() => { /* setTimeout(() => {
window.addEventListener("scroll", this.initHeight); window.addEventListener("scroll", this.initHeight);
this.offsetTop = document.querySelector("#tabbar").offsetTop; //距离offsetParent的高度 this.offsetTop = document.querySelector("#tabbar").offsetTop; //距离offsetParent的高度
this.tabbarData.map((item) => { this.tabbarData.map((item) => {
...@@ -421,7 +396,7 @@ export default { ...@@ -421,7 +396,7 @@ export default {
item.position = dom.offsetTop - 320; //100navbar 55tabbar item.position = dom.offsetTop - 320; //100navbar 55tabbar
} }
}); });
}, 500); }, 500); */
}, },
beforeRouteLeave(to, form, next) { beforeRouteLeave(to, form, next) {
// 离开路由移除滚动事件 // 离开路由移除滚动事件
...@@ -582,11 +557,15 @@ export default { ...@@ -582,11 +557,15 @@ export default {
} }
}); });
}, },
handleTabClick(type) {
this.nodeActive = type;
},
}, },
}; };
</script> </script>
<style lang="scss" > <style lang="scss">
// 自定义分页器样式 // 自定义分页器样式
#page { #page {
height: 30px; height: 30px;
...@@ -597,530 +576,209 @@ export default { ...@@ -597,530 +576,209 @@ export default {
cursor: pointer; cursor: pointer;
} }
</style> </style>
<style lang="scss" scoped>
// 中国风主题样式
/**公共样式开始 */
$titleFontFamily: SourceHanSerifCN-Bold;
.custom-title {
width: 50px;
background-color: #d72f3f;
min-height: 300px;
color: #fff;
font-size: 28px;
writing-mode: vertical-rl;
display: flex;
align-items: center;
justify-content: center;
box-shadow: rgb(215 47 63 / 30%) 4px 3px 8px 1px;
letter-spacing: 10px;
}
.units {
background-image: linear-gradient(to bottom, #660d04, #520002);
min-height: 400px;
}
.content {
// background: url("@/assets/imgs/display/normal/bg1.png");
background-color: #f3f3f3;
min-height: 100px;
}
.content-item {
width: 100%;
}
.custom_title { <style lang="scss" scoped>
display: flex; $node-w: 700px;
width: 100%; .content {
padding: 50px 0 40px 0; position: relative;
align-items: center; .bg {
.center { position: absolute;
width: 180px; top: 0;
margin: 0 10px; left: 0;
display: flex; z-index: 0;
align-items: center; width: 100%;
.svg-icon { height: 100%;
font-size: 50px; overflow: hidden;
color: $themeColor; > img {
margin-right: 10px; width: 100%;
overflow: h;
filter: opacity(0.2) brightness(0.6);
} }
.title { .mask {
font-size: 26px; position: absolute;
font-weight: 400; top: 0;
color: $themeColor; left: 0;
line-height: 101px; width: 100%;
height: 100%;
background: rgb(32 44 48 / 80%);
} }
} }
.desc { .inner {
flex: 1; width: 100%;
display: flex; display: flex;
align-items: center;
.modify { .inner-left {
width: 16px; width: 50%;
margin: 0 6px; height: 100vh;
img { position: relative;
width: 100%; > div {
width: 90%;
height: 60vh;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -70%);
display: flex;
justify-content: center;
align-items: center;
> img {
max-width: 100%;
max-height: 100%;
}
} }
} }
.divider { .inner-left {
flex: 1; padding: 0 60px;
height: 6px; ::v-deep .firstDiv {
background: url("@/assets/imgs/display/normal/divider.png") 100% 100% position: unset;
repeat-x; transform: none;
img {
width: 100%;
} }
} }
} .inner-right {
} width: 50%;
height: 100vh;
.enlarge {
position: absolute;
bottom: 20px;
right: 40px;
display: flex;
z-index: 9;
background-color: #c1925b;
width: 40px;
height: 40px;
border-radius: 12px;
display: flex;
justify-content: center;
align-items: center;
margin-right: 10px;
cursor: pointer;
img {
width: 24px;
height: 24px;
}
}
.intro-title {
font-size: 26px;
font-weight: 400;
color: $themeColor;
font-family: "SourceHanSerifCN-Bold";
display: flex;
align-items: center;
margin-bottom: 32px;
.svg-icon {
margin-right: 10px;
font-size: 36px;
}
}
.isFixed {
position: fixed;
left: 0;
top: 100px;
z-index: 99;
}
/**公共样式结束 */
/**样式开始 */
.content {
width: 100%;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
/**轮播图 */
.display-detail_imgs {
height: 436px;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.wrapper {
width: 1200px;
// padding: 0 13%;
// width: 100%;
// width: 78%;
display: flex;
justify-content: center;
.inner {
width: 100%;
// box-shadow: 0px 1px 56px 4px rgba(0, 0, 0, 0.16);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 200px;
position: relative; position: relative;
background-color: #fff;
// margin: 36px 0 70px;
/**基本信息 */
.display-detail_basic_info {
position: relative;
.info-container {
display: flex;
justify-content: space-between;
padding: 40px 36px;
height: 100%;
background-color: #fff;
.info-container-left {
min-height: 200px;
max-height: 460px;
margin-right: 50px;
flex: 1;
overflow: hidden;
position: relative;
// .imagesVo-image-container {
// // position: relative;
// } ul {
.img-container { line-height: 50px;
height: 100%; position: absolute;
width: 100%; right: 60px;
background: #f5f5f9; top: 30px;
img { width: 30px;
width: 100%; > li {
height: 100%; border: 1px solid #ddd;
object-fit: contain; writing-mode: vertical-lr;
} width: 100%;
} padding-top: 25px;
height: 140px;
margin: -1px 0;
> span {
color: #fff;
padding: 11px 2px;
border-radius: 8px 0 8px 0;
background: $themeColor;
} }
.info-container-right {
flex: 1;
min-height: 200px;
display: flex;
flex-direction: column;
justify-content: space-around;
.info-title {
font-size: 28px;
font-weight: bold;
color: #444;
padding-bottom: 20px;
margin-bottom: 20px;
border-bottom: 2px solid #f2f2f2;
.view-count {
font-size: 18px;
margin-top: 10px;
color: #999;
font-weight: normal;
.svg-icon {
margin-right: 10px;
}
}
}
.basic-info {
.body-item {
display: flex;
align-items: flex-start;
margin-bottom: 10px;
font-size: 18px;
.label {
display: flex;
align-items: center;
width: 120px;
// margin-right: 26px;
// margin-bottom: 10px;
font-weight: bold;
color: #999;
.svg-icon {
width: 24px;
height: 24px;
margin-right: 16px;
}
}
.value {
color: #666;
// font-weight: bold;
}
}
}
.bottom { &:hover,
display: flex; &.active {
flex-direction: column; cursor: pointer;
justify-content: flex-end; background-color: $themeColor;
.qrcode { > span {
display: flex; background: #b5800a;
justify-content: center;
img {
width: 50%;
height: 100%;
}
}
.showIcon {
height: 40px;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: $themeColor;
margin: 20px 0;
color: #fff;
cursor: pointer;
transition: all 0.3s ease;
&:hover {
// box-shadow: 2px 6px 6px 2px rgb(0 0 0 / 40%);
opacity: 0.8;
}
.svg-icon {
margin-right: 8px;
}
}
.tools {
width: 100%;
margin-top: 10px;
.tools-item {
color: #858585;
flex: 1;
display: flex;
align-items: center;
cursor: pointer;
.svg-icon {
width: 22px;
height: 22px;
margin-right: 8px;
}
.like {
color: #831122;
}
.collect {
color: $themeColor;
}
}
}
} }
} }
} }
.audio {
position: absolute;
right: -120px;
top: 34px;
cursor: pointer;
animation: audioRotate 8s linear infinite;
transform-origin: center center;
border: 2px solid $themeColor;
padding: 10px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
transition: all 0.5s ease;
&:hover {
box-shadow: 0 0 14px rgb(0 0 0 / 40%);
}
.svg-icon {
color: $themeColor;
font-size: 80px;
}
img {
width: 60px;
height: 60px;
}
}
} }
.display-detail_tabbar { .info-container-right {
background-color: #fff; width: $node-w;
display: flex; padding-bottom: 40px;
justify-content: center; .info-title {
padding: 10px; display: flex;
border-bottom: 1px solid #f2f2f2; justify-content: space-between;
.tab-item { padding-top: 60px;
height: 100%; padding-bottom: 10px;
margin-right: 20px; > span {
color: #666; font-size: 48px;
font-size: 24px; font-family: "华文行楷";
font-family: $titleFontFamily; font-weight: 600;
cursor: pointer; color: #fff;
position: relative;
&:hover {
color: $themeColor;
&::after {
display: inline-block;
}
} }
&::after { .view-count {
display: none; > span {
margin-left: 10px;
color: #ddd;
}
> svg {
color: #ddd;
}
} }
} }
.active { .basic-info {
color: $themeColor; display: flex;
&::after { flex-wrap: wrap;
display: inline-block; padding-bottom: 60px;
color: #c2cbd3;
> div {
flex-shrink: 0;
line-height: 24px;
padding: 0px 10px;
border: 1px solid #c2cbd3;
font-size: 14px;
margin-right: 10px;
margin-bottom: 10px;
border-radius: 4px;
} }
} }
.tab-item::after,
.active::after {
position: absolute;
content: "";
height: 4px;
width: 100%;
bottom: -10px;
left: 0;
background-color: $themeColor;
}
} }
/**简介和视频 */ #intro {
.display-detail_intro { min-height: 300px;
padding: 40px;
.intro-content { .intro-content {
line-height: 28px; color: #ffb836;
display: flex;
}
.left-box {
width: 60px;
background-color: $themeColor;
min-height: 200px;
color: #fff;
font-size: 28px;
writing-mode: vertical-rl;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 10px;
font-family: SourceHanSerifCN-Bold;
} }
.intro-content-container { .intro-content-container {
flex: 1; width: $node-w;
text-indent: 34px; font-size: 16px;
padding: 16px 32px; line-height: 2;
background-color: rgba($themeColor, 10%); // text-indent: 32px;
} }
} }
.display-detail_videos { #relateRelics {
display: flex; padding-top: 60px;
flex-direction: column; width: 800px;
background-color: #fff; .recommend-type {
.video-title {
display: flex;
// justify-content: center;
align-items: center;
font-size: 26px;
color: $themeColor;
margin: 80px 0 40px;
font-family: SourceHanSerifCN-Bold;
padding-left: 46px;
i {
font-size: 28px;
margin-right: 10px;
}
}
.video-names {
display: flex; display: flex;
justify-content: center; justify-content: center;
border-bottom: 1px solid #f2f0f0; margin-bottom: 40px;
margin-bottom: 30px; }
.video-item { .recommend-obj {
font-size: 18px; width: 100%;
margin: 8px 30px; overflow: hidden;
.name { .recommend-obj-node {
color: #999; display: flex;
position: relative; flex-wrap: wrap;
cursor: pointer; > div {
&:hover {
color: $themeColor;
&::after {
display: inline-block;
}
&::before {
display: inline-block;
}
}
}
.active::after,
.name::after {
content: "";
width: 50%; width: 50%;
height: 1px; padding: 20px;
background-color: $themeColor;
position: absolute;
left: 0;
bottom: -9px;
left: 50%;
transform: translateX(-50%);
display: none;
} }
.active::before,
.name::before {
content: "";
width: 0;
height: 0;
border: 8px solid transparent;
border-top-color: $themeColor;
position: absolute;
left: 50%;
bottom: -25px;
transform: translateX(-50%);
display: none;
}
.active::after,
.active::before {
display: inline-block;
}
}
}
.video-box {
height: 600px;
.video-player {
height: 100%;
} }
} .img-container {
} width: 100%;
height: 260px;
// 关联文物 display: flex;
.display-detail_relate_rc { justify-content: center;
min-height: 560px; &:hover {
// background-image: url("@/assets/imgs/display/normal/bg.png");
background-color: #fff;
background-size: 1%;
padding: 50px 46px;
.intro-title {
display: flex;
align-items: center;
font-family: SourceHanSerifCN-Bold;
}
.recommend-type {
margin-bottom: 20px;
border-bottom: 1px solid #f2f2f2;
padding-bottom: 8px;
}
.el-row {
.el-col {
.img-container {
width: 100%;
height: 214px;
position: relative;
cursor: pointer; cursor: pointer;
background-color: #939393; > img {
img { transform: scale(1.2);
width: 100%;
height: 100%;
object-fit: contain;
} }
} }
.cr-name { > img {
font-size: 18px; max-width: 100%;
// font-weight: bold; max-height: 100%;
color: #666; transition: all 0.3s ease;
text-align: left; transform: scale(1);
margin: 20px 0;
text-indent: 2px;
} }
} }
} .cr-name {
} line-height: 32px;
text-align: center;
/**关联文献 */ font-weight: 600;
.display-detail_lts { font-family: "楷体";
background-color: #fafafa; }
.lts-content {
flex: 1;
} }
} }
} }
} }
::v-deep .reader-operations {
color: #b2b2b2;
font-weight: 600;
font-family: "幼圆";
svg {
color: #b2b2b2;
}
}
} }
::v-deep .el-carousel__item--card { ::v-deep .el-carousel__item--card {
width: 100%; width: 100%;
...@@ -1154,7 +812,10 @@ $titleFontFamily: SourceHanSerifCN-Bold; ...@@ -1154,7 +812,10 @@ $titleFontFamily: SourceHanSerifCN-Bold;
font-family: SourceHanSerifCN-Bold; font-family: SourceHanSerifCN-Bold;
} }
::v-deep .el-radio__input.is-checked + .el-radio__label { ::v-deep .el-radio__input.is-checked + .el-radio__label {
color: $themeColor; color: #ffb836;
}
::v-deep .el-radio__input+.el-radio__label {
color: #fff;
} }
// ::v-deep .el-radio-button:first-child .el-radio-button__inner{ // ::v-deep .el-radio-button:first-child .el-radio-button__inner{
// border-radius: 0; // border-radius: 0;
...@@ -1201,4 +862,4 @@ $titleFontFamily: SourceHanSerifCN-Bold; ...@@ -1201,4 +862,4 @@ $titleFontFamily: SourceHanSerifCN-Bold;
animation-play-state: paused; animation-play-state: paused;
-webkit-animation-play-state: paused; /* Safari 和 Chrome */ -webkit-animation-play-state: paused; /* Safari 和 Chrome */
} }
</style> </style>
\ No newline at end of file
<template>
<div class="content">
<!-- 文物图片 -->
<!-- <div class="content-item display-detail_imgs" ref="imgs">
<img
class="animate__animated animate__fadeInDownBig"
v-if="CRDetail.imagesVo && CRDetail.imagesVo.length > 0"
id="faceImage"
:src="$getFullUrl(CRDetail.imagesVo[0].pressUrl)"
/>
<img
id="faceImage"
v-else-if="CRDetail.faceImagePressUrl"
class="animate__animated animate__fadeInDownBig"
:src="CRDetail.faceImagePressUrl"
/>
</div> -->
<div class="wrapper wow animate__animated animate__fadeInUpBig">
<div class="inner">
<!-- 展览基本信息 -->
<div class="content-item display-detail_basic_info">
<div class="info-container">
<div
class="
info-container-left
wow
animate__animated animate__fadeInLeft
"
>
<SlideImage
:imgList="CRDetail.imagesVo"
v-if="CRDetail.imagesVo && CRDetail.imagesVo.length > 0"
/>
<SlideImage
:imgList="[{ pressUrl: CRDetail.faceImagePressUrl }]"
v-else-if="CRDetail.faceImagePressUrl"
/>
</div>
<div
class="
info-container-right
wow
animate__animated animate__fadeInRight
"
>
<div class="info-title">
<span>{{ CRDetail.name }} </span>
<div class="view-count">
<svg-icon icon-class="view"></svg-icon>
<span>{{ CRDetail.browseCount }}</span>
</div>
</div>
<div class="basic-info">
<div class="body-item">
<span class="label">
<!-- <svg-icon icon-class="keyword"></svg-icon> -->
年代</span
>
<span class="value">{{ CRDetail.yearsLabel || "暂无" }}</span>
</div>
<div class="body-item">
<span class="label">
<!-- <svg-icon icon-class="glww"></svg-icon> -->
来源</span
>
<span class="value">{{ CRDetail.sourceWay || "暂无" }}</span>
</div>
<div class="body-item">
<span class="label">
<!-- <svg-icon icon-class="zllx"></svg-icon> -->
类别</span
>
<span class="value">{{ CRDetail.typeLabel || "暂无" }}</span>
</div>
<div class="body-item">
<span class="label">
<!-- <svg-icon icon-class="zlxz"></svg-icon> -->
级别</span
>
<span class="value">{{ CRDetail.levelLabel || "暂无" }}</span>
</div>
<div class="body-item">
<span class="label">
<!-- <svg-icon icon-class="wwzd"></svg-icon> -->
质地</span
>
<span class="value">{{
CRDetail.textureTypeLabel || "暂无"
}}</span>
</div>
<div class="body-item">
<span class="label">
<!-- <svg-icon icon-class="wwcc"></svg-icon> -->
尺寸
</span>
<span class="value">{{ CRDetail.detailSize || "暂无" }}</span>
</div>
<div class="body-item">
<span class="label">
<!-- <svg-icon icon-class="zldq"></svg-icon> -->
馆藏单位</span
>
<span class="value">{{ CRDetail.deptName || "暂无" }}</span>
</div>
</div>
<div class="bottom">
<div class="tools">
<ReaderOperations
:loveCount="CRDetail.loveCount"
:loveCountStatus="Boolean(CRDetail.loveCountStatus)"
:collectCount="CRDetail.collectCount"
:collectCountStatus="Boolean(CRDetail.collectCountStatus)"
:sourceId="CRDetail.crId"
:title="CRDetail.name"
:sourceType="'biz_cultural_relic'"
@reload="loadDetail"
/>
</div>
<div class="showIcon" v-if="CRDetail.url3d" @click="handleTo3D">
<svg-icon icon-class="3d" class="icon"></svg-icon
>查看文物3D模型
</div>
</div>
</div>
</div>
<div
class="audio wow animate__animated animate__fadeInRight"
:style="{ animationPlayState: audioPlaying ? 'running' : 'paused' }"
@click="handleClickAudio"
v-if="CRDetail.audiosVo && CRDetail.audiosVo.length > 0"
>
<!-- <img src="@/assets/imgs/display/normal/music.png" alt="" /> -->
<svg-icon icon-class="music"></svg-icon>
<AudioPlayer
style="display: none"
:url="$getFullUrl(CRDetail.audiosVo[0].url)"
ref="AudioPlayer"
/>
</div>
</div>
<div
class="content-item display-detail_tabbar"
id="tabbar"
:class="{ isFixed: isFixed }"
>
<span v-for="(item, index) in tabbarData" :key="index">
<span
@click="handleClickTabItem(item)"
:class="[
'tab-item',
currentTab && currentTab.domId == item.domId ? 'active' : '',
]"
v-html="item.name"
v-if="CRDetail[item.domId] && CRDetail[item.domId].length > 0"
>
</span>
<span
@click="handleClickTabItem(item)"
v-else-if="
item.domId == 'relateRelics' &&
relateRelics &&
relateRelics.length > 0
"
v-html="item.name"
:class="[
'tab-item',
currentTab && currentTab.domId == item.domId ? 'active' : '',
]"
>
</span>
</span>
</div>
<!-- 文物简介 -->
<div
class="content-item display-detail_intro"
v-if="CRDetail.intro"
id="intro"
>
<div class="intro-title">
<!-- <svg-icon icon-class="jianjie"></svg-icon> -->
<!-- <i class="el-icon-tickets" style="margin-right: 10px"></i> -->
<span>文物简介</span>
</div>
<div class="intro-content">
<div class="left-box">简介</div>
<div class="intro-content-container" v-html="CRDetail.intro"></div>
</div>
</div>
<!-- 文物视频 -->
<div
class="content-item display-detail_videos"
v-if="CRDetail.videosVo && CRDetail.videosVo.length > 0"
id="videosVo"
>
<div class="video-title">
<!-- <i class="el-icon-video-camera"></i> -->
相关视频
</div>
<div class="video-names">
<div
class="video-item"
v-for="(item, index) in CRDetail.videosVo"
:key="index"
@click="handleChangeCurrentVideo(item)"
>
<div
:class="[
'name',
currentVideo && item.fileId == currentVideo.fileId
? 'active'
: '',
]"
>
{{ item.name.split(".")[0] }}
</div>
</div>
</div>
<video-player
v-if="currentVideo"
:src="$getFullUrl(currentVideo.url)"
class="video-box"
></video-player>
</div>
<!--相关文物 -->
<div
class="content-item display-detail_relate_rc"
ref="units"
id="relateRelics"
>
<div class="intro-title">
<!-- <i class="el-icon-menu" style="margin-right: 10px"></i> -->
<span>相关文物推荐</span>
</div>
<div class="recommend-type">
<el-radio-group v-model="currentRcKey" size="small">
<el-radio :label="'type'" v-if="CRDetail.type">同类别</el-radio>
<el-radio :label="'years'" v-if="CRDetail.years">同年代</el-radio>
<el-radio :label="'deptId'" v-if="CRDetail.deptId"
>同馆藏</el-radio
>
</el-radio-group>
</div>
<el-row :gutter="8" v-if="relateRelics.length > 0">
<el-col
:span="6"
v-for="(item, index) in relateRelics"
:key="index"
>
<div class="img-container" @click="handleToCr(item)">
<img :src="item.faceImagePressUrl" alt="" />
</div>
<div class="cr-name">{{ item.name }}</div>
</el-col>
</el-row>
<el-empty
v-else
description="暂无相关推荐,去看看其他的吧~"
></el-empty>
</div>
<!-- 相关文献 -->
<div
class="content-item display-detail_lts"
id="literatureVo"
v-if="CRDetail.literatureVo && CRDetail.literatureVo.length > 0"
>
<!-- <div class="wrapper"> -->
<div class="custom_title wow animate__animated animate__fadeInUp">
<div class="desc">
<div class="divider"></div>
<img
src="@/assets/imgs/display/normal/title-desc.png"
class="modify"
alt=""
/>
</div>
<div class="center">
<svg-icon icon-class="wenxian"></svg-icon>
<span class="title">相关文献</span>
</div>
<div class="desc">
<img
src="@/assets/imgs/display/normal/title-desc.png"
class="modify"
alt=""
/>
<div class="divider"></div>
</div>
</div>
<div class="lts-content wow animate__animated animate__fadeInUp">
<el-table
:data="CRDetail.literatureVo"
:header-cell-style="{
background: '#eeeeee',
color: '#333',
}"
:row-style="tableRowStyle"
>
<el-table-column
prop="name"
label="名称"
align="center"
></el-table-column>
<el-table-column
prop="authors"
label="作者"
align="center"
></el-table-column>
<el-table-column
prop="date"
label="出版时间"
align="center"
></el-table-column>
<el-table-column
align="center"
prop="source"
label="出版所在刊物"
></el-table-column>
<el-table-column label="阅读" align="center">
<template slot-scope="scope">
<div class="pdf-img" @click="handleViewLt(scope.row)">
<img src="@/assets/imgs/display/ch/pdf-icon.png" />
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
<el-image-viewer
v-if="imgViewerVisible"
:on-close="closeImgViewer"
:url-list="imgList"
/>
</div>
</template>
<script>
// import SearchBar from "@/components/SearchBar";
// import CustomTitle from "@/components/CustomTitle";
// import QRCode from "qrcodejs2";
import AudioPlayer from "@/components/AudioPlayer";
import Video from "@/components/Video";
import ReaderOperations from "@/components/ReaderOperations";
import { getRCDetailByIdV2, crRecommendByPage } from "@/api/culturalRelic";
import { previewFile } from "@/utils/index";
import videoPlayer from "@/components/VideoPlayer";
import SlideImage from "@/components/SlideImage";
import { isElementInViewport2 } from "@/utils/index";
export default {
components: {
AudioPlayer,
ReaderOperations,
Video,
videoPlayer,
SlideImage,
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer"),
},
data() {
let vm = this;
return {
imgViewerVisible: false,
CRDetail: {},
relateRelics: [],
audioPlaying: true,
dotImg: require("@/assets/imgs/display/normal/mz-dot.png"),
dotImgS: require("@/assets/imgs/display/normal/mz-dot-s.png"),
page: null,
currentRcKey: "type",
currentVideo: null,
currentTab: null,
isFixed: false,
tabbarData: [
{
name: "文物简介",
domId: "intro",
},
{
name: "相关视频",
domId: "videosVo",
},
{
name: "相关文物",
domId: "relateRelics",
},
{
name: "相关文献",
domId: "literatureVo",
},
],
// tabbarItems: ["文物简介", "相关视频", "相关文物", "相关文献"],
};
},
watch: {
"$route.params.crId"(value) {
this.loadDetail(value);
},
currentRcKey(key) {
this.loadCrRecommend();
},
},
async mounted() {
let crId = this.$route.params.crId;
this.loadDetail(crId);
setTimeout(() => {
window.addEventListener("scroll", this.initHeight);
this.offsetTop = document.querySelector("#tabbar").offsetTop; //距离offsetParent的高度
this.tabbarData.map((item) => {
let dom = document.getElementById(item.domId);
if (dom) {
item.position = dom.offsetTop - 320; //100navbar 55tabbar
}
});
}, 500);
},
beforeRouteLeave(to, form, next) {
// 离开路由移除滚动事件
window.removeEventListener("scroll", this.initHeight);
next();
},
methods: {
async loadDetail(crId) {
if (crId) {
let res = await getRCDetailByIdV2({ crId });
if (res.code == 0) {
this.CRDetail = res.data.culturalRelicVo;
// this.relateRelics = res.data.recommendList.records;
if (this.CRDetail.videosVo && this.CRDetail.videosVo.length > 0) {
this.currentVideo = this.CRDetail.videosVo[0];
}
// 获取关联文物
this.loadCrRecommend();
this.$nextTick(() => {
// this.replaceFaceImage();
if (this.CRDetail.audiosVo && this.CRDetail.audiosVo.length > 0) {
this.$message.info("正在播放当前文物讲解音频,点击按钮可关闭");
this.$refs.AudioPlayer.play();
}
});
}
}
},
async loadCrRecommend() {
const { crId } = this.CRDetail;
const params = {
crId,
page: 1,
limit: 4,
};
if (this.currentRcKey == "type") {
params.type = this.CRDetail.type;
}
if (this.currentRcKey == "years") {
params.years = this.CRDetail.years;
}
if (this.currentRcKey == "deptId") {
params.deptId = this.CRDetail.deptId;
}
let res = await crRecommendByPage(params);
this.relateRelics = res.data.records;
// console.log("res", res);
},
replaceFaceImage() {
var img = new Image(); //新建一个图片对象
let url; //最终显示的大图
// debugger
if (this.CRDetail.faceImagePressUrl) {
url = this.$getFullUrl(this.CRDetail.faceImageUrl);
} else if (this.CRDetail.imagesVo.length > 0) {
url = this.$getFullUrl(this.CRDetail.imagesVo[0].url);
}
let faceImage = document.getElementById("faceImage");
img.src = url;
img.onload = function () {
faceImage.src = url;
};
},
handleBack() {
this.$router.go(-1);
},
handleTo3D() {
this.$message.info("即将打开3D模型...");
setTimeout(() => {
window.open(this.CRDetail.url3d, "_blank");
}, 1000);
},
closeImgViewer() {
this.imgViewerVisible = false;
},
handelPreviewImages(items, hasImages) {
this.imgViewerVisible = true;
if (hasImages) {
this.imgList = items.map((item) => this.$getFullUrl(item.url));
} else {
this.imgList = items.map((item) => this.$getFullUrl(item));
}
},
handleToDetail(crId) {
// const newPage = this.$router.resolve({
// path: `culturalReli/${crId}`,
// });
// window.open(newPage.href, "_blank");
this.$router.push(`culturalRelic/${crId}`);
},
// 点击音频
handleClickAudio() {
this.audioPlaying = !this.audioPlaying;
if (this.audioPlaying) {
this.$refs["AudioPlayer"].play();
// console.log(this.$refs['audioContainer']);
} else {
this.$refs["AudioPlayer"].pause();
}
},
// 关联文献的行样式调整
tableRowStyle({ row, rowIndex }) {
if (rowIndex % 2 == 0) {
return {
background: "#f9f9f9 !important",
};
} else {
return {
background: "#fff !important",
};
}
},
// 预览关联文献
handleViewLt(item) {
previewFile(item.files[0].url, item.files[0].name);
},
closeImgViewer() {
this.imgViewerVisible = false;
},
handleToCr(item) {
const { crId } = item;
const newPage = this.$router.resolve({
path: "/culturalRelic/" + crId,
});
window.open(newPage.href, "_blank");
// this.$router.push(`/culturalRelic/${crId}`);
},
handleChangeCurrentVideo(video) {
this.currentVideo = video;
},
handleClickTabItem(item) {
this.currentTab = item;
if (item.position) {
document.documentElement.scrollTop = item.position;
}
},
initHeight() {
let scrollTop =
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop;
this.isFixed = scrollTop > this.offsetTop - 155 ? true : false; //100为navbar的高度,55为tabbar的高度
this.tabbarData.map((item) => {
let content = document.getElementById(item.domId);
if (content && isElementInViewport2(content)) {
this.currentTab = item;
}
});
},
},
};
</script>
<style lang="scss" >
// 自定义分页器样式
#page {
height: 30px;
display: flex;
justify-content: center;
}
.page-item {
cursor: pointer;
}
</style>
<style lang="scss" scoped>
// 中国风主题样式
/**公共样式开始 */
$titleFontFamily: SourceHanSerifCN-Bold;
.custom-title {
width: 50px;
background-color: #d72f3f;
min-height: 300px;
color: #fff;
font-size: 28px;
writing-mode: vertical-rl;
display: flex;
align-items: center;
justify-content: center;
box-shadow: rgb(215 47 63 / 30%) 4px 3px 8px 1px;
letter-spacing: 10px;
}
.units {
background-image: linear-gradient(to bottom, #660d04, #520002);
min-height: 400px;
}
.content {
// background: url("@/assets/imgs/display/normal/bg1.png");
background-color: #f3f3f3;
min-height: 100px;
}
.content-item {
width: 100%;
}
.custom_title {
display: flex;
width: 100%;
padding: 50px 0 40px 0;
align-items: center;
.center {
width: 180px;
margin: 0 10px;
display: flex;
align-items: center;
.svg-icon {
font-size: 50px;
color: $themeColor;
margin-right: 10px;
}
.title {
font-size: 26px;
font-weight: 400;
color: $themeColor;
line-height: 101px;
}
}
.desc {
flex: 1;
display: flex;
align-items: center;
.modify {
width: 16px;
margin: 0 6px;
img {
width: 100%;
}
}
.divider {
flex: 1;
height: 6px;
background: url("@/assets/imgs/display/normal/divider.png") 100% 100%
repeat-x;
img {
width: 100%;
}
}
}
}
.enlarge {
position: absolute;
bottom: 20px;
right: 40px;
display: flex;
z-index: 9;
background-color: #c1925b;
width: 40px;
height: 40px;
border-radius: 12px;
display: flex;
justify-content: center;
align-items: center;
margin-right: 10px;
cursor: pointer;
img {
width: 24px;
height: 24px;
}
}
.intro-title {
font-size: 26px;
font-weight: 400;
color: $themeColor;
font-family: "SourceHanSerifCN-Bold";
display: flex;
align-items: center;
margin-bottom: 32px;
.svg-icon {
margin-right: 10px;
font-size: 36px;
}
}
.isFixed {
position: fixed;
left: 0;
top: 100px;
z-index: 99;
}
/**公共样式结束 */
/**样式开始 */
.content {
width: 100%;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
/**轮播图 */
.display-detail_imgs {
height: 436px;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.wrapper {
width: 1200px;
// padding: 0 13%;
// width: 100%;
// width: 78%;
display: flex;
justify-content: center;
.inner {
width: 100%;
// box-shadow: 0px 1px 56px 4px rgba(0, 0, 0, 0.16);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 200px;
position: relative;
background-color: #fff;
// margin: 36px 0 70px;
/**基本信息 */
.display-detail_basic_info {
position: relative;
.info-container {
display: flex;
justify-content: space-between;
padding: 40px 36px;
height: 100%;
background-color: #fff;
.info-container-left {
min-height: 200px;
max-height: 460px;
margin-right: 50px;
flex: 1;
overflow: hidden;
position: relative;
// .imagesVo-image-container {
// // position: relative;
// }
.img-container {
height: 100%;
width: 100%;
background: #f5f5f9;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
}
.info-container-right {
flex: 1;
min-height: 200px;
display: flex;
flex-direction: column;
justify-content: space-around;
.info-title {
font-size: 28px;
font-weight: bold;
color: #444;
padding-bottom: 20px;
margin-bottom: 20px;
border-bottom: 2px solid #f2f2f2;
.view-count {
font-size: 18px;
margin-top: 10px;
color: #999;
font-weight: normal;
.svg-icon {
margin-right: 10px;
}
}
}
.basic-info {
.body-item {
display: flex;
align-items: flex-start;
margin-bottom: 10px;
font-size: 18px;
.label {
display: flex;
align-items: center;
width: 120px;
// margin-right: 26px;
// margin-bottom: 10px;
font-weight: bold;
color: #999;
.svg-icon {
width: 24px;
height: 24px;
margin-right: 16px;
}
}
.value {
color: #666;
// font-weight: bold;
}
}
}
.bottom {
display: flex;
flex-direction: column;
justify-content: flex-end;
.qrcode {
display: flex;
justify-content: center;
img {
width: 50%;
height: 100%;
}
}
.showIcon {
height: 40px;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: $themeColor;
margin: 20px 0;
color: #fff;
cursor: pointer;
transition: all 0.3s ease;
&:hover {
// box-shadow: 2px 6px 6px 2px rgb(0 0 0 / 40%);
opacity: 0.8;
}
.svg-icon {
margin-right: 8px;
}
}
.tools {
width: 100%;
margin-top: 10px;
.tools-item {
color: #858585;
flex: 1;
display: flex;
align-items: center;
cursor: pointer;
.svg-icon {
width: 22px;
height: 22px;
margin-right: 8px;
}
.like {
color: #831122;
}
.collect {
color: $themeColor;
}
}
}
}
}
}
.audio {
position: absolute;
right: -120px;
top: 34px;
cursor: pointer;
animation: audioRotate 8s linear infinite;
transform-origin: center center;
border: 2px solid $themeColor;
padding: 10px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
transition: all 0.5s ease;
&:hover {
box-shadow: 0 0 14px rgb(0 0 0 / 40%);
}
.svg-icon {
color: $themeColor;
font-size: 80px;
}
img {
width: 60px;
height: 60px;
}
}
}
.display-detail_tabbar {
background-color: #fff;
display: flex;
justify-content: center;
padding: 10px;
border-bottom: 1px solid #f2f2f2;
.tab-item {
height: 100%;
margin-right: 20px;
color: #666;
font-size: 24px;
font-family: $titleFontFamily;
cursor: pointer;
position: relative;
&:hover {
color: $themeColor;
&::after {
display: inline-block;
}
}
&::after {
display: none;
}
}
.active {
color: $themeColor;
&::after {
display: inline-block;
}
}
.tab-item::after,
.active::after {
position: absolute;
content: "";
height: 4px;
width: 100%;
bottom: -10px;
left: 0;
background-color: $themeColor;
}
}
/**简介和视频 */
.display-detail_intro {
padding: 40px;
.intro-content {
line-height: 28px;
display: flex;
}
.left-box {
width: 60px;
background-color: $themeColor;
min-height: 200px;
color: #fff;
font-size: 28px;
writing-mode: vertical-rl;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 10px;
font-family: SourceHanSerifCN-Bold;
}
.intro-content-container {
flex: 1;
text-indent: 34px;
padding: 16px 32px;
background-color: rgba($themeColor, 10%);
}
}
.display-detail_videos {
display: flex;
flex-direction: column;
background-color: #fff;
.video-title {
display: flex;
// justify-content: center;
align-items: center;
font-size: 26px;
color: $themeColor;
margin: 80px 0 40px;
font-family: SourceHanSerifCN-Bold;
padding-left: 46px;
i {
font-size: 28px;
margin-right: 10px;
}
}
.video-names {
display: flex;
justify-content: center;
border-bottom: 1px solid #f2f0f0;
margin-bottom: 30px;
.video-item {
font-size: 18px;
margin: 8px 30px;
.name {
color: #999;
position: relative;
cursor: pointer;
&:hover {
color: $themeColor;
&::after {
display: inline-block;
}
&::before {
display: inline-block;
}
}
}
.active::after,
.name::after {
content: "";
width: 50%;
height: 1px;
background-color: $themeColor;
position: absolute;
left: 0;
bottom: -9px;
left: 50%;
transform: translateX(-50%);
display: none;
}
.active::before,
.name::before {
content: "";
width: 0;
height: 0;
border: 8px solid transparent;
border-top-color: $themeColor;
position: absolute;
left: 50%;
bottom: -25px;
transform: translateX(-50%);
display: none;
}
.active::after,
.active::before {
display: inline-block;
}
}
}
.video-box {
height: 600px;
.video-player {
height: 100%;
}
}
}
// 关联文物
.display-detail_relate_rc {
min-height: 560px;
// background-image: url("@/assets/imgs/display/normal/bg.png");
background-color: #fff;
background-size: 1%;
padding: 50px 46px;
.intro-title {
display: flex;
align-items: center;
font-family: SourceHanSerifCN-Bold;
}
.recommend-type {
margin-bottom: 20px;
border-bottom: 1px solid #f2f2f2;
padding-bottom: 8px;
}
.el-row {
.el-col {
.img-container {
width: 100%;
height: 214px;
position: relative;
cursor: pointer;
background-color: #939393;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
.cr-name {
font-size: 18px;
// font-weight: bold;
color: #666;
text-align: left;
margin: 20px 0;
text-indent: 2px;
}
}
}
}
/**关联文献 */
.display-detail_lts {
background-color: #fafafa;
.lts-content {
flex: 1;
}
}
}
}
}
::v-deep .el-carousel__item--card {
width: 100%;
height: 100%;
transform: translateX(0) scale(1) !important;
}
::v-deep .el-carousel {
height: 100%;
}
::v-deep .el-carousel__container {
height: 100%;
}
::v-deep .el-tree {
background: transparent;
.el-tree-node__content {
height: 50px;
:hover {
background: #fff;
color: $themeColor;
}
}
}
::v-deep .el-radio__input {
display: none;
}
::v-deep .el-radio__label {
font-size: 18px;
padding-left: 0;
font-family: SourceHanSerifCN-Bold;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
color: $themeColor;
}
// ::v-deep .el-radio-button:first-child .el-radio-button__inner{
// border-radius: 0;
// }
// ::v-deep .el-radio-button:last-child .el-radio-button__inner{
// border-radius: 0;
// }
@keyframes filmMoveLeft {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-1200px);
}
}
@keyframes filmMoveRight {
0% {
transform: translateX(0);
}
100% {
transform: translateX(1200px);
}
}
@keyframes audioRotate {
0% {
transform: rotateZ(0deg);
}
100% {
transform: rotateZ(360deg);
}
}
@-webkit-keyframes audioRotate {
0% {
transform: rotateZ(0deg);
}
100% {
transform: rotateZ(360deg);
}
}
.animation-play-paused {
animation-play-state: paused;
-webkit-animation-play-state: paused; /* Safari 和 Chrome */
}
</style>
\ No newline at end of file
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<div class="search-bar wow animate__animated animate__fadeIn"> <div class="search-bar wow animate__animated animate__fadeIn">
<div class="search-wrapper"> <div class="search-wrapper">
<div class="search-item" @click="handleClickSearchBar('type')"> <div class="search-item" @click="handleClickSearchBar('type')">
<span>{{currentType}}</span> <span>{{ currentType }}</span>
<i class="el-icon-caret-bottom"></i> <i class="el-icon-caret-bottom"></i>
</div> </div>
<div class="search-item" @click="handleClickSearchBar('years')"> <div class="search-item" @click="handleClickSearchBar('years')">
<span>{{currentYears}}</span> <span>{{ currentYears }}</span>
<i class="el-icon-caret-bottom"></i> <i class="el-icon-caret-bottom"></i>
</div> </div>
...@@ -87,88 +87,102 @@ ...@@ -87,88 +87,102 @@
<span>{{list.total}}件文物</span> <span>{{list.total}}件文物</span>
</div> --> </div> -->
<div class="content-wrapper"> <div class="content-wrapper">
<div class="content"> <div class="shade">
<el-row :gutter="40" class="cr-list"> <div class="jxl">
<el-col <img src="@/assets/imgs/shade/jxl.png" alt="" />
:span="item.status == 1 ? 6 : 0" </div>
class="cr-item" </div>
@click.native="handleClick(item)" <div>
@mouseenter.native="handleEnterImg(item)" <div class="content">
@mouseleave.native="handleLeaveImg(item)" <el-row :gutter="40" class="cr-list">
v-for="(item, index) in list.records" <el-col
:key="index" :span="item.status == 1 ? 6 : 0"
> class="cr-item"
<div @click.native="handleClick(item)"
class="container wow animate__animated animate__fadeInUp" @mouseenter.native="handleEnterImg(item)"
v-if="item.status == 1" @mouseleave.native="handleLeaveImg(item)"
v-for="(item, index) in list.records"
:key="index"
> >
<div class="img-container"> <div
<img class="container wow animate__animated animate__fadeInUp"
:src=" v-if="item.status == 1"
$getFullUrl(item.faceImagePressUrl || item.faceImageUrl) >
" <div class="img-container">
width="100%"
class="face-image"
lazy
/>
<div class="deco-left-top">
<img
:src="
require(`@/assets/imgs/list/img-deco${
item == currentImg ? '' : '-g'
}.png`)
"
alt=""
/>
</div>
<div class="deco-left-bottom">
<img <img
:src=" :src="
require(`@/assets/imgs/list/img-deco${ $getFullUrl(item.faceImagePressUrl || item.faceImageUrl)
item == currentImg ? '' : '-g'
}.png`)
" "
alt="" width="100%"
class="face-image"
lazy
/> />
<!-- <div class="deco-left-top">
<img
:src="
require(`@/assets/imgs/list/img-deco${
item == currentImg ? '' : '-g'
}.png`)
"
alt=""
/>
</div>
<div class="deco-left-bottom">
<img
:src="
require(`@/assets/imgs/list/img-deco${
item == currentImg ? '' : '-g'
}.png`)
"
alt=""
/>
</div>
<div class="deco-right-top">
<img
:src="
require(`@/assets/imgs/list/img-deco${
item == currentImg ? '' : '-g'
}.png`)
"
alt=""
/>
</div>
<div class="deco-right-bottom">
<img
:src="
require(`@/assets/imgs/list/img-deco${
item == currentImg ? '' : '-g'
}.png`)
"
alt=""
/>
</div> -->
</div> </div>
<div class="deco-right-top"> <div class="showIcon" v-if="item && item.url3d">
<img <svg-icon icon-class="3d" class="icon"></svg-icon>
:src="
require(`@/assets/imgs/list/img-deco${
item == currentImg ? '' : '-g'
}.png`)
"
alt=""
/>
</div> </div>
<div class="deco-right-bottom"> <div class="hover-bg">
<img <div>
:src=" <div>
require(`@/assets/imgs/list/img-deco${ <div class="name">{{ item.name }}</div>
item == currentImg ? '' : '-g' <div class="depart">{{ item.deptName }}</div>
}.png`) </div>
" </div>
alt=""
/>
</div> </div>
</div> <div class="desc">
<div class="showIcon" v-if="item && item.url3d"> <div class="name">{{ item.name }}</div>
<svg-icon icon-class="3d" class="icon"></svg-icon> <div class="desc-container">
</div> <div class="left">
<div class="desc"> <!-- <div class="deptName">
<div class="name">{{ item.name }}</div>
<div class="desc-container">
<div class="left">
<!-- <div class="deptName">
<span>关键词:</span> <span>关键词:</span>
<span>{{ item.keyword }}</span> <span>{{ item.keyword }}</span>
</div> --> </div> -->
<div class="deptName"> <div class="deptName">
<span>展览单位:</span> <span>展览单位:</span>
<span>{{ item.deptName }}</span> <span>{{ item.deptName }}</span>
</div>
</div> </div>
</div> <!-- <div class="right">
<!-- <div class="right">
<span class="collect"> <span class="collect">
<svg-icon icon-class="collect"></svg-icon> <svg-icon icon-class="collect"></svg-icon>
<span>{{ <span>{{
...@@ -180,27 +194,28 @@ ...@@ -180,27 +194,28 @@
<span>{{ item.browseCount }}</span> <span>{{ item.browseCount }}</span>
</span> </span>
</div> --> </div> -->
</div>
</div> </div>
</div> </div>
</div> </el-col>
</el-col> </el-row>
</el-row> <el-empty
<el-empty description="暂无数据"
description="暂无数据" v-if="list.records.length == 0"
v-if="list.records.length == 0" ></el-empty>
></el-empty> <div class="pagination-container">
<div class="pagination-container"> <el-pagination
<el-pagination @size-change="handleSizeChange"
@size-change="handleSizeChange" @current-change="handleCurrentChange"
@current-change="handleCurrentChange" :current-page="Number(list.current)"
:current-page="Number(list.current)" :page-sizes="[20, 40, 100]"
:page-sizes="[20, 40, 100]" :page-size="Number(list.size)"
:page-size="Number(list.size)" layout="total, prev, pager, next"
layout="total, prev, pager, next" :total="Number(list.total)"
:total="Number(list.total)" class="pagination"
class="pagination" >
> </el-pagination>
</el-pagination> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -250,13 +265,13 @@ export default { ...@@ -250,13 +265,13 @@ export default {
{ {
label: "全部年代", label: "全部年代",
value: "", value: "",
} },
]; ];
let typeList = [ let typeList = [
{ {
label: "全部类别", label: "全部类别",
value: "", value: "",
} },
]; ];
await this.$store.dispatch("dict/getDictList", ["culturalRelicType"]); await this.$store.dispatch("dict/getDictList", ["culturalRelicType"]);
for (const key in this.dicts.culturalRelicType) { for (const key in this.dicts.culturalRelicType) {
...@@ -599,12 +614,12 @@ $text-indent: 16px; ...@@ -599,12 +614,12 @@ $text-indent: 16px;
} }
} }
.total{ .total {
padding: 0 13%; padding: 0 13%;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
background-color: #fff; background-color: #fff;
&>span{ & > span {
display: inline-block; display: inline-block;
padding: 4px 8px; padding: 4px 8px;
background-color: #dfab46; background-color: #dfab46;
...@@ -615,7 +630,33 @@ $text-indent: 16px; ...@@ -615,7 +630,33 @@ $text-indent: 16px;
} }
.content-wrapper { .content-wrapper {
background-color: #fff; background-color: #fff;
padding: 0;
padding-bottom: 126px; padding-bottom: 126px;
> div {
padding: 0 13%;
}
.shade {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
padding: 0;
z-index: 0;
pointer-events: none;
> div.jxl {
height: 70vh;
filter: brightness(0.1);
opacity: 0.1;
position: absolute;
bottom: -80px;
right: -50px;
> img {
height: 100%;
}
}
}
.content { .content {
padding: 16px 0 60px; padding: 16px 0 60px;
...@@ -628,17 +669,26 @@ $text-indent: 16px; ...@@ -628,17 +669,26 @@ $text-indent: 16px;
.cr-item { .cr-item {
margin-bottom: 40px; margin-bottom: 40px;
.container { .container {
border: 2px solid #f1f1f1; // border: 2px solid #f1f1f1;
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
cursor: pointer; cursor: pointer;
transition: all 0.5s ease; transition: all 0.5s ease;
width: 350px;
height: 350px;
// overflow: hidden;
justify-content: center;
text-align: center;
text-align: center;
&:hover { &:hover {
border: 2px solid $themeColor; // border: 2px solid $themeColor;
.face-image {
// border-radius: 100%;
/* .face-image {
transform: scale(1.2); transform: scale(1.2);
} } */
.img-container { .img-container {
.deco-left-top, .deco-left-top,
.deco-left-bottom, .deco-left-bottom,
...@@ -646,20 +696,75 @@ $text-indent: 16px; ...@@ -646,20 +696,75 @@ $text-indent: 16px;
.deco-right-bottom { .deco-right-bottom {
display: block; display: block;
} }
> img {
transform: scale(1.2);
filter: grayscale(0.7) blur(1px);
}
} }
.desc { .desc {
background: url("@/assets/imgs/list/card-title-bg.png"); // background: url("@/assets/imgs/list/card-title-bg.png");
// display: none;
opacity: 0;
}
.hover-bg {
> div {
opacity: 1;
width: 100%;
height: 100%;
}
}
}
.hover-bg {
width: 100%;
height: 100%;
// padding: 20px;
position: absolute;
left: 0;
top: 0;
> div {
opacity: 0;
width: 120%;
height: 120%;
display: flex;
justify-content: center;
align-items: center;
background: rgb(66 85 92 / 80%);
color: #fff;
text-align: center;
border-radius: 100%;
transition: all 0.3s ease;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
> div {
.name {
font-weight: 600;
font-family: "楷体";
font-size: 26px;
padding: 20px;
}
.depart {
color: #84b3cf;
font-family: "黑体";
}
}
} }
} }
.img-container { .img-container {
// background-color:#939393; // background-color:#939393;
background-color: #42555c; // background-color: #42555c;
// #42555c // #42555c
height: 268px; // height: 268px;
cursor: pointer; cursor: pointer;
transition: all 0.5s ease; transition: all 0.5s ease;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
width: 350px;
height: 250px;
padding: 30px;
.face-image { .face-image {
height: 100%; height: 100%;
object-fit: contain; object-fit: contain;
...@@ -701,10 +806,12 @@ $text-indent: 16px; ...@@ -701,10 +806,12 @@ $text-indent: 16px;
} }
} }
.desc { .desc {
height: 120px; // height: 120px;
padding: 36px 30px 20px; height: 36px;
transition: all 0.5s ease; // padding: 36px 30px 20px;
// transition: all 0.5s ease;
background: #fff; background: #fff;
// display: none;
.name { .name {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
...@@ -719,6 +826,7 @@ $text-indent: 16px; ...@@ -719,6 +826,7 @@ $text-indent: 16px;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
justify-content: space-between; justify-content: space-between;
display: none;
.left { .left {
.deptName { .deptName {
font-size: 14px; font-size: 14px;
...@@ -790,6 +898,73 @@ $text-indent: 16px; ...@@ -790,6 +898,73 @@ $text-indent: 16px;
} }
} }
.cultural-relic {
.content {
.cr-list {
.cr-item {
.container {
.info {
position: relative;
border-radius: 10px;
overflow: hidden;
padding: 50px 10px;
.name {
text-align: center;
padding-bottom: 50px;
}
.depart {
position: absolute;
bottom: 30px;
right: 10px;
}
.corner {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
.deco-left-top,
.deco-left-bottom,
.deco-right-top,
.deco-right-bottom {
position: absolute;
width: 36px;
height: 36px;
// display: none;
transition: all 0.5s ease;
img {
width: 100%;
height: 100%;
}
}
.deco-left-top {
left: 0;
top: 0;
transform: rotate(180deg);
}
.deco-left-bottom {
left: 0;
bottom: 0;
transform: rotate(90deg);
}
.deco-right-top {
right: 0;
top: 0;
transform: rotate(270deg);
}
.deco-right-bottom {
right: 0;
bottom: 0;
}
}
}
}
}
}
}
}
::v-deep .el-cascader .el-input .el-icon-arrow-down, ::v-deep .el-cascader .el-input .el-icon-arrow-down,
::v-deep .el-select .el-input .el-select__caret { ::v-deep .el-select .el-input .el-select__caret {
font-weight: bold; font-weight: bold;
...@@ -842,4 +1017,4 @@ $text-indent: 16px; ...@@ -842,4 +1017,4 @@ $text-indent: 16px;
//可设置滚动条颜色 //可设置滚动条颜色
background: rgba($color: #000000, $alpha: 0.4); background: rgba($color: #000000, $alpha: 0.4);
} }
</style> </style>
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</template> </template>
<script> <script>
import mSmgz from "./topic/smgz.vue" import mSmgz from "./topic/smgz2.vue"
import mJyycc from './topic/jyycc.vue' import mJyycc from './topic/jyycc.vue'
import mYlgdyw from './topic/ylgdyw.vue' import mYlgdyw from './topic/ylgdyw.vue'
import mSdcs from './topic/sdcs.vue' import mSdcs from './topic/sdcs.vue'
......
<template>
<div class="boutique">
<div class="banner">
<img src="@/assets/imgs/banner.png" alt="" />
</div>
</div>
</template>
<style lang="scss" scoped>
.boutique {
.banner {
width: 100%;
height: 100%;
> img {
width: 100%;
}
}
}
</style>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</template> </template>
<script> <script>
import pic0 from "@/assets/imgs/boutique/1.jpg"; import pic0 from "@/assets/imgs/topic/smgz/dzbwg.png";
import pic1 from "@/assets/imgs/topic/jyycc/jyycc.jpg"; import pic1 from "@/assets/imgs/topic/jyycc/jyycc.jpg";
import pic2 from "@/assets/imgs/topic/ylgdyw/ylgdyw.png"; import pic2 from "@/assets/imgs/topic/ylgdyw/ylgdyw.png";
import pic3 from "@/assets/imgs/topic/sdcs/sdcs.png"; import pic3 from "@/assets/imgs/topic/sdcs/sdcs.png";
......
<template>
<div class="m-smgz">
<div class="banner">
<img src="@/assets/imgs/topic/smgz/dzbwg.png" alt="" />
</div>
</div>
</template>
<script>
export default {};
</script>
<style lang="scss" scoped>
.m-smgz {
.banner {
width: 100%;
height: 100%;
> img {
width: 100%;
height: 100%;
}
}
}
</style>
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
</template> </template>
<script> <script>
import Boutique from "./components/Boutique.vue"; // import Boutique from "./components/Boutique.vue";
import Boutique from './components/banner.vue'
import MuseumMap from "./components/MuseumMap.vue"; import MuseumMap from "./components/MuseumMap.vue";
import Virtural from "./components/Virtural.vue"; import Virtural from "./components/Virtural.vue";
import Display from "./components/Display.vue"; import Display from "./components/Display.vue";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论