Browse Source

滚动

master
lucky 5 years ago
parent
commit
cd794526cc
  1. 2
      src/components/HeadNav/HeadNav.vue
  2. 213
      src/components/SettledEnterprise/SettledEnterprise.vue
  3. 2
      src/views/IncubationPlatform/Children/Partner.vue
  4. 22
      src/views/IncubationPlatform/Children/place/EntitySpace.vue
  5. 12
      src/views/IncubationPlatform/Children/place/VirtualSpace.vue
  6. 2
      src/views/NewPlatform/Children/Service.vue
  7. 2
      src/views/NewPlatform/components/HNav.vue

2
src/components/HeadNav/HeadNav.vue

@ -89,7 +89,7 @@ export default {
url: '/NewPlatform/News', url: '/NewPlatform/News',
}, },
{ {
title: '创新服务', title: '知识培训与科技人才服务平台',
url: '/NewPlatform/NewService', url: '/NewPlatform/NewService',
}, },
], ],

213
src/components/SettledEnterprise/SettledEnterprise.vue

@ -0,0 +1,213 @@
<template>
<div class="fast-box">
<div class="con-box" id="bobaodiv">
<div :key="0 +`${i}`" class="ent-box-div" v-for="(item, i) in lists">
<div class="ent-box">
<p class="ent-index">{{ i + 1 }}</p>
<span class="ent-name" style="margin-left: 50px">{{ item.company }}</span>
<span class="ent-mainBusiness" style="margin-left: 50px">{{ item.mainBusiness }}</span>
</div>
</div>
<div :key="j" class="ent-box-div" v-for="(item, j) in lists">
<div class="ent-box">
<p class="ent-index">{{ j + 1 }}</p>
<span class="ent-name" style="margin-left: 50px">{{ item.company }}</span>
<span class="ent-mainBusiness" style="margin-left: 50px">{{ item.mainBusiness }}</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'SettledEnterprise',
props: {
lists: {
type: Array,
default: () => [],
},
},
data() {
return {
height: '',
width: '',
liHeight: '',
dataList: [
{
a: '1.面部对侧',
b: '正常',
c: '0分',
},
{
a: '2.上肢',
b: '中度无力',
c: '1分',
},
{
a: '3.语言运动',
b: '正常',
c: '0分',
},
{
a: '4.语言感觉',
b: '异常',
c: '1分',
},
{
a: '5.眼球凝视',
b: '一测活动困难',
c: '1分',
},
],
oMarquee: null, //
BBLineH: null,
BBScrollAmount: 1,
BBLineCount: 5,
rollRestTime: 500,
rollTime: 10,
};
},
mounted() {
this.BBLineH = document.getElementsByClassName('fast-box')[0].offsetHeight * 0.166;
this.scrollBox();
},
methods: {
scrollBox() {
/*
* 启动播报滚动事件
*/
const that = this;
window.onload = function() {
// BBAllTime = 0;
that.oMarquee = document.getElementById('bobaodiv'); //
window.setTimeout(function() {
that.run();
}, that.rollRestTime);
};
},
/*
* 播报滚动事件主逻辑
*/
run() {
const that = this;
if (that.BBScrollAmount == 0) {
//0
window.setTimeout(function() {
that.run();
}, that.rollTime);
return;
}
if (that.oMarquee.scrollTop >= that.BBLineCount * that.BBLineH) {
//
that.oMarquee.scrollTop = 0;
}
that.oMarquee.scrollTop += that.BBScrollAmount;
if (that.oMarquee.scrollTop % that.BBLineH < 1 && that.oMarquee.scrollTop > 0) {
window.setTimeout(function() {
that.run();
}, that.rollRestTime);
} else {
window.setTimeout(function() {
that.run();
}, that.rollTime);
}
},
},
};
</script>
<style lang="stylus" scoped>
.ent-box-div {
width: 100%;
margin-right: 11%;
position: relative;
height: 76px;
}
.ent-box {
width: 100%;
// margin-right: 11%;
position: relative;
height: 56px;
line-height: 56px;
padding: 0 14px;
background: #FFFFFF;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
opacity: 1;
// margin-bottom: 20px;
}
.ent-index {
width: 28px;
position: absolute;
top: 14px;
line-height: 28px;
text-align: center;
font-size: 20px;
font-family: Segoe UI;
color: #FFFFFF;
height: 28px;
border-radius: 50%;
background: #13ACC4;
margin-bottom: 0;
}
.ent-name {
position: absolute;
left: 0;
width: 30%;
height: 24px;
top: 50%;
margin-top: -12px;
font-size: 22px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 24px;
color: rgba(0, 0, 0, 0.65);
opacity: 1;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.ent-mainBusiness {
position: absolute;
left: 35%;
width: 20%;
height: 24px;
top: 50%;
margin-top: -12px;
font-size: 22px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 24px;
color: rgba(0, 0, 0, 0.65);
opacity: 1;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.fast-box {
position: relative;
height: 456px;
}
.con-box {
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
div {
justify-content: center;
align-items: center;
}
}
</style>

2
src/views/IncubationPlatform/Children/Partner.vue

@ -27,7 +27,7 @@ export default {
typeOfPlatform: '孵化平台', typeOfPlatform: '孵化平台',
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '孵化平台', url: '/IncubationPlatform/MakerSpace' },
{ name: '合作伙伴', url: '' }, { name: '第三方专业机构', url: '' },
], ],
}; };
}, },

22
src/views/IncubationPlatform/Children/place/EntitySpace.vue

@ -95,27 +95,15 @@
<div style="margin-left: 40px">入驻企业名录</div> <div style="margin-left: 40px">入驻企业名录</div>
</div> </div>
<div class="center-content"> <div class="center-content">
<div :key="index" class="ent-box" v-for="(item, index) in lists"> <settled-enterprise :lists="lists" />
<!-- <div :key="index" class="ent-box" v-for="(item, index) in lists">
<p class="ent-index">{{ index + 1 }}</p> <p class="ent-index">{{ index + 1 }}</p>
<span class="ent-name" style="margin-left: 50px">{{ item.company }}</span> <span class="ent-name" style="margin-left: 50px">{{ item.company }}</span>
<span class="ent-mainBusiness" style="margin-left: 50px">{{ item.mainBusiness }}</span> <span class="ent-mainBusiness" style="margin-left: 50px">{{ item.mainBusiness }}</span>
</div>
</div>
<!-- <div class="reg-box">
<settled-model style="float: left" :type-num="1" />
<a-pagination
:current="current"
:page-size="pageSize"
:total="lists.length"
@change="onShowSizeChange"
class="pagination"
show-less-items
show-quick-jumper
v-show="lists.length > 18"
/>
</div>--> </div>-->
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
@ -124,10 +112,12 @@ import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import AddModel from './../../components/AddModel.vue'; import AddModel from './../../components/AddModel.vue';
import SettledModel from 'components/Introduce/SettledModel.vue'; import SettledModel from 'components/Introduce/SettledModel.vue';
import Banner from 'components/Banner/Banner.vue'; import Banner from 'components/Banner/Banner.vue';
import SettledEnterprise from 'components/SettledEnterprise/SettledEnterprise.vue';
import { searchEnt } from 'config/api'; import { searchEnt } from 'config/api';
export default { export default {
name: 'EntitySpace', name: 'EntitySpace',
components: { HNav, BreadCrumb, AddModel, SettledModel, Banner }, components: { HNav, BreadCrumb, AddModel, SettledModel, Banner, SettledEnterprise },
data() { data() {
return { return {
title: '实体众创空间', title: '实体众创空间',

12
src/views/IncubationPlatform/Children/place/VirtualSpace.vue

@ -7,7 +7,7 @@
<div class="top-box"> <div class="top-box">
<banner :show-page="48" /> <banner :show-page="48" />
<add-model :value="3" class="add-mol" style="height: 32px" /> <add-model :value="3" class="add-mol" style="height: 32px" />
<settled-model class="set-mol" :type-num="0" /> <settled-model :type-num="0" class="set-mol" />
</div> </div>
<!-- <div class="center-box"> <!-- <div class="center-box">
<div class="center-title"> <div class="center-title">
@ -34,18 +34,19 @@
</div> </div>
</div> </div>
<add-model :value="3" class="center-btn" style="height: 32px" /> <add-model :value="3" class="center-btn" style="height: 32px" />
</div> --> </div>-->
<div class="center-box c-box" style="margin-bottom: 160px"> <div class="center-box c-box" style="margin-bottom: 160px">
<div class="center-title"> <div class="center-title">
<div class="circular"></div> <div class="circular"></div>
<div style="margin-left: 40px">入驻企业名录</div> <div style="margin-left: 40px">入驻企业名录</div>
</div> </div>
<div class="center-content"> <div class="center-content">
<div :key="index" class="ent-box" v-for="(item, index) in lists"> <settled-enterprise :lists="lists" />
<!-- <div :key="index" class="ent-box" v-for="(item, index) in lists">
<p class="ent-index">{{ index + 1 }}</p> <p class="ent-index">{{ index + 1 }}</p>
<span class="ent-name" style="margin-left: 50px">{{ item.company }}</span> <span class="ent-name" style="margin-left: 50px">{{ item.company }}</span>
<span class="ent-mainBusiness" style="margin-left: 50px">{{ item.mainBusiness }}</span> <span class="ent-mainBusiness" style="margin-left: 50px">{{ item.mainBusiness }}</span>
</div> </div>-->
</div> </div>
</div> </div>
</div> </div>
@ -58,10 +59,11 @@ import AddModel from './../../components/AddModel.vue';
import SettledModel from 'components/Introduce/SettledModel.vue'; import SettledModel from 'components/Introduce/SettledModel.vue';
import Banner from 'components/Banner/Banner.vue'; import Banner from 'components/Banner/Banner.vue';
import { searchEnt } from 'config/api'; import { searchEnt } from 'config/api';
import SettledEnterprise from 'components/SettledEnterprise/SettledEnterprise.vue';
export default { export default {
name: 'VirtualSpace', name: 'VirtualSpace',
components: { HNav, BreadCrumb, AddModel, SettledModel, Banner }, components: { HNav, BreadCrumb, AddModel, SettledModel, Banner, SettledEnterprise },
data() { data() {
return { return {
title: '虚拟众创空间', title: '虚拟众创空间',

2
src/views/NewPlatform/Children/Service.vue

@ -47,7 +47,7 @@ export default {
typeOfPlatform: '创新平台', typeOfPlatform: '创新平台',
arr: [ arr: [
{ name: '创新平台', url: '/NewPlatform/NewCore' }, { name: '创新平台', url: '/NewPlatform/NewCore' },
{ name: '创新服务', url: '/NewPlatform/NewService' }, { name: '知识培训与科技人才服务平台', url: '/NewPlatform/NewService' },
], ],
showPage: 33, showPage: 33,
list: [], list: [],

2
src/views/NewPlatform/components/HNav.vue

@ -26,7 +26,7 @@ export default {
url: '/NewPlatform/News', url: '/NewPlatform/News',
}, },
{ {
title: '创新服务', title: '知识培训与科技人才服务平台',
url: '/NewPlatform/NewService', url: '/NewPlatform/NewService',
}, },
], ],

Loading…
Cancel
Save