|
|
|
@ -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,17 +83,16 @@ 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') |
|
|
|
@ -129,7 +136,7 @@ export default { |
|
|
|
|
.tabs { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
box-shadow: 0px 2px 10px 0px rgba(223,223,223,0.28); |
|
|
|
|
box-shadow: 0px 2px 10px 0px rgba(223, 223, 223, 0.28); |
|
|
|
|
li { |
|
|
|
|
padding: 25px 19px; |
|
|
|
|
margin: 0 70px; |
|
|
|
@ -137,11 +144,11 @@ export default { |
|
|
|
|
color: #333; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
border-bottom: 4px solid transparent; |
|
|
|
|
text-shadow: 0px 2px 14px rgba(167,167,167,0.26); |
|
|
|
|
text-shadow: 0px 2px 14px rgba(167, 167, 167, 0.26); |
|
|
|
|
cursor: pointer; |
|
|
|
|
&.active { |
|
|
|
|
color: #1583FF; |
|
|
|
|
border-bottom-color: #1583FF; |
|
|
|
|
color: #1583ff; |
|
|
|
|
border-bottom-color: #1583ff; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -167,7 +174,7 @@ export default { |
|
|
|
|
margin: 0 1.25rem; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.tab-content{ |
|
|
|
|
.tab-content { |
|
|
|
|
width: 90%; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
} |
|
|
|
|