yujialong 2 years ago
parent 66c61d9120
commit 52b658af41
  1. BIN
      src/assets/images/column-banner.png
  2. BIN
      src/assets/images/location.png
  3. BIN
      src/assets/images/mine.png
  4. BIN
      src/assets/images/online.png
  5. BIN
      src/assets/images/time.png
  6. 2
      src/components/breadcrumb/index.vue
  7. 2
      src/components/menuTree/index.vue
  8. 40
      src/layouts/footer/index.vue
  9. 62
      src/layouts/navbar/index.vue
  10. 7
      src/libs/util.js
  11. 47
      src/mixins/article/index.js
  12. 11
      src/pages/about/index.vue
  13. 8
      src/pages/application/index.vue
  14. 8
      src/pages/article/activity.vue
  15. 17
      src/pages/article/index.vue
  16. 132
      src/pages/column/index.vue
  17. 6
      src/pages/home/index.vue
  18. 24
      src/pages/news/index.vue
  19. 5
      src/setting.js
  20. 9
      src/styles/common.scss
  21. BIN
      src/styles/font/PingFangSC-Medium.otf
  22. 5
      src/styles/page/page.scss

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

@ -28,7 +28,7 @@ export default {
}, },
route: { route: {
type: String, type: String,
default: 'list' default: 'column'
}, },
query: { query: {
type: Object type: Object

@ -7,7 +7,7 @@
</template> </template>
<menuTree :menuList="item.children"></menuTree> <menuTree :menuList="item.children"></menuTree>
</el-submenu> </el-submenu>
<el-menu-item :key="item.id" :id="item.id" :index="String(item.id)" v-else> <el-menu-item :key="item.id" :id="item.id" :index="String(item.id)" :class="{active: $route.query.id == item.id}" v-else>
<span slot="title" :id="item.id">{{item.columnName}}</span> <span slot="title" :id="item.id">{{item.columnName}}</span>
</el-menu-item> </el-menu-item>
</template> </template>

@ -9,9 +9,9 @@
<p class="meta">Tel400-0010-998</p> <p class="meta">Tel400-0010-998</p>
</div> </div>
<div v-for="(item, i) in columns" :key="i" class="column"> <div v-for="(item, i) in columns" :key="i" class="column">
<h6 @click="jump(item)">{{ item.columnName }}</h6> <h6 @click="columnTo(item)">{{ item.columnName }}</h6>
<ul v-if="item.children.length" class="children"> <ul v-if="item.children.length" class="children">
<li v-for="(column, j) in item.children" :key="j" @click="jump(column)">{{ column.columnName }}</li> <li v-for="(column, j) in item.children" :key="j" @click="columnTo(column)">{{ column.columnName }}</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -21,7 +21,9 @@
</template> </template>
<script> <script>
import Setting from '@/setting' import Setting from '@/setting'
import mixins from '@/mixins/article'
export default { export default {
mixins: [mixins],
data() { data() {
return { return {
site: this.$store.state.content.site, site: this.$store.state.content.site,
@ -45,39 +47,6 @@ export default {
this.columns = data.slice(0, 8) this.columns = data.slice(0, 8)
}).catch(err => {}) }).catch(err => {})
}, },
//
jump(to) {
const { id } = to
const { typeId } = to
//
if (typeId === 2) {
let href = to.linkAddress
const cType = to.connectionType
if (cType !== 2) { //
const ids = href.split('-') // -
// idsiteSelection
const site = cType === 1 ?
(this.$route.query.siteId || this.site) :
to.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 (to.isOpen) {
window.open(href)
} else {
location.href = href
}
} else if (typeId !== 4 || (typeId === 4 && !to.children.length)) {
// columnpath
this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${id}`).catch(err => {})
}
}
}, },
}; };
</script> </script>
@ -104,6 +73,7 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
font-size: 16px; font-size: 16px;
white-space: nowrap; white-space: nowrap;
cursor: pointer;
} }
} }
.children { .children {

@ -9,7 +9,9 @@
<script> <script>
import Setting from '@/setting' import Setting from '@/setting'
import menuTree from '@/components/menuTree' import menuTree from '@/components/menuTree'
import mixins from '@/mixins/article'
export default { export default {
mixins: [mixins],
data() { data() {
return { return {
site: this.$store.state.content.site, site: this.$store.state.content.site,
@ -73,7 +75,7 @@ export default {
handleColor() { handleColor() {
const home = this.isHome const home = this.isHome
this.bgColor = home ? 'transparent' : '#fff' this.bgColor = home ? 'transparent' : '#fff'
this.textColor = home ? '#fff' : '#333' this.textColor = home ? '#f9f9f9' : '#333'
// this.menuRefresh++ // this.menuRefresh++
}, },
// //
@ -91,40 +93,7 @@ export default {
// //
jump(id) { jump(id) {
this.getPath(this.menus ,id) this.getPath(this.menus ,id)
const to = this.toItem this.columnTo(this.toItem)
console.log("🚀 ~ file: index.vue ~ line 73 ~ jump ~ id", to, this.parentId)
const { typeId } = to
//
if (typeId === 2) {
let href = to.linkAddress
const cType = to.connectionType
if (cType !== 2) { //
const ids = href.split('-') // -
// idsiteSelection
const site = cType === 1 ?
(this.$route.query.siteId || this.site) :
to.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 (to.isOpen) {
window.open(href)
} else {
location.href = href
}
} else if (typeId === 3) {
// path
this.$router.push(`/${to.path}?id=${id}`).catch(err => {})
} else if (typeId !== 4 || (typeId === 4 && !to.children.length)) {
// /column
this.$router.push(`/column?id=${id}`).catch(err => {})
}
} }
} }
}; };
@ -138,6 +107,7 @@ $height: 90px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
border: 0; border: 0;
outline: none;
.el-menu-item, .el-submenu__title { .el-menu-item, .el-submenu__title {
height: $height; height: $height;
line-height: $height; line-height: $height;
@ -164,6 +134,28 @@ $height: 90px;
margin: 0 0 0 5px; margin: 0 0 0 5px;
color: inherit; color: inherit;
} }
.is-active {
color: #333 !important;
}
.active, .active .el-submenu__title {
color: #1583ff !important;
}
&.home {
.el-menu-item, .el-submenu__title {
&:hover {
background-color: transparent !important;
span {
color: #fff;
}
}
}
.is-active {
color: #f9f9f9 !important;
}
.active, .active .el-submenu__title {
color: #fff !important;
}
}
} }
@media (max-width: 1500px) { @media (max-width: 1500px) {
/deep/.nav { /deep/.nav {

@ -162,6 +162,13 @@ const util = {
showClose: true, showClose: true,
duration duration
}); });
},
// 去掉html里的标签
removeTag(list, prop = 'mainBody') {
list.map(e => {
e.mainBody = e[prop].replace(/<[^>]+>/g , '')
})
return list
} }
}; };

@ -0,0 +1,47 @@
import Setting from '@/setting'
import Util from '@/libs/util'
export default {
data() {
return {
site: this.$store.state.content.site,
id: this.$route.query.id
}
},
mounted() {
},
methods: {
// 点击栏目回调
columnTo(to) {
const { typeId } = to
// 跳转链接
if (typeId === 2) {
let href = to.linkAddress
const cType = to.connectionType
if (cType !== 2) { // 非站外链接
const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页
// 站点id:站内链接取当前站点,其他站点链接取siteSelection
const site = cType === 1 ?
(this.$route.query.siteId || this.site) :
to.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 (to.isOpen) {
window.open(href)
} else {
location.href = href
}
} else if (typeId !== 4 || (typeId === 4 && !to.children.length)) {
// 常规栏目跳转到column页,长页栏目直接获取path
this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${to.id}`).catch(err => {})
}
},
}
};

@ -139,7 +139,7 @@
</div> </div>
<div class="block"> <div class="block">
<div class="inner"> <div class="inner" style="width: 1581px">
<h2 class="b-title">{{ modules[21].form.title }}</h2> <h2 class="b-title">{{ modules[21].form.title }}</h2>
<p class="intro">{{ modules[21].form.des }}</p> <p class="intro">{{ modules[21].form.des }}</p>
<div :class="['staff', {'cursor-pointer': modules[22].form.link.linkName !== '无'}]" @click="openLink(modules[22].form)"> <div :class="['staff', {'cursor-pointer': modules[22].form.link.linkName !== '无'}]" @click="openLink(modules[22].form)">
@ -215,6 +215,7 @@ export default {
font-size: 22px; font-size: 22px;
color: #181818; color: #181818;
line-height: 31px; line-height: 31px;
-webkit-line-clamp: 6;
} }
.bg { .bg {
margin: -122px 0 0 0; margin: -122px 0 0 0;
@ -351,13 +352,14 @@ export default {
justify-content: space-between; justify-content: space-between;
background: #F8F8F8; background: #F8F8F8;
.left { .left {
width: 658px; width: 743px;
margin: 50px 0 0 46px; padding: 108px 43px 0 46px;
} }
h6 { h6 {
margin-bottom: 30px; margin-bottom: 30px;
font-size: 30px; font-size: 30px;
color: #333; color: #333;
@include mul-ellipsis(3);
} }
.des { .des {
font-size: 20px; font-size: 20px;
@ -365,7 +367,8 @@ export default {
line-height: 34px; line-height: 34px;
} }
.pic { .pic {
width: 650px; width: 838px;
height: 487px;
} }
} }
.stat { .stat {

@ -59,9 +59,9 @@
<p class="intro">{{ modules[6].form.des }}</p> <p class="intro">{{ modules[6].form.des }}</p>
<ul class="news"> <ul class="news">
<li v-for="(item, i) in articles" :key="i" @click="toArtice(item)"> <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"> <div class="texts">
<h6>{{ item.columnName }}</h6> <h6>{{ item.title }}</h6>
<div class="des" v-html="item.mainBody"></div> <div class="des" v-html="item.mainBody"></div>
<span class="meta">{{ item.createTime }}</span> <span class="meta">{{ item.createTime }}</span>
</div> </div>
@ -108,7 +108,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: articleNum || 6 pageSize: articleNum || 6
}).then(({ data }) => { }).then(({ data }) => {
this.articles = data.records
this.articles = Util.removeTag(data.records)
}).catch(err => {}) }).catch(err => {})
} }
} }
@ -243,6 +244,7 @@ export default {
color: #0648A8; color: #0648A8;
} }
.des { .des {
// height: 80px;
margin: 14px 0; margin: 14px 0;
font-size: 16px; font-size: 16px;
color: #333; color: #333;

@ -1,7 +1,7 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="content" style="width: 1400px;"> <div class="content" style="width: 1400px;">
<Breadcrumb ref="breadcrumb" :data="'装置概况/' + form.title" route="column" :query.sync="query"/> <Breadcrumb ref="breadcrumb" :data="'栏目/' + form.title" route="/column" :query.sync="query"/>
<div class="article"> <div class="article">
<div class="left"> <div class="left">
<h2>{{ form.title }}</h2> <h2>{{ form.title }}</h2>
@ -14,7 +14,7 @@
<div v-html="form.mainBody"></div> <div v-html="form.mainBody"></div>
</div> </div>
<div class="right"> <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="columns" highlight-current :expand-on-click-node="false" :props="defaultProps" node-key="id" @node-click="columnTo"></el-tree>
<p class="l-title">热点内容</p> <p class="l-title">热点内容</p>
<ul class="list"> <ul class="list">
@ -49,7 +49,9 @@
import Setting from '@/setting' import Setting from '@/setting'
import Util from '@/libs/util' import Util from '@/libs/util'
import Breadcrumb from '@/components/breadcrumb' import Breadcrumb from '@/components/breadcrumb'
import mixins from '@/mixins/article'
export default { export default {
mixins: [mixins],
data() { data() {
return { return {
id: this.$route.query.id, id: this.$route.query.id,
@ -169,7 +171,7 @@ export default {
font-size: 18px; font-size: 18px;
} }
.right { .right {
width: 324px; width: 290px;
} }
.column { .column {
width: 100%; width: 100%;

@ -1,17 +1,17 @@
<template> <template>
<div v-show="loaded" class="wrap"> <div v-show="loaded" class="wrap">
<div class="banner" :style="{backgroundImage: form.bannerImg ? ('url(' + form.bannerImg + ')') : ''}"> <div v-if="form.articleTemplate !== 23" class="banner" :style="{backgroundImage: form.bannerImg ? ('url(' + form.bannerImg + ')') : ''}">
{{ form.columnName }} {{ form.columnName }}
</div> </div>
<div class="content" style="width: 1400px;"> <div class="content" style="width: 1400px;">
<Breadcrumb ref="breadcrumb" :data="'装置概况/' + form.title" route="column" :query.sync="query"/> <Breadcrumb ref="breadcrumb" :data="'栏目/' + form.title" route="/column" :query.sync="query"/>
<div class="article"> <div class="article">
<div class="left"> <div class="left">
<h2>{{ form.title }}</h2> <h2>{{ form.title }}</h2>
<div class="meta">{{ form.source && form.source + ' | ' }} {{ form.author && form.author + ' | ' }} {{ form.totalBrowsing }} 浏览 | {{ form.createTime }}</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> <div class="meta">{{ form.edit && '编辑:' + form.edit }} {{ form.audit && ' | 审核:' + form.audit }} {{ form.label && ' | 标签:' + form.label }}</div>
<p class="brief">{{ form.summary }}</p> <p class="brief">{{ form.summary }}</p>
<div v-html="form.mainBody"></div> <div class="des" v-html="form.mainBody"></div>
<div v-if="form.fileList && form.fileList.length" class="annex"> <div v-if="form.fileList && form.fileList.length" class="annex">
<h6>附件下载</h6> <h6>附件下载</h6>
<ul class="files"> <ul class="files">
@ -23,7 +23,7 @@
</div> </div>
</div> </div>
<div class="right"> <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="columns" highlight-current :expand-on-click-node="false" :props="defaultProps" node-key="id" @node-click="columnTo"></el-tree>
<p class="l-title">热点内容</p> <p class="l-title">热点内容</p>
<ul class="list"> <ul class="list">
@ -50,7 +50,9 @@
import Setting from '@/setting' import Setting from '@/setting'
import Util from '@/libs/util' import Util from '@/libs/util'
import Breadcrumb from '@/components/breadcrumb' import Breadcrumb from '@/components/breadcrumb'
import mixins from '@/mixins/article'
export default { export default {
mixins: [mixins],
data() { data() {
return { return {
site: this.$store.state.content.site, site: this.$store.state.content.site,
@ -191,6 +193,11 @@ export default {
color: #606060; color: #606060;
border-bottom: 1px solid #D8D8D8; border-bottom: 1px solid #D8D8D8;
} }
/deep/.des {
p {
margin: 1em 0;
}
}
.annex { .annex {
margin-top: 30px; margin-top: 30px;
h6 { h6 {
@ -216,7 +223,7 @@ export default {
} }
} }
.right { .right {
width: 324px; width: 290px;
} }
.column { .column {
width: 100%; width: 100%;

@ -1,5 +1,5 @@
<template> <template>
<div class="wrap"> <div v-show="loaded" :class="['wrap', {activity: info.listStyleId === 15}]">
<div class="banner"> <div class="banner">
<img width="100%" height="280" :src="info.columnBanner" alt=""> <img width="100%" height="280" :src="info.columnBanner" alt="">
<p class="text">{{ info.columnName }}</p> <p class="text">{{ info.columnName }}</p>
@ -58,9 +58,13 @@
</div> </div>
</div> </div>
<div class="contents"> <div class="contents">
<el-tree v-if="!isFilter && showNav" 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" @node-click="columnClick"></el-tree> <el-tree v-if="!isFilter && showNav" 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" @node-click="item => columnClick(item, 1)">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :title="node.label">{{ node.label }}</span>
</span>
</el-tree>
<div style="width: 1113px"> <div class="article-wrap">
<ul class="articles"> <ul class="articles">
<li v-for="(item, i) in articles" :key="i" @click="toArtice(item)"> <li v-for="(item, i) in articles" :key="i" @click="toArtice(item)">
<div class="texts"> <div class="texts">
@ -72,10 +76,10 @@
</template> </template>
<span v-if="item.listStyleId === 10" class="meta">{{ item.updateTime }} {{ item.labelName && ' | ' + item.labelName }}</span> <span v-if="item.listStyleId === 10" class="meta">{{ item.updateTime }} {{ item.labelName && ' | ' + item.labelName }}</span>
<template v-if="item.listStyleId === 15 || item.listStyleId === 16"> <template v-if="item.listStyleId === 15 || item.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.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"><i class="el-icon-alarm-clock"></i> {{ item.activityStartTime + ' ~ ' + item.activityEndTime }}</div> <div v-if="item.activityStartTime" class="meta m-b-10"><img class="icon" src="@/assets/images/time.png" alt=""> {{ item.activityStartTime + ' ~ ' + item.activityEndTime }}</div>
<div v-if="item.offlineLocation" class="meta m-b-10"><i class="el-icon-location-outline"></i> {{ item.offlineLocation }}</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"><i class="el-icon-position"></i> {{ item.onlineLocation }}</div> <div v-if="item.onlineLocation" class="meta"><img class="icon" src="@/assets/images/online.png" alt=""> {{ item.onlineLocation }}</div>
</template> </template>
</div> </div>
<img class="pic" :src="item.titleImg" alt=""> <img class="pic" :src="item.titleImg" alt="">
@ -88,7 +92,7 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<el-tree class="column" ref="column" :data="infoColumns" highlight-current :expand-on-click-node="false" :props="defaultProps" node-key="id" @node-click="columnClick"></el-tree> <el-tree class="column" ref="column" :data="infoColumns" highlight-current :expand-on-click-node="false" :props="defaultProps" node-key="id" @node-click="item => columnClick(item, 0)"></el-tree>
<p class="l-title">热点内容</p> <p class="l-title">热点内容</p>
<ul class="list"> <ul class="list">
@ -114,10 +118,13 @@
<script> <script>
import Setting from '@/setting' import Setting from '@/setting'
import Util from '@/libs/util' import Util from '@/libs/util'
import Breadcrumb from '@/components/breadcrumb'
export default { export default {
data() { data() {
return { return {
loaded: false,
id: +this.$route.query.id, id: +this.$route.query.id,
fromColumn: this.$route.query.column,
site: this.$store.state.content.site, site: this.$store.state.content.site,
columnId: '', columnId: '',
info: {}, info: {},
@ -147,7 +154,8 @@ export default {
columns: [], columns: [],
all: null, all: null,
infoColumns: [], infoColumns: [],
curColumn: 0, sameStyle: 1,
allColumnId: [],
showNav: false, showNav: false,
showNavIds: [10, 11, 12, 16], // id showNavIds: [10, 11, 12, 16], // id
isFilter: false, isFilter: false,
@ -163,6 +171,9 @@ export default {
hots: [] hots: []
} }
}, },
components: {
Breadcrumb
},
watch: { watch: {
'$route'() { '$route'() {
this.id = this.$route.query.id this.id = this.$route.query.id
@ -189,7 +200,11 @@ export default {
// //
getInfo() { getInfo() {
this.$post(`${this.api.findColumn}?id=${this.id}`).then(({ data }) => { this.$post(`${this.api.findColumn}?id=${this.id}`).then(({ data }) => {
if (!data.columnBanner) data.columnBanner = require('@/assets/images/column-banner.png')
this.info = data this.info = data
this.loaded = true
this.showNav = this.showNavIds.includes(data.listStyleId) this.showNav = this.showNavIds.includes(data.listStyleId)
this.getClassification() this.getClassification()
}).catch(res => {}) }).catch(res => {})
@ -205,7 +220,6 @@ export default {
this.classifications = data this.classifications = data
}).catch(err => {}) }).catch(err => {})
} }
}, },
// //
getLabel() { getLabel() {
@ -213,15 +227,29 @@ export default {
this.labels = data this.labels = data
}).catch(err => {}) }).catch(err => {})
}, },
//
handleColumn(data, id) {
for (const e of data) {
this.allColumnId.push(e.id)
if (e.listStyleId !== id) {
this.sameStyle = 0
break
}
this.handleColumn(e.children, id)
}
},
// //
getLeftColumn() { getLeftColumn() {
this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}`).then(({ data }) => { this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}`).then(({ data }) => {
this.getArticle([+this.$route.query.id]) const fromColumn = this.$route.query.column
this.curColumn = 0 this.sameStyle = !fromColumn
this.allColumnId = []
fromColumn || data.length && this.handleColumn(data, data[0].listStyleId)
this.getArticle(this.sameStyle ? this.allColumnId : [+this.$route.query.id])
this.columns = data this.columns = data
this.$nextTick(() => { this.$nextTick(() => {
const el = this.$refs.leftColumn const el = this.$refs.leftColumn
el && el.setCurrentKey(this.id) el && el.setCurrentKey(this.sameStyle ? data[0].id : this.id)
}) })
}).catch(err => {}) }).catch(err => {})
}, },
@ -257,8 +285,10 @@ export default {
this.filter() this.filter()
}, },
// //
columnClick(to) { columnClick(to, left) {
const { typeId } = to const { typeId } = to
// /
if (left && to.level === 1 && (typeId === 2 || typeId === 3)) return false
// //
if (typeId === 2) { if (typeId === 2) {
let href = to.linkAddress let href = to.linkAddress
@ -283,9 +313,12 @@ export default {
} else { } else {
location.href = href location.href = href
} }
} else if (typeId !== 4 || (typeId === 4 && !to.children.length)) { } else if (typeId === 3) {
// columnpath // path
this.$router.push(`/${typeId === 3 ? to.path : 'column'}?id=${to.id}`).catch(err => {}) this.$router.push(`/${to.path}?id=${to.id}`).catch(err => {})
} else if (typeId === 1 || (typeId === 4 && !to.children.length)) {
// column
this.$router.push(`/column?id=${to.id}&column=1`).catch(err => {})
} }
}, },
// //
@ -302,11 +335,7 @@ export default {
labelName, labelName,
...this.form ...this.form
}).then(({ data }) => { }).then(({ data }) => {
const list = data.records this.articles = Util.removeTag(data.records)
list.map(e => {
e.mainBody = e.mainBody.replace(/<img.*?>/g , '') //
})
this.articles = list
this.total = +data.total this.total = +data.total
}).catch(res => {}) }).catch(res => {})
}, },
@ -327,7 +356,6 @@ export default {
} else if (this.columns.length) { } else if (this.columns.length) {
id = [this.columns[0].id] id = [this.columns[0].id]
} }
this.curColumn = 0
this.getArticle(id) this.getArticle(id)
}, },
currentChange(val) { currentChange(val) {
@ -368,11 +396,14 @@ export default {
} }
.article { .article {
display: flex; display: flex;
justify-content: space-between; justify-content: center;
width: 1666px;
margin: 0 auto; margin: 0 auto;
.left { .left {
width: 1295px; width: 1295px;
margin-right: 28px;
}
.article-wrap {
width: 1113px;
} }
.switch { .switch {
display: inline-flex; display: inline-flex;
@ -381,15 +412,15 @@ export default {
li { li {
padding: 0 15px; padding: 0 15px;
margin-right: 10px; margin-right: 10px;
line-height: 32px; line-height: 36px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
border-radius: 4px; background: #F7F7F7;
cursor: pointer; cursor: pointer;
} }
.active { .active {
color: #fff; color: #fff;
background-color: #1fa7ff; background: linear-gradient(126deg, #1150AC 0%, #17BEFF 100%);
} }
} }
.forms { .forms {
@ -446,7 +477,7 @@ export default {
display: flex; display: flex;
} }
/deep/.columns { /deep/.columns {
width: 174px; width: 210px;
margin-right: 12px; margin-right: 12px;
overflow: auto; overflow: auto;
&:after { &:after {
@ -537,20 +568,26 @@ export default {
@include mul-ellipsis(2); @include mul-ellipsis(2);
} }
.meta { .meta {
font-size: 16px; display: flex;
color: #666; align-items: center;
font-size: 14px;
font-family: PingFangSC-Medium;
color: #333;
}
.icon {
margin-right: 10px;
} }
.des { .des {
margin-top: 15px; margin-top: 15px;
@include mul-ellipsis(2); @include mul-ellipsis(2);
} }
img { .pic {
width: 417px; width: 417px;
height: 244px; height: 244px;
} }
} }
.right { .right {
width: 324px; width: 290px;
} }
.column { .column {
width: 100%; width: 100%;
@ -586,4 +623,33 @@ export default {
} }
} }
} }
.activity {
.column-wrap {
padding: 0;
background: none;
}
.article-wrap {
width: 100%;
}
.article {
justify-content: center;
.left {
width: 1136px;
margin-right: 36px;
}
.forms {
padding: 30px 0;
}
.articles li {
flex-direction: row-reverse;
justify-content: flex-end;
padding-bottom: 38px;
margin-bottom: 38px;
border-bottom: 1px solid #ddd;
}
.right {
padding-top: 30px;
}
}
}
</style> </style>

@ -41,7 +41,7 @@
<li v-for="(item, i) in articles" :key="i" @click="toArtice(item)"> <li v-for="(item, i) in articles" :key="i" @click="toArtice(item)">
<img :src="item.titleImg" alt=""> <img :src="item.titleImg" alt="">
<div class="texts"> <div class="texts">
<h6>{{ item.columnName }}</h6> <h6>{{ item.title }}</h6>
<div class="des" v-html="item.mainBody"></div> <div class="des" v-html="item.mainBody"></div>
<span class="meta">{{ item.createTime }}</span> <span class="meta">{{ item.createTime }}</span>
</div> </div>
@ -148,7 +148,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: articleNum || 6 pageSize: articleNum || 6
}).then(({ data }) => { }).then(({ data }) => {
this.articles = data.records this.articles = Util.removeTag(data.records)
}).catch(err => {}) }).catch(err => {})
} }
} }
@ -216,6 +216,7 @@ export default {
color: #0648A8; color: #0648A8;
} }
.des { .des {
width: 360px;
margin: 14px 0; margin: 14px 0;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
@ -274,6 +275,7 @@ export default {
} }
.num { .num {
margin-bottom: 10px; margin-bottom: 10px;
font-family: toppan;
font-size: 60px; font-size: 60px;
font-weight: 800; font-weight: 800;
color: #035CE1; color: #035CE1;

@ -36,7 +36,7 @@
<ul class="card"> <ul class="card">
<template v-for="(item, i) in modules[1].list[this.curColumn].articles"> <template v-for="(item, i) in modules[1].list[this.curColumn].articles">
<li v-if="i > 3" :key="i" @click="toArtice(item)"> <li v-if="i > 2" :key="i" @click="toArtice(item)">
<img class="pic" :src="item.titleImg" alt=""> <img class="pic" :src="item.titleImg" alt="">
<div class="texts"> <div class="texts">
<p class="meta">{{ item.createTime }} {{ item.author && ' | ' + item.author }}</p> <p class="meta">{{ item.createTime }} {{ item.author && ' | ' + item.author }}</p>
@ -114,18 +114,18 @@
<img class="pic" :src="item.titleImg" alt=""> <img class="pic" :src="item.titleImg" alt="">
<div class="texts"> <div class="texts">
<h6>{{ item.title }}</h6> <h6>{{ item.title }}</h6>
<p v-if="item.author" class="text"> <p v-if="item.keynoteSpeaker" class="text">
<i class="el-icon-user icon"></i> <i class="el-icon-user icon"></i>
{{ item.author }} {{ item.keynoteSpeaker }}
</p> </p>
<p class="text"> <p v-if="item.activityStartTime" class="text">
<i class="el-icon-alarm-clock icon"></i> <i class="el-icon-alarm-clock icon"></i>
Time: {{ item.createTime }} Time: {{ item.activityStartTime + ' ~ ' + item.activityEndTime }}
</p>
<p v-if="item.onlineLocation" class="text">
<i class="el-icon-position icon"></i>
Address: {{ item.onlineLocation }}
</p> </p>
<!-- <p class="text">
<i class="el-icon-user icon"></i>
Address: Big conference room on the fourth floor of headquarters
</p> -->
</div> </div>
</li> </li>
</template> </template>
@ -178,7 +178,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: e.articleNum || 6 pageSize: e.articleNum || 6
}).then(({ data }) => { }).then(({ data }) => {
this.$set(e, 'articles', data.records) this.$set(e, 'articles', Util.removeTag(data.records))
}).catch(err => {}) }).catch(err => {})
} else { } else {
this.$set(e, 'articles', []) this.$set(e, 'articles', [])
@ -194,7 +194,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: articleNum || 6 pageSize: articleNum || 6
}).then(({ data }) => { }).then(({ data }) => {
this.articles = data.records this.articles = Util.removeTag(data.records)
}).catch(err => {}) }).catch(err => {})
} }
if (json[5].form.column.length) { if (json[5].form.column.length) {
@ -205,7 +205,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: articleNum || 5 pageSize: articleNum || 5
}).then(({ data }) => { }).then(({ data }) => {
this.articles1 = data.records this.articles1 = Util.removeTag(data.records)
}).catch(err => {}) }).catch(err => {})
} }

@ -3,10 +3,11 @@
* */ * */
const url = location.host; const url = location.host;
const isDev = process.env.NODE_ENV === 'development' // 开发环境 const isDev = process.env.NODE_ENV === 'development' // 开发环境
let host = `${location.origin}:10000/` let host = `${location.origin}/`
if (isDev) { if (isDev) {
host = 'http://192.168.31.136:10000/' // 测试服 host = 'http://192.168.31.136:10000/' // 测试服
host = 'http://192.168.31.51:10000/' // 榕 // host = 'https://31k70639y6.zicp.fun/' // 测试服
// host = 'http://192.168.31.51:10000/' // 榕
// host = 'http://192.168.31.137:10000/' // 赓 // host = 'http://192.168.31.137:10000/' // 赓
} }

@ -5,6 +5,10 @@
font-family: PingFang; font-family: PingFang;
src: url('font/PingFang-Regular.otf'); src: url('font/PingFang-Regular.otf');
} }
@font-face {
font-family: PingFangSC-Medium;
src: url('font/PingFangSC-Medium.otf');
}
@font-face { @font-face {
font-family: SFProDisplay-Bold; font-family: SFProDisplay-Bold;
src: url('font/SF-Pro-Display-Bold.otf'); src: url('font/SF-Pro-Display-Bold.otf');
@ -47,7 +51,8 @@
.l-title { .l-title {
position: relative; position: relative;
padding-bottom: 20px; padding-bottom: 20px;
font-size: 14px; font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
color: #000; color: #000;
line-height: 25px; line-height: 25px;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
@ -86,7 +91,7 @@
margin-top: 0; margin-top: 0;
text-align: center; text-align: center;
.el-submenu__title, .el-menu-item, .menu-child { .el-submenu__title, .el-menu-item, .menu-child {
width: 128px !important; width: 220px !important;
min-width: 0; min-width: 0;
} }
span { span {

@ -51,12 +51,15 @@
bottom: 87px; bottom: 87px;
left: 213px; left: 213px;
font-size: 48px; font-size: 48px;
font-family: SFProDisplay-Bold;
font-weight: bold;
line-height: 58px;
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
} }
} }
.des { .des {
@include mul-ellipsis(2); @include mul-ellipsis(3);
} }
.gray { .gray {
background-color: #F2F6F8; background-color: #F2F6F8;

Loading…
Cancel
Save