修复研究院提出的问题

master
yujialong 5 months ago
parent 4eb372e784
commit 89ff070859
  1. 126
      src/components/rightColumns/index.vue
  2. 42
      src/mixins/page/index.js
  3. 63
      src/pages/article/index.vue
  4. 639
      src/pages/column/index.vue
  5. 2015
      src/pages/iasf/index.vue
  6. 6
      src/store/modules/content.js
  7. 26
      src/store/modules/layout.js

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

@ -1,7 +1,7 @@
import Setting from '@/setting' import Setting from '@/setting'
import Util from '@/libs/util' import Util from '@/libs/util'
export default { export default {
data() { data () {
return { return {
id: this.$route.query.id, id: this.$route.query.id,
preview: this.$route.query.preview, preview: this.$route.query.preview,
@ -10,25 +10,29 @@ export default {
} }
}, },
computed: { computed: {
site() { site () {
return this.$route.query.siteId || this.$store.state.content.site return this.$route.query.siteId || this.$store.state.content.site
} }
}, },
mounted() { mounted () {
this.getInfo && this.id && this.getColumnInfo() this.getInfo && this.id && this.getColumnInfo()
}, },
methods: { methods: {
// 获取栏目详情 // 获取栏目详情
getColumnInfo () { getColumnInfo () {
this.$post(this.api.findColumn, Util.rsa(this.id)) this.$post(this.api.findColumn, Util.rsa(this.id))
.then(({ data }) => { .then(({ data }) => {
// 栏目被禁用了,则不显示页面 // 栏目被禁用了,则不显示页面
data.menuVisible || this.getInfo() data.menuVisible || this.getInfo()
}) })
.catch((res) => { }); .catch((res) => { });
},
// 保存当前页面的滚动位置
saveScrollTop () {
this.$store.commit('content/setScrollTop', document.documentElement.scrollTop || document.body.scrollTop)
}, },
// 打开链接 // 打开链接
async openLink(item) { async openLink (item) {
const { link } = item const { link } = item
if (link.linkName === '无' || link.linkName === '') return false if (link.linkName === '无' || link.linkName === '') return false
let href = link.linkAddress let href = link.linkAddress
@ -62,24 +66,26 @@ export default {
href += '&siteId=' + link.site href += '&siteId=' + link.site
if (!link.otherArticleId) href = this.$router.resolve(href).href if (!link.otherArticleId) href = this.$router.resolve(href).href
} }
this.saveScrollTop()
// 如果是站内/站外链接,并且选择的是文章,则要获取当前长页名称传到文章详情里,面包屑点返回的时候需要返回到当前长页 // 如果是站内/站外链接,并且选择的是文章,则要获取当前长页名称传到文章详情里,面包屑点返回的时候需要返回到当前长页
if ((type === 1 && link.articleId) || (type === 3 && link.otherArticleId)) { if ((type === 1 && link.articleId) || (type === 3 && link.otherArticleId)) {
this.$post(this.api.findColumn, Util.rsa(this.id)).then(({ data }) => { this.$post(this.api.findColumn, Util.rsa(this.id)).then(({ data }) => {
href = this.$router.resolve(href + '&id=' + this.id + '&columnName=' + data.columnName + '&path=' + this.$route.path.replace('/', '')).href href = this.$router.resolve(href + '&id=' + this.id + '&columnName=' + data.columnName + '&path=' + this.$route.path.replace('/', '')).href
this.toHref(link.isOpen, href) this.toHref(link.isOpen, href)
}).catch(res => {}) }).catch(res => { })
} else { } else {
this.toHref(link.isOpen, href) this.toHref(link.isOpen, href)
} }
}, },
// 跳转地址 // 跳转地址
toHref(isOpen, href) { toHref (isOpen, href) {
if (isOpen) { if (isOpen) {
var userAgent = navigator.userAgent; var userAgent = navigator.userAgent;
var isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent); var isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent);
if(isSafari) { if (isSafari) {
window.location.href = href window.location.href = href
}else { } else {
window.open(href) window.open(href)
} }
} else { } else {
@ -88,7 +94,8 @@ export default {
} }
}, },
// 跳转文章页面 // 跳转文章页面
toArtice(item, form) { toArtice (item, form) {
this.saveScrollTop()
if (item.articleTemplate === 24) { // 链接 if (item.articleTemplate === 24) { // 链接
let href = item.linkAddress let href = item.linkAddress
const cType = item.connectionType const cType = item.connectionType
@ -112,15 +119,16 @@ export default {
} }
}, },
// 关联栏目的查看全部跳转 // 关联栏目的查看全部跳转
toAll(form) { toAll (form) {
this.saveScrollTop()
this.$router.push(`/column?id=${form.column[form.column.length - 1]}&siteId=${form.site}`) this.$router.push(`/column?id=${form.column[form.column.length - 1]}&siteId=${form.site}`)
}, },
// 判断是否有添加链接 // 判断是否有添加链接
isLink(linkName) { isLink (linkName) {
return linkName !== '无' && linkName !== '' return linkName !== '无' && linkName !== ''
}, },
// 关联栏目专用,获取栏目标题 // 关联栏目专用,获取栏目标题
getColumnTitle(form) { getColumnTitle (form) {
return form.columnTitle == 1 ? form.columnName : form.columnTitleCustom return form.columnTitle == 1 ? form.columnName : form.columnTitleCustom
} }
} }

@ -1,35 +1,38 @@
<template> <template>
<div v-show="loaded" class="wrap"> <div class="wrap">
<!-- 人物详情不展示banner --> <div v-show="loaded">
<div v-if="form.articleTemplate !== 23 && !isPeople" class="banner" <!-- 人物详情不展示banner -->
:style="{ backgroundImage: form.bannerImg ? ('url(' + form.bannerImg + ')') : '' }"> <div v-if="form.articleTemplate !== 23 && !isPeople" class="banner"
{{ form.columnName }} :style="{ backgroundImage: form.bannerImg ? ('url(' + form.bannerImg + ')') : '' }">
</div> {{ form.columnName }}
<div class="content"> </div>
<Breadcrumb ref="breadcrumb" :data.sync="routes" /> <div class="content">
<div class="article"> <Breadcrumb ref="breadcrumb" :data.sync="routes" />
<div class="left"> <div class="article">
<template v-if="!isPeople"> <div class="left">
<h2>{{ form.title }}</h2> <template v-if="!isPeople">
<div class="meta">{{ form.source && form.source + ' | ' }} {{ form.author && form.author + ' | ' }} {{ <h2>{{ form.title }}</h2>
form.releaseTime }}</div> <div class="meta">{{ form.source && form.source + ' | ' }} {{ form.author && form.author + ' | ' }} {{
<div class="meta">{{ form.edit && $t('column.edit') + ':' + form.edit }} {{ form.audit && ' | ' + form.releaseTime }}</div>
$t('column.auditor') + ':' + form.audit }} {{ form.label && ' | ' + $t('column.label') + ':' + form.label <div class="meta">{{ form.edit && $t('column.edit') + ':' + form.edit }} {{ form.audit && ' | ' +
}}</div> $t('column.auditor') + ':' + form.audit }} {{ form.label && ' | ' + $t('column.label') + ':' +
</template> form.label
<p v-if="form.summary" class="brief">{{ form.summary }}</p> }}</div>
<div class="des" id="mainBody" v-html="form.mainBody"></div> </template>
<div v-if="form.fileList && form.fileList.length" class="annex"> <p v-if="form.summary" class="brief">{{ form.summary }}</p>
<h6>{{ $t('column.attachmentDownload') }}</h6> <div class="des" id="mainBody" v-html="form.mainBody"></div>
<ul class="files"> <div v-if="form.fileList && form.fileList.length" class="annex">
<li v-for="(file, i) in form.fileList" :key="i"> <h6>{{ $t('column.attachmentDownload') }}</h6>
<span class="name">{{ file.fileName }}</span> <ul class="files">
<span class="download" @click="download(file)">{{ $t('column.download') }}</span> <li v-for="(file, i) in form.fileList" :key="i">
</li> <span class="name">{{ file.fileName }}</span>
</ul> <span class="download" @click="download(file)">{{ $t('column.download') }}</span>
</li>
</ul>
</div>
</div> </div>
<RightColumns ref="right" :party="isParty" />
</div> </div>
<RightColumns ref="right" :party="isParty" />
</div> </div>
</div> </div>
</div> </div>
@ -224,7 +227,7 @@ export default {
.brief { .brief {
padding-bottom: 1.5rem; padding-bottom: 1.5rem;
margin: 1rem 0; margin: 1rem 0;
font-size: 1.2rem; font-size: 0.9rem;
line-height: 1.6; line-height: 1.6;
color: #606060; color: #606060;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;

@ -1,348 +1,351 @@
<template> <template>
<div v-show="loaded" v-loading="loading" <div :class="['wrap', { activity: info.listStyleId === 15, party: info.listStyleId === 68 }]">
:class="['wrap', { activity: info.listStyleId === 15, party: info.listStyleId === 68 }]"> <div v-show="loaded" v-loading="loading">
<div class="banner"> <div class="banner">
<img width="100%" height="280" :src="info.columnBanner" alt="" /> <img width="100%" height="280" :src="info.columnBanner" alt="" />
<div class="texts"> <div class="texts">
<p class="text">{{ info.columnName }}</p> <p class="text">{{ info.columnName }}</p>
<p class="sub">{{ info.subtitle }}</p> <p class="sub">{{ info.subtitle }}</p>
</div>
</div> </div>
</div> <div class="column-wrap">
<div class="column-wrap"> <div class="article">
<div class="article"> <div class="left">
<div class="left"> <!-- 文章侧边栏+搜索+新闻列表 -->
<!-- 文章侧边栏+搜索+新闻列表 --> <div v-if="info.listStyleId === 10" class="forms">
<div v-if="info.listStyleId === 10" class="forms"> <div class="item">
<div class="item"> <span class="label">{{ $t('column.classification') }}</span>
<span class="label">{{ $t('column.classification') }}</span> <el-select v-model="form.classificationId" @change="filter">
<el-select v-model="form.classificationId" @change="filter"> <el-option :label="$t('column.all')" :value="null"></el-option>
<el-option :label="$t('column.all')" :value="null"></el-option> <el-option v-for="item in classifications" :key="item.id" :label="item.classificationName"
<el-option v-for="item in classifications" :key="item.id" :label="item.classificationName" :value="item.id">
:value="item.id"> </el-option>
</el-option> </el-select>
</el-select> </div>
</div> <div class="item">
<div class="item"> <span class="label">{{ $t('column.label') }}</span>
<span class="label">{{ $t('column.label') }}</span> <el-select ref="search" v-model="lableId" multiple @change="filter">
<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 v-for="item in labels" :key="item.id" :label="item.labelName" :value="item.id"> </el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="search"> <div class="search">
<input type="text" :placeholder="$t('column.titlePlaceholder')" v-model="form.title" /> <input type="text" :placeholder="$t('column.titlePlaceholder')" v-model="form.title" />
<!-- <i class="icon"> <!-- <i class="icon">
<img src="@/assets/images/search-white.png" alt="" /> <img src="@/assets/images/search-white.png" alt="" />
</i> --> </i> -->
</div>
</div> </div>
</div> <!-- 侧导航+新闻列表(含文章概述) -->
<!-- 侧导航+新闻列表(含文章概述) --> <div v-if="info.listStyleId === 12" class="forms">
<div v-if="info.listStyleId === 12" class="forms"> <div class="item">
<div class="item"> <span class="label">{{ $t('column.classification') }}</span>
<span class="label">{{ $t('column.classification') }}</span> <el-select v-model="form.classificationId" @change="filter">
<el-select v-model="form.classificationId" @change="filter"> <el-option :label="$t('column.all')" :value="null"></el-option>
<el-option :label="$t('column.all')" :value="null"></el-option> <el-option v-for="item in classifications" :key="item.id" :label="item.classificationName"
<el-option v-for="item in classifications" :key="item.id" :label="item.classificationName" :value="item.id">
:value="item.id"> </el-option>
</el-option> </el-select>
</el-select> </div>
</div> <div class="item">
<div class="item"> <span class="label">{{ $t('column.label') }}</span>
<span class="label">{{ $t('column.label') }}</span> <el-select ref="search" v-model="lableId" multiple @change="filter">
<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 v-for="item in labels" :key="item.id" :label="item.labelName" :value="item.id"> </el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="search"> <div class="search">
<input type="text" :placeholder="$t('column.titlePlaceholder')" v-model="form.title" /> <input type="text" :placeholder="$t('column.titlePlaceholder')" v-model="form.title" />
<!-- <i class="icon"> <!-- <i class="icon">
<img src="@/assets/images/search-white.png" alt="" /> <img src="@/assets/images/search-white.png" alt="" />
</i> --> </i> -->
</div>
</div> </div>
</div> <!-- 会议活动筛选+会议活动列表 -->
<!-- 会议活动筛选+会议活动列表 --> <div v-if="info.listStyleId === 15" class="forms">
<div v-if="info.listStyleId === 15" class="forms"> <ul class="switch">
<ul class="switch"> <li v-for="(item, i) in convokeTypes" :key="i" :class="{ active: item.id === form.convokeType }"
<li v-for="(item, i) in convokeTypes" :key="i" :class="{ active: item.id === form.convokeType }" @click="switchChange(item)">
@click="switchChange(item)"> {{ item.name }}
{{ item.name }} </li>
</li> </ul>
</ul> <div class="item">
<div class="item"> <span class="label">{{ $t('column.classification') }}</span>
<span class="label">{{ $t('column.classification') }}</span> <el-select v-model="form.classificationId" @change="filter">
<el-select v-model="form.classificationId" @change="filter"> <el-option :label="$t('column.all')" :value="null"></el-option>
<el-option :label="$t('column.all')" :value="null"></el-option> <el-option v-for="item in classifications" :key="item.id" :label="item.classificationName"
<el-option v-for="item in classifications" :key="item.id" :label="item.classificationName" :value="item.id">
:value="item.id"> </el-option>
</el-option> </el-select>
</el-select> </div>
</div> </div>
</div>
<div class="contents"> <div class="contents">
<el-tree <el-tree
v-if="columns.length && columns.find(e => e.children.length) && !isFilter && showNav && info.listStyleId !== 15" v-if="columns.length && columns.find(e => e.children.length) && !isFilter && showNav && info.listStyleId !== 15"
class="columns" ref="leftColumn" :data="columns" highlight-current :expand-on-click-node="false" class="columns" ref="leftColumn" :data="columns" highlight-current :expand-on-click-node="false"
default-expand-all :props="defaultProps" node-key="id" icon-class="el-icon-arrow-down" default-expand-all :props="defaultProps" node-key="id" icon-class="el-icon-arrow-down"
@node-click="(item) => columnClick(item, 1)" @current-change="(item) => columnClick(item, 1)"> @node-click="(item) => columnClick(item, 1)" @current-change="(item) => columnClick(item, 1)">
<span class="custom-tree-node" slot-scope="{ node, data }" style="padding-left: 10px;"> <span class="custom-tree-node" slot-scope="{ node, data }" style="padding-left: 10px;">
<span :title="node.label">{{ node.label }}</span> <span :title="node.label">{{ node.label }}</span>
</span> </span>
</el-tree> </el-tree>
<template v-if="articles.length && !loading"> <template v-if="articles.length && !loading">
<!-- 列表样式选的是列表详情则直接显示最新一篇文章的详情 --> <!-- 列表样式选的是列表详情则直接显示最新一篇文章的详情 -->
<div v-if="info.listStyleId === 73" class="detail"> <div v-if="info.listStyleId === 73" class="detail">
<template v-if="article.articleTemplate != 72"> <template v-if="article.articleTemplate != 72">
<h2>{{ article.title }}</h2> <h2>{{ article.title }}</h2>
<!-- <div class="meta">{{ article.source && article.source + ' | ' }} {{ article.author && article.author + ' | ' }} {{ article.releaseTime }}</div> <!-- <div class="meta">{{ article.source && article.source + ' | ' }} {{ article.author && article.author + ' | ' }} {{ article.releaseTime }}</div>
<div class="meta">{{ article.edit && $t('column.edit') + ':' + article.edit }} {{ article.audit && ' | ' + $t('column.auditor') + ':' + article.audit }} {{ article.label && ' | ' + $t('column.label') + ':' + article.label }}</div> --> <div class="meta">{{ article.edit && $t('column.edit') + ':' + article.edit }} {{ article.audit && ' | ' + $t('column.auditor') + ':' + article.audit }} {{ article.label && ' | ' + $t('column.label') + ':' + article.label }}</div> -->
</template> </template>
<p v-if="article.summary" class="brief">{{ article.summary }}</p> <p v-if="article.summary" class="brief">{{ article.summary }}</p>
<div class="des" v-html="article.mainBody"></div> <div class="des" v-html="article.mainBody"></div>
<div v-if="article.fileList && article.fileList.length" class="annex"> <div v-if="article.fileList && article.fileList.length" class="annex">
<h6>{{ $t('column.attachmentDownload') }}</h6> <h6>{{ $t('column.attachmentDownload') }}</h6>
<ul class="files"> <ul class="files">
<li v-for="(file, i) in article.fileList" :key="i"> <li v-for="(file, i) in article.fileList" :key="i">
<span class="name">{{ file.fileName }}</span> <span class="name">{{ file.fileName }}</span>
<span class="download" @click="download(file)">{{ $t('column.download') }}</span> <span class="download" @click="download(file)">{{ $t('column.download') }}</span>
</li>
</ul>
</div>
</div>
<template v-else>
<template v-if="info.listStyleId === 12">
<div class="article-wrap">
<ul class="articles">
<li v-for="(item, i) in articles" :key="i" :class="{ 'news-notice': info.listStyleId === 55 }"
class="readDetail" @click="toArtice(item)">
<template v-if="info.listStyleId === 55">
<div class="releaseTime">
<p class="d">{{ item.date }}</p>
<p class="m">{{ item.month }}</p>
</div>
<div class="news-title">{{ item.title }}</div>
</template>
<template v-else>
<img class="pic" :src="item.titleImg" alt=""
onerror="javascript:this.src='./images/1.png?id=1';" />
<div class="texts">
<p v-if="(item.listStyleId === 10 || item.listStyleId === 15) && item.classificationName"
class="type">
{{ item.classificationName }}
</p>
<h6 class="titleDes">{{ item.title }}</h6>
<template v-if="item.listStyleId === 11 || item.listStyleId == 12">
<span class="meta">{{ item.releaseTime }}</span>
<div class="des" v-html="item.mainBody"></div>
</template>
<span v-if="item.listStyleId === 10" class="meta">{{ item.releaseTime }} {{ item.labelName
&& ' | ' +
item.labelName }}</span>
<template v-if="item.listStyleId === 15 || item.listStyleId === 16">
<div v-if="item.keynoteSpeaker" class="meta m-b-10">
<img class="icon" src="@/assets/images/mine.png" alt="" /> {{ item.keynoteSpeaker }}
</div>
<div v-if="item.activityStartTime" class="meta m-b-10">
<img class="icon" src="@/assets/images/time.png" alt="" />
{{ item.activityStartTime }}
</div>
<div v-if="item.offlineLocation" class="meta m-b-10">
<img class="icon" src="@/assets/images/location.png" alt="" /> {{ item.offlineLocation
}}
</div>
<div v-if="item.onlineLocation" class="meta">
<img class="icon" src="@/assets/images/online.png" alt="" /> {{ item.onlineLocation }}
</div>
</template>
<el-button type="primary" class="readDetailBtn">{{ $t('column.readDetail') }}</el-button>
</div>
</template>
</li>
</ul>
<div v-if="articles.length" class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page"
:page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div>
</template>
<template v-else-if="info.listStyleId === 11 || info.listStyleId === 15 || info.listStyleId === 10">
<div class="article-wrap">
<ul class="articles">
<li v-for="(item, i) in articles" :key="i" :class="{ 'news-notice': info.listStyleId === 55 }"
@click="toArtice(item)">
<template v-if="info.listStyleId === 55">
<div class="releaseTime">
<p class="d">{{ item.date }}</p>
<p class="m">{{ item.month }}</p>
</div>
<div class="news-title">{{ item.title }}</div>
</template>
<template v-else>
<div class="texts leftBox">
<p v-if="(item.listStyleId === 10 || item.listStyleId === 15 || item.listStyleId === 11) && item.classificationName"
class="type">
{{ item.classificationName }}
</p>
<h6 class="titleDes">{{ item.title }}</h6>
<template v-if="item.listStyleId === 11 || item.listStyleId == 12">
<span class="meta">{{ item.releaseTime }}
<template v-if="item.labelName != ''">
| {{ item.labelName }}
</template>
</span>
</template>
<span v-if="item.listStyleId === 10" class="meta">{{ item.releaseTime }} {{ item.labelName
&& ' | ' +
item.labelName }}</span>
<template v-if="item.listStyleId === 15 || item.listStyleId === 16">
<div v-if="item.keynoteSpeaker" class="meta m-b-10">
<img class="icon" src="@/assets/images/mine.png" alt="" /> {{ item.keynoteSpeaker }}
</div>
<div v-if="item.activityStartTime" class="meta m-b-10">
<img class="icon" src="@/assets/images/time.png" alt="" />
{{ item.activityStartTime }}
</div>
<div v-if="item.offlineLocation" class="meta m-b-10">
<img class="icon" src="@/assets/images/location.png" alt="" /> {{ item.offlineLocation
}}
</div>
<div v-if="item.onlineLocation" class="meta">
<img class="icon" src="@/assets/images/online.png" alt="" /> {{ item.onlineLocation }}
</div>
</template>
</div>
<img class="pic" :src="item.titleImg" alt=""
onerror="javascript:this.src='./images/1.png?id=1';" />
</template>
</li> </li>
</ul> </ul>
<div v-if="articles.length" class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page"
:page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div> </div>
</template>
</div>
<template v-else> <template v-else>
<div class="article-wrap"> <template v-if="info.listStyleId === 12">
<ul :class="['articles', { media: info.listStyleId === 74 }]"> <div class="article-wrap">
<li v-for="(item, i) in articles" :key="i" <ul class="articles">
:class="{ 'news-notice': info.listStyleId === 55, 'org': info.listStyleId === 68 }" <li v-for="(item, i) in articles" :key="i" :class="{ 'news-notice': info.listStyleId === 55 }"
class="overDetail" @click="toArtice(item)"> class="readDetail" @click="toArtice(item)">
<template v-if="info.listStyleId === 55"> <template v-if="info.listStyleId === 55">
<div class="releaseTime"> <div class="releaseTime">
<p class="d">{{ item.date }}</p> <p class="d">{{ item.date }}</p>
<p class="m">{{ item.month }}</p> <p class="m">{{ item.month }}</p>
</div> </div>
<div class="news-title">{{ item.title }}</div> <div class="news-title">{{ item.title }}</div>
</template> </template>
<template v-else> <template v-else>
<img v-if="info.listStyleId !== 74" class="pic" :src="item.titleImg" alt="" <img class="pic" :src="item.titleImg" alt=""
onerror="javascript:this.src='./images/1.png?id=1';" /> onerror="javascript:this.src='./images/1.png?id=1';" />
<div class="texts">
<template v-else-if="item.fileList"> <p v-if="(item.listStyleId === 10 || item.listStyleId === 15) && item.classificationName"
<!-- <el-image class="media-pic" class="type">
{{ item.classificationName }}
</p>
<h6 class="titleDes">{{ item.title }}</h6>
<template v-if="item.listStyleId === 11 || item.listStyleId == 12">
<span class="meta">{{ item.releaseTime }}</span>
<div class="des" v-html="item.mainBody"></div>
</template>
<span v-if="item.listStyleId === 10" class="meta">{{ item.releaseTime }} {{ item.labelName
&& ' | ' +
item.labelName }}</span>
<template v-if="item.listStyleId === 15 || item.listStyleId === 16">
<div v-if="item.keynoteSpeaker" class="meta m-b-10">
<img class="icon" src="@/assets/images/mine.png" alt="" /> {{ item.keynoteSpeaker }}
</div>
<div v-if="item.activityStartTime" class="meta m-b-10">
<img class="icon" src="@/assets/images/time.png" alt="" />
{{ item.activityStartTime }}
</div>
<div v-if="item.offlineLocation" class="meta m-b-10">
<img class="icon" src="@/assets/images/location.png" alt="" /> {{ item.offlineLocation
}}
</div>
<div v-if="item.onlineLocation" class="meta">
<img class="icon" src="@/assets/images/online.png" alt="" /> {{ item.onlineLocation }}
</div>
</template>
<el-button type="primary" class="readDetailBtn">{{ $t('column.readDetail') }}</el-button>
</div>
</template>
</li>
</ul>
<div v-if="articles.length" class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page"
:page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div>
</template>
<template v-else-if="info.listStyleId === 11 || info.listStyleId === 15 || info.listStyleId === 10">
<div class="article-wrap">
<ul class="articles">
<li v-for="(item, i) in articles" :key="i" :class="{ 'news-notice': info.listStyleId === 55 }"
@click="toArtice(item)">
<template v-if="info.listStyleId === 55">
<div class="releaseTime">
<p class="d">{{ item.date }}</p>
<p class="m">{{ item.month }}</p>
</div>
<div class="news-title">{{ item.title }}</div>
</template>
<template v-else>
<div class="texts leftBox">
<p v-if="(item.listStyleId === 10 || item.listStyleId === 15 || item.listStyleId === 11) && item.classificationName"
class="type">
{{ item.classificationName }}
</p>
<h6 class="titleDes">{{ item.title }}</h6>
<template v-if="item.listStyleId === 11 || item.listStyleId == 12">
<span class="meta">{{ item.releaseTime }}
<template v-if="item.labelName != ''">
| {{ item.labelName }}
</template>
</span>
</template>
<span v-if="item.listStyleId === 10" class="meta">{{ item.releaseTime }} {{ item.labelName
&& ' | ' +
item.labelName }}</span>
<template v-if="item.listStyleId === 15 || item.listStyleId === 16">
<div v-if="item.keynoteSpeaker" class="meta m-b-10">
<img class="icon" src="@/assets/images/mine.png" alt="" /> {{ item.keynoteSpeaker }}
</div>
<div v-if="item.activityStartTime" class="meta m-b-10">
<img class="icon" src="@/assets/images/time.png" alt="" />
{{ item.activityStartTime }}
</div>
<div v-if="item.offlineLocation" class="meta m-b-10">
<img class="icon" src="@/assets/images/location.png" alt="" /> {{ item.offlineLocation
}}
</div>
<div v-if="item.onlineLocation" class="meta">
<img class="icon" src="@/assets/images/online.png" alt="" /> {{ item.onlineLocation }}
</div>
</template>
</div>
<img class="pic" :src="item.titleImg" alt=""
onerror="javascript:this.src='./images/1.png?id=1';" />
</template>
</li>
</ul>
<div v-if="articles.length" class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page"
:page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div>
</template>
<template v-else>
<div class="article-wrap">
<ul :class="['articles', { media: info.listStyleId === 74 }]">
<li v-for="(item, i) in articles" :key="i"
:class="{ 'news-notice': info.listStyleId === 55, 'org': info.listStyleId === 68 }"
class="overDetail" @click="toArtice(item)">
<template v-if="info.listStyleId === 55">
<div class="releaseTime">
<p class="d">{{ item.date }}</p>
<p class="m">{{ item.month }}</p>
</div>
<div class="news-title">{{ item.title }}</div>
</template>
<template v-else>
<img v-if="info.listStyleId !== 74" class="pic" :src="item.titleImg" alt=""
onerror="javascript:this.src='./images/1.png?id=1';" />
<template v-else-if="item.fileList">
<!-- <el-image class="media-pic"
:style="{backgroundImage: 'url(https://new.iasf.ac.cn/iasf/sysFiles/preview/1706961813193707521)'}" :style="{backgroundImage: 'url(https://new.iasf.ac.cn/iasf/sysFiles/preview/1706961813193707521)'}"
src="https://new.iasf.ac.cn/iasf/sysFiles/preview/1706961813193707521" src="https://new.iasf.ac.cn/iasf/sysFiles/preview/1706961813193707521"
:preview-src-list="['https://new.iasf.ac.cn/iasf/sysFiles/preview/1706961813193707521']"> :preview-src-list="['https://new.iasf.ac.cn/iasf/sysFiles/preview/1706961813193707521']">
</el-image> --> </el-image> -->
<video <video
v-if="Util.isVideo(item.fileList[0].fileName.substring(item.fileList[0].fileName.lastIndexOf('.') + 1))" v-if="Util.isVideo(item.fileList[0].fileName.substring(item.fileList[0].fileName.lastIndexOf('.') + 1))"
class="media-video" controls x5-playsinline x5-video-player-type="h5" class="media-video" controls x5-playsinline x5-video-player-type="h5"
:poster="isIphone ? 'https://new.iasf.ac.cn/images/about/12.png' : ''" preload> :poster="isIphone ? 'https://new.iasf.ac.cn/images/about/12.png' : ''" preload>
<source :src="item.fileList[0].filePath" type="video/mp4"> <source :src="item.fileList[0].filePath" type="video/mp4">
您的浏览器不支持 video 标签 您的浏览器不支持 video 标签
</video> </video>
<el-image v-else class="media-pic" :src="item.fileList[0].filePath" <el-image v-else class="media-pic" :src="item.fileList[0].filePath"
:preview-src-list="[item.fileList[0].filePath]"> :preview-src-list="[item.fileList[0].filePath]">
</el-image> </el-image>
</template>
<div class="texts">
<p v-if="(item.listStyleId === 10 || item.listStyleId === 15) && item.classificationName"
class="type">
{{ item.classificationName }}
</p>
<h6 class="titleDes" :title="item.title">{{ item.title }}</h6>
<template
v-if="item.listStyleId === 11 || item.listStyleId == 12 || item.listStyleId == 68">
<span class="meta">{{ item.releaseTime }}</span>
<div class="des" v-html="item.mainBody"></div>
</template>
<span v-if="item.listStyleId === 10" class="meta">{{ item.releaseTime }} {{ item.labelName
&& ' | ' +
item.labelName }}</span>
<template v-if="item.listStyleId === 15 || item.listStyleId === 16">
<div v-if="item.keynoteSpeaker" class="meta m-b-10">
<img class="icon" src="@/assets/images/mine.png" alt="" /> {{ item.keynoteSpeaker }}
</div>
<div v-if="item.activityStartTime" class="meta m-b-10">
<img class="icon" src="@/assets/images/time.png" alt="" />
{{ item.activityStartTime }}
</div>
<div v-if="item.offlineLocation" class="meta m-b-10">
<img class="icon" src="@/assets/images/location.png" alt="" /> {{ item.offlineLocation
}}
</div>
<div v-if="item.onlineLocation" class="meta">
<img class="icon" src="@/assets/images/online.png" alt="" /> {{ item.onlineLocation }}
</div>
</template> </template>
<el-button v-if="item.listStyleId === 15 || item.listStyleId == 68" type="primary"
class="readDetailBtn">{{ <div class="texts">
$t('column.readDetail') }}</el-button> <p v-if="(item.listStyleId === 10 || item.listStyleId === 15) && item.classificationName"
</div> class="type">
</template> {{ item.classificationName }}
</li> </p>
</ul> <h6 class="titleDes" :title="item.title">{{ item.title }}</h6>
<div v-if="total > articles.length" class="pagination"> <template
<el-pagination background @current-change="currentChange" :current-page="page" v-if="item.listStyleId === 11 || item.listStyleId == 12 || item.listStyleId == 68">
:page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination> <span class="meta">{{ item.releaseTime }}</span>
<div class="des" v-html="item.mainBody"></div>
</template>
<span v-if="item.listStyleId === 10" class="meta">{{ item.releaseTime }} {{ item.labelName
&& ' | ' +
item.labelName }}</span>
<template v-if="item.listStyleId === 15 || item.listStyleId === 16">
<div v-if="item.keynoteSpeaker" class="meta m-b-10">
<img class="icon" src="@/assets/images/mine.png" alt="" /> {{ item.keynoteSpeaker }}
</div>
<div v-if="item.activityStartTime" class="meta m-b-10">
<img class="icon" src="@/assets/images/time.png" alt="" />
{{ item.activityStartTime }}
</div>
<div v-if="item.offlineLocation" class="meta m-b-10">
<img class="icon" src="@/assets/images/location.png" alt="" /> {{ item.offlineLocation
}}
</div>
<div v-if="item.onlineLocation" class="meta">
<img class="icon" src="@/assets/images/online.png" alt="" /> {{ item.onlineLocation }}
</div>
</template>
<el-button v-if="item.listStyleId === 15 || item.listStyleId == 68" type="primary"
class="readDetailBtn">{{
$t('column.readDetail') }}</el-button>
</div>
</template>
</li>
</ul>
<div v-if="total > articles.length" class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page"
:page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div> </div>
</div> </template>
</template> </template>
</template> </template>
</template> <div v-else class="none">
<div v-else class="none"> <img src="@/assets/images/none.png" alt="">
<img src="@/assets/images/none.png" alt=""> <p class="text">{{ $t('column.comming') }}</p>
<p class="text">{{ $t('column.comming') }}</p> </div>
</div> </div>
</div> </div>
<!-- <template v-if="info.listStyleId !== 73 && info.listStyleId !== 74"> -->
<template v-if="info.listStyleId !== 73 && info.listStyleId !== 74">
<div v-if="site == 2" class="right">
<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)">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.releaseTime }}</span>
</li>
</ul>
</div>
<!-- 选择了列表样式不用显示右侧部分 -->
<div v-else class="right">
<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)">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.releaseTime }}</span>
</li>
</ul>
<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)">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.releaseTime }}</span>
</li>
</ul>
</div>
</template>
<div v-else class="right"></div>
</div> </div>
<!-- <template v-if="info.listStyleId !== 73 && info.listStyleId !== 74"> -->
<template v-if="info.listStyleId !== 73 && info.listStyleId !== 74">
<div v-if="site == 2" class="right">
<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)">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.releaseTime }}</span>
</li>
</ul>
</div>
<!-- 选择了列表样式不用显示右侧部分 -->
<div v-else class="right">
<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)">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.releaseTime }}</span>
</li>
</ul>
<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)">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.releaseTime }}</span>
</li>
</ul>
</div>
</template>
<div v-else class="right"></div>
</div> </div>
</div> </div>
</div> </div>

File diff suppressed because it is too large Load Diff

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

@ -3,20 +3,20 @@
* */ * */
// 是否IE // 是否IE
function isIE() { function isIE () {
if (!!window.ActiveXObject || "ActiveXObject" in window) return true; if (!!window.ActiveXObject || "ActiveXObject" in window) return true;
return false; return false;
} }
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
isIE: isIE() isIE: isIE()
}, },
mutations: { mutations: {
SET_IE: (state, val) => { SET_IE: (state, val) => {
state.isIE = val; state.isIE = val;
} }
}, },
actions: {} actions: {}
}; };
Loading…
Cancel
Save