<template>
|
<div class="population" style="background: rgba(8, 32, 58, 0.7)">
|
<p class="message">本月统筹情况</p>
|
<div class="rollTitle">
|
<el-row>
|
<el-col :span="4">序号</el-col>
|
<el-col :span="5">时间</el-col>
|
<el-col :span="5">名称</el-col>
|
<el-col :span="5">数据量</el-col>
|
<el-col :span="5">状态</el-col>
|
</el-row>
|
</div>
|
<vue-seamless-scroll
|
:data="tableData"
|
class="seamless-warp"
|
:class-option="defaultOption"
|
>
|
<ul>
|
<li v-for="(item, index) in tableData" :key="index">
|
<el-row class="click_box">
|
<el-col :span="4" class="rollItem_id">{{ index + 1 }}</el-col>
|
|
<el-col :span="5" class="rollItem">{{ item.NY }}</el-col>
|
<el-col :span="5" class="rollItem">{{ item.NAME }}</el-col>
|
<el-col :span="5" class="rollItem">{{
|
item.ALL_SIZE == undefined ? "0条" : `${item.ALL_SIZE}条`
|
}}</el-col>
|
<el-col :span="5" class="rollItem">{{ item.STATUS }}</el-col>
|
</el-row>
|
</li>
|
</ul>
|
</vue-seamless-scroll>
|
</div>
|
</template>
|
|
<script>
|
import { constructionData } from "../../../utils/api.js";
|
export default {
|
//import引入的组件需要注入到对象中才能使用
|
components: {},
|
data() {
|
//这里存放数据
|
return {
|
param: {
|
TYPE: 4,
|
},
|
tableData: [],
|
};
|
},
|
computed: {
|
defaultOption() {
|
return {
|
step: 0.2, // 数值越大速度滚动越快
|
limitMoveNum: 2, // 开始无缝滚动的数据量 this.dataList.length
|
hoverStop: true, // 是否开启鼠标悬停stop
|
direction: 1, // 0向下 1向上 2向左 3向右
|
openWatch: true, // 开启数据实时监控刷新dom
|
singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
|
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
|
};
|
},
|
},
|
//方法集合
|
methods: {
|
async construction() {
|
let { data: dt } = await constructionData(this.param);
|
if (dt.errno !== 200) {
|
return this.$message.error(dt.errmsg);
|
}
|
this.tableData = dt.pd.varList;
|
},
|
},
|
created() {
|
this.construction();
|
},
|
};
|
</script>
|
<style lang="less" scoped>
|
//@import url(); 引入公共css类
|
.population {
|
overflow: hidden;
|
width: 100%;
|
height: 25%;
|
box-sizing: border-box;
|
.message {
|
font-size: 60px;
|
font-weight: 400;
|
color: #ffffff;
|
text-align: center;
|
padding-top: 25px;
|
padding-bottom: 40px;
|
}
|
.seamless-warp {
|
height: 300px;
|
overflow: hidden;
|
}
|
|
/* 标题头的设置 */
|
.rollTitle {
|
// margin-top: 10px;
|
height: 70px;
|
line-height: 70px !important;
|
color: #fff !important;
|
font-size: 26px !important;
|
background: #054b75;
|
// opacity: 0.27;
|
}
|
/* 标题中文字居中 */
|
.rollTitle .el-col {
|
text-align: center !important;
|
color: #fff;
|
}
|
/* 滚动项的字体大小 */
|
.rollItem {
|
font-size: 30px !important;
|
color: #fff;
|
}
|
.rollItem_id {
|
font-family: dig;
|
font-size: 12px;
|
font-weight: 300;
|
color: #fff;
|
}
|
/* 去除ul的左内边距 */
|
.seamless-warp ul {
|
padding: 0 !important;
|
margin: 0 !important;
|
}
|
/* 去除li的小点 */
|
.seamless-warp ul li {
|
list-style-type: none !important;
|
border-bottom: 1px solid white;
|
}
|
.seamless-warp ul li:hover {
|
background-color: rgba(0, 162, 255, 0.3);
|
cursor: pointer;
|
}
|
/* 每行数据的样式调整 */
|
.seamless-warp ul li .el-row .el-col {
|
text-align: center !important;
|
height: 70px !important;
|
line-height: 70px !important;
|
}
|
}
|
|
@media only screen and (max-width: 2560px) {
|
.population {
|
height: auto;
|
overflow: visible;
|
.seamless-warp {
|
height: 900px;
|
overflow: hidden;
|
}
|
.rollTitle {
|
// margin-top: 10px;
|
height: 210px;
|
line-height: 210px !important;
|
}
|
.seamless-warp ul li .el-row .el-col {
|
height: 210px !important;
|
line-height: 210px !important;
|
}
|
}
|
}
|
</style>
|