parent
8798bb44d9
commit
dc241c2d01
13 changed files with 359 additions and 519 deletions
@ -1,5 +1,5 @@ |
||||
export default { |
||||
getTableByCondition:`data/data/table/getTableByCondition`, |
||||
queryDatabaseInfo:`data/data/dataRecord/queryDatabaseInfo`, |
||||
previewData:`data/data/preview`, |
||||
newlyPublishedArticles: `iasf/sysContent/newlyPublishedArticles`, |
||||
listWithTree: `iasf/sysColumn/listWithTree`, |
||||
findArticle: `iasf/sysContent/findById`, |
||||
} |
@ -0,0 +1,229 @@ |
||||
<template> |
||||
<div class="wrap"> |
||||
<div class="banner" :style="{backgroundImage: form.bannerImg ? ('url(' + form.bannerImg + ')') : ''}"> |
||||
S³FEL概况 |
||||
</div> |
||||
<div class="content"> |
||||
<Breadcrumb ref="breadcrumb" :data="'装置概况/' + form.title"/> |
||||
<div class="article"> |
||||
<div class="left"> |
||||
<h2>{{ form.title }}</h2> |
||||
<div class="meta">{{ form.createTime }} | {{ form.source }} | {{ form.author && form.author + ' | ' }} {{ form.totalBrowsing }} 浏览</div> |
||||
<p class="brief">{{ form.summary }}</p> |
||||
<div v-html="form.mainBody"></div> |
||||
<div class="annex"> |
||||
<h6>附件下载</h6> |
||||
<div class="file"> |
||||
<span class="name">{{ form.file }}</span> |
||||
<span class="download" @click="download">下载</span> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="right"> |
||||
<el-tree class="column" ref="column" :data="columns" highlight-current :expand-on-click-node="false" default-expand-all :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' |
||||
import Breadcrumb from '@/components/breadcrumb' |
||||
export default { |
||||
data() { |
||||
return { |
||||
id: this.$route.query.id, |
||||
columnId: '', |
||||
form: {}, |
||||
columns: [], |
||||
defaultProps: { |
||||
value: 'id', |
||||
label: 'columnName' |
||||
}, |
||||
news: [] |
||||
} |
||||
}, |
||||
components: { |
||||
Breadcrumb |
||||
}, |
||||
watch: { |
||||
'$route'() { |
||||
this.id = this.$route.query.id |
||||
this.getInfo() |
||||
} |
||||
}, |
||||
mounted() { |
||||
this.getColumn() |
||||
this.getArticle() |
||||
}, |
||||
methods: { |
||||
// 获取文章详情 |
||||
getInfo() { |
||||
this.$post(`${this.api.findArticle}?id=${this.id}`).then(({ data }) => { |
||||
this.form = data |
||||
this.columnId = data.columnId |
||||
this.$refs.breadcrumb.update('装置概况/' + data.title) |
||||
data.bannerImg || this.getBanner(this.columns) |
||||
if (this.columnBanner) this.form.bannerImg = this.columnBanner |
||||
}).catch(err => {}) |
||||
}, |
||||
// 获取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.getInfo() |
||||
}).catch(err => {}) |
||||
}, |
||||
// 最新资讯 |
||||
getArticle() { |
||||
this.$post(this.api.newlyPublishedArticles, { |
||||
pageNum: 1, |
||||
pageSize: 5, |
||||
siteId: 1 |
||||
}).then(({ data }) => { |
||||
this.news = data.records |
||||
}).catch(res => {}) |
||||
}, |
||||
// 下载附件 |
||||
download() { |
||||
Util.downloadFile('附件', this.form.file) |
||||
} |
||||
} |
||||
}; |
||||
</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; |
||||
} |
||||
.article { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
.left { |
||||
width: 1090px; |
||||
} |
||||
h2 { |
||||
font-size: 36px; |
||||
color: #1C1C1C; |
||||
} |
||||
.meta { |
||||
margin: 20px 0; |
||||
font-size: 14px; |
||||
color: #9B9B9B; |
||||
} |
||||
.brief { |
||||
padding-bottom: 30px; |
||||
margin-bottom: 30px; |
||||
font-size: 14px; |
||||
line-height: 20px; |
||||
color: #606060; |
||||
border-bottom: 1px solid #D8D8D8; |
||||
} |
||||
.annex { |
||||
margin-top: 30px; |
||||
h6 { |
||||
padding-left: 8px; |
||||
margin-bottom: 20px; |
||||
font-size: 16px; |
||||
line-height: 1; |
||||
color: #333; |
||||
border-left: 2px solid #1583FF; |
||||
} |
||||
.file { |
||||
display: flex; |
||||
align-items: center; |
||||
} |
||||
.name { |
||||
margin-right: 8px; |
||||
font-size: 14px; |
||||
} |
||||
.download { |
||||
color: #1583FF; |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
.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> |
@ -1,23 +0,0 @@ |
||||
<template> |
||||
<div class="wrap"> |
||||
|
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import Setting from '@/setting' |
||||
import util from '@/libs/util' |
||||
export default { |
||||
data() { |
||||
return { |
||||
|
||||
} |
||||
}, |
||||
mounted() {}, |
||||
methods: {} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
|
||||
</style> |
@ -1,82 +1,66 @@ |
||||
/** |
||||
* 业务配置 |
||||
* */ |
||||
const url = location.host; |
||||
const isDev = process.env.NODE_ENV === "development"; // 开发环境
|
||||
const isPro = url.includes("occupationlab.com"); //是否职站生产
|
||||
const isTest = url.includes('121.37.12.51'); //是否中台测试服
|
||||
|
||||
let systemPath = `${location.origin}/banksystem` |
||||
let host = `${location.origin}/` |
||||
let uploadURL = `http://121.37.12.51/` |
||||
if (isPro) { |
||||
// 职站生产
|
||||
uploadURL = `https://www.huorantech.cn/` |
||||
systemPath = `https://www.huorantech.cn/banksystem` |
||||
} else if (isDev) { |
||||
// 本地
|
||||
systemPath = `http://${location.hostname}:8093` |
||||
host = "http://121.37.12.51/"; // 中台测试服
|
||||
// host = "http://192.168.31.151:9000/"; // 榕
|
||||
// host = "http://192.168.31.137:9000/"; // 赓
|
||||
} |
||||
|
||||
const Setting = { |
||||
/** |
||||
* 基础配置 |
||||
* */ |
||||
platformId: 1, // 平台标识,1职站,2数据平台,3中台
|
||||
titleSuffix: '粒子研究院', // 网页标题的后缀
|
||||
routerMode: "hash", // 路由模式,可选值为 history 或 hash
|
||||
showProgressBar: true, // 页面切换时,是否显示模拟的进度条
|
||||
apiBaseURL: host, // 接口请求地址
|
||||
uploadURL, // 阿里云oss域名
|
||||
systemPath, // 子系统地址前缀
|
||||
autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间
|
||||
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
|
||||
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
|
||||
cookiesExpires: 1, // Cookies 默认保存时间,单位:天
|
||||
tokenExpires: 1296000000, // token在localStorage的时间(毫秒)
|
||||
tokenKey: "official_token", // localStorage里保存的token的key
|
||||
storeKey: "official_store", // localStorage里保存的vuex的key
|
||||
initialPassword: "111aaa", // 默认密码
|
||||
isDev, |
||||
isTest, |
||||
isPro, |
||||
/** |
||||
* 路由白名单 |
||||
* */ |
||||
whiteList: ['/login', '/index/list', '/cityPartner/list', '/devPlatform/list'], |
||||
/** |
||||
* 平台列表 |
||||
* */ |
||||
platformList: [ |
||||
{ |
||||
id: 1, |
||||
name: '职站' |
||||
}, |
||||
{ |
||||
id: 2, |
||||
name: '数据平台' |
||||
}, |
||||
{ |
||||
id: 3, |
||||
name: '中台' |
||||
} |
||||
], |
||||
/** |
||||
* 多语言配置 |
||||
* */ |
||||
i18n: { |
||||
default: "zh", // 默认语言
|
||||
auto: false // 是否根据用户电脑配置自动设置语言(仅第一次有效)
|
||||
}, |
||||
layout: {}, // 布局配置
|
||||
/** |
||||
* 功能配置 |
||||
* */ |
||||
sameRouteForceUpdate: false, // 相同路由,不同参数间进行切换,是否强力更新
|
||||
dynamicRoute: false // 是否使用动态路由
|
||||
}; |
||||
|
||||
export default Setting; |
||||
const url = location.host; |
||||
const isDev = process.env.NODE_ENV === 'development' // 开发环境
|
||||
let host = `${location.origin}:10000/` |
||||
if (isDev) { |
||||
host = 'http://192.168.31.136:10000/' // 测试服
|
||||
// host = 'http://192.168.31.151:10000/' // 榕
|
||||
// host = 'http://192.168.31.137:10000/' // 赓
|
||||
} |
||||
|
||||
const Setting = { |
||||
/** |
||||
* 基础配置 |
||||
* */ |
||||
titleSuffix: '粒子研究院', // 网页标题的后缀
|
||||
routerMode: "hash", // 路由模式,可选值为 history 或 hash
|
||||
showProgressBar: true, // 页面切换时,是否显示模拟的进度条
|
||||
apiBaseURL: host, // 接口请求地址
|
||||
autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间
|
||||
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
|
||||
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
|
||||
cookiesExpires: 1, // Cookies 默认保存时间,单位:天
|
||||
tokenExpires: 1296000000, // token在localStorage的时间(毫秒)
|
||||
isDev, |
||||
/** |
||||
* 路由白名单 |
||||
* */ |
||||
whiteList: ['/login', '/redirect'], |
||||
/** |
||||
* localStorage里保存的token的key |
||||
*/ |
||||
tokenKey: "IASF_client_token", |
||||
/** |
||||
* localStorage里保存的vuex的key |
||||
*/ |
||||
storeKey: "IASF_client_store", |
||||
/** |
||||
* 默认密码 |
||||
*/ |
||||
initialPassword: "111aaa", |
||||
/** |
||||
* 多语言配置 |
||||
* */ |
||||
i18n: { |
||||
// 默认语言
|
||||
default: "zh", |
||||
// 是否根据用户电脑配置自动设置语言(仅第一次有效)
|
||||
auto: false |
||||
}, |
||||
/** |
||||
* 布局配置 |
||||
* */ |
||||
layout: {}, |
||||
/** |
||||
* 功能配置 |
||||
* */ |
||||
// 相同路由,不同参数间进行切换,是否强力更新
|
||||
sameRouteForceUpdate: false, |
||||
// 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮)
|
||||
dynamicRoute: true |
||||
}; |
||||
|
||||
export default Setting; |
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue