修复研究院提出的问题

master
yujialong 5 months ago
parent 4eb372e784
commit 89ff070859
  1. 38
      src/components/rightColumns/index.vue
  2. 8
      src/mixins/page/index.js
  3. 9
      src/pages/article/index.vue
  4. 11
      src/pages/column/index.vue
  5. 433
      src/pages/iasf/index.vue
  6. 6
      src/store/modules/content.js

@ -1,21 +1,12 @@
<template>
<div :class="['right', { party }]">
<el-tree class="column"
ref="column"
:data="columns"
highlight-current
:expand-on-click-node="false"
:props="defaultProps"
node-key="id"
@node-click="columnTo"></el-tree>
<el-tree class="column" ref="column" :data="columns" highlight-current :expand-on-click-node="false"
:props="defaultProps" node-key="id" @node-click="columnTo"></el-tree>
<template v-if="site == 2">
<p class="l-title">{{ $t('column.latestNews') }}</p>
<ul class="list">
<li v-for="(item, i) in site2News"
:key="i"
:title="item.title"
@click="toArtice(item)">
<li v-for="(item, i) in site2News" :key="i" :title="item.title" @click="toArtice(item)">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.releaseTime }}</span>
</li>
@ -24,10 +15,7 @@
<template v-else>
<p class="l-title">{{ $t('column.hot') }}</p>
<ul class="list">
<li v-for="(item, i) in hots"
:key="i"
:title="item.title"
@click="toArtice(item)">
<li v-for="(item, i) in hots" :key="i" :title="item.title" @click="toArtice(item)">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.releaseTime }}</span>
</li>
@ -35,10 +23,7 @@
<p class="l-title">{{ $t('column.latestNews') }}</p>
<ul class="list">
<li v-for="(item, i) in news"
:key="i"
:title="item.title"
@click="toArtice(item)">
<li v-for="(item, i) in news" :key="i" :title="item.title" @click="toArtice(item)">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.releaseTime }}</span>
</li>
@ -91,7 +76,7 @@ export default {
siteId: this.site,
columnIds: [411, 412, 413],
pageNum: 1,
pageSize: 8,
pageSize: 5,
})).then(({ data }) => {
this.site2News = Util.removeTag(data.records);
}).catch((res) => { });
@ -111,10 +96,12 @@ export default {
<style lang="scss" scoped>
.right {
width: 20%;
/deep/ .el-tree-node__label {
font-size: 0.78rem;
}
}
.column {
width: 100%;
margin-bottom: 1.56rem;
@ -122,36 +109,45 @@ export default {
.el-tree-node:focus>.el-tree-node__content {
background-color: #e5edf8;
}
/deep/.el-tree-node__content {
height: 2.75rem;
background-color: #e5edf8;
border-bottom: 2px solid #fff;
}
/deep/.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
color: #fff;
background-color: #0f5698;
}
}
.list {
margin-bottom: 20px;
li {
padding: 16px 0;
border-bottom: 1px solid #d8d8d8;
}
.text {
margin-bottom: 5px;
font-size: 14px;
cursor: pointer;
&:hover {
color: $main-color;
}
}
.date {
font-size: 12px;
color: #999;
}
}
.party {
.el-tree-node:focus>.el-tree-node__content,
/deep/.el-tree-node__content {
background-color: $lightPartyTheme;

@ -27,6 +27,10 @@ export default {
})
.catch((res) => { });
},
// 保存当前页面的滚动位置
saveScrollTop () {
this.$store.commit('content/setScrollTop', document.documentElement.scrollTop || document.body.scrollTop)
},
// 打开链接
async openLink (item) {
const { link } = item
@ -62,6 +66,8 @@ export default {
href += '&siteId=' + link.site
if (!link.otherArticleId) href = this.$router.resolve(href).href
}
this.saveScrollTop()
// 如果是站内/站外链接,并且选择的是文章,则要获取当前长页名称传到文章详情里,面包屑点返回的时候需要返回到当前长页
if ((type === 1 && link.articleId) || (type === 3 && link.otherArticleId)) {
this.$post(this.api.findColumn, Util.rsa(this.id)).then(({ data }) => {
@ -89,6 +95,7 @@ export default {
},
// 跳转文章页面
toArtice (item, form) {
this.saveScrollTop()
if (item.articleTemplate === 24) { // 链接
let href = item.linkAddress
const cType = item.connectionType
@ -113,6 +120,7 @@ export default {
},
// 关联栏目的查看全部跳转
toAll (form) {
this.saveScrollTop()
this.$router.push(`/column?id=${form.column[form.column.length - 1]}&siteId=${form.site}`)
},
// 判断是否有添加链接

@ -1,5 +1,6 @@
<template>
<div v-show="loaded" class="wrap">
<div class="wrap">
<div v-show="loaded">
<!-- 人物详情不展示banner -->
<div v-if="form.articleTemplate !== 23 && !isPeople" class="banner"
:style="{ backgroundImage: form.bannerImg ? ('url(' + form.bannerImg + ')') : '' }">
@ -14,7 +15,8 @@
<div class="meta">{{ form.source && form.source + ' | ' }} {{ form.author && form.author + ' | ' }} {{
form.releaseTime }}</div>
<div class="meta">{{ form.edit && $t('column.edit') + ':' + form.edit }} {{ form.audit && ' | ' +
$t('column.auditor') + ':' + form.audit }} {{ form.label && ' | ' + $t('column.label') + ':' + form.label
$t('column.auditor') + ':' + form.audit }} {{ form.label && ' | ' + $t('column.label') + ':' +
form.label
}}</div>
</template>
<p v-if="form.summary" class="brief">{{ form.summary }}</p>
@ -33,6 +35,7 @@
</div>
</div>
</div>
</div>
</template>
<script>
@ -224,7 +227,7 @@ export default {
.brief {
padding-bottom: 1.5rem;
margin: 1rem 0;
font-size: 1.2rem;
font-size: 0.9rem;
line-height: 1.6;
color: #606060;
border-bottom: 1px solid #d8d8d8;

@ -1,6 +1,6 @@
<template>
<div v-show="loaded" v-loading="loading"
:class="['wrap', { activity: info.listStyleId === 15, party: info.listStyleId === 68 }]">
<div :class="['wrap', { activity: info.listStyleId === 15, party: info.listStyleId === 68 }]">
<div v-show="loaded" v-loading="loading">
<div class="banner">
<img width="100%" height="280" :src="info.columnBanner" alt="" />
<div class="texts">
@ -25,7 +25,8 @@
<div class="item">
<span class="label">{{ $t('column.label') }}</span>
<el-select ref="search" v-model="lableId" multiple @change="filter">
<el-option v-for="item in labels" :key="item.id" :label="item.labelName" :value="item.id"> </el-option>
<el-option v-for="item in labels" :key="item.id" :label="item.labelName" :value="item.id">
</el-option>
</el-select>
</div>
<div class="search">
@ -50,7 +51,8 @@
<div class="item">
<span class="label">{{ $t('column.label') }}</span>
<el-select ref="search" v-model="lableId" multiple @change="filter">
<el-option v-for="item in labels" :key="item.id" :label="item.labelName" :value="item.id"> </el-option>
<el-option v-for="item in labels" :key="item.id" :label="item.labelName" :value="item.id">
</el-option>
</el-select>
</div>
<div class="search">
@ -346,6 +348,7 @@
</div>
</div>
</div>
</div>
</template>
<script>

File diff suppressed because it is too large Load Diff

@ -7,7 +7,8 @@ export default {
namespaced: true,
state: {
site: 2,
keyword: ''
keyword: '',
scrollTop: 0,
},
getters: {
site: state => {
@ -21,6 +22,9 @@ export default {
setKeyword: (state, keyword) => {
state.keyword = keyword
},
setScrollTop: (state, val) => {
state.scrollTop = val
},
},
actions: {

Loading…
Cancel
Save