|
|
|
@ -1,7 +1,10 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="wrap"> |
|
|
|
|
<div class="banner"> |
|
|
|
|
<img width="100%" height="280" :src="info.columnBanner" alt="" /> |
|
|
|
|
<img width="100%" |
|
|
|
|
height="280" |
|
|
|
|
:src="info.columnBanner" |
|
|
|
|
alt="" /> |
|
|
|
|
<div class="texts"> |
|
|
|
|
<p class="text">{{ info.columnName }}</p> |
|
|
|
|
</div> |
|
|
|
@ -9,18 +12,23 @@ |
|
|
|
|
|
|
|
|
|
<ul class="tabs wow fadeInLeft"> |
|
|
|
|
<template v-for="(item, i) in tabs"> |
|
|
|
|
<li :class="{active: item.listStyleId == active}" :key="i" @click="tabChange(item, i)">{{ item.columnName | i18nName($i18n) }}</li> |
|
|
|
|
<li :class="{active: item.listStyleId == active}" |
|
|
|
|
:key="i" |
|
|
|
|
@click="tabChange(item, i)">{{ item.columnName | i18nName($i18n) }}</li> |
|
|
|
|
</template> |
|
|
|
|
</ul> |
|
|
|
|
|
|
|
|
|
<div class="tab-content"> |
|
|
|
|
<!-- 根据栏目的listStyleId判断是哪个列表样式,这个出版物页面只显示下面三个列表样式 --> |
|
|
|
|
<!-- 论文 --> |
|
|
|
|
<Thesis v-if="active === 46" :id.sync="curId" /> |
|
|
|
|
<Thesis v-if="active === 46" |
|
|
|
|
:id.sync="curId" /> |
|
|
|
|
<!-- 专利 --> |
|
|
|
|
<Patent v-if="active === 44" :id.sync="curId" /> |
|
|
|
|
<Patent v-if="active === 44" |
|
|
|
|
:id.sync="curId" /> |
|
|
|
|
<!-- 专著 --> |
|
|
|
|
<Monograph v-if="active === 45" :id.sync="curId" /> |
|
|
|
|
<Monograph v-if="active === 45" |
|
|
|
|
:id.sync="curId" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -32,7 +40,7 @@ import Patent from './patent' |
|
|
|
|
import Monograph from './monograph' |
|
|
|
|
export default { |
|
|
|
|
mixins: [mixins], |
|
|
|
|
data() { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
info: {}, |
|
|
|
|
active: 0, |
|
|
|
@ -46,13 +54,13 @@ export default { |
|
|
|
|
Patent, |
|
|
|
|
Monograph |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
mounted () { |
|
|
|
|
this.getInfo() |
|
|
|
|
this.getColumn() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取栏目详情 |
|
|
|
|
getInfo() { |
|
|
|
|
getInfo () { |
|
|
|
|
this.id && |
|
|
|
|
this.$post(`${this.api.findColumn}?id=${this.id}`) |
|
|
|
|
.then(({ data }) => { |
|
|
|
@ -62,7 +70,7 @@ export default { |
|
|
|
|
.catch((res) => { }) |
|
|
|
|
}, |
|
|
|
|
// 获取子级栏目 |
|
|
|
|
getColumn() { |
|
|
|
|
getColumn () { |
|
|
|
|
this.$post(`${this.api.getsSublevelColumnsUnderALevel}?id=${this.id}&siteId=${this.site}`).then(({ data }) => { |
|
|
|
|
this.tabs = data |
|
|
|
|
// 如果url里有tab参数,则自动切换到这个tab,这个tab就是三个出版页中的其中一个id |
|
|
|
@ -75,24 +83,23 @@ export default { |
|
|
|
|
this.active = data[0].listStyleId |
|
|
|
|
this.curId = data[0].id |
|
|
|
|
} |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
}, |
|
|
|
|
// tab回调 |
|
|
|
|
tabChange(item) { |
|
|
|
|
tabChange (item) { |
|
|
|
|
this.active = item.listStyleId |
|
|
|
|
this.curId = item.id |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
filters: { |
|
|
|
|
i18nName(name,type) { |
|
|
|
|
console.log(type) |
|
|
|
|
i18nName (name, type) { |
|
|
|
|
switch (name) { |
|
|
|
|
case '专利': |
|
|
|
|
return type.t('column.patent') |
|
|
|
|
case '专著': |
|
|
|
|
return type.t('column.monograph') |
|
|
|
|
case '论文': |
|
|
|
|
return type.t('column.paper') |
|
|
|
|
return type.t('column.paper') |
|
|
|
|
default: |
|
|
|
|
return name |
|
|
|
|
} |
|
|
|
@ -103,81 +110,81 @@ export default { |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.wrap { |
|
|
|
|
background-color: #f9f9f9; |
|
|
|
|
background-color: #f9f9f9; |
|
|
|
|
} |
|
|
|
|
.banner { |
|
|
|
|
position: relative; |
|
|
|
|
height: 280px; |
|
|
|
|
color: #fff; |
|
|
|
|
.texts { |
|
|
|
|
position: absolute; |
|
|
|
|
top: 123px; |
|
|
|
|
left: 243px; |
|
|
|
|
} |
|
|
|
|
position: relative; |
|
|
|
|
height: 280px; |
|
|
|
|
color: #fff; |
|
|
|
|
.texts { |
|
|
|
|
position: absolute; |
|
|
|
|
top: 123px; |
|
|
|
|
left: 243px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.text { |
|
|
|
|
font-size: 3.42rem; |
|
|
|
|
font-weight: 600; |
|
|
|
|
@include ellipsis; |
|
|
|
|
} |
|
|
|
|
.text { |
|
|
|
|
font-size: 3.42rem; |
|
|
|
|
font-weight: 600; |
|
|
|
|
@include ellipsis; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.sub { |
|
|
|
|
margin-top: 10px; |
|
|
|
|
font-size: 2rem; |
|
|
|
|
} |
|
|
|
|
.sub { |
|
|
|
|
margin-top: 10px; |
|
|
|
|
font-size: 2rem; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.tabs { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
box-shadow: 0px 2px 10px 0px rgba(223,223,223,0.28); |
|
|
|
|
li { |
|
|
|
|
padding: 25px 19px; |
|
|
|
|
margin: 0 70px; |
|
|
|
|
font-size: 1.1rem; |
|
|
|
|
color: #333; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
border-bottom: 4px solid transparent; |
|
|
|
|
text-shadow: 0px 2px 14px rgba(167,167,167,0.26); |
|
|
|
|
cursor: pointer; |
|
|
|
|
&.active { |
|
|
|
|
color: #1583FF; |
|
|
|
|
border-bottom-color: #1583FF; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
box-shadow: 0px 2px 10px 0px rgba(223, 223, 223, 0.28); |
|
|
|
|
li { |
|
|
|
|
padding: 25px 19px; |
|
|
|
|
margin: 0 70px; |
|
|
|
|
font-size: 1.1rem; |
|
|
|
|
color: #333; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
border-bottom: 4px solid transparent; |
|
|
|
|
text-shadow: 0px 2px 14px rgba(167, 167, 167, 0.26); |
|
|
|
|
cursor: pointer; |
|
|
|
|
&.active { |
|
|
|
|
color: #1583ff; |
|
|
|
|
border-bottom-color: #1583ff; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.tab-content { |
|
|
|
|
width: 1000px; |
|
|
|
|
padding: 20px 0; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
width: 1000px; |
|
|
|
|
padding: 20px 0; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
} |
|
|
|
|
@media (max-width: 1200px) { |
|
|
|
|
.banner { |
|
|
|
|
.texts { |
|
|
|
|
.text { |
|
|
|
|
font-size: 1.5rem; |
|
|
|
|
} |
|
|
|
|
.banner { |
|
|
|
|
.texts { |
|
|
|
|
.text { |
|
|
|
|
font-size: 1.5rem; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.tabs { |
|
|
|
|
// flex-direction: column; |
|
|
|
|
width: 100%; |
|
|
|
|
overflow-x: scroll; |
|
|
|
|
li { |
|
|
|
|
padding: 1.25rem 0; |
|
|
|
|
margin: 0 1.25rem; |
|
|
|
|
.tabs { |
|
|
|
|
// flex-direction: column; |
|
|
|
|
width: 100%; |
|
|
|
|
overflow-x: scroll; |
|
|
|
|
li { |
|
|
|
|
padding: 1.25rem 0; |
|
|
|
|
margin: 0 1.25rem; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.tab-content { |
|
|
|
|
width: 90%; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.tab-content{ |
|
|
|
|
width: 90%; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@media (max-width: 320px) { |
|
|
|
|
.banner { |
|
|
|
|
.texts { |
|
|
|
|
left: 6rem; |
|
|
|
|
top: 6rem; |
|
|
|
|
.banner { |
|
|
|
|
.texts { |
|
|
|
|
left: 6rem; |
|
|
|
|
top: 6rem; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |