文章栏目模板联调

mobile
yujialong 2 years ago
parent 18ff1c99a7
commit a80a307666
  1. 2
      src/api/index.js
  2. 12
      src/layouts/footer/index.vue
  3. 13
      src/layouts/header/index.vue
  4. 45
      src/layouts/navbar/index.vue
  5. 7
      src/pages/about/index.vue
  6. 4
      src/pages/application/index.vue
  7. 208
      src/pages/article/activity.vue
  8. 29
      src/pages/article/index.vue
  9. 4
      src/pages/careers/index.vue
  10. 155
      src/pages/column/index.vue
  11. 4
      src/pages/edu/index.vue
  12. 8
      src/pages/home/index.vue
  13. 45
      src/pages/news/index.vue
  14. 4
      src/pages/newsPress/index.vue
  15. 4
      src/pages/newsProcurement/index.vue
  16. 4
      src/pages/research/index.vue
  17. 6
      src/router/modules/article.js
  18. 17
      src/styles/common.scss
  19. BIN
      src/styles/font/toppan.otf

@ -10,4 +10,6 @@ export default {
findColumn: `iasf/sysColumn/findById`,
queryClassif: `iasf/content/classification/allTheQuery`,
queryLabel: `iasf/content/label/queryAllArticleSubjectTags`,
getsTheSubColumn: `iasf/sysColumn/getsTheSubColumn`,
getTheFullArticleByColumn: `iasf/sysColumn/getTheFullArticleByColumn`,
}

@ -21,7 +21,6 @@
</template>
<script>
import Setting from '@/setting'
import ColumnConst from '@/const/column'
export default {
data() {
return {
@ -75,14 +74,9 @@ export default {
} else {
location.href = href
}
} else {
// column
let path = 'column'
if (typeId === 3) { //
const item = ColumnConst.pageStyle.find(e => e.id === to.listStyleId)
if (item) path = item.path
}
this.$router.push(`/${path}?id=${id}`).catch(err => {})
} else if (typeId !== 4 || (typeId === 4 && !to.children.length)) {
// columnpath
this.$router.push(`/${typeId === 3 ? row.path : 'column'}?id=${id}`).catch(err => {})
}
}
},

@ -58,12 +58,11 @@ $height: 90px;
height: $height;
&:not(.channel) {
background-color: #fff;
box-shadow: 0px 2px 9px 0px rgba(221,221,221,0.18);
}
.logo{
position: absolute;
top: 0;
left: 167px;
left: 5%;
font-size: 20px;
color: #333330;
line-height: $height;
@ -75,7 +74,7 @@ $height: 90px;
.tools {
position: absolute;
top: 30px;
right: 240px;
right: 5%;
img {
cursor: pointer;
}
@ -84,13 +83,13 @@ $height: 90px;
margin-right: 43px;
}
}
@media (max-width: 1430px) {
@media (max-width: 1500px) {
.header {
.logo {
left: 20px;
left: 50px;
}
.inner {
padding-right: 20px;
.tools {
right: 50px
}
}
}

@ -1,6 +1,6 @@
<template>
<div>
<el-menu class="nav" ref="type" :key="menuRefresh" mode="horizontal" :background-color="bgColor" :text-color="textColor" :active-text-color="activeTextColor" @open="jump" @select="jump" :default-active="String(active)">
<el-menu :class="['nav', {home: isHome}]" ref="type" :key="menuRefresh" mode="horizontal" menu-trigger="click" :background-color="bgColor" :text-color="textColor" :active-text-color="activeTextColor" @open="jump" @select="jump" :default-active="String(active)">
<menuTree :menuList="menus"/>
</el-menu>
</div>
@ -9,12 +9,11 @@
<script>
import Setting from '@/setting'
import menuTree from '@/components/menuTree'
import ColumnConst from '@/const/column'
export default {
data() {
return {
site: this.$store.state.content.site,
isChannel: this.$route.path === '/home',
isHome: this.$route.path === '/home',
active: this.$route.query.id,
menus: [],
bgColor: '#fff',
@ -29,7 +28,7 @@ export default {
},
watch: {
'$route'() {
this.isChannel = this.$route.path === '/home'
this.isHome = this.$route.path === '/home'
this.handleColor()
}
},
@ -53,9 +52,9 @@ export default {
},
//
handleColor() {
const channel = this.isChannel
this.bgColor = channel ? 'transparent' : '#fff'
this.textColor = channel ? '#fff' : '#333'
const home = this.isHome
this.bgColor = home ? 'transparent' : '#fff'
this.textColor = home ? '#fff' : '#333'
// this.menuRefresh++
},
//
@ -98,14 +97,9 @@ export default {
} else {
location.href = href
}
} else {
// column
let path = 'column'
if (typeId === 3) { //
const item = ColumnConst.pageStyle.find(e => e.id === to.listStyleId)
if (item) path = item.path
}
this.$router.push(`/${path}?id=${id}`).catch(err => {})
} else if (typeId !== 4 || (typeId === 4 && !to.children.length)) {
// columnpath
this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${id}`).catch(err => {})
}
}
}
@ -114,13 +108,11 @@ export default {
<style lang="scss" scoped>
$height: 90px;
/deep/.nav{
/deep/.nav.el-menu--horizontal {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
}
/deep/.nav.el-menu--horizontal {
border: 0;
.el-menu-item, .el-submenu__title {
height: $height;
@ -128,6 +120,12 @@ $height: 90px;
span {
font-size: 14px;
}
&:hover {
background-color: transparent !important;
span {
color: #1583FF;
}
}
}
.el-submenu__title {
display: inline-flex;
@ -139,12 +137,15 @@ $height: 90px;
}
.el-submenu__icon-arrow {
position: static;
margin: 0;
margin: 0 0 0 5px;
color: inherit;
}
}
@media (max-width: 1430px) {
.nav {
left: 52%;
@media (max-width: 1500px) {
/deep/.nav {
.el-menu-item {
padding: 0 8px;
}
}
}
</style>

@ -5,7 +5,7 @@
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div :class="['banner-item', {'cursor-pointer': item.link.linkName !== '无'}]" @click="openLink(item)">
<img :src="item.pic" alt="">
<p class="banner-name">ABOUT</p>
<p class="banner-name">{{ item.title }}</p>
</div>
</el-carousel-item>
</template>
@ -177,7 +177,7 @@ export default {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json[0])
}
@ -218,6 +218,7 @@ export default {
}
.bg {
margin: -122px 0 0 0;
border-top-right-radius: 40px;
}
}
.card {
@ -248,6 +249,7 @@ export default {
h6 {
margin-bottom: 10px;
font-size: 40px;
font-family: toppan;
}
.des {
font-size: 18px;
@ -379,6 +381,7 @@ export default {
margin-bottom: 10px;
font-size: 60px;
font-weight: 800;
font-family: toppan;
color: #035CE1;
line-height: 49px;
}

@ -5,7 +5,7 @@
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div :class="['banner-item', {'cursor-pointer': item.link.linkName !== '无'}]" @click="openLink(item)">
<img :src="item.pic" alt="">
<p class="banner-name">APPLICATION</p>
<p class="banner-name">{{ item.title }}</p>
</div>
</el-carousel-item>
</template>
@ -95,7 +95,7 @@ export default {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json)

@ -0,0 +1,208 @@
<template>
<div class="wrap">
<div class="content" style="width: 1400px;">
<Breadcrumb ref="breadcrumb" :data="'装置概况/' + form.title"/>
<div class="article">
<div class="left">
<h2>{{ form.title }}</h2>
<div class="meta">日期{{ form.activityStartTime + ' ~ ' + form.activityEndTime }}</div>
<div class="meta">地址{{ form.offlineLocation }}</div>
<div class="meta">线上{{ form.onlineLocation }}</div>
<div class="meta">主讲人{{ form.keynoteSpeaker }}</div>
<h6>内容介绍</h6>
<div v-html="form.mainBody"></div>
</div>
<div class="right">
<el-tree class="column" ref="column" :data="columns" highlight-current :expand-on-click-node="false" :props="defaultProps" node-key="id" ></el-tree>
<p class="l-title">热点内容</p>
<ul class="list">
<li>
<p class="text">喜报 | 深圳粒子研究院荣获全国科研</p>
<span class="date">2022-08-09</span>
</li>
<li>
<p class="text">喜报 | 深圳粒子研究院荣获全国科研</p>
<span class="date">2022-08-09</span>
</li>
<li>
<p class="text">喜报 | 深圳粒子研究院荣获全国科研</p>
<span class="date">2022-08-09</span>
</li>
</ul>
<p class="l-title">最新资讯</p>
<ul class="list">
<li v-for="(item, i) in news" :key="i">
<p class="text">{{ item.title }}</p>
<span class="date">{{ item.createTime }}</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</template>
<script>
import Setting from '@/setting'
import Util from '@/libs/util'
import Breadcrumb from '@/components/breadcrumb'
export default {
data() {
return {
id: this.$route.query.id,
columnId: '',
form: {},
columnBanner: '',
columns: [],
defaultProps: {
value: 'id',
label: 'columnName'
},
news: [],
files: []
}
},
components: {
Breadcrumb
},
watch: {
'$route'() {
this.id = this.$route.query.id
this.getInfo()
}
},
mounted() {
this.getColumn()
this.getArticle()
this.getFile()
},
methods: {
//
getInfo() {
this.$post(`${this.api.findArticle}?id=${this.id}`).then(({ data }) => {
this.form = data
this.columnId = data.columnId
this.$refs.breadcrumb.update('装置概况/' + data.title)
data.bannerImg || this.getBanner(this.columns)
if (this.columnBanner) this.form.bannerImg = this.columnBanner
}).catch(err => {})
},
// banner
getBanner(data) {
this.columnBanner = ''
for (const e of data) {
if (e.columnBanner) this.columnBanner = e.columnBanner
if (e.id == this.columnId) {
break
} else {
this.getBanner(e.children)
}
}
},
//
getFile() {
this.$post(`${this.api.theAttachmentUnderTheQueryColumn}?contentId=${this.id}`).then(({ data }) => {
this.files = data
}).catch(err => {})
},
//
getColumn() {
this.$post(this.api.listWithTree, {
siteId: this.$route.query.siteId || this.$store.state.content.site,
columnName: '',
templateId: '',
typeId : '',
isSort: 0
}).then(({ data }) => {
this.columns = data
this.getInfo()
}).catch(err => {})
},
//
getArticle() {
this.$post(this.api.newlyPublishedArticles, {
pageNum: 1,
pageSize: 5,
siteId: this.$route.query.siteId || this.$store.state.content.site
}).then(({ data }) => {
this.news = data.records
}).catch(res => {})
},
//
download(e) {
Util.downloadFile(e.fileName, e.filePath)
}
}
};
</script>
<style lang="scss" scoped>
@import "./editor.css";
.banner {
height: 280px;
padding: 123px 0 0 243px;
font-size: 48px;
color: #fff;
background: url(../../assets/images/intro-bg.png) 0 0/100% 100% no-repeat;
}
.article {
display: flex;
justify-content: space-between;
.left {
width: 920px;
}
h2 {
margin-bottom: 20px;
font-size: 36px;
color: #1C1C1C;
}
.meta {
margin: 10px 0;
font-size: 14px;
font-weight: 600;
color: #333;
}
h6 {
margin: 30px 0 10px;
font-size: 18px;
}
.right {
width: 324px;
}
.column {
width: 100%;
margin-bottom: 25px;
}
/deep/.el-tree-node__content {
height: 60px;
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;
}
}
}
</style>

@ -1,14 +1,14 @@
<template>
<div class="wrap">
<div v-show="loaded" class="wrap">
<div class="banner" :style="{backgroundImage: form.bannerImg ? ('url(' + form.bannerImg + ')') : ''}">
{{ form.title }}
{{ form.columnName }}
</div>
<div class="content" style="width: 1400px;">
<Breadcrumb ref="breadcrumb" :data="'装置概况/' + form.title"/>
<div class="article">
<div class="left">
<h2>{{ form.title }}</h2>
<div class="meta">{{ form.createTime }} | {{ form.source && form.source + '|' }} {{ form.author && form.author + ' | ' }} {{ form.totalBrowsing }} 浏览</div>
<div class="meta">{{ form.source && form.source + ' | ' }} {{ form.author && form.author + ' | ' }} {{ form.totalBrowsing }} 浏览 | {{ form.createTime }}</div>
<div class="meta">{{ form.edit && '编辑:' + form.edit }} {{ form.audit && ' | 审核:' + form.audit }} {{ form.label && ' | 标签:' + form.label }}</div>
<p class="brief">{{ form.summary }}</p>
<div v-html="form.mainBody"></div>
@ -61,9 +61,11 @@ import Breadcrumb from '@/components/breadcrumb'
export default {
data() {
return {
loaded: false,
id: this.$route.query.id,
columnId: '',
form: {},
columnBanner: '',
columns: [],
defaultProps: {
value: 'id',
@ -91,11 +93,20 @@ export default {
//
getInfo() {
this.$post(`${this.api.findArticle}?id=${this.id}`).then(({ data }) => {
this.form = data
this.columnId = data.columnId
this.$refs.breadcrumb.update('装置概况/' + data.title)
data.bannerImg || this.getBanner(this.columns)
if (this.columnBanner) this.form.bannerImg = this.columnBanner
if (data.isDisable) {
this.$router.back()
} else {
if (data.articleTemplate === 10) {
this.$router.replace(`/article/activity?id=${this.id}&siteId=${this.$route.query.siteId}`)
} else {
this.form = data
this.columnId = data.columnId
this.$refs.breadcrumb.update('装置概况/' + data.title)
data.bannerImg || this.getBanner(this.columns)
if (this.columnBanner) this.form.bannerImg = this.columnBanner
this.loaded = true
}
}
}).catch(err => {})
},
// banner
@ -123,7 +134,7 @@ export default {
columnName: '',
templateId: '',
typeId : '',
isSort: 0
isSort: 1
}).then(({ data }) => {
this.columns = data
this.getInfo()

@ -5,7 +5,7 @@
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div :class="['banner-item', {'cursor-pointer': item.link.linkName !== '无'}]" @click="openLink(item)">
<img :src="item.pic" alt="">
<p class="banner-name">CAREERS</p>
<p class="banner-name">{{ item.title }}</p>
</div>
</el-carousel-item>
</template>
@ -116,7 +116,7 @@ export default {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json)
}

@ -7,10 +7,12 @@
<div class="column-wrap">
<div class="article">
<div class="left">
<div class="forms">
<!-- 文章侧边栏+搜索+新闻列表 -->
<div v-if="info.listStyleId === 10" class="forms">
<div class="item">
<span class="label">所属分类</span>
<el-select v-model="form.typeId">
<el-select v-model="form.classificationId" @change="filter">
<el-option label="不限" value=""></el-option>
<el-option
v-for="item in classifications"
:key="item.id"
@ -21,7 +23,7 @@
</div>
<div class="item">
<span class="label">主题</span>
<el-select v-model="form.labelId">
<el-select v-model="lableId" multiple @change="filter">
<el-option
v-for="item in labels"
:key="item.id"
@ -37,17 +39,44 @@
</i>
</div>
</div>
<!-- 会议活动筛选+会议活动列表 -->
<div v-if="info.listStyleId === 15" class="forms">
<div class="item">
<span class="label">类型</span>
<el-select v-model="form.classificationId">
<el-option label="不限" value=""></el-option>
<el-option
v-for="item in classifications"
:key="item.id"
:label="item.labelName"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="contents">
<ul class="columns">
<li v-for="(item, i) in columns" :key="i" :class="{active: i === curColumn}" @click="toArticle(i)">{{ item.columnName }}</li>
<ul v-if="columns.length > 2 && !isFilter && showNav" class="columns">
<li v-if="all.columnName" class="all" :class="{active: curColumn === 0 }" @click="toArticle(0, 1)">{{ all.columnName }}</li>
<template v-for="(item, i) in columns">
<li v-if="i" :key="i" :class="{active: i === curColumn}" @click="toArticle(i)">{{ item.columnName }}</li>
</template>
</ul>
<div style="width: 1113px">
<ul class="articles">
<li v-for="(item, i) in articles" :key="i">
<li v-for="(item, i) in articles" :key="i" @click="toArtice(item)">
<div class="texts">
<p class="type">新闻类型</p>
<p v-if="info.listStyleId === 10 && item.classificationName" class="type">{{ item.classificationName }}</p>
<h6>{{ item.title }}</h6>
<span class="meta">{{ item.releaseTime }} | 建设进展</span>
<template v-if="info.listStyleId === 11">
<span class="meta">{{ item.updateTime }}</span>
<div class="des" v-html="item.mainBody"></div>
</template>
<span v-if="info.listStyleId === 10" class="meta">{{ item.updateTime }} {{ item.labelName && ' | ' + item.labelName }}</span>
<template v-if="info.listStyleId === 15 || info.listStyleId === 16">
<div v-if="item.keynoteSpeaker" class="meta m-b-10"><i class="el-icon-user"></i> {{ item.keynoteSpeaker }}</div>
<div v-if="item.activityStartTime" class="meta m-b-10"><i class="el-icon-alarm-clock"></i> {{ item.activityStartTime + '~' + item.activityEndTime }}</div>
<div v-if="item.offlineLocation" class="meta"><i class="el-icon-location-outline"></i> {{ item.offlineLocation }}</div>
</template>
</div>
<img class="pic" :src="item.titleImg" alt="">
</li>
@ -59,7 +88,7 @@
</div>
</div>
<div class="right">
<el-tree class="column" ref="column" :data="columns" highlight-current :expand-on-click-node="false" :props="defaultProps" node-key="id" ></el-tree>
<el-tree class="column" ref="column" :data="infoColumns" highlight-current :expand-on-click-node="false" :props="defaultProps" node-key="id" ></el-tree>
<p class="l-title">热点内容</p>
<ul class="list">
@ -99,18 +128,22 @@ export default {
id: this.$route.query.id,
site: this.$store.state.content.site,
columnId: '',
info: {
columnName: '',
columnBanner: ''
},
info: {},
searchTimer: null,
lableId: [],
form: {
classificationId: '',
title: ''
},
classifications: [],
labels: [],
columns: [],
all: null,
infoColumns: [],
curColumn: 0,
showNav: false,
showNavIds: [10, 11, 12, 16], // id
isFilter: false,
page: 1,
pageSize: 10,
total: 0,
@ -125,33 +158,37 @@ export default {
watch: {
'$route'() {
this.id = this.$route.query.id
this.getInfo()
this.init()
},
'form.title': function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
this.filter()
}, 500)
}
},
mounted() {
this.getInfo()
this.getColumn()
this.getNews()
this.getArticle([this.id])
this.getClassification()
this.getLabel()
this.init()
},
methods: {
init() {
this.getLeftColumn()
this.getInfo()
this.getColumn()
this.getNews()
this.getLabel()
},
//
getInfo() {
this.$post(`${this.api.findColumn}?id=${this.id}`).then(({ data }) => {
this.info = data
this.showNav = this.showNavIds.includes(data.listStyleId)
this.getClassification()
}).catch(res => {})
},
//
getClassification() {
this.$post(`${this.api.queryClassif}?siteId=${this.$route.query.siteId || this.site}`).then(({ data }) => {
this.$post(`${this.api.getTheFullArticleByColumn}?id=${this.id}`).then(({ data }) => {
this.classifications = data
}).catch(err => {})
},
@ -161,16 +198,32 @@ export default {
this.labels = data
}).catch(err => {})
},
//
//
getLeftColumn() {
this.$post(`${this.api.getsTheSubColumn}?id=${this.id}`).then(({ data }) => {
if (data.length > 1 && !data.find(e => e.listStyleId !== data[0].listStyleId)) {
this.all = data[0]
this.getArticle(data.map(e => e.id))
} else {
this.all = null
this.getArticle([data[data.length > 1 ? 1 : 0].id])
data = data.slice(1)
}
this.curColumn = 0
this.columns = data
console.log("🚀 ~ file: index.vue ~ line 212 ~ this.$post ~ columns", columns)
}).catch(err => {})
},
//
getColumn() {
this.$post(this.api.listWithTree, {
this.$post(this.api.listWithTreeMenuVisible, {
siteId: this.$route.query.siteId || this.$store.state.content.site,
columnName: '',
templateId: '',
typeId : '',
isSort: 0
isSort: 1
}).then(({ data }) => {
this.columns = data
this.infoColumns = data
}).catch(err => {})
},
//
@ -183,32 +236,48 @@ export default {
this.news = data.records
}).catch(res => {})
},
//
toArticle(i) {
//
toArticle(i, all) {
this.curColumn = i
this.initData()
this.page = 1
this.getArticle(all ? this.columns.map(e => e.id) : [this.columns[i].id])
},
//
getArticle(columnIds) {
this.$post(this.api.queryArticle, {
siteId: this.$route.query.siteId || this.$store.state.content.site,
this.$post(this.api.newlyPublishedArticles, {
siteId: this.$route.query.siteId || this.site,
columnIds,
pageNum: this.page,
pageSize: this.pageSize,
labelId: this.lableId.join(),
...this.form
}).then(({ data }) => {
this.articles = data.records
const list = data.records
list.map(e => {
e.mainBody = e.mainBody.replace(/<img.*?>/g , '') //
})
this.articles = list
this.total = +data.total
}).catch(res => {})
},
initData() {
//
filter() {
this.page = 1
this.getArticle([this.columns[this.curColumn].id])
this.isFilter = !!(this.form.classificationId || this.form.title || this.lableId.length)
const id = (this.isFilter || this.all) ?
this.columns.map(e => e.id) :
[this.columns[0].id]
this.curColumn = 0
this.getArticle(id)
},
currentChange(val) {
this.page = val
this.getData()
// this.getData()
},
//
toArtice(item) {
this.$router.push(`/article?id=${item.id}&site=${this.$route.query.siteId || this.site}`)
}
}
};
</script>
@ -241,6 +310,7 @@ export default {
display: flex;
align-items: center;
padding: 30px;
margin-bottom: 20px;
background-color: #fff;
.item {
display: inline-flex;
@ -288,16 +358,16 @@ export default {
}
.contents {
display: flex;
margin-top: 20px;
}
.columns {
width: 174px;
margin-right: 12px;
overflow: auto;
li {
display: flex;
align-items: center;
height: 48px;
padding-left: 24px;
padding-left: 40px;
margin-bottom: 1px;
font-size: 16px;
color: #666;
@ -318,6 +388,9 @@ export default {
&.active {
border-right-color: #083A93;
}
&.all {
padding-left: 24px;
}
}
}
.articles {
@ -327,17 +400,19 @@ export default {
align-items: center;
margin-bottom: 20px;
background-color: #fff;
cursor: pointer;
}
.texts {
max-width: 620px;
padding-left: 30px;
}
.type {
margin-bottom: 15px;
font-size: 18px;
color: #333;
}
h6 {
margin: 15px 0;
margin-bottom: 15px;
font-size: 24px;
color: #000;
line-height: 38px;
@ -347,6 +422,10 @@ export default {
font-size: 16px;
color: #666;
}
.des {
margin-top: 15px;
@include mul-ellipsis(2);
}
img {
width: 417px;
height: 244px;

@ -5,7 +5,7 @@
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div :class="['banner-item', {'cursor-pointer': item.link.linkName !== '无'}]" @click="openLink(item)">
<img :src="item.pic" alt="">
<p class="banner-name">NEWS & EVENTS</p>
<p class="banner-name">{{ item.title }}</p>
</div>
</el-carousel-item>
</template>
@ -71,7 +71,7 @@ export default {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json)
}

@ -39,7 +39,7 @@
<p class="intro">{{ modules[4].form.des }}</p>
<ul class="news">
<li v-for="(item, i) in articles" :key="i" @click="toArtice(item)">
<img src="@/assets/images/channel1.png" alt="">
<img :src="item.titleImg" alt="">
<div class="texts">
<h6>{{ item.columnName }}</h6>
<div class="des" v-html="item.mainBody"></div>
@ -135,14 +135,14 @@ export default {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 138 ~ this.$post ~ this.modules", this.modules)
//
const { column, site, articleNum } = json[5].form
if (column.length) {
this.$post(this.api.queryArticle, {
this.$post(this.api.newlyPublishedArticles, {
siteId: site,
columnIds: [column[column.length - 1]],
pageNum: 1,
@ -304,6 +304,7 @@ export default {
color: #fff;
}
.des {
display: block;
padding: 38px 60px;
margin-top: 84px;
font-size: 30px;
@ -312,6 +313,7 @@ export default {
text-align: center;
background: rgba(111, 69, 36, .56);
border-radius: 17px;
overflow: visible;
}
}
</style>

@ -5,7 +5,7 @@
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div :class="['banner-item', {'cursor-pointer': item.link.linkName !== '无'}]" @click="openLink(item)">
<img :src="item.pic" alt="">
<p class="banner-name">NEWS & EVENTS</p>
<p class="banner-name">{{ item.title }}</p>
</div>
</el-carousel-item>
</template>
@ -154,7 +154,7 @@ export default {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
console.log("🚀 ~ file: index.vue ~ line 138 ~ this.$post ~ this.modules", json)
//
@ -208,7 +208,46 @@ export default {
},
// tab
tabChange(i) {
this.curColumn = i
const { column } = this.modules[1].list[i]
if (column && column.length) {
const id = column[column.length - 1]
//
this.$post(`${this.api.findColumn}?id=${id}`).then(({ data }) => {
const { typeId } = data
//
if (typeId === 2) {
let href = data.linkAddress
const cType = data.connectionType
if (cType !== 2) { //
const ids = href.split('-') // -
// idsiteSelection
const site = cType === 1 ?
(this.$route.query.siteId || this.site) :
data.siteSelection
if (ids[1]) { //
href = '/article?id=' + ids[1]
} else { //
const columnIds = ids[0].split(',')
href = '/column?id=' + columnIds[columnIds.length - 1]
}
href = this.$router.resolve(href + '&siteId=' + site).href
}
//
if (data.isOpen) {
window.open(href)
} else {
location.href = href
}
} else if (typeId === 3) {
// path
this.$router.push(`/${data.path}?id=${id}`).catch(err => {})
} else {
this.curColumn = i
}
}).catch(err => {})
} else {
this.curColumn = i
}
}
}
};

@ -5,7 +5,7 @@
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div :class="['banner-item', {'cursor-pointer': item.link.linkName !== '无'}]" @click="openLink(item)">
<img :src="item.pic" alt="">
<p class="banner-name">NEWS & EVENTS</p>
<p class="banner-name">{{ item.title }}</p>
</div>
</el-carousel-item>
</template>
@ -54,7 +54,7 @@ export default {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json)
}

@ -5,7 +5,7 @@
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div :class="['banner-item', {'cursor-pointer': item.link.linkName !== '无'}]" @click="openLink(item)">
<img :src="item.pic" alt="">
<p class="banner-name">NEWS & EVENTS</p>
<p class="banner-name">{{ item.title }}</p>
</div>
</el-carousel-item>
</template>
@ -54,7 +54,7 @@ export default {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json)
}

@ -5,7 +5,7 @@
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div :class="['banner-item', {'cursor-pointer': item.link.linkName !== '无'}]" @click="openLink(item)">
<img :src="item.pic" alt="">
<p class="banner-name">RESEARCH</p>
<p class="banner-name">{{ item.title }}</p>
</div>
</el-carousel-item>
</template>
@ -80,7 +80,7 @@ export default {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json)
}

@ -9,6 +9,12 @@ export default {
path: `/${name}`,
component: () => import(`@/pages/${name}`),
meta: { title: '' }
},
{
name,
path: `/${name}/activity`,
component: () => import(`@/pages/${name}/activity`),
meta: { title: '' }
}
]
};

@ -9,6 +9,10 @@
font-family: SFProDisplay-Bold;
src: url('font/SF-Pro-Display-Bold.otf');
}
@font-face {
font-family: toppan;
src: url('font/toppan.otf');
}
[v-cloak] {
display: none;
@ -77,3 +81,16 @@
background-color: $--color-primary !important;
}
}
.el-menu--popup {
min-width: 128px;
margin-top: 0;
text-align: center;
.el-menu-item {
height: 50px !important;
line-height: 50px !important;
}
span {
font-size: 18px;
color: #333;
}
}

Binary file not shown.
Loading…
Cancel
Save