mobile
yujialong 2 years ago
parent f4fbb304d3
commit b2aaaebce7
  1. BIN
      src/assets/images/column-bg.png
  2. 4
      src/components/menuTree/index.vue
  3. 6
      src/layouts/navbar/index.vue
  4. 4
      src/pages/about/index.vue
  5. 17
      src/pages/careers/index.vue
  6. 371
      src/pages/column/index.vue
  7. 4
      src/pages/edu/index.vue
  8. 4
      src/pages/home/index.vue
  9. 4
      src/pages/newsPress/index.vue
  10. 110
      src/pages/newsProcurement/index.vue
  11. 14
      src/router/modules/column.js
  12. 14
      src/router/modules/newsProcurement.js
  13. 20
      src/styles/common.scss

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -1,13 +1,13 @@
<template>
<div class="menu-child">
<template v-for="item in this.menuList">
<el-submenu :key="item.id" :index="item.id" v-if="item.children && item.children.length">
<el-submenu :key="item.id" :index="String(item.id)" v-if="item.children && item.children.length">
<template slot="title">
<span slot="title">{{item.columnName}}</span>
</template>
<menuTree :menuList="item.children"></menuTree>
</el-submenu>
<el-menu-item :key="item.id" :index="item.id" v-else>
<el-menu-item :key="item.id" :index="String(item.id)" v-else>
<span slot="title">{{item.columnName}}</span>
</el-menu-item>
</template>

@ -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" @select="jump" :default-active="active">
<el-menu class="nav" ref="type" :key="menuRefresh" mode="horizontal" :background-color="bgColor" :text-color="textColor" :active-text-color="activeTextColor" @select="jump" :default-active="String(active)">
<menuTree :menuList="menus"/>
</el-menu>
</div>
@ -57,7 +57,9 @@ export default {
}
},
//
jump(item) {
jump(item, indexPath) {
console.log("🚀 ~ file: index.vue ~ line 61 ~ jump ~ item", item)
// return
const { id } = item
this.active = id
this.$router.push('channel?id=' + id).catch(err => {})

@ -99,7 +99,8 @@
<h2 class="b-title">{{ modules[15].form.title }}</h2>
<p class="intro">{{ modules[15].form.des }}</p>
<ul class="people">
<li v-for="(item, i) in modules[16].list" :key="i">
<template v-for="(item, i) in modules[16].list">
<li v-if="item.isEnable" :key="i">
<img class="pic" :src="item.pic" alt="">
<div class="texts">
<p class="sub">{{ item.title }}</p>
@ -108,6 +109,7 @@
<img class="arrow" src="@/assets/images/arrow.png" alt="" @click="openLink(item)">
</div>
</li>
</template>
</ul>
</div>
</div>

@ -63,7 +63,8 @@
<h2 class="b-title">{{ modules[5].form.title }}</h2>
<p class="intro">{{ modules[5].form.des }}</p>
<ul class="people">
<li v-for="(item, i) in modules[6].list" :key="i">
<template v-for="(item, i) in modules[6].list">
<li v-if="item.isEnable" :key="i">
<img class="comma" src="@/assets/images/comma.png" alt="">
<div class="left">
<h6>{{ item.title }}</h6>
@ -71,20 +72,23 @@
</div>
<img class="pic" :src="item.pic" alt="">
</li>
</template>
</ul>
</div>
</div>
<ul class="shows">
<li v-for="(item, i) in modules[7].list" :key="i">
<img class="pic" :src="item.pic" alt="">
<template v-for="(item, i) in modules[7].list">
<li v-if="item.isEnable" :key="i">
<div class="left">
<h6>{{ item.title }}</h6>
<div class="sub">{{ item.subTitle }}</div>
<div class="des">{{ item.des }}</div>
<img class="arrow" src="@/assets/images/arrow-white.png" alt="" @click="openLink(item)">
</div>
<img class="pic" :src="item.pic" alt="">
</li>
</template>
</ul>
</div>
</template>
@ -244,13 +248,18 @@ export default {
}
}
.left {
position: relative;
z-index: 1;
width: 43.3%;
height: 100%;
padding: 138px 30px 30px 103px;
background-color: rgba(54, 54, 54, .65);
}
.pic {
width: 56.9%;
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
}
h6 {

@ -0,0 +1,371 @@
<template>
<div class="wrap">
<div class="banner">
IASF的最新新闻公告活动
</div>
<div class="column-wrap">
<div class="article">
<div class="left">
<div class="forms">
<div class="item">
<span class="label">文章类型</span>
<el-select v-model="form.typeId">
<el-option
v-for="item in labels"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="item">
<span class="label">主题</span>
<el-select v-model="form.labelId">
<el-option
v-for="item in labels"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="search">
<input type="text" placeholder="请输入搜索内容" v-model="form.title">
<i class="icon">
<img src="@/assets/images/search-white.png" alt="">
</i>
</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>
<div style="width: 1113px">
<ul class="articles">
<li v-for="(item, i) in articles" :key="i">
<div class="texts">
<p class="type">新闻类型</p>
<h6>{{ item.title }}</h6>
<span class="meta">{{ item.releaseTime }} | 建设进展</span>
</div>
<img class="pic" :src="item.titleImg" alt="">
</li>
</ul>
<div v-if="articles.length" class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div>
</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'
export default {
data() {
return {
id: this.$route.query.id,
columnId: '',
searchTimer: null,
form: {
title: ''
},
labels: {},
columns: [],
curColumn: 0,
page: 1,
pageSize: 10,
total: 0,
articles: [],
defaultProps: {
value: 'id',
label: 'columnName'
},
news: []
}
},
watch: {
'$route'() {
this.id = this.$route.query.id
this.getInfo()
},
'form.title': function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted() {
this.getColumn()
this.getNews()
},
methods: {
// 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)
}
}
},
//
getColumn() {
this.$post(this.api.listWithTree, {
siteId: 1,
columnName: '',
templateId: '',
typeId : '',
isSort: 0
}).then(({ data }) => {
this.columns = data
this.initData()
}).catch(err => {})
},
//
getNews() {
this.$post(this.api.newlyPublishedArticles, {
pageNum: 1,
pageSize: 5,
siteId: 1
}).then(({ data }) => {
this.news = data.records
}).catch(res => {})
},
//
toArticle(i) {
this.curColumn = i
this.initData()
},
//
getArticle() {
this.$post(this.api.queryArticle, {
siteId: 1,
columnIds: [this.columns[this.curColumn].id],
pageNum: this.page,
pageSize: this.pageSize,
...this.form
}).then(({ data }) => {
this.articles = data.records
this.total = +data.total
}).catch(res => {})
},
initData() {
this.page = 1
this.getArticle()
},
currentChange(val) {
this.page = val
this.getData()
},
}
};
</script>
<style lang="scss" scoped>
.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;
}
.column-wrap {
padding: 40px 0;
background: #F9FAFA url(../../assets/images/column-bg.png) no-repeat;
}
.article {
display: flex;
justify-content: space-between;
width: 1666px;
margin: 0 auto;
.left {
width: 1295px;
}
.forms {
display: flex;
align-items: center;
padding: 30px;
background-color: #fff;
.item {
display: inline-flex;
align-items: center;
margin-right: 30px;
}
.label {
font-size: 16px;
color: #333;
}
/deep/.el-input__inner {
width: 238px;
height: 48px;
line-height: 48px;
border: 0;
background: #F7F7F7;
}
.search {
display: inline-flex;
input {
width: 443px;
height: 48px;
padding: 0 10px;
font-size: 14px;
color: #333;
background: #F7F7F7;
border: 0;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
&:focus {
outline: none;
}
}
}
.icon {
display: inline-flex;
justify-content: center;
align-items: center;
width: 62px;
height: 48px;
background: #1583FF;
border-radius: 0px 6px 6px 0px;
cursor: pointer;
}
}
.contents {
display: flex;
margin-top: 20px;
}
.columns {
width: 174px;
margin-right: 12px;
li {
display: flex;
align-items: center;
height: 48px;
padding-left: 24px;
margin-bottom: 1px;
font-size: 16px;
color: #666;
background-color: #fff;
border-right: 2px solid transparent;
cursor: pointer;
&:before {
content: '';
width: 2px;
height: 2px;
margin-right: 5px;
background-color: #666;
border-radius: 50%;
}
&:hover {
color: #0c84eb;
}
&.active {
border-right-color: #083A93;
}
}
}
.articles {
li {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
background-color: #fff;
}
.texts {
max-width: 620px;
padding-left: 30px;
}
.type {
font-size: 18px;
color: #333;
}
h6 {
margin: 15px 0;
font-size: 24px;
color: #000;
line-height: 38px;
@include mul-ellipsis(2);
}
.meta {
font-size: 16px;
color: #666;
}
img {
width: 417px;
height: 244px;
}
}
.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>

@ -32,7 +32,8 @@
<h2 class="b-title">{{ modules[3].form.title }}</h2>
<p class="intro">{{ modules[3].form.des }}</p>
<ul class="list">
<li v-for="(item, i) in modules[4].list" :key="i">
<template v-for="(item, i) in modules[4].list">
<li v-if="item.isEnable" :key="i">
<img class="pic" :src="item.pic" alt="" @click="openLink(item)">
<div class="texts">
<h6>{{ item.title }}</h6>
@ -40,6 +41,7 @@
<div class="des">{{ item.des }}</div>
</div>
</li>
</template>
</ul>
</div>
</div>

@ -55,7 +55,8 @@
<h2 class="b-title">{{ modules[6].form.title }}</h2>
<p class="intro">{{ modules[6].form.des }}</p>
<ul class="people">
<li v-for="(item, i) in modules[7].list" :key="i">
<template v-for="(item, i) in modules[7].list">
<li v-if="item.isEnable" :key="i">
<img class="pic" :src="item.pic" alt="">
<div class="texts">
<h6>{{ item.title }}</h6>
@ -63,6 +64,7 @@
<img class="arrow" src="@/assets/images/arrow.png" alt="" @click="openLink(item)">
</div>
</li>
</template>
</ul>
</div>
</div>

@ -14,7 +14,8 @@
<div class="block">
<div class="inner">
<ul class="list">
<li v-for="(item, i) in modules[1].list" :key="i">
<template v-for="(item, i) in modules[1].list">
<li v-if="item.isEnable" :key="i">
<img class="pic" :src="item.pic" alt="">
<div class="texts">
<h6>{{ item.title }}</h6>
@ -23,6 +24,7 @@
<img class="arrow" src="@/assets/images/arrow.png" alt="" @click="openLink(item)">
</div>
</li>
</template>
</ul>
</div>
</div>

@ -0,0 +1,110 @@
<template>
<div class="wrap">
<el-carousel height="480px" :interval="6000" :arrow="(modules[0] && modules[0].list.length > 1) ? 'hover' : 'never'">
<template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div class="banner-item" @click="openLink(item)">
<img :src="item.pic" alt="">
<p class="banner-name">NEWS & EVENTS</p>
</div>
</el-carousel-item>
</template>
</el-carousel>
<div class="block">
<div class="inner">
<ul class="list">
<template v-for="(item, i) in modules[1].list">
<li v-if="item.isEnable" :key="i">
<img class="pic" :src="item.pic" alt="">
<div class="texts">
<h6>{{ item.title }}</h6>
<p class="sub">{{ item.subTitle }}</p>
<div class="des">{{ item.des }}</div>
<img class="arrow" src="@/assets/images/arrow.png" alt="" @click="openLink(item)">
</div>
</li>
</template>
</ul>
</div>
</div>
</div>
</template>
<script>
import mixins from '@/mixins/page'
import Setting from '@/setting'
import Util from '@/libs/util'
export default {
mixins: [mixins],
data() {
return {
}
},
mounted() {
},
methods: {
//
getInfo() {
// /
this.$post(`${this.api[this.preview ? 'getRedisCache' : 'findPage']}?columnId=${this.id}`).then(({ data }) => {
if (data.length) {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[0][data[0].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json)
}
}).catch(err => {})
},
}
};
</script>
<style lang="scss" scoped>
@import "../../styles/page/page.scss";
.list {
li {
position: relative;
&:nth-child(even) {
text-align: right;
.texts {
left: 0;
text-align: left;
}
}
}
.pic {
width: 650px;
height: 730px;
}
.texts {
position: absolute;
top: 120px;
left: 610px;
width: 850px;
height: 440px;
padding: 60px 30px 30px 100px;
background: rgba(247, 247, 247, .72);
}
h6 {
font-size: 40px;
color: #3C3C3C;
}
.sub {
margin: 20px 0;
font-size: 24px;
color: #1C1C1C;
line-height: 33px;
}
.des {
margin-bottom: 20px;
font-size: 20px;
color: #3C3C3C;
line-height: 32px;
}
}
</style>

@ -0,0 +1,14 @@
import BasicLayout from '@/layouts/home'
const name = 'column'
export default {
path: `/${name}`,
component: BasicLayout,
children: [
{
name,
path: `/${name}`,
component: () => import(`@/pages/${name}`),
meta: { title: '' }
}
]
};

@ -0,0 +1,14 @@
import BasicLayout from '@/layouts/home'
const name = 'newsProcurement'
export default {
path: `/${name}`,
component: BasicLayout,
children: [
{
name,
path: `/${name}`,
component: () => import(`@/pages/${name}`),
meta: { title: '' }
}
]
};

@ -53,3 +53,23 @@
background-color: #156CEB;
}
}
.pagination {
margin: 20px 0;
text-align: center;
button, .number {
color: rgba(0, 0, 0, .65) !important;
background-color: transparent !important;
border: 1px solid #DCDEE0 !important;
border-radius: 4px !important;
}
button i {
color: #333;
}
.active {
color: #fff !important;
background-color: $--color-primary !important;
}
}
Loading…
Cancel
Save