|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div
|
|
|
- class="painting-list-menu"
|
|
|
+ class="painting-list"
|
|
|
>
|
|
|
<ul
|
|
|
ref="menuEl"
|
|
@@ -12,13 +12,19 @@
|
|
|
>
|
|
|
<div
|
|
|
class="cover"
|
|
|
+ :style="{
|
|
|
+ backgroundImage: `url(${ageRenderInfo[ageName].coverBg})`,
|
|
|
+ }"
|
|
|
@click="onClickAge(ageName)"
|
|
|
>
|
|
|
- <div class="age">
|
|
|
- {{ ageName }}
|
|
|
- </div>
|
|
|
+ <img
|
|
|
+ class="age"
|
|
|
+ :src="ageRenderInfo[ageName].artFontImg"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
<div class="age-en">
|
|
|
- {{ `${ageCnToEn[ageName]} dynasty` }}
|
|
|
+ {{ `${ageRenderInfo[ageName].En} dynasty` }}
|
|
|
</div>
|
|
|
<div class="author-list">
|
|
|
{{ getAuthorList(paintingGroup).join('\\') }}
|
|
@@ -38,21 +44,48 @@
|
|
|
v-if="ageName === '宋'"
|
|
|
class="special-desc"
|
|
|
>
|
|
|
- <!-- <img class="logo" src="@/assets/images/" alt="" draggable="false"> -->
|
|
|
- <p>{{ specialDesc }}</p>
|
|
|
- <button class="see-more" />
|
|
|
+ <img
|
|
|
+ class="title"
|
|
|
+ src="@/assets/images/painting-menu-special-content-title.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
+ <p class="desc">
|
|
|
+ {{ specialDesc }}
|
|
|
+ </p>
|
|
|
+ <button
|
|
|
+ class="see-more"
|
|
|
+ @click="isShowPaintingStyleDesc = true"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div
|
|
|
v-for="item in paintingGroup"
|
|
|
:key="item['标题']"
|
|
|
class="painting-item"
|
|
|
+ @click="router.push({
|
|
|
+ name: 'PaintingDetailList',
|
|
|
+ query: {
|
|
|
+ idx: Number(item['序号']) - 1,
|
|
|
+ }
|
|
|
+ })"
|
|
|
>
|
|
|
<div class="top-wrap">
|
|
|
- <div class="author">
|
|
|
+ <div
|
|
|
+ class="author"
|
|
|
+ :class="{
|
|
|
+ long: item['作者'].length >= 6,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ class="bg"
|
|
|
+ src="@/assets/images/decoration-sun.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
{{ item['作者'] }}
|
|
|
</div>
|
|
|
<div class="title">
|
|
|
- {{ item['标题'].split('\n').join('') }}
|
|
|
+ {{ item['标题(展示)'].split('\n').join('') }}
|
|
|
</div>
|
|
|
<div class="type">
|
|
|
{{ item['装裱\/材质\/笔类型'] }}
|
|
@@ -61,7 +94,7 @@
|
|
|
<div class="img-wrap">
|
|
|
<img
|
|
|
class=""
|
|
|
- :src="`${$env.VUE_APP_DEPLOY_ORIGIN}/configMultiMedia/paintings-thumb/${item['标题']}.jpg`"
|
|
|
+ :src="`${$env.BASE_URL}configMultiMedia/paintings-thumb/${item['标题']}.jpg`"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -78,13 +111,20 @@
|
|
|
</ul>
|
|
|
<BtnBack
|
|
|
class="button-back"
|
|
|
- @click="emit('close')"
|
|
|
+ @click="router.go(-1)"
|
|
|
/>
|
|
|
<OperationTip
|
|
|
class="operation-tip"
|
|
|
direction="h"
|
|
|
:is-show="isShowOperationTip"
|
|
|
/>
|
|
|
+
|
|
|
+ <Transition name="fade-in-out">
|
|
|
+ <PaintingStyleDesc
|
|
|
+ v-if="isShowPaintingStyleDesc"
|
|
|
+ @close="isShowPaintingStyleDesc = false"
|
|
|
+ />
|
|
|
+ </Transition>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -93,6 +133,7 @@ import { ref, computed, watch, onMounted, inject } from "vue"
|
|
|
import { useRoute, useRouter } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
|
import useSizeAdapt from "@/useFunctions/useSizeAdapt"
|
|
|
+import PaintingStyleDesc from "@/views/PaintingStyleDesc.vue"
|
|
|
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
@@ -100,8 +141,6 @@ const store = useStore()
|
|
|
|
|
|
const $env = inject('$env')
|
|
|
|
|
|
-const emit = defineEmits(['close'])
|
|
|
-
|
|
|
const {
|
|
|
windowSizeInCssForRef,
|
|
|
windowSizeWhenDesignForRef,
|
|
@@ -111,13 +150,10 @@ const menuEl = ref(null)
|
|
|
const menuElScrollLeft = ref(0)
|
|
|
onMounted(() => {
|
|
|
menuEl.value.addEventListener('scroll', (e) => {
|
|
|
- menuElScrollLeft.value = menuEl.value.scrollTop
|
|
|
+ menuElScrollLeft.value = menuEl.value.scrollLeft
|
|
|
})
|
|
|
})
|
|
|
|
|
|
-/**
|
|
|
- * 目录
|
|
|
- */
|
|
|
const menuInfo = {}
|
|
|
const temp = configExcel['画作'].map((item) => {
|
|
|
return item['朝代']
|
|
@@ -129,18 +165,37 @@ for (const painting of configExcel['画作']) {
|
|
|
}
|
|
|
menuInfo[painting['朝代']].push(painting)
|
|
|
}
|
|
|
-const ageCnToEn = {
|
|
|
- '宋': 'Song',
|
|
|
- '元': 'Yuan',
|
|
|
- '明': 'Ming',
|
|
|
- '清': 'Qing',
|
|
|
+
|
|
|
+const ageRenderInfo = {
|
|
|
+ '宋': {
|
|
|
+ En: 'Song',
|
|
|
+ artFontImg: require(`@/assets/images/painting-menu-item-title-song.png`),
|
|
|
+ coverBg: require(`@/assets/images/painting-menu-item-cover-bg-song.png`),
|
|
|
+ },
|
|
|
+ '元': {
|
|
|
+ En: 'Yuan',
|
|
|
+ artFontImg: require(`@/assets/images/painting-menu-item-title-yuan.png`),
|
|
|
+ coverBg: require(`@/assets/images/painting-menu-item-cover-bg-yuan.png`),
|
|
|
+ },
|
|
|
+ '明': {
|
|
|
+ En: 'Ming',
|
|
|
+ artFontImg: require(`@/assets/images/painting-menu-item-title-ming.png`),
|
|
|
+ coverBg: require(`@/assets/images/painting-menu-item-cover-bg-ming.png`),
|
|
|
+ },
|
|
|
+ '清': {
|
|
|
+ En: 'Qing',
|
|
|
+ artFontImg: require(`@/assets/images/painting-menu-item-title-qing.png`),
|
|
|
+ coverBg: require(`@/assets/images/painting-menu-item-cover-bg-qing.png`),
|
|
|
+ },
|
|
|
}
|
|
|
+
|
|
|
function getAuthorList(paintingGroup) {
|
|
|
const temp = paintingGroup.map((item) => {
|
|
|
return item['作者']
|
|
|
})
|
|
|
return Array.from(new Set(temp))
|
|
|
}
|
|
|
+
|
|
|
function getPaintingSizeString(raw) {
|
|
|
const temp = raw.split('\n')
|
|
|
let height = temp[0]
|
|
@@ -149,6 +204,7 @@ function getPaintingSizeString(raw) {
|
|
|
width = width.substring(1, width.length - 2)
|
|
|
return `${width}\u00D7${height} 厘米`
|
|
|
}
|
|
|
+
|
|
|
const paintingWidthWhenDesign = 240
|
|
|
const paintingMarginWhenDesin = 75
|
|
|
const specialDescWidthWhenDesin = 444
|
|
@@ -159,6 +215,7 @@ function getHiddenContentWidth(paintingGroup, ageName) {
|
|
|
}
|
|
|
return `${temp / windowSizeWhenDesignForRef.value * Number(windowSizeInCssForRef.value.substring(0, windowSizeInCssForRef.value.length - 2))}px`
|
|
|
}
|
|
|
+
|
|
|
const expandedAgeNameList = ref(new Set())
|
|
|
function onClickAge(ageName) {
|
|
|
if (expandedAgeNameList.value.has(ageName)) {
|
|
@@ -167,7 +224,10 @@ function onClickAge(ageName) {
|
|
|
expandedAgeNameList.value.add(ageName)
|
|
|
}
|
|
|
}
|
|
|
-const specialDesc = configExcel['其他'][3]['修篁树石图'][1]['作品简介'].split('\n')[0]
|
|
|
+
|
|
|
+const specialDesc = configExcel['其他'][4]['修篁树石图'][1]['作品简介'].split('\n')[0]
|
|
|
+
|
|
|
+const isShowPaintingStyleDesc = ref(false)
|
|
|
|
|
|
const isShowOperationTip = ref(true)
|
|
|
watch(menuElScrollLeft, (v) => {
|
|
@@ -179,7 +239,7 @@ watch(menuElScrollLeft, (v) => {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-.painting-list-menu{
|
|
|
+.painting-list{
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
@@ -201,20 +261,20 @@ watch(menuElScrollLeft, (v) => {
|
|
|
align-items: center;
|
|
|
>.cover{
|
|
|
flex: 0 0 auto;
|
|
|
- height: 100%;
|
|
|
+ height: calc(534 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
padding-left: calc(22 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
padding-right: calc(22 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
writing-mode: vertical-lr;
|
|
|
+ background-size: cover;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center center;
|
|
|
>.age{
|
|
|
- margin-top: calc(334 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
- font-weight: 400;
|
|
|
- font-size: calc(34 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- color: #fff;
|
|
|
- line-height: calc(40 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ margin-top: calc(171 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ width: calc(34 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ height: calc(44 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
}
|
|
|
>.age-en{
|
|
|
- margin-top: calc(334 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ margin-top: calc(176 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
font-weight: 400;
|
|
|
font-size: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
@@ -222,7 +282,7 @@ watch(menuElScrollLeft, (v) => {
|
|
|
line-height: calc(23 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
}
|
|
|
>.author-list{
|
|
|
- margin-top: calc(334 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ margin-top: calc(176 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
font-family: KaiTi, KaiTi;
|
|
|
font-weight: 400;
|
|
|
font-size: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
@@ -244,17 +304,42 @@ watch(menuElScrollLeft, (v) => {
|
|
|
transition: width 1s;
|
|
|
overflow: hidden;
|
|
|
display: flex;
|
|
|
+ align-items: flex-end;
|
|
|
+ padding-bottom: calc(230 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
background-color: #f9f7f2;
|
|
|
height: 100%;
|
|
|
>.special-desc{
|
|
|
flex: 0 0 auto;
|
|
|
- >img.logo{
|
|
|
-
|
|
|
+ width: calc(v-bind('specialDescWidthWhenDesin') / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ >img.title{
|
|
|
+ flex: 0 0 auto;
|
|
|
+ width: calc(133 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ height: calc(133 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ margin-right: calc(12 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
}
|
|
|
- >p{
|
|
|
-
|
|
|
+ >p.desc{
|
|
|
+ writing-mode: vertical-lr;
|
|
|
+ font-family: KaiTi, KaiTi;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ color: #476446;
|
|
|
+ line-height: 2;
|
|
|
+ text-align: justified;
|
|
|
+ height: calc(552 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ letter-spacing: 0.15em;
|
|
|
}
|
|
|
>button.see-more{
|
|
|
+ width: calc(34 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ height: calc(94 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ background-image: url(@/assets/images/see-more-btn.png);
|
|
|
+ background-size: contain;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center center;
|
|
|
+ margin-left: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ transform: translateY(180%);
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -269,11 +354,11 @@ watch(menuElScrollLeft, (v) => {
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
>.top-wrap{
|
|
|
- height: 0;
|
|
|
- width: 0;
|
|
|
- margin-top: calc(297 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
margin-bottom: calc(29 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
position: relative;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
>.author{
|
|
|
writing-mode: vertical-lr;
|
|
|
font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
@@ -281,9 +366,22 @@ watch(menuElScrollLeft, (v) => {
|
|
|
font-size: calc(34 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
color: #474747;
|
|
|
white-space: pre;
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
- bottom: calc(18 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ transform: translateY(-50%);
|
|
|
+ margin-right: calc(11 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ position: relative;
|
|
|
+ letter-spacing: 0.3em;
|
|
|
+ >img.bg{
|
|
|
+ width: calc(27 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 50%;
|
|
|
+ transform: translate(-34%, 9%);
|
|
|
+ z-index: -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >.author.long{
|
|
|
+ transform: initial;
|
|
|
+ letter-spacing: initial;
|
|
|
}
|
|
|
>.title{
|
|
|
writing-mode: vertical-lr;
|
|
@@ -292,9 +390,8 @@ watch(menuElScrollLeft, (v) => {
|
|
|
font-size: calc(13 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
color: #474747;
|
|
|
white-space: pre;
|
|
|
- position: absolute;
|
|
|
- left: calc(11 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- bottom: 0;
|
|
|
+ margin-right: calc(9 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ letter-spacing: 0.2em;
|
|
|
}
|
|
|
>.type{
|
|
|
writing-mode: vertical-lr;
|
|
@@ -303,9 +400,7 @@ watch(menuElScrollLeft, (v) => {
|
|
|
font-size: calc(13 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
color: #474747;
|
|
|
white-space: pre;
|
|
|
- position: absolute;
|
|
|
- left: calc(31 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- bottom: calc(0 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ letter-spacing: 0.2em;
|
|
|
}
|
|
|
}
|
|
|
>.img-wrap{
|