文章详情

mobile
yujialong 2 years ago
parent 8798bb44d9
commit dc241c2d01
  1. 6
      src/api/index.js
  2. 4
      src/layouts/home/index.vue
  3. 54
      src/layouts/navbar/index.vue
  4. 229
      src/pages/channel/index.vue
  5. 23
      src/pages/intro/index.vue
  6. 4
      src/router/modules/channel.js
  7. 2
      src/router/routes.js
  8. 78
      src/setting.js
  9. 370
      src/styles/common.scss
  10. BIN
      src/styles/font/PingFang-Regular.otf
  11. BIN
      src/styles/font/YouSheBiaoTiHei.ttf
  12. BIN
      src/styles/font/din.otf
  13. 2
      src/styles/layout/index.scss

@ -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`,
}

@ -2,15 +2,13 @@
<div class="main">
<v-head></v-head>
<div class="layout">
<div class="content">
<transition name="move" mode="out-in">
<router-view class="view"></router-view>
</transition>
<el-backtop target=".content"></el-backtop>
<el-backtop target=".layout"></el-backtop>
<!-- <v-footer ref="footer"></v-footer> -->
</div>
</div>
</div>
</template>
<script>

@ -1,8 +1,8 @@
<template>
<div>
<ul class="nav">
<li v-for="(item, i) in menus" :key="i" :class="{active: active == item.index}" @click="jump(item)">
{{item.title}}
<li v-for="(item, i) in menus" :key="i" :class="{active: active == item.id}" @click="jump(item)">
{{ item.columnName }}
</li>
</ul>
</div>
@ -13,44 +13,32 @@ import Setting from '@/setting'
export default {
data() {
return {
active: this.$route.path,
menus: [
{
index: "/intro",
title: "S³FEL概况"
},
{
index: "occupationlab",
title: "装置介绍"
},
{
index: 'data',
title: "科学研究"
},
{
index: "/cityPartner",
title: "人才队伍"
},
{
index: "/devPlatform",
title: "用户共享"
},
{
index: "/about",
title: "科普之窗"
}
]
active: this.$route.query.id,
menus: []
};
},
mounted() {
this.getColumn()
},
methods: {
//
getColumn() {
this.$post(this.api.listWithTree, {
siteId: 1,
columnName: '',
templateId: '',
typeId : '',
isSort: 0
}).then(({ data }) => {
this.menus = data
if (!this.active && data.length) this.active = data[0].id
}).catch(err => {})
},
//
jump(item) {
const { index } = item
this.active = index
this.$router.push(index).catch(err => {})
const { id } = item
this.active = id
this.$router.push('channel?id=' + id).catch(err => {})
}
}
};

@ -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,5 +1,5 @@
import BasicLayout from '@/layouts/home'
const name = 'intro'
const name = 'channel'
export default {
path: `/${name}`,
component: BasicLayout,
@ -8,7 +8,7 @@ export default {
name,
path: `/${name}`,
component: () => import(`@/pages/${name}`),
meta: { title: 'S³FEL概况' }
meta: { title: '' }
}
]
};

@ -10,7 +10,7 @@ requireModule.keys().forEach(fileName => {
const frameIn = [
{
path: "/",
redirect: "/index"
redirect: "/channel"
},
...modules
];

@ -2,81 +2,65 @@
* 业务配置
* */
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 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 = {
/**
* 基础配置
* */
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'],
whiteList: ['/login', '/redirect'],
/**
* 平台列表
* */
platformList: [
{
id: 1,
name: '职站'
},
{
id: 2,
name: '数据平台'
},
{
id: 3,
name: '中台'
}
],
* localStorage里保存的token的key
*/
tokenKey: "IASF_client_token",
/**
* localStorage里保存的vuex的key
*/
storeKey: "IASF_client_store",
/**
* 默认密码
*/
initialPassword: "111aaa",
/**
* 多语言配置
* */
i18n: {
default: "zh", // 默认语言
auto: false // 是否根据用户电脑配置自动设置语言(仅第一次有效)
// 默认语言
default: "zh",
// 是否根据用户电脑配置自动设置语言(仅第一次有效)
auto: false
},
layout: {}, // 布局配置
/**
* 布局配置
* */
layout: {},
/**
* 功能配置
* */
sameRouteForceUpdate: false, // 相同路由,不同参数间进行切换,是否强力更新
dynamicRoute: false // 是否使用动态路由
// 相同路由,不同参数间进行切换,是否强力更新
sameRouteForceUpdate: false,
// 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮)
dynamicRoute: true
};
export default Setting;

@ -2,32 +2,22 @@
@import "./var.scss";
@font-face {
font-family: youshe;
src: url('font/YouSheBiaoTiHei.ttf');
}
@font-face {
font-family: din;
src: url('font/din.otf');
font-family: PingFang;
src: url('font/PingFang-Regular.otf');
}
[v-cloak] {
display: none;
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
.l-title {
margin-bottom: 0;
}
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-thumb {
width: 5px;
border-radius: 6px;
@ -37,355 +27,29 @@
.view {
min-width: $min-width;
min-height: calc(100vh - 90px);
padding: 12px 200px 20px;
margin: 0 auto;
background-color: #F3F6FA;
&.no-pd {
padding-top: 0;
}
&.pb {
padding-bottom: 20px;
}
background-color: #fff;
}
.wrap-inner {
min-width: $min-width;
width: 100%;
padding: 0 200px 20px;
.content {
width: 1512px;
padding: 40px 0;
margin: 0 auto;
}
.center-wrap {
width: 1000px;
padding-bottom: 20px;
margin: 40px auto 0;
}
}
.l-title {
display: flex;
align-items: center;
margin-bottom: 12px;
font-size: 14px;
color: #333;
img{
margin-right: 5px;
}
}
.p-title {
padding-left: 5px;
margin-bottom: 24px;
line-height: 1;
font-size: 14px;
color: #585858;
border-left: 3px solid $--color-primary;
}
.el-input {
.el-input__inner {
border-color: rgba(0, 0, 0, 0.15);
}
}
.filter {
width: 100vw;
display: inline-flex;
align-items: center;
flex: 1;
li {
display: inline-flex;
align-items: center;
margin-right: 30px;
label {
margin-right: 6px;
font-size: 14px;
line-height: 14px;
color: rgba(0, 0, 0, .65);
white-space: nowrap;
}
.el-radio {
margin-right: 10px !important;
.el-radio__input {
display: none !important;
}
}
}
}
.page {
position: relative;
padding: 24px 16px;
background-color: #fff;
.tool {
display: flex;
justify-content: space-between;
margin-bottom: 24px;
.single-choice {
dl {
display: flex;
line-height: 30px;
dt {
color: rgba(0, 0, 0, .65);
font-size: 14px;
white-space: nowrap;
}
dd {
display: inline-flex;
align-items: center;
flex-wrap: wrap;
span {
padding: 0 10px;
margin: 0 10px;
color: #333;
font-size: 14px;
line-height: 1.8;
white-space: nowrap;
cursor: pointer;
&:hover {
color: $--color-primary;
}
&.active {
border-radius: 4px;
color: #fff;
background-color: $--color-primary;
}
}
}
}
}
}
}
.pagination {
margin-top: 20px;
text-align: center;
button,.number,.more,.el-input__inner{
min-width: 32px !important;
height: 32px !important;
line-height: 32px;
color: #333 !important;
background-color: transparent !important;
border: 1px solid #ccc !important;
border-radius: 2px !important;
}
button i{
color: #333;
}
.active{
color: #fff !important;
background-color: $--color-primary !important;
}
}
.el-table{
border-radius: 4px;
th{
background: #E8F0FF !important;
.cell{
color: #222326;
font-size: 12px;
font-weight: normal;
.el-checkbox{
&:before{
opacity: 1;
}
}
}
}
th, td{
padding: 10px 0;
border-bottom-color: #E1E6F2;
}
&.el-table--striped .el-table__body tr.el-table__row--striped td{
background-color: #FAFBFF;
}
.el-checkbox__inner{
border-radius: 4px;
transition: none !important;
}
.el-checkbox__input.is-indeterminate .el-checkbox__inner{
background-color: #FFFFFF;
border-color: #DCDFE6;
}
.el-switch__core{
background-color: #bfbfbf;
}
.el-switch__label--right{
z-index: 2;
position: absolute;
right: 8px;
margin-left: 0;
color: #fff !important;
}
.el-switch__label--right.is-active{
left: 8px;
right: auto;
}
.el-switch__label--right span{
font-size: 12px;
}
.el-button--text{
padding: 0;
}
}
.el-message {
padding: 11px 20px;
.el-message__icon {
font-size: 16px;
}
.el-message__content {
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-icon-close {
font-size: 14px;
color: #92998d;
}
.el-message--success {
border: 1px solid #B7EB8F;
background: #F6FFED;
.el-message__icon {
color: #00c700;
}
}
.el-message--warning {
border: 1px solid #FFE58F;
background: #FFFBE6;
.el-message__icon {
color: #ffa900;
}
}
}
.el-message-box {
padding-bottom: 24px;
.el-message-box__header {
padding: 32px 32px 12px 50px;
span {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
}
}
.el-message-box__status {
top: -30px;
}
.el-message-box__status + .el-message-box__message {
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-message-box__btns {
padding-right: 32px;
&.el-icon-warning {
color: #ffa900;
}
}
&:not(.normal) {
.el-button--primary {
color: #606266;
background: #fff;
border-color: #DCDFE6;
&:hover {
color: $--color-primary;
border-color: #efbdbb;
background-color: #fae9e8;
}
}
}
}
.el-dialog__wrapper {
.el-dialog {
border-radius: 4px;
.el-dialog__header {
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
.el-dialog__title {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
}
}
.el-dialog__footer {
padding: 10px 16px;
border-top: 1px solid rgba(0, 0, 0, 0.06);
.el-button {
padding-bottom: 20px;
font-size: 14px;
border-radius: 4px;
border-color: rgba(0, 0, 0, 0.15);
}
}
}
}
.el-tooltip__popper {
width: 300px;
}
.el-tooltip__popper.is-dark {
padding: 18px 20px;
color: #606266;
line-height: 1.8;
background-color: #fff;
border: .0625rem solid #ebeef5;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
.el-tooltip__popper[x-placement^="top"] {
.popper__arrow {
border-top-color: #fff;
color: #000;
line-height: 25px;
border-bottom: 1px solid #ddd;
&:after {
border-top-color: #fff;
}
}
}
@media(max-width: 1600px) {
.el-table {
.el-switch__label--right.is-active {
left: 8px;
}
}
}
.empty{
display: flex;
justify-content: center;
align-items: center;
padding: 50px 0;
text-align: center;
img{
width: 471px;
}
p{
margin-top: 40px;
font-size: 18px;
color: rgba(0, 0, 0, 0.25);
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 30px;
height: 2px;
background-color: #156CEB;
}
}

Binary file not shown.

@ -11,7 +11,7 @@ body,
body {
min-width: 1280px;
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
font-family: PingFang, PingFang SC, "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
font-size: 14px;
background: rgba(0, 0, 0, 0.02);
}
Loading…
Cancel
Save