From a87eb4c3b6fe14ae9dedc84de651aa596a42f939 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 17 Aug 2023 10:55:05 +0800 Subject: [PATCH] fix --- src/components/breadcrumb/index.vue | 70 +-- src/pages/article/index.vue | 98 ++-- src/pages/contactUs/index.vue | 4 +- src/pages/governance/index.vue | 10 +- src/pages/iasf/index.vue | 181 +++--- src/pages/lightSources/index.vue | 62 ++- src/pages/overview/index.vue | 39 +- src/pages/talentCenter/index.vue | 824 +++++++++++++++------------- 8 files changed, 661 insertions(+), 627 deletions(-) diff --git a/src/components/breadcrumb/index.vue b/src/components/breadcrumb/index.vue index 95245d5..e7fa089 100644 --- a/src/components/breadcrumb/index.vue +++ b/src/components/breadcrumb/index.vue @@ -1,67 +1,35 @@ \ No newline at end of file diff --git a/src/pages/article/index.vue b/src/pages/article/index.vue index 840e641..d85fa2c 100644 --- a/src/pages/article/index.vue +++ b/src/pages/article/index.vue @@ -52,6 +52,7 @@ export default { return { id: this.$route.query.articleId, columnId: +this.$route.query.id, + preview: this.$route.query.preview, loaded: false, routes: [], form: {}, @@ -77,54 +78,63 @@ export default { methods: { // 获取文章详情 getInfo () { - this.id && this.$post(`${this.api.findArticle}?id=${this.id}`).then(async ({ data }) => { - // 设置面包屑 - const { columnName, path, id } = this.$route.query - this.routes = [ - { - name: columnName || data.columnName, - path: path ? '/' + path : '', - query: { - id: id || data.columnId + // 预览直接取缓存数据,不然就调接口 + if (this.preview) { + const data = localStorage.getItem('article') + this.form = data + if (temId == 69) this.isParty = 1 // 组织架构(articleTemplate=69)是另一套主题,加个class即可 + if (temId == 72) this.isPeople = 1 // 人物详情(articleTemplate=72)要隐藏除了正文和摘要以外的所有字段 + data.releaseTime = data.releaseTime.split(' ')[0] + } else { + this.$post(`${this.api.findArticle}?id=${this.id}`).then(async ({ data }) => { + // 设置面包屑 + const { columnName, path, id } = this.$route.query + this.routes = [ + { + name: columnName || data.columnName, + path: path ? '/' + path : '', + query: { + id: id || data.columnId + } + }, + { + name: data.title } - }, - { - name: data.title - } - ] - // 文章被禁用了就直接返回 - if (data.isDisable) { - this.$router.back() - } else { - const temId = data.articleTemplate - let path = `?articleId=${this.id}&id=${id}&columnName=${columnName || ''}&path=${path || ''}` - if (temId === 25 || temId === 26) { // 会议活动/期刊详情 - this.$router.replace((temId === 25 ? '/article/activity' : '/publish/show') + path) + ] + // 文章被禁用了就直接返回 + if (data.isDisable) { + this.$router.back() } else { - if (temId == 69) this.isParty = 1 // 组织架构(articleTemplate=69)是另一套主题,加个class即可 - if (temId == 72) this.isPeople = 1 // 人物详情(articleTemplate=72)要隐藏除了正文和摘要以外的所有字段 - data.releaseTime = data.releaseTime.split(' ')[0] - this.form = data - this.columnId = data.columnId - // 如果没上传banner - if (!data.bannerImg) { - const columns = await this.$post(this.api.listWithTree, { - siteId: this.site, - columnName: '', - templateId: '', - typeId: '', - isSort: 1 - }) - this.getBanner(columns.data) - this.form.bannerImg = this.gotBanner ? this.columnBanner || require('@/assets/images/article-banner.png') : '' - } + const temId = data.articleTemplate + let path = `?articleId=${this.id}&id=${id}&columnName=${columnName || ''}&path=${path || ''}` + if (temId === 25 || temId === 26) { // 会议活动/期刊详情 + this.$router.replace((temId === 25 ? '/article/activity' : '/publish/show') + path) + } else { + if (temId == 69) this.isParty = 1 // 组织架构(articleTemplate=69)是另一套主题,加个class即可 + if (temId == 72) this.isPeople = 1 // 人物详情(articleTemplate=72)要隐藏除了正文和摘要以外的所有字段 + data.releaseTime = data.releaseTime.split(' ')[0] + this.form = data + this.columnId = data.columnId + // 如果没上传banner + if (!data.bannerImg) { + const columns = await this.$post(this.api.listWithTree, { + siteId: this.site, + columnName: '', + templateId: '', + typeId: '', + isSort: 1 + }) + this.getBanner(columns.data) + this.form.bannerImg = this.gotBanner ? this.columnBanner || require('@/assets/images/article-banner.png') : '' + } - // 浏览量+1 - this.$post(`${this.api.articlePreview}?contentId=${this.id}`).then(({ data }) => { }).catch(err => { }) - this.loaded = true + // 浏览量+1 + this.$post(`${this.api.articlePreview}?contentId=${this.id}`).then(({ data }) => { }).catch(err => { }) + this.loaded = true + } } - } - }).catch(err => { }) + }).catch(err => { }) + } }, // 列表详情 getColumnInfo () { diff --git a/src/pages/contactUs/index.vue b/src/pages/contactUs/index.vue index f0d29d8..121cbf0 100644 --- a/src/pages/contactUs/index.vue +++ b/src/pages/contactUs/index.vue @@ -17,9 +17,7 @@
{{ modules[1].form.title }}
-

{{ modules[1].form.address }}

-

{{ modules[1].form.phone }}

-

{{ modules[1].form.email }}

+
diff --git a/src/pages/iasf/index.vue b/src/pages/iasf/index.vue index 58cca9c..49a8c59 100644 --- a/src/pages/iasf/index.vue +++ b/src/pages/iasf/index.vue @@ -116,83 +116,73 @@ @@ -684,7 +674,7 @@ export default { left: 0; width: 100%; height: 100%; - padding: 50px 30px; + padding: 50px; color: #fff; background-color: rgba(0, 0, 0, 0.3); } @@ -712,6 +702,49 @@ export default { .date { font-size: 16px; } + .activity { + display: flex; + align-items: center; + margin-top: 10px; + .meta { + margin-bottom: 5px; + } + .des-wrap { + height: auto; + margin: 0; + } + } + .date-y { + margin-right: 20px; + text-align: center; + color: #fff; + .d { + font-size: 28px; + } + .y { + padding-top: 5px; + margin-top: 5px; + font-size: 16px; + border-top: 1px solid #686868; + } + } + /deep/.el-carousel__indicators--horizontal { + bottom: 20px; + .el-carousel__indicator--horizontal { + width: 10px; + height: 10px; + padding: 0; + margin-right: 6px; + border-radius: 50%; + background: rgba(255, 255, 255, 0.65); + &.is-active { + background: #1583ff; + } + } + .el-carousel__button { + width: 0; + } + } .action { position: absolute; bottom: 20px; diff --git a/src/pages/lightSources/index.vue b/src/pages/lightSources/index.vue index 7bd700e..8beb301 100644 --- a/src/pages/lightSources/index.vue +++ b/src/pages/lightSources/index.vue @@ -21,14 +21,6 @@ :src="modules[1].form.pic" :preview-src-list="[modules[1].form.pic]"> - @@ -46,50 +38,56 @@ 光源名称 - 国家 - 电子束能量(GeV) + 国家和地区 + 地点 + 能量(GeV) 储存环周长(m) - 实验站数量 + 光束线/条 代际 - 建成/改造时间 发射度(nm.rad) 状态 + 建成时间 - - {{ item.name }} - {{ item.country }} - {{ item.gev }} - {{ item.storage }} - {{ item.stations }} - {{ item.intergenerational }} - {{ item.time }} - {{ item.emittance }} - {{ item.status }} - + - + - - - + + + - +
光源名称国家国家和地区 地点 加速器技术 能量/GeV 波长范围/nm重复频率/Hz Repetition rate设施长度/m Overall length线站数量重复频率/Hz设施长度/m实验站/个 状态出光时间建成时间