|
|
@ -582,7 +582,7 @@ export default { |
|
|
|
this.loading = true |
|
|
|
this.loading = true |
|
|
|
this.loaded = false |
|
|
|
this.loaded = false |
|
|
|
this.id && |
|
|
|
this.id && |
|
|
|
this.$post(`${this.api.findColumn}?id=${this.id}`) |
|
|
|
this.$post(this.api.findColumn, Util.rsa(this.id)) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
this.columnClick(data); |
|
|
|
this.columnClick(data); |
|
|
|
if (data.typeId !== 3 && !data.menuVisible) { |
|
|
|
if (data.typeId !== 3 && !data.menuVisible) { |
|
|
@ -602,7 +602,10 @@ export default { |
|
|
|
if (this.info.templateId === 11) { // 出版社直接跳转到单个的出版社页面(/publication/single),否则就查询子级是否是出版社模板(templateId = 11),是的话就跳转到/publication/index,必须是每个子级都是出版社才跳转,后者是前者的集合(专利、专著、论文) |
|
|
|
if (this.info.templateId === 11) { // 出版社直接跳转到单个的出版社页面(/publication/single),否则就查询子级是否是出版社模板(templateId = 11),是的话就跳转到/publication/index,必须是每个子级都是出版社才跳转,后者是前者的集合(专利、专著、论文) |
|
|
|
this.$router.push(`/publication/single?siteId=${this.site}&id=${this.id}&type=${this.info.listStyleId}`) |
|
|
|
this.$router.push(`/publication/single?siteId=${this.site}&id=${this.id}&type=${this.info.listStyleId}`) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$post(`${this.api.getsSublevelColumnsUnderALevel}?id=${this.id}&siteId=${this.site}`).then(({ data }) => { |
|
|
|
this.$post(this.api.getsSublevelColumnsUnderALevel, Util.rsa({ |
|
|
|
|
|
|
|
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}`) // 如果子级每个栏目都是出版物类型 |
|
|
|
data.length && data.every(e => e.templateId == 11) && this.$router.push(`/publication?siteId=${this.site}&id=${this.id}`) // 如果子级每个栏目都是出版物类型 |
|
|
|
}).catch(err => { }) |
|
|
|
}).catch(err => { }) |
|
|
|
} |
|
|
|
} |
|
|
@ -622,14 +625,17 @@ export default { |
|
|
|
getClassification () { |
|
|
|
getClassification () { |
|
|
|
// 会议分类 |
|
|
|
// 会议分类 |
|
|
|
if (this.info.templateId === 7) { |
|
|
|
if (this.info.templateId === 7) { |
|
|
|
this.$post(`${this.api.queryClassif}?siteId=${this.site}&templateId=${7}`) |
|
|
|
this.$post(this.api.queryClassif, Util.rsa({ |
|
|
|
|
|
|
|
siteId: this.site, |
|
|
|
|
|
|
|
templateId: 7 |
|
|
|
|
|
|
|
})) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
this.classifications = data; |
|
|
|
this.classifications = data; |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch((err) => { }); |
|
|
|
.catch((err) => { }); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 其他类型的分类 |
|
|
|
// 其他类型的分类 |
|
|
|
this.$post(`${this.api.getTheFullArticleByColumn}?id=${this.id}`) |
|
|
|
this.$post(this.api.getTheFullArticleByColumn, Util.rsa(this.id)) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
this.classifications = data; |
|
|
|
this.classifications = data; |
|
|
|
}) |
|
|
|
}) |
|
|
@ -638,7 +644,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取标签 |
|
|
|
// 获取标签 |
|
|
|
getLabel () { |
|
|
|
getLabel () { |
|
|
|
this.$post(`${this.api.queryLabel}?siteId=${this.site}`) |
|
|
|
this.$post(this.api.queryLabel, Util.rsa(this.site)) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
this.labels = data; |
|
|
|
this.labels = data; |
|
|
|
// 修改placeholder |
|
|
|
// 修改placeholder |
|
|
@ -684,7 +690,11 @@ export default { |
|
|
|
// 左边栏目 |
|
|
|
// 左边栏目 |
|
|
|
getLeftColumn () { |
|
|
|
getLeftColumn () { |
|
|
|
this.getAllId = [] |
|
|
|
this.getAllId = [] |
|
|
|
this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}&isSort=1&siteId=${this.site}`) |
|
|
|
this.$post(this.api.oneLevelChecksThemAll, Util.rsa({ |
|
|
|
|
|
|
|
id: this.id, |
|
|
|
|
|
|
|
isSort: 1, |
|
|
|
|
|
|
|
siteId: this.site |
|
|
|
|
|
|
|
})) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
const fromColumn = this.$route.query.column; // 有column标识的,说明是通过点击左侧导航跳转过来的,这种情况只查询该栏目下的文章 |
|
|
|
const fromColumn = this.$route.query.column; // 有column标识的,说明是通过点击左侧导航跳转过来的,这种情况只查询该栏目下的文章 |
|
|
|
const { typeId } = this.info; |
|
|
|
const { typeId } = this.info; |
|
|
@ -713,19 +723,19 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 右边资讯 |
|
|
|
// 右边资讯 |
|
|
|
getColumn () { |
|
|
|
getColumn () { |
|
|
|
this.$post(this.api.listWithTreeMenuVisible, { |
|
|
|
this.$post(this.api.listWithTreeMenuVisible, Util.rsa({ |
|
|
|
siteId: this.site, |
|
|
|
siteId: this.site, |
|
|
|
columnName: '', |
|
|
|
columnName: '', |
|
|
|
templateId: '', |
|
|
|
templateId: '', |
|
|
|
typeId: '', |
|
|
|
typeId: '', |
|
|
|
isSort: 1 |
|
|
|
isSort: 1 |
|
|
|
}) |
|
|
|
})) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
this.infoColumns = data; |
|
|
|
this.infoColumns = data; |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch((err) => { }); |
|
|
|
.catch((err) => { }); |
|
|
|
|
|
|
|
|
|
|
|
this.$post(`${this.api.hotContent}?siteId=${this.site}`) |
|
|
|
this.$post(this.api.hotContent, Util.rsa(this.site)) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
this.hots = Util.removeTag(data); |
|
|
|
this.hots = Util.removeTag(data); |
|
|
|
}) |
|
|
|
}) |
|
|
@ -734,22 +744,22 @@ export default { |
|
|
|
// 最新资讯 |
|
|
|
// 最新资讯 |
|
|
|
getNews () { |
|
|
|
getNews () { |
|
|
|
if (this.site == 2) { |
|
|
|
if (this.site == 2) { |
|
|
|
this.$post(this.api.newlyPublishedArticles, { |
|
|
|
this.$post(this.api.newlyPublishedArticles, Util.rsa({ |
|
|
|
siteId: this.site, |
|
|
|
siteId: this.site, |
|
|
|
columnIds: [411, 412, 413], |
|
|
|
columnIds: [411, 412, 413], |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 10, |
|
|
|
publicationTimeSort: 1 |
|
|
|
publicationTimeSort: 1 |
|
|
|
}).then(({ data }) => { |
|
|
|
})).then(({ data }) => { |
|
|
|
this.site2News = Util.removeTag(data.records); |
|
|
|
this.site2News = Util.removeTag(data.records); |
|
|
|
}).catch((res) => { }); |
|
|
|
}).catch((res) => { }); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$post(this.api.newlyPublishedArticles, { |
|
|
|
this.$post(this.api.newlyPublishedArticles, Util.rsa({ |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 5, |
|
|
|
pageSize: 5, |
|
|
|
siteId: this.site, |
|
|
|
siteId: this.site, |
|
|
|
publicationTimeSort: 1 |
|
|
|
publicationTimeSort: 1 |
|
|
|
}).then(({ data }) => { |
|
|
|
})).then(({ data }) => { |
|
|
|
this.news = Util.removeTag(data.records); |
|
|
|
this.news = Util.removeTag(data.records); |
|
|
|
}).catch((res) => { }); |
|
|
|
}).catch((res) => { }); |
|
|
|
} |
|
|
|
} |
|
|
@ -824,14 +834,14 @@ export default { |
|
|
|
this.labels.map((e) => { |
|
|
|
this.labels.map((e) => { |
|
|
|
if (this.lableId.includes(e.id)) labelName.push(e.labelName); |
|
|
|
if (this.lableId.includes(e.id)) labelName.push(e.labelName); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$post(this.api.newlyPublishedArticles, { |
|
|
|
this.$post(this.api.newlyPublishedArticles, Util.rsa({ |
|
|
|
siteId: this.site, |
|
|
|
siteId: this.site, |
|
|
|
columnIds, |
|
|
|
columnIds, |
|
|
|
pageNum: this.page, |
|
|
|
pageNum: this.page, |
|
|
|
pageSize: this.pageSize, |
|
|
|
pageSize: this.pageSize, |
|
|
|
labelName, |
|
|
|
labelName, |
|
|
|
...this.form |
|
|
|
...this.form |
|
|
|
}) |
|
|
|
})) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
const articles = Util.removeTag(data.records); |
|
|
|
const articles = Util.removeTag(data.records); |
|
|
|
articles.forEach(e => { |
|
|
|
articles.forEach(e => { |
|
|
@ -847,7 +857,7 @@ export default { |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
|
// this.total == 1 && this.info.showWithDetails && this.$router.push(`/article?articleId=${this.articles[0].id}&id=${this.articles[0].columnId}`) |
|
|
|
// this.total == 1 && this.info.showWithDetails && this.$router.push(`/article?articleId=${this.articles[0].id}&id=${this.articles[0].columnId}`) |
|
|
|
if (this.total) { |
|
|
|
if (this.total) { |
|
|
|
this.$post(`${this.api.findArticle}?id=${articles[0].id}`).then(async ({ data }) => { |
|
|
|
this.$post(this.api.findArticle, Util.rsa(articles[0].id)).then(async ({ data }) => { |
|
|
|
this.article = data |
|
|
|
this.article = data |
|
|
|
}).catch(err => { }) |
|
|
|
}).catch(err => { }) |
|
|
|
} |
|
|
|
} |
|
|
|