深圳或然科技官网后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

229 lines
5.8 KiB

<template>
<div class="wrap">
<div class="actions">
<p class="page-name">页面设置/装置介绍-实验站</p>
<div>
<el-button type="primary"
@click="preview">预览</el-button>
<el-button @click="save(0)">保存为草稿</el-button>
<el-button type="primary"
@click="save(1)">发布</el-button>
<el-button @click="back">放弃编辑</el-button>
</div>
</div>
<div class="modules">
<div class="relative">
<el-carousel height="480px"
:indicator-position="modules[0].list.filter(e => e.isEnable).length > 1 ? '' : 'none'">
<template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable"
:key="i">
<img width="100%"
height="100%"
:src="item.pic"
alt="">
</el-carousel-item>
</template>
</el-carousel>
<div class="cover"
@click="toSet(0)">点击更换banner与链接</div>
</div>
<div class="block station">
<div class="inner c-wrap">
<h6 v-html="modules[1].form.title"></h6>
<p class="en">{{ modules[1].form.subTitle }}</p>
<template v-if="modules[1].form.pic">
<video v-if="Util.isVideo(modules[1].form.mediaType)"
class="pic"
ref="video"
autoplay
controls
loop>
<source :src="modules[1].form.pic"
type="video/mp4">
您的浏览器不支持 video 标签。
</video>
<img v-else
class="pic"
:src="modules[1].form.pic"
alt="">
</template>
<div class="des"
v-html="modules[1].form.des"></div>
<div class="cover"
@click="toSet(1)">点击更改图片与概述</div>
</div>
</div>
<ul class="list">
<li class="item1">
<img src="@/assets/images/exp/2.png"
alt="">
<h6>{{ modules[2].form.title }}</h6>
<div class="cover"
@click="toSet(2)">点击更改标题与链接</div>
</li>
<li class="item2">
<img src="@/assets/images/exp/3.png"
alt="">
<h6>{{ modules[3].form.title }}</h6>
<div class="cover"
@click="toSet(3)">点击更改标题与链接</div>
</li>
<li class="item3">
<img src="@/assets/images/exp/4.png"
alt="">
<h6>{{ modules[4].form.title }}</h6>
<div class="cover"
@click="toSet(4)">点击更改标题与链接</div>
</li>
<li class="item4">
<img src="@/assets/images/exp/5.png"
alt="">
<h6>{{ modules[5].form.title }}</h6>
<div class="cover"
@click="toSet(5)">点击更改标题与链接</div>
</li>
<li class="item5">
<img src="@/assets/images/exp/6.png"
alt="">
<h6>{{ modules[6].form.title }}</h6>
<div class="cover"
@click="toSet(6)">点击更改标题与链接</div>
</li>
<li class="item6">
<img src="@/assets/images/exp/7.png"
alt="">
<h6>{{ modules[7].form.title }}</h6>
<div class="cover"
@click="toSet(7)">点击更改标题与链接</div>
</li>
</ul>
</div>
<Module ref="module"
:data.sync="curData"
:visible.sync="diaVisible"
@moduleSubmit="moduleSubmit" />
</div>
</template>
<script>
import mixins from '@/mixins/page'
import Modules from '@/const/modules'
import Util from '@/libs/util'
export default {
mixins: [mixins],
data () {
return {
modules: Modules.exp,
Util
}
},
computed: {
isVideo () {
const { pic } = this.modules[1].form
const ext = pic.substr(pic.lastIndexOf('.') + 1)
console.log(33, pic)
return Util.isVideo(ext)
}
},
mounted () {
this.$store.commit('user/setCrumbs', [
{
name: '站点管理',
route: '/site'
},
{
name: '内容管理',
route: '/column'
},
{
name: '栏目管理',
route: '/column'
},
{
name: '装置介绍-实验站'
}
])
},
methods: {
}
};
</script>
<style lang="scss" scoped>
@import '../../../styles/page/page.scss';
.station {
.inner {
width: 1200px;
}
h6 {
position: relative;
font-size: 48px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 1;
}
.en {
margin-bottom: 20px;
font-size: 45px;
font-family: AppleSystemUIFont;
color: #e4e4e4;
line-height: 1;
}
.pic {
width: 100%;
height: 604px;
}
.des {
margin-top: 55px;
font-size: 18px;
color: #333;
line-height: 34px;
overflow: visible;
}
}
.list {
display: flex;
flex-wrap: wrap;
margin-top: 30px;
li {
position: relative;
height: 542px;
}
img {
width: 100%;
height: 100%;
}
h6 {
position: absolute;
top: 192px;
left: 60px;
font-size: 30px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
}
.item1,
.item2 {
width: 25%;
}
.item3 {
width: 50%;
}
.item4 {
width: 40%;
}
.item5 {
width: 32%;
}
.item6 {
width: 28%;
}
}
</style>