var vms = Vue.component("Company-amplify-xmspyj", { template: `
`, props: { businessdata:{ type:Object } }, data() { return { show:false, dayOffLineNum:0, monthOffLineNum:0, cellStyle:{ color:'#B6CFEF', fontSize:'24px', height:'64px', }, headerStyle:{ color:'#B6CFEF', fontSize:'18px', height:'64px' }, warningInterval:'', warningTableData:[ ], } }, mounted(){ console.log(this.businessdata) }, methods: { openAmplify(){ this.show = true //预警分析 // this.warningInterval = setInterval(this.warningScroll,50); }, closeAmplify(){ this.show = false }, closeAmplifyAll(e){ if(e.target.className == 'amplify-fixed'){ this.show = false } }, // 表格滚动 方法 --------- 开始 warningScroll(){ let maxHeight=this.$refs.warning.$el.querySelectorAll('.el-table__body')[0].offsetHeight; let clientHeight=this.$refs.warning.bodyWrapper.clientHeight; if(Math.abs(this.$refs.warning.bodyWrapper.scrollTop-(maxHeight-clientHeight))<5){ //预留5像素误差 this.$refs.warning.bodyWrapper.scrollTop=0; }else{ this.$refs.warning.bodyWrapper.scrollTop+= 1;//32是每一行表格的高度,每秒滚一行 } }, warningMouseEnter(){//鼠标移入停止滚动 clearInterval(this.warningInterval); }, warningMouseLeave(){//鼠标离开继续滚动 this.warningInterval=setInterval(this.warningScroll,30); }, // 表格滚动 方法 ------ 结束 }, watch:{ }, })