yujialong 1 year ago
parent a87eb4c3b6
commit d1c6ee4e4e
  1. 1
      src/libs/util.js
  2. 21
      src/pages/article/index.vue
  3. 142
      src/pages/iasf/index.vue
  4. 70
      src/pages/lightSources/index.vue

@ -150,7 +150,6 @@ const util = {
// 传入站点id,判断是否英文
getLang(id) {
let siteId = util.getQuery('siteId')
console.log("🚀 ~ file: main.js:42 ~ siteId:", siteId)
return Setting.enIds.includes(siteId ? +siteId : store.state.content.site) ? 'en' : 'zh'
},
};

@ -79,12 +79,24 @@ export default {
//
getInfo () {
//
if (this.preview) {
const data = localStorage.getItem('article')
this.form = data
let cache = localStorage.getItem('article')
if (this.preview && cache) {
cache = JSON.parse(cache)
const temId = cache.articleTemplate
this.form = cache
this.routes = [
{
name: cache.columnName,
},
{
name: cache.title
}
]
if (temId == 69) this.isParty = 1 // articleTemplate=69class
if (temId == 72) this.isPeople = 1 // articleTemplate=72
data.releaseTime = data.releaseTime.split(' ')[0]
if (cache.releaseTime) cache.releaseTime = cache.releaseTime.split(' ')[0]
this.loaded = true
console.log("🚀 ~ file: index.vue:90 ~ getInfo ~ cache:", this.form, cache)
} else {
this.$post(`${this.api.findArticle}?id=${this.id}`).then(async ({ data }) => {
//
@ -138,7 +150,6 @@ export default {
},
//
getColumnInfo () {
console.log("🚀 ~ file: index.vue:125 ~ getColumnInfo ~ this.columnId:", this.columnId)
this.columnId && this.$post(`${this.api.findColumn}?id=${this.columnId}`)
.then(({ data }) => {
if (data.detailStyleId == 69) this.isParty = 1

@ -116,73 +116,88 @@
</template>
<ul class="news-carousel">
<li v-if="articles1.length">
<el-carousel :interval="5000"
height="284px"
arrow="always">
<el-carousel-item v-for="item in articles1"
:key="item">
<img class="pic"
src="http://10.10.11.7/images/iasf/8.png"
alt="">
<div class="texts">
<h6 @click="toAll(modules[6].form)">{{ getColumnTitle(modules[6].form) }} <i class="el-icon-arrow-right"></i></h6>
<div class="des-wrap">
<p class="meta">{{ item.source }}</p>
<div class="des"
@click="toArtice(item, modules[6].form)">{{ item.title }}</div>
</div>
<p class="date">{{ item.releaseTime }}</p>
</div>
</el-carousel-item>
</el-carousel>
<img class="pic"
src="http://10.10.11.7/images/iasf/8.png"
alt="">
<div class="texts">
<h6 @click="toAll(modules[6].form)">{{ getColumnTitle(modules[6].form) }} <i class="el-icon-arrow-right"></i></h6>
<div class="des-wrap">
<p class="meta">{{ curArticle1.source }}</p>
<div class="des"
@click="toArtice(curArticle1, modules[6].form)">{{ curArticle1.title }}</div>
</div>
<p class="date">{{ curArticle1.releaseTime }}</p>
</div>
<div class="action">
<i class="el-icon-arrow-left dir"
@click.stop="prevCarousel(1)"></i>
<ul class="inds">
<li v-for="i in articles1.length > 3 ? 4 : articles1.length"
:key="i"
:class="{active: curInd1 == i - 1}"
@click.stop="switchCarousel(1, i - 1)"></li>
</ul>
<i class="el-icon-arrow-right dir"
@click.stop="nextCarousel(1)"></i>
</div>
</li>
<li v-if="articles2.length">
<el-carousel :interval="5000"
height="284px"
arrow="always">
<el-carousel-item v-for="item in articles2"
:key="item">
<img class="pic"
src="http://10.10.11.7/images/iasf/9.png"
alt="">
<div class="texts">
<h6 @click="toAll(modules[7].form)">{{ getColumnTitle(modules[7].form) }} <i class="el-icon-arrow-right"></i></h6>
<div class="des-wrap">
<p class="meta">{{ item.classificationName }}</p>
<div class="des"
@click="toArtice(item, modules[7].form)">{{ item.title }}</div>
</div>
<p class="date">{{ item.releaseTime }}</p>
</div>
</el-carousel-item>
</el-carousel>
<img class="pic"
src="http://10.10.11.7/images/iasf/9.png"
alt="">
<div class="texts">
<h6 @click="toAll(modules[7].form)">{{ getColumnTitle(modules[7].form) }} <i class="el-icon-arrow-right"></i></h6>
<div class="des-wrap">
<p class="meta">{{ curArticle2.classificationName }}</p>
<div class="des"
@click="toArtice(curArticle2, modules[7].form)">{{ curArticle2.title }}</div>
</div>
<p class="date">{{ curArticle2.releaseTime }}</p>
</div>
<div class="action">
<i class="el-icon-arrow-left dir"
@click.stop="prevCarousel(2)"></i>
<ul class="inds">
<li v-for="i in articles2.length > 3 ? 4 : articles2.length"
:key="i"
:class="{active: curInd2 == i - 1}"
@click.stop="switchCarousel(2, i - 1)"></li>
</ul>
<i class="el-icon-arrow-right dir"
@click.stop="nextCarousel(2)"></i>
</div>
</li>
<li v-if="articles3.length">
<el-carousel :interval="5000"
height="284px"
arrow="always">
<el-carousel-item v-for="item in articles3"
:key="item">
<img class="pic"
src="http://10.10.11.7/images/iasf/10.png"
alt="">
<div class="texts">
<h6 @click="toAll(modules[8].form)">{{ getColumnTitle(modules[8].form) }} <i class="el-icon-arrow-right"></i></h6>
<div class="activity">
<div v-if="item.activityStartTime"
class="date-y">
<p class="d">{{ item.activityStartTime.split(' ')[0].split('-')[2] }}</p>
<p class="y">{{ item.activityStartTime.split(' ')[0].split('-')[0] + '-' + item.activityStartTime.split(' ')[0].split('-')[1] }}</p>
</div>
<div class="des-wrap">
<p class="meta">{{ item.classificationName }}</p>
<div class="des"
@click="toArtice(item, modules[8].form)">{{ item.title }}</div>
</div>
</div>
<img class="pic"
src="http://10.10.11.7/images/iasf/10.png"
alt="">
<div class="texts">
<h6 @click="toAll(modules[8].form)">{{ getColumnTitle(modules[8].form) }} <i class="el-icon-arrow-right"></i></h6>
<div class="activity">
<div v-if="curArticle3.activityStartTime"
class="date-y">
<p class="d">{{ curArticle3.activityStartTime.split(' ')[0].split('-')[2] }}</p>
<p class="y">{{ curArticle3.activityStartTime.split(' ')[0].split('-')[0] + '-' + curArticle3.activityStartTime.split(' ')[0].split('-')[1] }}</p>
</div>
<div class="des-wrap">
<p class="meta">{{ curArticle3.classificationName }}</p>
<div class="des"
@click="toArtice(curArticle3, modules[8].form)">{{ curArticle3.title }}</div>
</div>
</el-carousel-item>
</el-carousel>
</div>
</div>
<div class="action">
<i class="el-icon-arrow-left dir"
@click.stop="prevCarousel(3)"></i>
<ul class="inds">
<li v-for="i in articles3.length > 3 ? 4 : articles3.length"
:key="i"
:class="{active: curInd3 == i - 1}"
@click.stop="switchCarousel(3, i - 1)"></li>
</ul>
<i class="el-icon-arrow-right dir"
@click.stop="nextCarousel(3)"></i>
</div>
</li>
</ul>
</div>
@ -674,7 +689,7 @@ export default {
left: 0;
width: 100%;
height: 100%;
padding: 50px;
padding: 50px 30px;
color: #fff;
background-color: rgba(0, 0, 0, 0.3);
}
@ -710,6 +725,7 @@ export default {
margin-bottom: 5px;
}
.des-wrap {
max-width: calc(100% - 100px);
height: auto;
margin: 0;
}

@ -50,21 +50,27 @@
</tr>
</thead>
<template v-if="modules[2].list.length">
<tr v-for="(item, i) in modules[2].list"
:key="i">
<td :class="{link: isLink(item.link.linkName)}"
@click="openLink(item)">{{ item.name }}</td>
<td>{{ item.country }}</td>
<td>{{ item.address }}</td>
<td>{{ item.gev }}</td>
<td>{{ item.storage }}</td>
<td>{{ item.stations }}</td>
<td>{{ item.intergenerational }}</td>
<td>{{ item.emittance }}</td>
<td>{{ item.status }}</td>
<td>{{ item.time }}</td>
</tr>
<template v-for="(item, i) in modules[2].list">
<tr v-if="item.isEnable"
:key="i">
<td :class="{link: isLink(item.link.linkName)}"
@click="openLink(item)">{{ item.name }}</td>
<td>{{ item.country }}</td>
<td>{{ item.address }}</td>
<td>{{ item.gev }}</td>
<td>{{ item.storage }}</td>
<td>{{ item.stations }}</td>
<td>{{ item.intergenerational }}</td>
<td>{{ item.emittance }}</td>
<td>{{ item.status }}</td>
<td>{{ item.time }}</td>
</tr>
</template>
</template>
<tr v-else>
<td class="none"
colspan="20">暂无数据</td>
</tr>
</table>
<table v-else
class="table">
@ -84,25 +90,27 @@
</tr>
</thead>
<template v-if="modules[3].list.length">
<tr v-for="(item, i) in modules[3].list"
:key="i">
<td :class="{link: isLink(item.link.linkName)}"
@click="openLink(item)">{{ item.name }}</td>
<td>{{ item.country }}</td>
<td>{{ item.address }}</td>
<td>{{ item.accelerator }}</td>
<td>{{ item.gev }}</td>
<td>{{ item.wavelength }}</td>
<td>{{ item.repetitive }}</td>
<td>{{ item.facility }}</td>
<td>{{ item.stations }}</td>
<td>{{ item.status }}</td>
<td>{{ item.time }}</td>
</tr>
<template v-for="(item, i) in modules[3].list">
<tr v-if="item.isEnable"
:key="i">
<td :class="{link: isLink(item.link.linkName)}"
@click="openLink(item)">{{ item.name }}</td>
<td>{{ item.country }}</td>
<td>{{ item.address }}</td>
<td>{{ item.accelerator }}</td>
<td>{{ item.gev }}</td>
<td>{{ item.wavelength }}</td>
<td>{{ item.repetitive }}</td>
<td>{{ item.facility }}</td>
<td>{{ item.stations }}</td>
<td>{{ item.status }}</td>
<td>{{ item.time }}</td>
</tr>
</template>
</template>
<tr v-else>
<td class="none"
colspan="11">暂无数据</td>
colspan="20">暂无数据</td>
</tr>
</table>
<div class="copyright">全球先进光源页面所刊载内容包括图片文字数据源自相关设施官方网站宣传手册以及国际原子能机构IAEA网站公开数据由深圳综合粒子设施研究院及中国科学学与科技政策研究会科技基础设施专业委员会共同汇总整理而来相关内容供访问者学习研究如需转载或引用须声明内容来源</div>
@ -208,7 +216,7 @@ export default {
}
}
.copyright {
margin-top: 10px;
margin-top: 25px;
font-size: 0.7rem;
line-height: 1.6;
color: #8d8d8d;

Loading…
Cancel
Save