Commit 0fb1e3dc by zhangzhen

界面展示优化

parent 2aea91e6
......@@ -256,18 +256,21 @@
querySbNODate:[],
currentTime:dayjs().format("YYYY-MM-DD HH:mm:ss"),
lineOption1:'',
lineOption2:''
lineOption2:'',
timer: ''
};
},
mounted() {
this.getYesterdayDateFormatted();
setInterval(() => {
this.currentTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
}, 1000);
this.queryCompanyInfo();
this.initPage();
this.setOption();
this.setOption2();
this.getYesterdayDateFormatted();
this.initPage();
this.onSetInterval();
},
......
let timer1 = {}
const tableContentScroll = (el) => {
if (timer1[el]) {
clearInterval(timer1[el])
timer1[el] = null;
}
setTimeout(()=>{
let i = $("#" + el + ' .el-table__body-wrapper table');
let i2 = $("#" + el + ' .el-table__body-wrapper');
let a = 0;
let boxHeight = i.height();
let height = i2.height();
let num = boxHeight - height;
// console.log(boxHeight, height, num,"高度数据")
let run = () => {
if (num > 0) {
timer1[el] = setInterval(() => {
a = a + 0.07;
if (a >= num) {
a = 0
}
i2.scrollTop(a);
}, 10)
}
}
run()
i.on('mouseenter', () => {
clearInterval(timer1[el])
timer1[el] = null
i2.on('scroll',()=>{
a = i2.scrollTop();
})
})
i.on("mouseleave",()=>{
i2.off("scroll");
if(!timer1[el]){
run()
}
})
},50)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment