<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>
|
<tr>
|
<th class="coll1">序号</th>
|
<th class="coll2">出货单号</th>
|
<th class="coll3">货主</th>
|
<th class="coll4">应收账款(元)</th>
|
<th class="coll5">结算状态</th>
|
<th class="coll6">交易类型</th>
|
<th class="coll7">出货时间</th>
|
<th class="coll8">结算时间</th>
|
<th class="coll9">品种</th>
|
<th class="coll10">品质</th>
|
<th class="coll11">出货重量(斤)</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.shipmentno">
|
{{ item.shipmentno }}
|
</td>
|
<td class="coll3" :title="item.ownername">{{ item.ownername }}</td>
|
<td class="coll4" :title="item.ysmoney">{{ item.ysmoney }}</td>
|
<td class="coll5">
|
<button>{{ item.status }}</button>
|
</td>
|
<td class="coll6">
|
<button>{{ item.dealtype }}</button>
|
</td>
|
<td class="coll7" :title="item.createtime">
|
{{ item.createtime }}
|
</td>
|
<td class="coll8" :title="item.repaydate">{{ item.repaydate }}</td>
|
<td class="coll9" :title="item.varietyname">
|
{{ item.varietyname }}
|
</td>
|
<td class="coll10" :title="item.qualityname">
|
{{ item.qualityname }}
|
</td>
|
<td class="coll11" :title="item.chweight">{{ item.chweight }}</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/owner_trading/ownerTrading/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: 45%;
|
margin-top: 5%;
|
width: 100%;
|
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%);
|
}
|
}
|
}
|
|
.content {
|
width: 100%;
|
height: 90%;
|
padding: 10px;
|
overflow: hidden;
|
margin-top: 20px;
|
table {
|
text-align: center;
|
border: none;
|
width: 100%;
|
height: 88%;
|
tbody tr:nth-of-type(odd) {
|
background-color: #202e3b;
|
}
|
tbody tr:nth-of-type(even) {
|
background-color: #08213c;
|
}
|
}
|
}
|
|
.table_main {
|
width: 100%;
|
|
text-align: center;
|
border: 1px solid #86c7ff;
|
color: #fff;
|
position: relative;
|
}
|
|
.table_main tr {
|
line-height: 10%;
|
}
|
|
.table_main thead {
|
background-color: #054b75;
|
width: 100%;
|
font-size: 30px;
|
display: table;
|
table-layout: fixed;
|
box-sizing: border-box;
|
}
|
|
.zindex {
|
position: absolute;
|
top: 0;
|
left: 0;
|
z-index: 99;
|
/* background: #06067a; */
|
background: #10107a;
|
border: none;
|
}
|
|
.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: 100%;
|
}
|
|
.table_main tbody {
|
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 {
|
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 {
|
height: 60px;
|
width: 8%;
|
}
|
.content .coll2 {
|
width: 8%;
|
}
|
.content .coll3 {
|
width: 8%;
|
}
|
.content .coll4 {
|
width: 8%;
|
}
|
.content .coll5 {
|
width: 8%;
|
button {
|
font-size: 30px;
|
border: none;
|
background-color: #ff7200;
|
width: 80%;
|
margin-left: 20%;
|
height: 90%;
|
text-align: center;
|
color: #ffffff;
|
border-radius: 10px;
|
}
|
}
|
.content .coll6 {
|
width: 8%;
|
button {
|
font-size: 30px;
|
border: none;
|
background-color: #00a0e9;
|
width: 80%;
|
margin-left: 20%;
|
height: 90%;
|
text-align: center;
|
color: #ffffff;
|
border-radius: 10px;
|
}
|
}
|
.content .coll7 {
|
width: 8%;
|
}
|
.content .coll8 {
|
width: 8%;
|
}
|
.content .coll9 {
|
width: 8%;
|
}
|
.content .coll10 {
|
width: 8%;
|
}
|
.content .coll11 {
|
width: 8%;
|
}
|
.content .coll12 {
|
width: 8%;
|
.cz,
|
.update {
|
text-align: center;
|
font-size: 20px;
|
border: none;
|
width: 40%;
|
|
height: 90%;
|
text-align: center;
|
color: #ffffff;
|
border-radius: 10px;
|
}
|
.cz {
|
background-color: #00784c;
|
}
|
.update {
|
background-color: #00a0e9;
|
}
|
}
|
|
.anim {
|
transition: all 2s;
|
margin-top: -32px;
|
}
|
@media only screen and (max-width: 2560px) {
|
.evaluate {
|
overflow: visible;
|
height: 49%;
|
background: transparent;
|
margin-top: 4%;
|
.content {
|
height: 100%;
|
.coll1 {
|
height: 200px;
|
}
|
.table_main tr {
|
height: 150px;
|
line-height: 150px;
|
}
|
}
|
}
|
}
|
</style>
|