|
|
|
@ -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; |
|
|
|
|