出版物修复

master
yujialong 2 years ago
parent 20b94f55fe
commit cdf6ce2826
  1. BIN
      src/assets/images/publication-bg.png
  2. 8
      src/mixins/article/index.js
  3. 10
      src/pages/column/index.vue
  4. 1
      src/pages/publication/index.vue
  5. 6
      src/pages/publication/monograph.vue
  6. 115
      src/pages/publication/single.vue
  7. 6
      src/router/modules/publication.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

@ -30,7 +30,7 @@ export default {
const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页
// 站点id:站内链接取当前站点,其他站点链接取siteSelection
const site = cType === 1 ?
(this.$route.query.siteId || this.site) :
(this.site) :
to.siteSelection
if (ids[1]) { // 文章
href = '/article?articleId=' + ids[1]
@ -54,7 +54,7 @@ export default {
}
} else if (typeId !== 4 || (typeId === 4 && !to.children.length)) {
// 常规栏目跳转到column页,长页栏目直接获取path
this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${to.id}&siteId=${this.$route.query.siteId || this.site}`).catch(err => {})
this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${to.id}&siteId=${this.site}`).catch(err => {})
}
},
// 跳转文章页面
@ -66,7 +66,7 @@ export default {
const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页
// 站点id:站内链接取当前站点,其他站点链接取siteSelection
const site = cType === 1 ?
(this.$route.query.siteId || this.site) :
(this.site) :
item.siteSelection
if (ids[1]) { // 文章
href = '/article?articleId=' + ids[1]
@ -89,7 +89,7 @@ export default {
location.href = href
}
} else {
this.$router.push(`/article?articleId=${item.id}&site=${this.$route.query.siteId || this.site}&id=${item.columnId}`)
this.$router.push(`/article?articleId=${item.id}&site=${this.site}&id=${item.columnId}`)
}
}
}

@ -235,9 +235,13 @@ export default {
},
//
handlePublication() {
this.$post(`${this.api.getsSublevelColumnsUnderALevel}?id=${this.id}&siteId=${this.site}`).then(({ data }) => {
data.length && data.every(e => e.templateId == 11) && this.$router.push(`/publication?siteId=${this.site}&id=${this.id}`) //
}).catch(err => {})
if (this.info.templateId === 11) { // /publication/singletemplateId = 11/publication/index
this.$router.push(`/publication/single?siteId=${this.site}&id=${this.id}&type=${this.info.listStyleId}`)
} else {
this.$post(`${this.api.getsSublevelColumnsUnderALevel}?id=${this.id}&siteId=${this.site}`).then(({ data }) => {
data.length && data.every(e => e.templateId == 11) && this.$router.push(`/publication?siteId=${this.site}&id=${this.id}`) //
}).catch(err => {})
}
},
// banner
getBanner(data) {

@ -55,6 +55,7 @@ export default {
this.id &&
this.$post(`${this.api.findColumn}?id=${this.id}`)
.then(({ data }) => {
if (!data.columnBanner) data.columnBanner = require('@/assets/images/publication-bg.png');
this.info = data
})
.catch((res) => { })

@ -15,7 +15,7 @@
</el-date-picker>
</div>
<div class="search">
<input type="text" placeholder="请输入著作名称/出版社名称/编写人员" v-model="form.title" clearable>
<input type="text" placeholder="请输入著作名称/出版社名称/编写人员" v-model="form.monographQueryKeyWord" clearable>
</div>
</div>
@ -41,7 +41,7 @@ export default {
patentClasses: ColumnConst.patentClasses,
searchTimer: null,
form: {
title: '',
monographQueryKeyWord: '',
publicationTime: ''
},
classifications: [],
@ -55,7 +55,7 @@ export default {
id() {
this.id && this.initData()
},
'form.title': function (val) {
'form.monographQueryKeyWord': function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();

@ -0,0 +1,115 @@
<template>
<div class="wrap">
<div class="banner">
<img width="100%" height="280" src="@/assets/images/publication-bg.png" alt="" />
<div class="texts">
<p class="text">{{ info.columnName }}</p>
</div>
</div>
<div class="tab-content">
<Breadcrumb style="margin-bottom: 30px" ref="breadcrumb" :data.sync="routes"/>
<!-- 根据栏目的listStyleId判断是哪个列表样式这个出版物页面只显示下面三个列表样式 -->
<!-- 论文 -->
<Thesis v-if="type === 46" :id.sync="id" />
<!-- 专利 -->
<Patent v-if="type === 44" :id.sync="id" />
<!-- 专著 -->
<Monograph v-if="type === 45" :id.sync="id" />
</div>
</div>
</template>
<script>
import mixins from '@/mixins/article'
import Thesis from './thesis'
import Patent from './patent'
import Monograph from './monograph'
import Breadcrumb from '@/components/breadcrumb'
export default {
mixins: [mixins],
data() {
return {
routes: [
{
name: '科学研究'
},
{
name: '科研成果'
}
],
info: {},
type: +this.$route.query.type, // listStyleId
}
},
components: {
Breadcrumb,
Thesis,
Patent,
Monograph
},
mounted() {
this.getInfo()
},
methods: {
//
getInfo() {
this.id &&
this.$post(`${this.api.findColumn}?id=${this.id}`)
.then(({ data }) => {
this.info = data
})
.catch((res) => { })
},
}
};
</script>
<style lang="scss" scoped>
.wrap {
background-color: #f9f9f9;
}
.banner {
position: relative;
height: 280px;
color: #fff;
.texts {
position: absolute;
top: 123px;
left: 243px;
}
.text {
font-size: 3.42rem;
font-weight: 600;
@include ellipsis;
}
.sub {
margin-top: 10px;
font-size: 2rem;
}
}
.tab-content {
width: 1000px;
padding: 20px 0;
margin: 0 auto;
}
@media (max-width: 1200px) {
.banner {
.texts {
.text {
font-size: 1.5rem;
}
}
}
}
@media (max-width: 320px) {
.banner {
.texts {
left: 6rem;
top: 6rem;
}
}
}
</style>

@ -5,10 +5,12 @@ export default {
component: BasicLayout,
children: [
{
name,
path: `/${name}`,
component: () => import(`@/pages/${name}`),
meta: { title: '' }
},
{
path: `single`,
component: () => import(`@/pages/${name}/single`),
},
]
};

Loading…
Cancel
Save