<template>
|
<div class="grid">
|
<div class="title">
|
<span>网格分布</span>
|
<img src="../../../assets/img/zonlan (9).png" alt="" />
|
</div>
|
<div class="rollTitle">
|
<el-row>
|
<el-col :span="6">网格名称</el-col>
|
<el-col :span="6">所属街道</el-col>
|
<el-col :span="6">所属社区</el-col>
|
<el-col :span="6">所辖人员数</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="6" class="rollItem">{{ item.name }}</el-col>
|
<el-col :span="6" class="rollItem">{{ item.street }}</el-col>
|
<el-col :span="6" class="rollItem">{{ item.community }}</el-col>
|
<el-col :span="6" class="rollItem">{{ item.persons }}</el-col>
|
</el-row>
|
</li>
|
</ul>
|
</vue-seamless-scroll>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
//import引入的组件需要注入到对象中才能使用
|
components: {},
|
data() {
|
//这里存放数据
|
return {
|
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)
|
};
|
},
|
},
|
//方法集合
|
mounted() {
|
this.drawLine();
|
},
|
methods: {
|
async drawLine() {
|
const { data: dt } = await this.$http.get(
|
"/jeecg-boot/grid/grid/queryall"
|
);
|
this.tableData = dt.result;
|
},
|
},
|
created() {},
|
};
|
</script>
|
<style lang="less" scoped>
|
//@import url(); 引入公共css类
|
.grid {
|
height: calc(50vh - 158px);
|
overflow: hidden;
|
background: rgba(8, 32, 58, 0.7);
|
.title {
|
width: 100%;
|
position: relative;
|
img {
|
width: 100%;
|
}
|
span {
|
font-size: 78px;
|
font-weight: 400;
|
color: #ffe86b;
|
background: linear-gradient(0deg, #bce7ff 0%, #69efff 98.6572265625%);
|
-webkit-background-clip: text;
|
-webkit-text-fill-color: transparent;
|
position: absolute;
|
left: 50%;
|
top: 0;
|
transform: translateX(-50%);
|
}
|
}
|
.seamless-warp {
|
height: 100%;
|
overflow: hidden;
|
}
|
|
/* 标题头的设置 */
|
.rollTitle {
|
margin-top: 50px;
|
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:nth-child(even) {
|
background: #636363;
|
}
|
.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) {
|
.grid {
|
background: transparent;
|
.population {
|
height: 100%;
|
overflow: visible;
|
.seamless-warp {
|
height: 900px;
|
overflow: hidden;
|
}
|
}
|
.rollTitle {
|
// margin-top: 10px;
|
height: 300px !important;
|
line-height: 300px !important;
|
}
|
.seamless-warp ul li .el-row .el-col {
|
height: 300px !important;
|
line-height: 300px !important;
|
}
|
}
|
}
|
</style>
|