<template>
|
<div class="evaluate">
|
<div class="title">
|
<span>公共信用</span>
|
<img src="../../../assets/img/zonlan (9).png" alt="" />
|
</div>
|
<div class="content">
|
<table class="table_main">
|
<thead class="zindex">
|
<tr>
|
<th class="coll1">内容发布</th>
|
</tr>
|
</thead>
|
<tbody :class="{ anim: animate == true, hei: isLenght === true }">
|
<tr v-for="(item, index) in tableData" :key="index">
|
<td class="coll1" :title="item.id">{{ item.id }}</td>
|
<td class="coll2" :title="item.name">{{ item.name }}</td>
|
<td class="coll3" :title="item.time">
|
{{ item.time }}
|
</td>
|
</tr>
|
</tbody>
|
</table>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
//import引入的组件需要注入到对象中才能使用
|
components: {},
|
data() {
|
//这里存放数据
|
return {
|
timer: "",
|
animate: false,
|
tableData: [],
|
endId: "",
|
isLenght: false,
|
};
|
},
|
|
//方法集合
|
methods: {
|
async getList() {
|
const { data: dt } = await this.$http.get(
|
"/jeecg-boot/public_credit/publicCredit/queryall"
|
);
|
|
this.tableData = dt.result;
|
this.endId = this.tableData[this.tableData.length - 1].id;
|
if (this.tableData.length > 10) {
|
this.isLenght = true;
|
this.timer = setInterval(this.scroll, 5000);
|
} else {
|
this.isLenght = false;
|
clearInterval(this.timer);
|
}
|
},
|
|
scroll() {
|
this.animate = true;
|
setTimeout(() => {
|
this.tableData.push(this.tableData[0]);
|
this.tableData.shift();
|
this.animate = false;
|
if (this.tableData[0].id === this.endId) {
|
// console.log('请求刷新数据')
|
this.getList();
|
clearInterval(this.timer);
|
}
|
}, 500);
|
},
|
},
|
created() {
|
//this.getList()
|
},
|
mounted() {
|
this.getList();
|
},
|
};
|
</script>
|
<style lang="less" scoped>
|
//@import url(); 引入公共css类
|
.evaluate {
|
height: 49%;
|
width: 100%;
|
background: rgba(8, 32, 58, 0.7);
|
padding: 10px;
|
.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%);
|
}
|
}
|
}
|
|
.content {
|
width: 100%;
|
height: 90%;
|
padding: 10px;
|
overflow: hidden;
|
margin-top: 20px;
|
table {
|
text-align: center;
|
border: none;
|
width: 100%;
|
height: 90%;
|
|
tbody tr:nth-of-type(odd) {
|
background-color: #202e3b;
|
}
|
|
tbody tr:nth-of-type(even) {
|
background-color: #08213c;
|
}
|
}
|
}
|
|
.table_main {
|
height: 110%;
|
overflow: hidden;
|
width: 100%;
|
text-align: center;
|
border: 1px solid #86c7ff;
|
color: #fff;
|
position: relative;
|
}
|
|
.table_main tr {
|
height: 10%;
|
line-height: 10%;
|
}
|
|
.table_main thead {
|
background-color: #054b75;
|
width: 100%;
|
height: 80px;
|
font-size: 30px;
|
display: table;
|
table-layout: fixed;
|
box-sizing: border-box;
|
}
|
|
.zindex {
|
height: 10%;
|
position: absolute;
|
top: 0;
|
left: 0;
|
z-index: 99;
|
/* background: #06067a; */
|
background: #10107a;
|
border: none;
|
border: solid 1px #10107a;
|
}
|
|
.zindex tr th {
|
border: none;
|
}
|
|
.table_main thead th {
|
height: 124px;
|
font-weight: 300;
|
table-layout: fixed;
|
box-sizing: border-box;
|
}
|
|
.table_main tbody.hei {
|
height: 120%;
|
}
|
|
.table_main tbody {
|
padding-top: 80px;
|
display: block;
|
width: 100%;
|
/* height: 352px; */
|
/* 隐藏滚动条兼容 */
|
-ms-scroll-chaining: chained;
|
-ms-content-zooming: zoom;
|
-ms-scroll-rails: none;
|
-ms-content-zoom-limit-min: 100%;
|
-ms-content-zoom-limit-max: 500%;
|
/* -ms-scroll-snap-type: proximity; */
|
-ms-scroll-snap-points-x: snapList(100%, 200%, 300%, 400%, 500%);
|
-ms-overflow-style: none;
|
overflow-y: scroll;
|
/* 火狐 */
|
scrollbar-width: none;
|
/* ie */
|
-ms-overflow-style: none;
|
}
|
|
.table_main tbody::-webkit-scrollbar {
|
display: none;
|
}
|
|
.table_main tbody tr {
|
height: 120px;
|
display: table;
|
table-layout: fixed;
|
width: 100%;
|
}
|
|
.table_main tbody tr td {
|
color: #848b91;
|
font-size: 38px;
|
vertical-align: middle;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
border: none;
|
}
|
|
.content .coll1 {
|
text-align: left;
|
height: 80px;
|
width: 1%;
|
}
|
|
.content .coll2 {
|
width: 80%;
|
}
|
|
.content .coll3 {
|
width: 19%;
|
}
|
.anim {
|
transition: all 0.5s;
|
margin-top: -10%;
|
}
|
@media only screen and (max-width: 2560px) {
|
.evaluate {
|
overflow: visible;
|
height: auto;
|
background: transparent;
|
.content {
|
height: 5000px;
|
.coll1 {
|
height: 200px;
|
}
|
.table_main tr {
|
height: 150px;
|
line-height: 150px;
|
}
|
}
|
.table_main tbody {
|
padding-top: 180px;
|
}
|
}
|
}
|
</style>
|